summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/sega8/sega8_slot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/sega8/sega8_slot.cpp')
-rw-r--r--src/devices/bus/sega8/sega8_slot.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/devices/bus/sega8/sega8_slot.cpp b/src/devices/bus/sega8/sega8_slot.cpp
index 3cfb14b4981..41ae0e6cf17 100644
--- a/src/devices/bus/sega8/sega8_slot.cpp
+++ b/src/devices/bus/sega8/sega8_slot.cpp
@@ -74,7 +74,7 @@ device_sega8_cart_interface::~device_sega8_cart_interface()
// rom_alloc - alloc the space for the cart
//-------------------------------------------------
-void device_sega8_cart_interface::rom_alloc(UINT32 size, const char *tag)
+void device_sega8_cart_interface::rom_alloc(uint32_t size, const char *tag)
{
if (m_rom == nullptr)
{
@@ -92,7 +92,7 @@ void device_sega8_cart_interface::rom_alloc(UINT32 size, const char *tag)
// ram_alloc - alloc the space for the ram
//-------------------------------------------------
-void device_sega8_cart_interface::ram_alloc(UINT32 size)
+void device_sega8_cart_interface::ram_alloc(uint32_t size)
{
m_ram.resize(size);
}
@@ -107,7 +107,7 @@ void device_sega8_cart_interface::ram_alloc(UINT32 size)
// sega8_cart_slot_device - constructor
//-------------------------------------------------
-sega8_cart_slot_device::sega8_cart_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, bool is_card, const char *shortname, const char *source) :
+sega8_cart_slot_device::sega8_cart_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, bool is_card, 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),
@@ -119,7 +119,7 @@ sega8_cart_slot_device::sega8_cart_slot_device(const machine_config &mconfig, de
m_is_card = is_card;
}
-sega8_cart_slot_device::sega8_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+sega8_cart_slot_device::sega8_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, SEGA8_CART_SLOT, "Sega Master System / Game Gear / SG1000 Cartridge Slot", tag, owner, clock, "sega8_cart_slot", __FILE__),
device_image_interface(mconfig, *this),
device_slot_interface(mconfig, *this),
@@ -131,7 +131,7 @@ sega8_cart_slot_device::sega8_cart_slot_device(const machine_config &mconfig, co
{
}
-sega8_card_slot_device::sega8_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+sega8_card_slot_device::sega8_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
sega8_cart_slot_device(mconfig, SEGA8_CARD_SLOT, "Sega Master System / Game Gear / SG1000 Card Slot", tag, owner, clock, TRUE, "sega8_card_slot", __FILE__)
{
}
@@ -213,7 +213,7 @@ static const char *sega8_get_slot(int type)
call load
-------------------------------------------------*/
-image_verify_result sega8_cart_slot_device::verify_cart( UINT8 *magic, int size )
+image_verify_result sega8_cart_slot_device::verify_cart( uint8_t *magic, int size )
{
image_verify_result retval(image_verify_result::FAIL);
@@ -227,9 +227,9 @@ image_verify_result sega8_cart_slot_device::verify_cart( UINT8 *magic, int size
return retval;
}
-void sega8_cart_slot_device::set_lphaser_xoffset( UINT8 *rom, int size )
+void sega8_cart_slot_device::set_lphaser_xoffset( uint8_t *rom, int size )
{
- static const UINT8 signatures[7][16] =
+ static const uint8_t signatures[7][16] =
{
/* Spacegun */
{ 0x54, 0x4d, 0x52, 0x20, 0x53, 0x45, 0x47, 0x41, 0xff, 0xff, 0x9d, 0x99, 0x10, 0x90, 0x00, 0x40 },
@@ -335,9 +335,9 @@ image_init_result sega8_cart_slot_device::call_load()
{
if (m_cart)
{
- UINT32 len = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
- UINT32 offset = 0;
- UINT8 *ROM;
+ uint32_t len = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
+ uint32_t offset = 0;
+ uint8_t *ROM;
if (m_is_card && len > 0x8000)
{
@@ -438,9 +438,9 @@ void sega8_cart_slot_device::call_unload()
The Korean game Jang Pung II also seems to use a codemasters style mapper.
*/
-int sms_state::detect_codemasters_mapper( UINT8 *rom )
+int sms_state::detect_codemasters_mapper( uint8_t *rom )
{
- static const UINT8 jang_pung2[16] = { 0x00, 0xba, 0x38, 0x0d, 0x00, 0xb8, 0x38, 0x0c, 0x00, 0xb6, 0x38, 0x0b, 0x00, 0xb4, 0x38, 0x0a };
+ static const uint8_t jang_pung2[16] = { 0x00, 0xba, 0x38, 0x0d, 0x00, 0xb8, 0x38, 0x0c, 0x00, 0xb6, 0x38, 0x0b, 0x00, 0xb4, 0x38, 0x0a };
if (((rom[0x7fe0] & 0x0f ) <= 9) && (rom[0x7fe3] == 0x93 || rom[0x7fe3] == 0x94 || rom[0x7fe3] == 0x95) && rom[0x7fef] == 0x00)
return 1;
@@ -452,9 +452,9 @@ int sms_state::detect_codemasters_mapper( UINT8 *rom )
}
-int sms_state::detect_korean_mapper( UINT8 *rom )
+int sms_state::detect_korean_mapper( uint8_t *rom )
{
- static const UINT8 signatures[2][16] =
+ static const uint8_t signatures[2][16] =
{
{ 0x3e, 0x11, 0x32, 0x00, 0xa0, 0x78, 0xcd, 0x84, 0x85, 0x3e, 0x02, 0x32, 0x00, 0xa0, 0xc9, 0xff }, /* Dodgeball King */
{ 0x41, 0x48, 0x37, 0x37, 0x44, 0x37, 0x4e, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20 }, /* Sangokushi 3 */
@@ -472,7 +472,7 @@ int sms_state::detect_korean_mapper( UINT8 *rom )
}
#endif
-int sega8_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
+int sega8_cart_slot_device::get_cart_type(uint8_t *ROM, uint32_t len)
{
int type = SEGA8_BASE_ROM;
@@ -484,7 +484,7 @@ int sega8_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
{
if (ROM[i] == 0x32) // Z80 opcode for: LD (xxxx), A
{
- UINT16 addr = (ROM[i + 2] << 8) | ROM[i + 1];
+ uint16_t addr = (ROM[i + 2] << 8) | ROM[i + 1];
if (addr == 0xffff)
{ i += 2; _ffff++; continue; }
if (addr == 0x0002 || addr == 0x0003 || addr == 0x0004)
@@ -533,7 +533,7 @@ int sega8_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
{
if (ROM[i] == 0x32)
{
- UINT16 addr = ROM[i + 1] | (ROM[i + 2] << 8);
+ uint16_t addr = ROM[i + 1] | (ROM[i + 2] << 8);
switch (addr & 0xf000)
{
@@ -597,8 +597,8 @@ std::string sega8_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);
@@ -668,7 +668,7 @@ WRITE8_MEMBER(sega8_cart_slot_device::write_ram)
Internal header logging
-------------------------------------------------*/
-void sega8_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 len, UINT32 nvram_len)
+void sega8_cart_slot_device::internal_header_logging(uint8_t *ROM, uint32_t len, uint32_t nvram_len)
{
static const char *const system_region[] =
{
@@ -711,9 +711,9 @@ void sega8_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 len, UIN
};
char reserved[10];
- UINT8 version, csum_size, region, serial[3];
- UINT16 checksum, csum = 0;
- UINT32 csum_end;
+ uint8_t version, csum_size, region, serial[3];
+ uint16_t checksum, csum = 0;
+ uint32_t csum_end;
// LOG FILE DETAILS
logerror("FILE DETAILS\n" );
@@ -773,7 +773,7 @@ void sega8_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 len, UIN
if (m_type == SEGA8_CODEMASTERS)
{
- UINT8 day, month, year, hour, minute;
+ uint8_t day, month, year, hour, minute;
csum = 0;
day = ROM[0x7fe1];