summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/wswan/slot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/wswan/slot.cpp')
-rw-r--r--src/devices/bus/wswan/slot.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/devices/bus/wswan/slot.cpp b/src/devices/bus/wswan/slot.cpp
index abfa903a6a3..de0b0393179 100644
--- a/src/devices/bus/wswan/slot.cpp
+++ b/src/devices/bus/wswan/slot.cpp
@@ -48,7 +48,7 @@ device_ws_cart_interface::~device_ws_cart_interface()
// rom_alloc - alloc the space for the cart
//-------------------------------------------------
-void device_ws_cart_interface::rom_alloc(UINT32 size, const char *tag)
+void device_ws_cart_interface::rom_alloc(uint32_t size, const char *tag)
{
if (m_rom == nullptr)
{
@@ -63,7 +63,7 @@ void device_ws_cart_interface::rom_alloc(UINT32 size, const char *tag)
// nvram_alloc - alloc the space for the ram
//-------------------------------------------------
-void device_ws_cart_interface::nvram_alloc(UINT32 size)
+void device_ws_cart_interface::nvram_alloc(uint32_t size)
{
m_nvram.resize(size);
}
@@ -76,7 +76,7 @@ void device_ws_cart_interface::nvram_alloc(UINT32 size)
//-------------------------------------------------
// ws_cart_slot_device - constructor
//-------------------------------------------------
-ws_cart_slot_device::ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ws_cart_slot_device::ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, WS_CART_SLOT, "Wonderswan Cartridge Slot", tag, owner, clock, "ws_cart_slot", __FILE__),
device_image_interface(mconfig, *this),
device_slot_interface(mconfig, *this),
@@ -164,9 +164,9 @@ image_init_result ws_cart_slot_device::call_load()
{
if (m_cart)
{
- UINT8 *ROM;
- UINT32 size = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
- UINT32 nvram_size = 0;
+ uint8_t *ROM;
+ uint32_t size = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
+ uint32_t nvram_size = 0;
m_cart->rom_alloc(size, tag());
ROM = m_cart->get_rom_base();
@@ -241,7 +241,7 @@ void ws_cart_slot_device::call_unload()
get cart type from cart file
-------------------------------------------------*/
-int ws_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len, UINT32 &nvram_len)
+int ws_cart_slot_device::get_cart_type(uint8_t *ROM, uint32_t len, uint32_t &nvram_len)
{
int chunks = len / 0x10000;
int type = WS_STD;
@@ -300,10 +300,10 @@ std::string ws_cart_slot_device::get_default_card_software()
if (open_image_file(mconfig().options()))
{
const char *slot_string;
- UINT32 size = m_file->size();
- std::vector<UINT8> rom(size);
+ uint32_t size = m_file->size();
+ std::vector<uint8_t> rom(size);
int type;
- UINT32 nvram;
+ uint32_t nvram;
m_file->read(&rom[0], size);
@@ -410,10 +410,10 @@ static const char *const sram_str[] = { "none", "64Kbit SRAM", "256Kbit SRAM", "
static const char *const eeprom_str[] = { "none", "1Kbit EEPROM", "16Kbit EEPROM", "Unknown", "Unknown", "8Kbit EEPROM" };
static const char *const romsize_str[] = { "Unknown", "Unknown", "4Mbit", "8Mbit", "16Mbit", "Unknown", "32Mbit", "Unknown", "64Mbit", "128Mbit" };
-void ws_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 offs, UINT32 len)
+void ws_cart_slot_device::internal_header_logging(uint8_t *ROM, uint32_t offs, uint32_t len)
{
int sum = 0, banks = len / 0x10000;
- UINT8 romsize, ramtype, ramsize;
+ uint8_t romsize, ramtype, ramsize;
romsize = ROM[offs + 0xfffa];
ramtype = (ROM[offs + 0xfffb] & 0xf0) ? 1 : 0; // 1 = EEPROM, 0 = SRAM
ramsize = ramtype ? ((ROM[offs + 0xfffb] & 0xf0) >> 4) : (ROM[offs + 0xfffb] & 0x0f);