summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/megadrive
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
commitddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch)
treea70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/devices/bus/megadrive
parent333bff8de64dfaeb98134000412796b4fdef970b (diff)
NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
Diffstat (limited to 'src/devices/bus/megadrive')
-rw-r--r--src/devices/bus/megadrive/eeprom.cpp30
-rw-r--r--src/devices/bus/megadrive/eeprom.h48
-rw-r--r--src/devices/bus/megadrive/ggenie.cpp2
-rw-r--r--src/devices/bus/megadrive/ggenie.h8
-rw-r--r--src/devices/bus/megadrive/jcart.cpp14
-rw-r--r--src/devices/bus/megadrive/jcart.h16
-rw-r--r--src/devices/bus/megadrive/md_slot.cpp50
-rw-r--r--src/devices/bus/megadrive/md_slot.h34
-rw-r--r--src/devices/bus/megadrive/rom.cpp80
-rw-r--r--src/devices/bus/megadrive/rom.h108
-rw-r--r--src/devices/bus/megadrive/sk.cpp4
-rw-r--r--src/devices/bus/megadrive/sk.h4
-rw-r--r--src/devices/bus/megadrive/stm95.cpp12
-rw-r--r--src/devices/bus/megadrive/stm95.h10
-rw-r--r--src/devices/bus/megadrive/svp.cpp64
-rw-r--r--src/devices/bus/megadrive/svp.h22
16 files changed, 253 insertions, 253 deletions
diff --git a/src/devices/bus/megadrive/eeprom.cpp b/src/devices/bus/megadrive/eeprom.cpp
index 016a17507eb..49132e537e4 100644
--- a/src/devices/bus/megadrive/eeprom.cpp
+++ b/src/devices/bus/megadrive/eeprom.cpp
@@ -60,46 +60,46 @@ const device_type MD_EEPROM_NHLPA = &device_creator<md_eeprom_nhlpa_device>;
const device_type MD_EEPROM_BLARA = &device_creator<md_eeprom_blara_device>;
-md_std_eeprom_device::md_std_eeprom_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)
+md_std_eeprom_device::md_std_eeprom_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_md_cart_interface( mconfig, *this ),
m_i2cmem(*this, "i2cmem"), m_i2c_mem(0), m_i2c_clk(0)
{
}
-md_std_eeprom_device::md_std_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_std_eeprom_device::md_std_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MD_STD_EEPROM, "MD Standard cart + EEPROM", tag, owner, clock, "md_std_eeprom", __FILE__),
device_md_cart_interface( mconfig, *this ),
m_i2cmem(*this, "i2cmem"), m_i2c_mem(0), m_i2c_clk(0)
{
}
-md_eeprom_nbajam_device::md_eeprom_nbajam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_eeprom_nbajam_device::md_eeprom_nbajam_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_eeprom_device(mconfig, MD_EEPROM_NBAJAM, "MD NBA Jam", tag, owner, clock, "md_eeprom_nbajam", __FILE__)
{
}
-md_eeprom_nbajamte_device::md_eeprom_nbajamte_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_eeprom_nbajamte_device::md_eeprom_nbajamte_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_eeprom_device(mconfig, MD_EEPROM_NBAJAMTE, "MD NBA Jam TE (and a few more)", tag, owner, clock, "md_eeprom_nbajamte", __FILE__)
{
}
-md_eeprom_cslam_device::md_eeprom_cslam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_eeprom_cslam_device::md_eeprom_cslam_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_eeprom_device(mconfig, MD_EEPROM_CSLAM, "MD College Slam", tag, owner, clock, "md_eeprom_cslam", __FILE__)
{
}
-md_eeprom_nflqb_device::md_eeprom_nflqb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_eeprom_nflqb_device::md_eeprom_nflqb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_eeprom_device(mconfig, MD_EEPROM_NFLQB, "MD NFL Quarterback 96", tag, owner, clock, "md_eeprom_nflqb", __FILE__)
{
}
-md_eeprom_nhlpa_device::md_eeprom_nhlpa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_eeprom_nhlpa_device::md_eeprom_nhlpa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_eeprom_device(mconfig, MD_EEPROM_NHLPA, "MD NHLPA 93", tag, owner, clock, "md_eeprom_nhlpa", __FILE__)
{
}
-md_eeprom_blara_device::md_eeprom_blara_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_eeprom_blara_device::md_eeprom_blara_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_eeprom_device(mconfig, MD_EEPROM_BLARA, "MD Brian Lara", tag, owner, clock, "md_eeprom_blara", __FILE__)
{
}
@@ -380,7 +380,7 @@ WRITE16_MEMBER(md_eeprom_blara_device::write)
const device_type MD_EEPROM_NBAJAM_ALT = &device_creator<md_eeprom_nbajam_device_alt>;
-md_eeprom_nbajam_device_alt::md_eeprom_nbajam_device_alt(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_eeprom_nbajam_device_alt::md_eeprom_nbajam_device_alt(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_eeprom_device(mconfig, MD_EEPROM_NBAJAM_ALT, "MD NBA Jam (Alt)", tag, owner, clock, "md_eeprom_nbajama", __FILE__)
{
}
@@ -555,8 +555,8 @@ void md_eeprom_nbajam_device_alt::eeprom_i2c_update(void)
m_eeprom_byte = ((m_eeprom_byte << 1) | m_eeprom_sda) & 0xff;
else
{
- UINT8 *nvram = (UINT8 *)&m_nvram[0];
- UINT16 sram_address = m_eeprom_slave_mask | (m_eeprom_devsel * 0x100) | m_eeprom_word_address;
+ uint8_t *nvram = (uint8_t *)&m_nvram[0];
+ uint16_t sram_address = m_eeprom_slave_mask | (m_eeprom_devsel * 0x100) | m_eeprom_word_address;
nvram[sram_address & 0xffff] = m_eeprom_byte;
m_eeprom_byte = 0;
@@ -574,17 +574,17 @@ void md_eeprom_nbajam_device_alt::eeprom_i2c_update(void)
//printf("Write line : status %d SDA %x SCL %x (count %d)\n", m_eeprom_cur_state, m_eeprom_sda, m_eeprom_scl, m_eeprom_cnt);
}
-UINT8 md_eeprom_nbajam_device_alt::eeprom_i2c_out()
+uint8_t md_eeprom_nbajam_device_alt::eeprom_i2c_out()
{
- UINT8 res = m_eeprom_sda;
+ uint8_t res = m_eeprom_sda;
switch (m_eeprom_cur_state)
{
case STATE_I2C_READ_DATA:
if (m_eeprom_cnt < 9)
{
- UINT8 *nvram = (UINT8 *)&m_nvram[0];
- UINT16 sram_address = m_eeprom_slave_mask | (m_eeprom_devsel * 0x100) | m_eeprom_word_address;
+ uint8_t *nvram = (uint8_t *)&m_nvram[0];
+ uint16_t sram_address = m_eeprom_slave_mask | (m_eeprom_devsel * 0x100) | m_eeprom_word_address;
sram_address &= 0xffff;
res = (nvram[sram_address] >> (8 - m_eeprom_cnt)) & 1;
diff --git a/src/devices/bus/megadrive/eeprom.h b/src/devices/bus/megadrive/eeprom.h
index f3582a49cba..a99766a8681 100644
--- a/src/devices/bus/megadrive/eeprom.h
+++ b/src/devices/bus/megadrive/eeprom.h
@@ -18,8 +18,8 @@ class md_std_eeprom_device : public device_t,
{
public:
// construction/destruction
- md_std_eeprom_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);
- md_std_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_std_eeprom_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);
+ md_std_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -31,7 +31,7 @@ public:
virtual DECLARE_WRITE16_MEMBER(write) override;
required_device<i2cmem_device> m_i2cmem;
- UINT8 m_i2c_mem, m_i2c_clk;
+ uint8_t m_i2c_mem, m_i2c_clk;
};
// ======================> md_eeprom_nbajam_device
@@ -40,7 +40,7 @@ class md_eeprom_nbajam_device : public md_std_eeprom_device
{
public:
// construction/destruction
- md_eeprom_nbajam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_eeprom_nbajam_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -56,7 +56,7 @@ class md_eeprom_nbajamte_device : public md_std_eeprom_device
{
public:
// construction/destruction
- md_eeprom_nbajamte_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_eeprom_nbajamte_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -72,7 +72,7 @@ class md_eeprom_cslam_device : public md_std_eeprom_device
{
public:
// construction/destruction
- md_eeprom_cslam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_eeprom_cslam_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -88,7 +88,7 @@ class md_eeprom_nflqb_device : public md_std_eeprom_device
{
public:
// construction/destruction
- md_eeprom_nflqb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_eeprom_nflqb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -104,7 +104,7 @@ class md_eeprom_nhlpa_device : public md_std_eeprom_device
{
public:
// construction/destruction
- md_eeprom_nhlpa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_eeprom_nhlpa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -120,7 +120,7 @@ class md_eeprom_blara_device : public md_std_eeprom_device
{
public:
// construction/destruction
- md_eeprom_blara_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_eeprom_blara_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -161,7 +161,7 @@ class md_eeprom_nbajam_device_alt : public md_std_eeprom_device
{
public:
// construction/destruction
- md_eeprom_nbajam_device_alt(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_eeprom_nbajam_device_alt(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
// virtual machine_config_constructor device_mconfig_additions() const override;
@@ -171,29 +171,29 @@ public:
virtual DECLARE_READ16_MEMBER(read) override;
virtual DECLARE_WRITE16_MEMBER(write) override;
- std::vector<UINT8> m_sram;
+ std::vector<uint8_t> m_sram;
void eeprom_i2c_init();
void idle_devsel_check();
void eeprom_i2c_update();
- UINT8 eeprom_i2c_out();
+ uint8_t eeprom_i2c_out();
private:
// EEPROM runtime vars
- UINT8 m_eeprom_sda; // current SDA
- UINT8 m_eeprom_prev_sda; // previous SDA
- UINT8 m_eeprom_scl; // current SCL
- UINT8 m_eeprom_prev_scl; // previous SCL
- UINT8 m_eeprom_cnt; // operation count in 0-9
- UINT8 m_eeprom_readwrite; // read/write bit
- UINT16 m_eeprom_slave_mask; // dev addr
- UINT16 m_eeprom_word_address; // memory addr
- UINT16 m_eeprom_devsel; // selected device
- UINT16 m_eeprom_byte; // byte to be written
+ uint8_t m_eeprom_sda; // current SDA
+ uint8_t m_eeprom_prev_sda; // previous SDA
+ uint8_t m_eeprom_scl; // current SCL
+ uint8_t m_eeprom_prev_scl; // previous SCL
+ uint8_t m_eeprom_cnt; // operation count in 0-9
+ uint8_t m_eeprom_readwrite; // read/write bit
+ uint16_t m_eeprom_slave_mask; // dev addr
+ uint16_t m_eeprom_word_address; // memory addr
+ uint16_t m_eeprom_devsel; // selected device
+ uint16_t m_eeprom_byte; // byte to be written
int m_eeprom_cur_state; // current state
// EEPROM physical characteristics (configured at init)
- UINT16 m_eeprom_mask; // size of the memory - 1
- UINT16 m_eeprom_pagewrite_mask; // max number of bytes that can be written in a single write cycle
+ uint16_t m_eeprom_mask; // size of the memory - 1
+ uint16_t m_eeprom_pagewrite_mask; // max number of bytes that can be written in a single write cycle
};
diff --git a/src/devices/bus/megadrive/ggenie.cpp b/src/devices/bus/megadrive/ggenie.cpp
index 65097208567..a8586e087eb 100644
--- a/src/devices/bus/megadrive/ggenie.cpp
+++ b/src/devices/bus/megadrive/ggenie.cpp
@@ -32,7 +32,7 @@
const device_type MD_ROM_GAMEGENIE = &device_creator<md_rom_ggenie_device>;
-md_rom_ggenie_device::md_rom_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_ggenie_device::md_rom_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MD_ROM_GAMEGENIE, "MD Game Genie", tag, owner, clock, "md_ggenie", __FILE__),
device_md_cart_interface( mconfig, *this ),
m_exp(*this, "subslot"), m_gg_bypass(0), m_reg_enable(0)
diff --git a/src/devices/bus/megadrive/ggenie.h b/src/devices/bus/megadrive/ggenie.h
index 75b943abb4e..5970ca1d172 100644
--- a/src/devices/bus/megadrive/ggenie.h
+++ b/src/devices/bus/megadrive/ggenie.h
@@ -13,7 +13,7 @@ class md_rom_ggenie_device : public device_t,
{
public:
// construction/destruction
- md_rom_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -26,11 +26,11 @@ public:
private:
required_device<md_cart_slot_device> m_exp;
- UINT16 m_gg_regs[0x20];
+ uint16_t m_gg_regs[0x20];
int m_gg_bypass;
int m_reg_enable;
- UINT16 m_gg_addr[6];
- UINT16 m_gg_data[6];
+ uint16_t m_gg_addr[6];
+ uint16_t m_gg_data[6];
};
diff --git a/src/devices/bus/megadrive/jcart.cpp b/src/devices/bus/megadrive/jcart.cpp
index e3182fca414..43d38e50a60 100644
--- a/src/devices/bus/megadrive/jcart.cpp
+++ b/src/devices/bus/megadrive/jcart.cpp
@@ -40,7 +40,7 @@ const device_type MD_SEPROM_CODEMAST = &device_creator<md_seprom_codemast_device
const device_type MD_SEPROM_MM96 = &device_creator<md_seprom_mm96_device>;
// Sampras, Super Skidmarks?
-md_jcart_device::md_jcart_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)
+md_jcart_device::md_jcart_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_md_cart_interface( mconfig, *this ),
m_jcart3(*this, "JCART3"),
@@ -48,7 +48,7 @@ md_jcart_device::md_jcart_device(const machine_config &mconfig, device_type type
{
}
-md_jcart_device::md_jcart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_jcart_device::md_jcart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MD_JCART, "MD J-Cart games", tag, owner, clock, "md_jcart", __FILE__),
device_md_cart_interface( mconfig, *this ),
m_jcart3(*this, "JCART3"),
@@ -57,20 +57,20 @@ md_jcart_device::md_jcart_device(const machine_config &mconfig, const char *tag,
}
// Micro Machines 2, Micro Machines Military
-md_seprom_codemast_device::md_seprom_codemast_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)
+md_seprom_codemast_device::md_seprom_codemast_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)
: md_jcart_device(mconfig, type, name, tag, owner, clock, shortname, source),
m_i2cmem(*this, "i2cmem"), m_i2c_mem(0), m_i2c_clk(0)
{
}
-md_seprom_codemast_device::md_seprom_codemast_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_seprom_codemast_device::md_seprom_codemast_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_jcart_device(mconfig, MD_SEPROM_CODEMAST, "MD J-Cart games + SEPROM", tag, owner, clock, "md_seprom_codemast", __FILE__),
m_i2cmem(*this, "i2cmem"), m_i2c_mem(0), m_i2c_clk(0)
{
}
// Micro Machines 96
-md_seprom_mm96_device::md_seprom_mm96_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_seprom_mm96_device::md_seprom_mm96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_seprom_codemast_device(mconfig, MD_SEPROM_MM96, "MD Micro Machine 96", tag, owner, clock, "md_seprom_mm96", __FILE__)
{
}
@@ -176,7 +176,7 @@ READ16_MEMBER(md_jcart_device::read)
{
if (offset == 0x38fffe/2)
{
- UINT8 joy[2];
+ uint8_t joy[2];
if (m_jcart_io_data[0] & 0x40)
{
@@ -219,7 +219,7 @@ READ16_MEMBER(md_seprom_codemast_device::read)
}
if (offset == 0x38fffe/2)
{
- UINT8 joy[2];
+ uint8_t joy[2];
if (m_jcart_io_data[0] & 0x40)
{
diff --git a/src/devices/bus/megadrive/jcart.h b/src/devices/bus/megadrive/jcart.h
index 7af02447ede..3d2a6c10bd7 100644
--- a/src/devices/bus/megadrive/jcart.h
+++ b/src/devices/bus/megadrive/jcart.h
@@ -18,8 +18,8 @@ class md_jcart_device : public device_t,
{
public:
// construction/destruction
- md_jcart_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);
- md_jcart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_jcart_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);
+ md_jcart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -34,7 +34,7 @@ public:
required_ioport m_jcart4;
private:
- UINT8 m_jcart_io_data[2];
+ uint8_t m_jcart_io_data[2];
};
// ======================> md_seprom_codemast_device
@@ -43,8 +43,8 @@ class md_seprom_codemast_device : public md_jcart_device
{
public:
// construction/destruction
- md_seprom_codemast_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);
- md_seprom_codemast_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_seprom_codemast_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);
+ md_seprom_codemast_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -58,8 +58,8 @@ public:
required_device<i2cmem_device> m_i2cmem;
private:
- UINT8 m_jcart_io_data[2];
- UINT8 m_i2c_mem, m_i2c_clk;
+ uint8_t m_jcart_io_data[2];
+ uint8_t m_i2c_mem, m_i2c_clk;
};
// ======================> md_seprom_mm96_device (same read/write as codemast, but different I2C type)
@@ -68,7 +68,7 @@ class md_seprom_mm96_device : public md_seprom_codemast_device
{
public:
// construction/destruction
- md_seprom_mm96_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_seprom_mm96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual machine_config_constructor device_mconfig_additions() const override;
diff --git a/src/devices/bus/megadrive/md_slot.cpp b/src/devices/bus/megadrive/md_slot.cpp
index 246dc43cab8..0886d204e98 100644
--- a/src/devices/bus/megadrive/md_slot.cpp
+++ b/src/devices/bus/megadrive/md_slot.cpp
@@ -87,7 +87,7 @@ void device_md_cart_interface::rom_alloc(size_t size, const char *tag)
{
if (m_rom == nullptr)
{
- m_rom = (UINT16 *)device().machine().memory().region_alloc(std::string(tag).append(MDSLOT_ROM_REGION_TAG).c_str(), size, 2, ENDIANNESS_BIG)->base();
+ m_rom = (uint16_t *)device().machine().memory().region_alloc(std::string(tag).append(MDSLOT_ROM_REGION_TAG).c_str(), size, 2, ENDIANNESS_BIG)->base();
m_rom_size = size;
}
}
@@ -99,7 +99,7 @@ void device_md_cart_interface::rom_alloc(size_t size, const char *tag)
void device_md_cart_interface::nvram_alloc(size_t size)
{
- m_nvram.resize(size/sizeof(UINT16));
+ m_nvram.resize(size/sizeof(uint16_t));
}
//-------------------------------------------------
@@ -107,7 +107,7 @@ void device_md_cart_interface::nvram_alloc(size_t size)
// blocks, so to simplify ROM mirroring
//-------------------------------------------------
-void device_md_cart_interface::rom_map_setup(UINT32 size)
+void device_md_cart_interface::rom_map_setup(uint32_t size)
{
int i;
// setup the rom_bank_map array to faster ROM read
@@ -139,9 +139,9 @@ void device_md_cart_interface::rom_map_setup(UINT32 size)
// get_padded_size
//-------------------------------------------------
-UINT32 device_md_cart_interface::get_padded_size(UINT32 size)
+uint32_t device_md_cart_interface::get_padded_size(uint32_t size)
{
- UINT32 pad_size = 0x10000;
+ uint32_t pad_size = 0x10000;
while (size > pad_size)
pad_size <<= 1;
@@ -160,7 +160,7 @@ UINT32 device_md_cart_interface::get_padded_size(UINT32 size)
//-------------------------------------------------
// base_md_cart_slot_device - constructor
//-------------------------------------------------
-base_md_cart_slot_device::base_md_cart_slot_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) :
+base_md_cart_slot_device::base_md_cart_slot_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_image_interface(mconfig, *this),
device_slot_interface(mconfig, *this),
@@ -169,17 +169,17 @@ base_md_cart_slot_device::base_md_cart_slot_device(const machine_config &mconfig
{
}
-md_cart_slot_device::md_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+md_cart_slot_device::md_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
base_md_cart_slot_device(mconfig, MD_CART_SLOT, "MD Cartridge Slot", tag, owner, clock, "md_cart_slot", __FILE__)
{
}
-pico_cart_slot_device::pico_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+pico_cart_slot_device::pico_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
base_md_cart_slot_device(mconfig, PICO_CART_SLOT, "Pico Cartridge Slot", tag, owner, clock, "pico_cart_slot", __FILE__)
{
}
-copera_cart_slot_device::copera_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+copera_cart_slot_device::copera_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
base_md_cart_slot_device(mconfig, COPERA_CART_SLOT, "Copera Cartridge Slot", tag, owner, clock, "copera_cart_slot", __FILE__)
{
}
@@ -354,7 +354,7 @@ image_init_result base_md_cart_slot_device::call_load()
if (m_cart->get_nvram_size())
battery_load(m_cart->get_nvram_base(), m_cart->get_nvram_size(), 0xff);
- file_logging((UINT8 *)m_cart->get_rom_base(), m_cart->get_rom_size(), m_cart->get_nvram_size());
+ file_logging((uint8_t *)m_cart->get_rom_base(), m_cart->get_rom_size(), m_cart->get_nvram_size());
}
return res;
@@ -366,8 +366,8 @@ image_init_result base_md_cart_slot_device::call_load()
image_init_result base_md_cart_slot_device::load_list()
{
- UINT16 *ROM;
- UINT32 length = get_software_region_length("rom");
+ uint16_t *ROM;
+ uint32_t length = get_software_region_length("rom");
const char *slot_name;
// if cart size is not (2^n * 64K), the system will see anyway that size so we need to alloc a bit more space
@@ -375,7 +375,7 @@ image_init_result base_md_cart_slot_device::load_list()
m_cart->rom_alloc(length, tag());
ROM = m_cart->get_rom_base();
- memcpy((UINT8 *)ROM, get_software_region("rom"), get_software_region_length("rom"));
+ memcpy((uint8_t *)ROM, get_software_region("rom"), get_software_region_length("rom"));
// if we allocated a ROM larger that the file (e.g. due to uneven cart size), set remaining space to 0xff
if (length > get_software_region_length("rom"))
@@ -470,8 +470,8 @@ image_init_result base_md_cart_slot_device::load_nonlist()
{
unsigned char *ROM;
bool is_smd, is_md;
- UINT32 tmplen = length(), offset, len;
- std::vector<UINT8> tmpROM(tmplen);
+ uint32_t tmplen = length(), offset, len;
+ std::vector<uint8_t> tmpROM(tmplen);
// STEP 1: store a (possibly headered) copy of the file and determine its type (SMD? MD? BIN?)
fread(&tmpROM[0], tmplen);
@@ -562,7 +562,7 @@ void base_md_cart_slot_device::call_unload()
void base_md_cart_slot_device::setup_custom_mappers()
{
- UINT16 *ROM16 = m_cart->get_rom_base();
+ uint16_t *ROM16 = m_cart->get_rom_base();
switch (m_type)
{
@@ -583,7 +583,7 @@ void base_md_cart_slot_device::setup_custom_mappers()
void base_md_cart_slot_device::setup_nvram()
{
- UINT8 *ROM = (UINT8 *)m_cart->get_rom_base();
+ uint8_t *ROM = (uint8_t *)m_cart->get_rom_base();
m_cart->m_nvram_readonly = 0;
m_cart->m_nvram_active = 0;
m_cart->m_nvram_handlers_installed = 0;
@@ -683,7 +683,7 @@ void base_md_cart_slot_device::setup_nvram()
-int base_md_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
+int base_md_cart_slot_device::get_cart_type(uint8_t *ROM, uint32_t len)
{
int type = SEGA_STD;
@@ -889,8 +889,8 @@ int base_md_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
// If the cart is not of a special type, we check the header for SRAM.
if (ROM[0x1b1] == 'A' && ROM[0x1b0] == 'R')
{
- UINT32 start = (ROM[0x1b4] << 24 | ROM[0x1b5] << 16 | ROM[0x1b6] << 8 | ROM[0x1b7]);
- UINT32 end = (ROM[0x1b8] << 24 | ROM[0x1b9] << 16 | ROM[0x1ba] << 8 | ROM[0x1bb]);
+ uint32_t start = (ROM[0x1b4] << 24 | ROM[0x1b5] << 16 | ROM[0x1b6] << 8 | ROM[0x1b7]);
+ uint32_t end = (ROM[0x1b8] << 24 | ROM[0x1b9] << 16 | ROM[0x1ba] << 8 | ROM[0x1bb]);
// For some games using serial EEPROM, difference between SRAM end to start is 0 or 1.
// Carts with EEPROM should have been already detected above, but better safe than sorry
if (end - start < 2)
@@ -918,8 +918,8 @@ std::string base_md_cart_slot_device::get_default_card_software()
if (open_image_file(mconfig().options()))
{
const char *slot_string;
- UINT32 len = m_file->size(), offset = 0;
- std::vector<UINT8> rom(len);
+ uint32_t len = m_file->size(), offset = 0;
+ std::vector<uint8_t> rom(len);
int type;
m_file->read(&rom[0], len);
@@ -995,12 +995,12 @@ WRITE16_MEMBER(base_md_cart_slot_device::write_a15)
Image loading logging
-------------------------------------------------*/
-void base_md_cart_slot_device::file_logging(UINT8 *ROM8, UINT32 rom_len, UINT32 nvram_len)
+void base_md_cart_slot_device::file_logging(uint8_t *ROM8, uint32_t rom_len, uint32_t nvram_len)
{
char console[16], copyright[16], domestic_name[48], overseas_name[48];
char serial[14], io[16], modem[12], memo[40], country[16];
- UINT32 rom_start, rom_end, ram_start, ram_end, sram_start = 0, sram_end = 0;
- UINT16 checksum, csum = 0;
+ uint32_t rom_start, rom_end, ram_start, ram_end, sram_start = 0, sram_end = 0;
+ uint16_t checksum, csum = 0;
bool valid_sram = FALSE, is_pico = FALSE;
std::string ctrl(""), reg("");
diff --git a/src/devices/bus/megadrive/md_slot.h b/src/devices/bus/megadrive/md_slot.h
index 008ae917fb5..4953ac046cd 100644
--- a/src/devices/bus/megadrive/md_slot.h
+++ b/src/devices/bus/megadrive/md_slot.h
@@ -109,16 +109,16 @@ public:
virtual void rom_alloc(size_t size, const char *tag);
virtual void nvram_alloc(size_t size);
- virtual UINT16* get_rom_base() { return m_rom; };
- virtual UINT16* get_nvram_base() { return &m_nvram[0]; };
- virtual UINT32 get_rom_size() { return m_rom_size; };
- virtual UINT32 get_nvram_size() { return m_nvram.size()*sizeof(UINT16); };
- virtual void set_bank_to_rom(const char *banktag, UINT32 offset) {};
+ virtual uint16_t* get_rom_base() { return m_rom; };
+ virtual uint16_t* get_nvram_base() { return &m_nvram[0]; };
+ virtual uint32_t get_rom_size() { return m_rom_size; };
+ virtual uint32_t get_nvram_size() { return m_nvram.size()*sizeof(uint16_t); };
+ virtual void set_bank_to_rom(const char *banktag, uint32_t offset) {};
void save_nvram() { device().save_item(NAME(m_nvram)); }
- void rom_map_setup(UINT32 size);
- UINT32 get_padded_size(UINT32 size);
+ void rom_map_setup(uint32_t size);
+ uint32_t get_padded_size(uint32_t size);
int m_nvram_start, m_nvram_end;
int m_nvram_active, m_nvram_readonly;
@@ -129,11 +129,11 @@ public:
int m_nvram_handlers_installed;
// internal state
- UINT16 *m_rom;
- UINT32 m_rom_size;
- std::vector<UINT16> m_nvram;
+ uint16_t *m_rom;
+ uint32_t m_rom_size;
+ std::vector<uint16_t> m_nvram;
- UINT8 rom_bank_map[128]; // 64K chunks of rom
+ uint8_t rom_bank_map[128]; // 64K chunks of rom
};
@@ -145,7 +145,7 @@ class base_md_cart_slot_device : public device_t,
{
public:
// construction/destruction
- base_md_cart_slot_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);
+ base_md_cart_slot_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 ~base_md_cart_slot_device();
// device-level overrides
@@ -171,12 +171,12 @@ public:
image_init_result load_list();
image_init_result load_nonlist();
- int get_cart_type(UINT8 *ROM, UINT32 len);
+ int get_cart_type(uint8_t *ROM, uint32_t len);
void setup_custom_mappers();
void setup_nvram();
void set_must_be_loaded(bool _must_be_loaded) { m_must_be_loaded = _must_be_loaded; }
- void file_logging(UINT8 *ROM, UINT32 rom_len, UINT32 nvram_len);
+ void file_logging(uint8_t *ROM, uint32_t rom_len, uint32_t nvram_len);
void save_nvram() { if (m_cart && m_cart->get_nvram_size()) m_cart->save_nvram(); }
@@ -205,7 +205,7 @@ class md_cart_slot_device : public base_md_cart_slot_device
{
public:
// construction/destruction
- md_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const override { return "megadriv_cart"; }
virtual const char *file_extensions() const override { return "smd,bin,md,gen"; }
};
@@ -216,7 +216,7 @@ class pico_cart_slot_device : public base_md_cart_slot_device
{
public:
// construction/destruction
- pico_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ pico_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const override { return "pico_cart"; }
virtual const char *file_extensions() const override { return "bin,md"; }
};
@@ -227,7 +227,7 @@ class copera_cart_slot_device : public base_md_cart_slot_device
{
public:
// construction/destruction
- copera_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ copera_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const override { return "copera_cart"; }
virtual const char *file_extensions() const override { return "bin,md"; }
};
diff --git a/src/devices/bus/megadrive/rom.cpp b/src/devices/bus/megadrive/rom.cpp
index 039574487ca..772a777d965 100644
--- a/src/devices/bus/megadrive/rom.cpp
+++ b/src/devices/bus/megadrive/rom.cpp
@@ -65,184 +65,184 @@ const device_type MD_ROM_WUKONG = &device_creator<md_rom_wukong_device>;
const device_type MD_ROM_STARODYS = &device_creator<md_rom_starodys_device>;
-md_std_rom_device::md_std_rom_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)
+md_std_rom_device::md_std_rom_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_md_cart_interface( mconfig, *this )
{
}
-md_std_rom_device::md_std_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_std_rom_device::md_std_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MD_STD_ROM, "MD Standard cart", tag, owner, clock, "md_std_rom", __FILE__),
device_md_cart_interface( mconfig, *this )
{
}
-md_rom_sram_device::md_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_sram_device::md_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_SRAM, "MD Standard cart + SRAM", tag, owner, clock, "md_rom_sram", __FILE__)
{
}
-md_rom_fram_device::md_rom_fram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_fram_device::md_rom_fram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_FRAM, "MD Standard cart + FRAM", tag, owner, clock, "md_rom_fram", __FILE__)
{
}
-md_rom_ssf2_device::md_rom_ssf2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_ssf2_device::md_rom_ssf2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_SSF2, "MD Super SF2", tag, owner, clock, "md_rom_ssf2", __FILE__), m_lastoff(0), m_lastdata(0)
{
}
-md_rom_cm2in1_device::md_rom_cm2in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_cm2in1_device::md_rom_cm2in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_CM2IN1, "MD Codemasters 2in1", tag, owner, clock, "md_rom_cm2in1", __FILE__), m_base(0)
{
}
-md_rom_mcpirate_device::md_rom_mcpirate_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_mcpirate_device::md_rom_mcpirate_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_MCPIR, "MD Pirate Multicarts (Various)", tag, owner, clock, "md_rom_mcpirate", __FILE__), m_bank(0)
{
}
-md_rom_bugslife_device::md_rom_bugslife_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_bugslife_device::md_rom_bugslife_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_BUGSLIFE, "MD A Bug's Life", tag, owner, clock, "md_rom_bugslife", __FILE__)
{
}
-md_rom_smouse_device::md_rom_smouse_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_smouse_device::md_rom_smouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_SMOUSE, "MD Huan Le Tao Qi Shu / Smart Mouse", tag, owner, clock, "md_rom_smouse", __FILE__)
{
}
-md_rom_smb_device::md_rom_smb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_smb_device::md_rom_smb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_SMB, "MD Super Mario Bros.", tag, owner, clock, "md_rom_smb", __FILE__)
{
}
-md_rom_smb2_device::md_rom_smb2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_smb2_device::md_rom_smb2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_SMB2, "MD Super Mario Bros. 2", tag, owner, clock, "md_rom_smb2", __FILE__)
{
}
-md_rom_smw64_device::md_rom_smw64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_smw64_device::md_rom_smw64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_SMW64, "MD Super Mario World 64", tag, owner, clock, "md_rom_smw64", __FILE__), m_latch0(0), m_latch1(0)
{
}
-md_rom_sbubl_device::md_rom_sbubl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_sbubl_device::md_rom_sbubl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_SBUBL, "MD Super Bubble Bobble", tag, owner, clock, "md_rom_sbubl", __FILE__)
{
}
-md_rom_rx3_device::md_rom_rx3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_rx3_device::md_rom_rx3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_RX3, "MD Rockman X3", tag, owner, clock, "md_rom_rx3", __FILE__)
{
}
-md_rom_mjlov_device::md_rom_mjlov_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_mjlov_device::md_rom_mjlov_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_MJLOV, "MD Ma Jiang Qing Ren / Mahjong Lover", tag, owner, clock, "md_rom_mjlov", __FILE__)
{
}
-md_rom_cjmjclub_device::md_rom_cjmjclub_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_cjmjclub_device::md_rom_cjmjclub_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_CJMJCLUB, "MD Chaoji Majiang Club / Super Mahjong Club", tag, owner, clock, "md_rom_cjmjclub", __FILE__)
{
}
-md_rom_kof98_device::md_rom_kof98_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_kof98_device::md_rom_kof98_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_KOF98, "MD KOF 98", tag, owner, clock, "md_rom_kof98", __FILE__)
{
}
-md_rom_kof99_device::md_rom_kof99_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_kof99_device::md_rom_kof99_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_KOF99, "MD KOF 99 (and others)", tag, owner, clock, "md_rom_kof99", __FILE__)
{
}
-md_rom_soulb_device::md_rom_soulb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_soulb_device::md_rom_soulb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_SOULB, "MD Soul Blade", tag, owner, clock, "md_rom_soulb", __FILE__)
{
}
-md_rom_chinf3_device::md_rom_chinf3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_chinf3_device::md_rom_chinf3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_CHINF3, "MD Chinese Fighter 3", tag, owner, clock, "md_rom_chinf3", __FILE__), m_bank(0)
{
}
-md_rom_16mj2_device::md_rom_16mj2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_16mj2_device::md_rom_16mj2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_16MJ2, "MD 16 Mahjong Tiles II", tag, owner, clock, "md_rom_16mj2", __FILE__)
{
}
-md_rom_elfwor_device::md_rom_elfwor_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_elfwor_device::md_rom_elfwor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_ELFWOR, "MD Linghuan Daoshi Super Magician / Elf Wor", tag, owner, clock, "md_rom_elfwor", __FILE__)
{
}
-md_rom_yasech_device::md_rom_yasech_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_yasech_device::md_rom_yasech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_YASECH, "MD Ya Se Chuan Shuo", tag, owner, clock, "md_rom_yasech", __FILE__)
{
}
-md_rom_lion2_device::md_rom_lion2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_lion2_device::md_rom_lion2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_LION2, "MD Lion King 2", tag, owner, clock, "md_rom_lion2", __FILE__), m_prot1_data(0), m_prot2_data(0)
{
}
-md_rom_lion3_device::md_rom_lion3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_lion3_device::md_rom_lion3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_LION3, "MD Lion King 3", tag, owner, clock, "md_rom_lion3", __FILE__), m_bank(0)
{
}
-md_rom_pokea_device::md_rom_pokea_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_pokea_device::md_rom_pokea_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_POKEA, "MD Pokemon (Alt Protection)", tag, owner, clock, "md_rom_pokea", __FILE__)
{
}
-md_rom_pokestad_device::md_rom_pokestad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_pokestad_device::md_rom_pokestad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_POKESTAD, "MD Pokemon Stadium", tag, owner, clock, "md_rom_pokestad", __FILE__), m_bank(0)
{
}
-md_rom_realtec_device::md_rom_realtec_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_realtec_device::md_rom_realtec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_REALTEC, "MD Realtec", tag, owner, clock, "md_rom_realtec", __FILE__), m_bank_addr(0), m_bank_size(0), m_old_bank_addr(0)
{
}
-md_rom_redcl_device::md_rom_redcl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_redcl_device::md_rom_redcl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_REDCL, "MD Redcliff", tag, owner, clock, "md_rom_redcl", __FILE__)
{
}
-md_rom_squir_device::md_rom_squir_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_squir_device::md_rom_squir_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_SQUIR, "MD Squirrel King", tag, owner, clock, "md_rom_squir", __FILE__), m_latch(0)
{
}
-md_rom_tekkensp_device::md_rom_tekkensp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_tekkensp_device::md_rom_tekkensp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_TEKKENSP, "MD Tekken Special", tag, owner, clock, "md_rom_tekkensp", __FILE__), m_reg(0)
{
}
-md_rom_topf_device::md_rom_topf_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_topf_device::md_rom_topf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_TOPF, "MD Top Fighter", tag, owner, clock, "md_rom_topf", __FILE__), m_latch(0)
{
}
-md_rom_radica_device::md_rom_radica_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_radica_device::md_rom_radica_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_RADICA, "MD Radica TV games", tag, owner, clock, "md_rom_radica", __FILE__), m_bank(0)
{
}
-md_rom_beggarp_device::md_rom_beggarp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_beggarp_device::md_rom_beggarp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_BEGGARP, "MD Beggar Prince", tag, owner, clock, "md_rom_beggarp", __FILE__), m_mode(0), m_lock(0)
{
}
-md_rom_wukong_device::md_rom_wukong_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_wukong_device::md_rom_wukong_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_WUKONG, "MD Legend of Wukong", tag, owner, clock, "md_rom_wukong", __FILE__), m_mode(0)
{
}
-md_rom_starodys_device::md_rom_starodys_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_starodys_device::md_rom_starodys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_STARODYS, "MD Star Odyssey", tag, owner, clock, "md_rom_starodys", __FILE__), m_mode(0), m_lock(0), m_ram_enable(0), m_base(0)
{
}
@@ -552,7 +552,7 @@ WRITE16_MEMBER(md_rom_ssf2_device::write_a13)
m_lastdata = data;
if (offset) // bank 0 is not modified
{
- UINT16 *ROM = get_rom_base();
+ uint16_t *ROM = get_rom_base();
m_bank[offset] = data & 0xf;
memcpy(ROM + offset * 0x080000/2, ROM + 0x400000/2 + (m_bank[offset] * 0x080000)/2, 0x080000);
}
@@ -625,7 +625,7 @@ READ16_MEMBER(md_rom_chinf3_device::read)
and the writes made at the start of the game.. */
if (offset >= 0x400000/2 && offset < 0x500000/2)
{
- UINT32 retdat;
+ uint32_t retdat;
/*
04dc10 chifi3, prot_r? 2800
04cefa chifi3, prot_r? 65262
@@ -1163,7 +1163,7 @@ READ16_MEMBER(md_rom_smw64_device::read)
}
if ((offset >= 0x670000/2) && (offset < 0x680000/2))
{
- UINT16 data = (m_ctrl[1] & 0x80) ? ((m_ctrl[2] & 0x40) ? (m_reg[4] & m_reg[5]) : (m_reg[4] ^ 0xff)) : 0x0000;
+ uint16_t data = (m_ctrl[1] & 0x80) ? ((m_ctrl[2] & 0x40) ? (m_reg[4] & m_reg[5]) : (m_reg[4] ^ 0xff)) : 0x0000;
if (offset & 0x1) // odd offset, return lower 7 bits of the above
return data & 0x7f;
else // even offset, return whole data above, but also update the regs if CTRL3 has 0x80 set
@@ -1503,7 +1503,7 @@ WRITE16_MEMBER(md_rom_starodys_device::write)
if (offset < 0x10000/2)
{
- UINT32 prot_offs = (offset * 2) & 0xf00;
+ uint32_t prot_offs = (offset * 2) & 0xf00;
if (!m_lock)
{
if (prot_offs == 0xd00)
diff --git a/src/devices/bus/megadrive/rom.h b/src/devices/bus/megadrive/rom.h
index d640242ff3c..a75068c2ae2 100644
--- a/src/devices/bus/megadrive/rom.h
+++ b/src/devices/bus/megadrive/rom.h
@@ -16,8 +16,8 @@ class md_std_rom_device : public device_t,
{
public:
// construction/destruction
- md_std_rom_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);
- md_std_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_std_rom_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);
+ md_std_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override {};
@@ -33,7 +33,7 @@ class md_rom_sram_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read) override;
@@ -47,7 +47,7 @@ class md_rom_fram_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_fram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_fram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read) override;
@@ -62,7 +62,7 @@ class md_rom_ssf2_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_ssf2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_ssf2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -73,7 +73,7 @@ public:
virtual DECLARE_WRITE16_MEMBER(write_a13) override;
private:
- UINT8 m_bank[16];
+ uint8_t m_bank[16];
int m_lastoff, m_lastdata;
};
@@ -83,7 +83,7 @@ class md_rom_cm2in1_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_cm2in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_cm2in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -103,7 +103,7 @@ class md_rom_mcpirate_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_mcpirate_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_mcpirate_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -114,7 +114,7 @@ public:
virtual DECLARE_WRITE16_MEMBER(write_a13) override;
private:
- UINT8 m_bank;
+ uint8_t m_bank;
};
@@ -124,7 +124,7 @@ class md_rom_bugslife_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_bugslife_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_bugslife_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read_a13) override;
@@ -136,7 +136,7 @@ class md_rom_chinf3_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_chinf3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_chinf3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -156,7 +156,7 @@ class md_rom_16mj2_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_16mj2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_16mj2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read) override;
@@ -168,7 +168,7 @@ class md_rom_elfwor_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_elfwor_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_elfwor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read) override;
@@ -180,7 +180,7 @@ class md_rom_yasech_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_yasech_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_yasech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read) override;
@@ -192,7 +192,7 @@ class md_rom_kof98_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_kof98_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_kof98_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read) override;
@@ -204,7 +204,7 @@ class md_rom_kof99_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_kof99_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_kof99_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read_a13) override;
@@ -216,7 +216,7 @@ class md_rom_lion2_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_lion2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_lion2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -227,7 +227,7 @@ public:
virtual DECLARE_WRITE16_MEMBER(write) override;
private:
- UINT16 m_prot1_data, m_prot2_data;
+ uint16_t m_prot1_data, m_prot2_data;
};
// ======================> md_rom_lion3_device
@@ -236,7 +236,7 @@ class md_rom_lion3_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_lion3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_lion3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -247,8 +247,8 @@ public:
virtual DECLARE_WRITE16_MEMBER(write) override;
private:
- UINT8 m_reg[3];
- UINT16 m_bank;
+ uint8_t m_reg[3];
+ uint16_t m_bank;
};
// ======================> md_rom_mjlov_device
@@ -257,7 +257,7 @@ class md_rom_mjlov_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_mjlov_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_mjlov_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read) override;
@@ -269,7 +269,7 @@ class md_rom_cjmjclub_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_cjmjclub_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_cjmjclub_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read) override;
@@ -281,7 +281,7 @@ class md_rom_pokea_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_pokea_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_pokea_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read_a13) override;
@@ -293,7 +293,7 @@ class md_rom_pokestad_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_pokestad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_pokestad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -304,7 +304,7 @@ public:
virtual DECLARE_WRITE16_MEMBER(write) override;
private:
- UINT8 m_bank;
+ uint8_t m_bank;
};
// ======================> md_rom_realtec_device
@@ -313,7 +313,7 @@ class md_rom_realtec_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_realtec_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_realtec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -324,7 +324,7 @@ public:
virtual DECLARE_WRITE16_MEMBER(write) override;
private:
- UINT16 m_bank_addr, m_bank_size, m_old_bank_addr;
+ uint16_t m_bank_addr, m_bank_size, m_old_bank_addr;
};
// ======================> md_rom_redcl_device
@@ -333,7 +333,7 @@ class md_rom_redcl_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_redcl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_redcl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read) override;
@@ -345,7 +345,7 @@ class md_rom_rx3_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_rx3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_rx3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read_a13) override;
@@ -357,7 +357,7 @@ class md_rom_sbubl_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_sbubl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_sbubl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read) override;
@@ -369,7 +369,7 @@ class md_rom_smb_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_smb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_smb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read_a13) override;
@@ -381,7 +381,7 @@ class md_rom_smb2_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_smb2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_smb2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read_a13) override;
@@ -393,7 +393,7 @@ class md_rom_smw64_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_smw64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_smw64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -404,9 +404,9 @@ public:
virtual DECLARE_WRITE16_MEMBER(write) override;
private:
- UINT32 m_latch0, m_latch1;
- UINT16 m_reg[6];
- UINT16 m_ctrl[3];
+ uint32_t m_latch0, m_latch1;
+ uint16_t m_reg[6];
+ uint16_t m_ctrl[3];
};
// ======================> md_rom_smouse_device
@@ -415,7 +415,7 @@ class md_rom_smouse_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_smouse_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_smouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read) override;
@@ -428,7 +428,7 @@ class md_rom_soulb_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_soulb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_soulb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// reading and writing
virtual DECLARE_READ16_MEMBER(read) override;
@@ -440,7 +440,7 @@ class md_rom_squir_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_squir_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_squir_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -451,7 +451,7 @@ public:
virtual DECLARE_WRITE16_MEMBER(write) override;
private:
- UINT16 m_latch;
+ uint16_t m_latch;
};
// ======================> md_rom_tekkensp_device
@@ -460,7 +460,7 @@ class md_rom_tekkensp_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_tekkensp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_tekkensp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -471,7 +471,7 @@ public:
virtual DECLARE_WRITE16_MEMBER(write) override;
private:
- UINT16 m_reg;
+ uint16_t m_reg;
};
// ======================> md_rom_topf_device
@@ -480,7 +480,7 @@ class md_rom_topf_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_topf_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_topf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -491,8 +491,8 @@ public:
virtual DECLARE_WRITE16_MEMBER(write) override;
private:
- UINT16 m_latch;
- UINT8 m_bank[3];
+ uint16_t m_latch;
+ uint8_t m_bank[3];
};
// ======================> md_rom_radica_device
@@ -501,7 +501,7 @@ class md_rom_radica_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_radica_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_radica_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -512,7 +512,7 @@ public:
virtual DECLARE_READ16_MEMBER(read_a13) override;
private:
- UINT8 m_bank;
+ uint8_t m_bank;
};
// ======================> md_rom_beggarp_device
@@ -521,7 +521,7 @@ class md_rom_beggarp_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_beggarp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_beggarp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -533,7 +533,7 @@ public:
virtual DECLARE_WRITE16_MEMBER(write_a13) override;
private:
- UINT8 m_mode, m_lock;
+ uint8_t m_mode, m_lock;
};
// ======================> md_rom_wukong_device
@@ -542,7 +542,7 @@ class md_rom_wukong_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_wukong_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_wukong_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -554,7 +554,7 @@ public:
virtual DECLARE_WRITE16_MEMBER(write_a13) override;
private:
- UINT8 m_mode;
+ uint8_t m_mode;
};
// ======================> md_rom_starodys_device
@@ -563,7 +563,7 @@ class md_rom_starodys_device : public md_std_rom_device
{
public:
// construction/destruction
- md_rom_starodys_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_starodys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -576,7 +576,7 @@ public:
virtual DECLARE_WRITE16_MEMBER(write_a13) override;
private:
- UINT8 m_mode, m_lock, m_ram_enable, m_base;
+ uint8_t m_mode, m_lock, m_ram_enable, m_base;
};
diff --git a/src/devices/bus/megadrive/sk.cpp b/src/devices/bus/megadrive/sk.cpp
index 4cee6dd90f4..5703a2a96ca 100644
--- a/src/devices/bus/megadrive/sk.cpp
+++ b/src/devices/bus/megadrive/sk.cpp
@@ -27,14 +27,14 @@
const device_type MD_ROM_SK = &device_creator<md_rom_sk_device>;
-md_rom_sk_device::md_rom_sk_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)
+md_rom_sk_device::md_rom_sk_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_md_cart_interface( mconfig, *this ),
m_exp(*this, "subslot")
{
}
-md_rom_sk_device::md_rom_sk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_sk_device::md_rom_sk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MD_ROM_SK, "MD Sonic & Knuckles", tag, owner, clock, "md_rom_sk", __FILE__),
device_md_cart_interface( mconfig, *this ),
m_exp(*this, "subslot")
diff --git a/src/devices/bus/megadrive/sk.h b/src/devices/bus/megadrive/sk.h
index 606d928daae..526a2aa47ea 100644
--- a/src/devices/bus/megadrive/sk.h
+++ b/src/devices/bus/megadrive/sk.h
@@ -13,8 +13,8 @@ class md_rom_sk_device : public device_t,
{
public:
// construction/destruction
- md_rom_sk_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);
- md_rom_sk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_sk_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);
+ md_rom_sk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
diff --git a/src/devices/bus/megadrive/stm95.cpp b/src/devices/bus/megadrive/stm95.cpp
index 2c7ddf89ad4..dded370bdba 100644
--- a/src/devices/bus/megadrive/stm95.cpp
+++ b/src/devices/bus/megadrive/stm95.cpp
@@ -15,7 +15,7 @@
#include "stm95.h"
-stm95_eeprom_device::stm95_eeprom_device(running_machine &machine, UINT8 *eeprom) :
+stm95_eeprom_device::stm95_eeprom_device(running_machine &machine, uint8_t *eeprom) :
stm_state(IDLE),
stream_pos(0),
m_machine(machine)
@@ -175,13 +175,13 @@ void stm95_eeprom_device::set_sck_line(int state)
const device_type MD_EEPROM_STM95 = &device_creator<md_eeprom_stm95_device>;
-md_eeprom_stm95_device::md_eeprom_stm95_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)
+md_eeprom_stm95_device::md_eeprom_stm95_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_md_cart_interface( mconfig, *this ), m_rdcnt(0)
{
}
-md_eeprom_stm95_device::md_eeprom_stm95_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_eeprom_stm95_device::md_eeprom_stm95_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MD_EEPROM_STM95, "MD Cart + EEPROM STM95", tag, owner, clock, "md_eeprom_stm95", __FILE__),
device_md_cart_interface( mconfig, *this ), m_rdcnt(0)
{
@@ -191,7 +191,7 @@ md_eeprom_stm95_device::md_eeprom_stm95_device(const machine_config &mconfig, co
void md_eeprom_stm95_device::device_start()
{
nvram_alloc(M95320_SIZE);
- m_stm95 = std::make_unique<stm95_eeprom_device>(machine(), (UINT8*)get_nvram_base());
+ m_stm95 = std::make_unique<stm95_eeprom_device>(machine(), (uint8_t*)get_nvram_base());
save_item(NAME(m_rdcnt));
save_item(NAME(m_bank));
@@ -215,7 +215,7 @@ READ16_MEMBER(md_eeprom_stm95_device::read)
{
// ugly hack until we don't know much about game protection
// first 3 reads from 15e6 return 0x00000010, then normal 0x00018010 value for crc check
- UINT16 res;
+ uint16_t res;
offset -= 0x0015e6/2;
logerror("read 0x15e6 %d\n", m_rdcnt);
if (m_rdcnt < 6)
@@ -231,7 +231,7 @@ READ16_MEMBER(md_eeprom_stm95_device::read)
return m_rom[offset];
else // last 0x180000 are bankswitched
{
- UINT8 bank = (offset - 0x280000/2) >> 18;
+ uint8_t bank = (offset - 0x280000/2) >> 18;
return m_rom[(offset & 0x7ffff/2) + (m_bank[bank] * 0x80000)/2];
}
}
diff --git a/src/devices/bus/megadrive/stm95.h b/src/devices/bus/megadrive/stm95.h
index 09e61670c14..1e0561f3fae 100644
--- a/src/devices/bus/megadrive/stm95.h
+++ b/src/devices/bus/megadrive/stm95.h
@@ -28,10 +28,10 @@ enum STMSTATE
class stm95_eeprom_device
{
public:
- stm95_eeprom_device(running_machine &machine, UINT8 *eeprom);
+ stm95_eeprom_device(running_machine &machine, uint8_t *eeprom);
running_machine &machine() const { return m_machine; }
- UINT8 *eeprom_data;
+ uint8_t *eeprom_data;
void set_cs_line(int);
void set_halt_line(int state) {}; // not implemented
void set_si_line(int);
@@ -60,8 +60,8 @@ class md_eeprom_stm95_device : public device_t,
{
public:
// construction/destruction
- md_eeprom_stm95_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);
- md_eeprom_stm95_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_eeprom_stm95_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);
+ md_eeprom_stm95_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
@@ -73,7 +73,7 @@ public:
virtual DECLARE_WRITE16_MEMBER(write_a13) override;
private:
- UINT8 m_bank[3];
+ uint8_t m_bank[3];
int m_rdcnt;
std::unique_ptr<stm95_eeprom_device> m_stm95;
diff --git a/src/devices/bus/megadrive/svp.cpp b/src/devices/bus/megadrive/svp.cpp
index 589a58138a6..8aa370164f2 100644
--- a/src/devices/bus/megadrive/svp.cpp
+++ b/src/devices/bus/megadrive/svp.cpp
@@ -36,7 +36,7 @@
const device_type MD_ROM_SVP = &device_creator<md_rom_svp_device>;
-md_rom_svp_device::md_rom_svp_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)
+md_rom_svp_device::md_rom_svp_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_md_cart_interface( mconfig, *this ),
m_svp(*this, "svp"),
@@ -44,7 +44,7 @@ md_rom_svp_device::md_rom_svp_device(const machine_config &mconfig, device_type
{
}
-md_rom_svp_device::md_rom_svp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+md_rom_svp_device::md_rom_svp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MD_ROM_SVP, "MD Virtua Racing", tag, owner, clock, "md_rom_svp", __FILE__),
device_md_cart_interface( mconfig, *this ),
m_svp(*this, "svp"),
@@ -71,7 +71,7 @@ static inline int get_inc(int mode)
return inc;
}
-static inline void overwrite_write(UINT16 *dst, UINT16 d)
+static inline void overwrite_write(uint16_t *dst, uint16_t d)
{
if (d & 0xf000) { *dst &= ~0xf000; *dst |= d & 0xf000; }
if (d & 0x0f00) { *dst &= ~0x0f00; *dst |= d & 0x0f00; }
@@ -81,7 +81,7 @@ static inline void overwrite_write(UINT16 *dst, UINT16 d)
-UINT32 md_rom_svp_device::pm_io(int reg, int write, UINT32 d)
+uint32_t md_rom_svp_device::pm_io(int reg, int write, uint32_t d)
{
if (m_emu_status & SSP_PMC_SET)
{
@@ -101,7 +101,7 @@ UINT32 md_rom_svp_device::pm_io(int reg, int write, UINT32 d)
if (reg == 4 || (m_svp->state().state_int(SSP_ST) & 0x60))
{
#define CADDR ((((mode<<16)&0x7f0000)|addr)<<1)
- UINT16 *dram = (UINT16 *)m_dram;
+ uint16_t *dram = (uint16_t *)m_dram;
if (write)
{
int mode = m_pmac_write[reg] >> 16;
@@ -127,7 +127,7 @@ UINT32 md_rom_svp_device::pm_io(int reg, int write, UINT32 d)
else if ((mode & 0x47ff) == 0x001c) // IRAM
{
int inc = get_inc(mode);
- ((UINT16 *)m_iram)[addr & 0x3ff] = d;
+ ((uint16_t *)m_iram)[addr & 0x3ff] = d;
m_pmac_write[reg] += inc;
}
else
@@ -142,7 +142,7 @@ UINT32 md_rom_svp_device::pm_io(int reg, int write, UINT32 d)
int addr = m_pmac_read[reg] & 0xffff;
if ((mode & 0xfff0) == 0x0800) // ROM, inc 1, verified to be correct
{
- UINT16 *ROM = (UINT16 *)get_rom_base();
+ uint16_t *ROM = (uint16_t *)get_rom_base();
m_pmac_read[reg] += 1;
d = ROM[addr | ((mode & 0xf) << 16)];
}
@@ -169,13 +169,13 @@ UINT32 md_rom_svp_device::pm_io(int reg, int write, UINT32 d)
return d;
}
- return (UINT32)-1;
+ return (uint32_t)-1;
}
READ16_MEMBER( md_rom_svp_device::read_pm0 )
{
- UINT32 d = pm_io(0, 0, 0);
- if (d != (UINT32)-1)
+ uint32_t d = pm_io(0, 0, 0);
+ if (d != (uint32_t)-1)
return d;
d = m_xst2;
m_xst2 &= ~2; // ?
@@ -184,16 +184,16 @@ READ16_MEMBER( md_rom_svp_device::read_pm0 )
WRITE16_MEMBER( md_rom_svp_device::write_pm0 )
{
- UINT32 r = pm_io(0, 1, data);
- if (r != (UINT32)-1)
+ uint32_t r = pm_io(0, 1, data);
+ if (r != (uint32_t)-1)
return;
m_xst2 = data; // ?
}
READ16_MEMBER( md_rom_svp_device::read_pm1 )
{
- UINT32 r = pm_io(1, 0, 0);
- if (r != (UINT32)-1)
+ uint32_t r = pm_io(1, 0, 0);
+ if (r != (uint32_t)-1)
return r;
logerror("svp: PM1 acces in non PM mode?\n");
return 0;
@@ -201,16 +201,16 @@ READ16_MEMBER( md_rom_svp_device::read_pm1 )
WRITE16_MEMBER( md_rom_svp_device::write_pm1 )
{
- UINT32 r = pm_io(1, 1, data);
- if (r != (UINT32)-1)
+ uint32_t r = pm_io(1, 1, data);
+ if (r != (uint32_t)-1)
return;
logerror("svp: PM1 acces in non PM mode?\n");
}
READ16_MEMBER( md_rom_svp_device::read_pm2 )
{
- UINT32 r = pm_io(2, 0, 0);
- if (r != (UINT32)-1)
+ uint32_t r = pm_io(2, 0, 0);
+ if (r != (uint32_t)-1)
return r;
logerror("svp: PM2 acces in non PM mode?\n");
return 0;
@@ -218,24 +218,24 @@ READ16_MEMBER( md_rom_svp_device::read_pm2 )
WRITE16_MEMBER( md_rom_svp_device::write_pm2 )
{
- UINT32 r = pm_io(2, 1, data);
- if (r != (UINT32)-1)
+ uint32_t r = pm_io(2, 1, data);
+ if (r != (uint32_t)-1)
return;
logerror("svp: PM2 acces in non PM mode?\n");
}
READ16_MEMBER( md_rom_svp_device::read_xst )
{
- UINT32 d = pm_io(3, 0, 0);
- if (d != (UINT32)-1)
+ uint32_t d = pm_io(3, 0, 0);
+ if (d != (uint32_t)-1)
return d;
return m_xst;
}
WRITE16_MEMBER( md_rom_svp_device::write_xst )
{
- UINT32 r = pm_io(3, 1, data);
- if (r != (UINT32)-1)
+ uint32_t r = pm_io(3, 1, data);
+ if (r != (uint32_t)-1)
return;
m_xst2 |= 1;
m_xst = data;
@@ -294,7 +294,7 @@ WRITE16_MEMBER( md_rom_svp_device::write_al )
READ16_MEMBER( md_rom_svp_device::rom_read1 )
{
- UINT16 *IRAM = (UINT16 *)m_iram;
+ uint16_t *IRAM = (uint16_t *)m_iram;
return IRAM[offset];
}
@@ -368,7 +368,7 @@ ioport_constructor md_rom_svp_device::device_input_ports() const
}
-void md_rom_svp_device::set_bank_to_rom(const char *banktag, UINT32 offset)
+void md_rom_svp_device::set_bank_to_rom(const char *banktag, uint32_t offset)
{
if (membank(banktag))
membank(banktag)->set_base(m_rom + offset);
@@ -404,7 +404,7 @@ void md_rom_svp_device::device_start()
READ16_MEMBER(md_rom_svp_device::read)
{
- UINT16 *DRAM = (UINT16 *)m_dram;
+ uint16_t *DRAM = (uint16_t *)m_dram;
if (offset >= 0x300000/2 && offset < 0x320000/2)
{
@@ -413,14 +413,14 @@ READ16_MEMBER(md_rom_svp_device::read)
else if (offset >= 0x390000/2 && offset < 0x3a0000/2)
{
// this is rewritten 68k test code
- UINT32 a1 = offset - 0x390000/2;
+ uint32_t a1 = offset - 0x390000/2;
a1 = (a1 & 0x7001) | ((a1 & 0x3e) << 6) | ((a1 & 0xfc0) >> 5);
return DRAM[a1];
}
else if (offset >= 0x3a0000/2 && offset < 0x3b0000/2)
{
// this is rewritten 68k test code
- UINT32 a1 = offset - 0x3a0000/2;
+ uint32_t a1 = offset - 0x3a0000/2;
a1 = (a1 & 0x7801) | ((a1 & 0x1e) << 6) | ((a1 & 0x7e0) >> 4);
return DRAM[a1];
}
@@ -437,15 +437,15 @@ WRITE16_MEMBER(md_rom_svp_device::write)
{
if (offset >= 0x300000/2 && offset < 0x320000/2)
{
- UINT32 a1 = offset - 0x300000/2;
- UINT16 *DRAM = (UINT16 *)m_dram;
+ uint32_t a1 = offset - 0x300000/2;
+ uint16_t *DRAM = (uint16_t *)m_dram;
DRAM[a1] = data;
}
}
READ16_MEMBER(md_rom_svp_device::read_a15)
{
- UINT32 d;
+ uint32_t d;
switch (offset)
{
// 0xa15000, 0xa15002
diff --git a/src/devices/bus/megadrive/svp.h b/src/devices/bus/megadrive/svp.h
index 73c230c92a0..57aa7713b67 100644
--- a/src/devices/bus/megadrive/svp.h
+++ b/src/devices/bus/megadrive/svp.h
@@ -17,15 +17,15 @@ class md_rom_svp_device : public device_t,
{
public:
// construction/destruction
- md_rom_svp_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);
- md_rom_svp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ md_rom_svp_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);
+ md_rom_svp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
//protected:
// device-level overrides
virtual void device_start() override;
virtual machine_config_constructor device_mconfig_additions() const override;
virtual ioport_constructor device_input_ports() const override;
- virtual void set_bank_to_rom(const char *banktag, UINT32 offset) override;
+ virtual void set_bank_to_rom(const char *banktag, uint32_t offset) override;
required_device<device_t> m_svp;
required_ioport m_test_ipt;
@@ -56,16 +56,16 @@ public:
virtual DECLARE_WRITE16_MEMBER(write_pmc);
virtual DECLARE_WRITE16_MEMBER(write_al);
- UINT32 pm_io(int reg, int write, UINT32 d);
+ uint32_t pm_io(int reg, int write, uint32_t d);
- UINT32 m_pmac_read[6]; // read modes/addrs for PM0-PM5
- UINT32 m_pmac_write[6]; // write ...
+ uint32_t m_pmac_read[6]; // read modes/addrs for PM0-PM5
+ uint32_t m_pmac_write[6]; // write ...
PAIR m_pmc;
- UINT32 m_emu_status;
- UINT16 m_xst; // external status, mapped at a15000 and a15002 on 68k side.
- UINT16 m_xst2; // status of XST (bit1 set when 68k writes to XST)
- UINT8 m_iram[0x800]; // IRAM (0-0x7ff)
- UINT8 m_dram[0x20000]; // [0x20000];
+ uint32_t m_emu_status;
+ uint16_t m_xst; // external status, mapped at a15000 and a15002 on 68k side.
+ uint16_t m_xst2; // status of XST (bit1 set when 68k writes to XST)
+ uint8_t m_iram[0x800]; // IRAM (0-0x7ff)
+ uint8_t m_dram[0x20000]; // [0x20000];
};