Revert "use c++ cast instead of c casts (nw)"

This reverts commit be704c00ab.
This commit is contained in:
Miodrag Milanovic 2015-12-05 13:34:37 +01:00
parent 4c8a059d1d
commit 31ae631b88
97 changed files with 320 additions and 315 deletions

View File

@ -221,7 +221,7 @@ void a2bus_corvfdc02_device::write_c0nx(address_space &space, UINT8 offset, UINT
break; break;
} }
logerror("corvfdc02: selecting drive %d: %p\n", data & 3, static_cast<void *>(floppy)); logerror("corvfdc02: selecting drive %d: %p\n", data & 3, (void *) floppy);
if (floppy != m_curfloppy) if (floppy != m_curfloppy)
{ {

View File

@ -437,8 +437,8 @@ WRITE8_MEMBER(a2bus_mouse_device::mcu_timer_w)
// recalculate the timer now // recalculate the timer now
UINT32 m_ticks = 2043600 / 4; UINT32 m_ticks = 2043600 / 4;
m_ticks /= prescale[m_timer_ctl & 7]; m_ticks /= prescale[m_timer_ctl & 7];
m_ticks /= static_cast<int>(m_timer_cnt + 1); m_ticks /= (int)(m_timer_cnt + 1);
m_timer->adjust(attotime::from_hz(static_cast<double>(m_ticks)), TIMER_68705, attotime::from_hz(static_cast<double>(m_ticks))); m_timer->adjust(attotime::from_hz((double)m_ticks), TIMER_68705, attotime::from_hz((double)m_ticks));
} }
} }

View File

@ -378,7 +378,7 @@ bool a78_cart_slot_device::call_load()
char head[128]; char head[128];
fread(head, 128); fread(head, 128);
if (verify_header(static_cast<char *>(head)) == IMAGE_VERIFY_FAIL) if (verify_header((char *)head) == IMAGE_VERIFY_FAIL)
return IMAGE_INIT_FAIL; return IMAGE_INIT_FAIL;
len = (head[49] << 24) | (head[50] << 16) | (head[51] << 8) | head[52]; len = (head[49] << 24) | (head[50] << 16) | (head[51] << 8) | head[52];
@ -449,7 +449,7 @@ bool a78_cart_slot_device::call_load()
osd_printf_info("Run it through the expansion to exploit this feature.\n"); osd_printf_info("Run it through the expansion to exploit this feature.\n");
} }
internal_header_logging(reinterpret_cast<UINT8 *>(head), length()); internal_header_logging((UINT8 *)head, length());
m_cart->rom_alloc(len, tag()); m_cart->rom_alloc(len, tag());
fread(m_cart->get_rom_base(), len); fread(m_cart->get_rom_base(), len);

View File

@ -319,7 +319,7 @@ int a800_cart_slot_device::identify_cart_type(UINT8 *header)
int type = A800_8K; int type = A800_8K;
// check CART format // check CART format
if (strncmp(reinterpret_cast<const char *>(header), "CART", 4)) if (strncmp((const char *)header, "CART", 4))
fatalerror("Invalid header detected!\n"); fatalerror("Invalid header detected!\n");
switch ((header[4] << 24) + (header[5] << 16) + (header[6] << 8) + (header[7] << 0)) switch ((header[4] << 24) + (header[5] << 16) + (header[6] << 8) + (header[7] << 0))

View File

@ -174,7 +174,7 @@ WRITE8_MEMBER( adam_digital_data_pack_device::p1_w )
if (m_ddp0->exists()) if (m_ddp0->exists())
{ {
m_ddp0->set_speed(BIT(data, 0) ? static_cast<double>(80)/1.875 : 20/1.875); // speed select m_ddp0->set_speed(BIT(data, 0) ? (double) 80/1.875 : 20/1.875); // speed select
if(!(data & 0x08)) m_ddp0->go_forward(); if(!(data & 0x08)) m_ddp0->go_forward();
if(!(data & 0x10)) m_ddp0->go_reverse(); if(!(data & 0x10)) m_ddp0->go_reverse();
m_ddp0->change_state(BIT(data, 1) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); // motor control m_ddp0->change_state(BIT(data, 1) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); // motor control
@ -182,7 +182,7 @@ WRITE8_MEMBER( adam_digital_data_pack_device::p1_w )
if (m_ddp1->exists()) if (m_ddp1->exists())
{ {
m_ddp1->set_speed(BIT(data, 0) ? static_cast<double>(80)/1.875 : 20/1.875); // speed select m_ddp1->set_speed(BIT(data, 0) ? (double) 80/1.875 : 20/1.875); // speed select
if(!(data & 0x08)) m_ddp1->go_forward(); if(!(data & 0x08)) m_ddp1->go_forward();
if(!(data & 0x10)) m_ddp1->go_reverse(); if(!(data & 0x10)) m_ddp1->go_reverse();
m_ddp1->change_state(BIT(data, 2) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); // motor control m_ddp1->change_state(BIT(data, 2) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); // motor control

View File

@ -58,7 +58,7 @@ const rom_entry *bml3bus_kanji_device::device_rom_region() const
READ8_MEMBER( bml3bus_kanji_device::bml3_kanji_r ) READ8_MEMBER( bml3bus_kanji_device::bml3_kanji_r )
{ {
return m_rom[(static_cast<UINT32>(m_kanji_addr) << 1) + offset]; return m_rom[((UINT32)m_kanji_addr << 1) + offset];
} }
WRITE8_MEMBER( bml3bus_kanji_device::bml3_kanji_w ) WRITE8_MEMBER( bml3bus_kanji_device::bml3_kanji_w )

View File

@ -131,7 +131,7 @@ void bml3bus_mp1802_device::device_start()
// install into memory // install into memory
address_space &space_prg = machine().firstcpu->space(AS_PROGRAM); address_space &space_prg = machine().firstcpu->space(AS_PROGRAM);
space_prg.install_readwrite_handler(0xff00, 0xff03, read8_delegate(FUNC(mb8866_t::read),static_cast<mb8866_t*>(m_fdc)), write8_delegate(FUNC(mb8866_t::write),static_cast<mb8866_t*>(m_fdc))); space_prg.install_readwrite_handler(0xff00, 0xff03, read8_delegate(FUNC(mb8866_t::read),(mb8866_t*)m_fdc), write8_delegate(FUNC(mb8866_t::write),(mb8866_t*)m_fdc));
space_prg.install_readwrite_handler(0xff04, 0xff04, read8_delegate(FUNC(bml3bus_mp1802_device::bml3_mp1802_r), this), write8_delegate(FUNC(bml3bus_mp1802_device::bml3_mp1802_w), this)); space_prg.install_readwrite_handler(0xff04, 0xff04, read8_delegate(FUNC(bml3bus_mp1802_device::bml3_mp1802_r), this), write8_delegate(FUNC(bml3bus_mp1802_device::bml3_mp1802_w), this));
// overwriting the main ROM (rather than using e.g. install_rom) should mean that bank switches for RAM expansion still work... // overwriting the main ROM (rather than using e.g. install_rom) should mean that bank switches for RAM expansion still work...
UINT8 *mainrom = device().machine().root_device().memregion("maincpu")->base(); UINT8 *mainrom = device().machine().root_device().memregion("maincpu")->base();

View File

@ -158,7 +158,7 @@ void bml3bus_mp1805_device::device_start()
// install into memory // install into memory
address_space &space_prg = machine().firstcpu->space(AS_PROGRAM); address_space &space_prg = machine().firstcpu->space(AS_PROGRAM);
space_prg.install_readwrite_handler(0xff18, 0xff1f, read8_delegate( FUNC(mc6843_device::read), static_cast<mc6843_device*>(m_mc6843)), write8_delegate(FUNC(mc6843_device::write), static_cast<mc6843_device*>(m_mc6843)) ); space_prg.install_readwrite_handler(0xff18, 0xff1f, read8_delegate( FUNC(mc6843_device::read), (mc6843_device*)m_mc6843), write8_delegate(FUNC(mc6843_device::write), (mc6843_device*)m_mc6843) );
space_prg.install_readwrite_handler(0xff20, 0xff20, read8_delegate( FUNC(bml3bus_mp1805_device::bml3_mp1805_r), this), write8_delegate(FUNC(bml3bus_mp1805_device::bml3_mp1805_w), this) ); space_prg.install_readwrite_handler(0xff20, 0xff20, read8_delegate( FUNC(bml3bus_mp1805_device::bml3_mp1805_r), this), write8_delegate(FUNC(bml3bus_mp1805_device::bml3_mp1805_w), this) );
// overwriting the main ROM (rather than using e.g. install_rom) should mean that bank switches for RAM expansion still work... // overwriting the main ROM (rather than using e.g. install_rom) should mean that bank switches for RAM expansion still work...
UINT8 *mainrom = device().machine().root_device().memregion("maincpu")->base(); UINT8 *mainrom = device().machine().root_device().memregion("maincpu")->base();

View File

@ -189,6 +189,8 @@ void c64_turbo232_cartridge_device::c64_cd_w(address_space &space, offs_t offset
case 7: case 7:
if (m_es & ES_M) if (m_es & ES_M)
{ {
data = m_es;
switch (m_es & ES_S_MASK) switch (m_es & ES_S_MASK)
{ {
case ES_S_230400: m_acia->set_xtal(XTAL_3_6864MHz); break; case ES_S_230400: m_acia->set_xtal(XTAL_3_6864MHz); break;

View File

@ -140,7 +140,7 @@ void cgenie_fdc_device::device_reset()
// map extra socket // map extra socket
if (m_socket->exists()) if (m_socket->exists())
{ {
m_slot->m_program->install_read_handler(0xe000, 0xefff, read8_delegate(FUNC(generic_slot_device::read_rom), static_cast<generic_slot_device *>(m_socket))); m_slot->m_program->install_read_handler(0xe000, 0xefff, read8_delegate(FUNC(generic_slot_device::read_rom), (generic_slot_device *) m_socket));
} }
} }

View File

@ -97,7 +97,7 @@ void beckerport_device::device_start(void)
file_error filerr = osd_open(chAddress, 0, &m_pSocket, &filesize); file_error filerr = osd_open(chAddress, 0, &m_pSocket, &filesize);
if (filerr != FILERR_NONE) if (filerr != FILERR_NONE)
{ {
osd_printf_verbose("Error: osd_open returned error %i!\n", static_cast<int>(filerr)); osd_printf_verbose("Error: osd_open returned error %i!\n", (int) filerr);
return; return;
} }
@ -167,7 +167,7 @@ READ8_MEMBER(beckerport_device::read)
fprintf(stderr, "%s: read from bad offset %d\n", __FILE__, offset); fprintf(stderr, "%s: read from bad offset %d\n", __FILE__, offset);
} }
return static_cast<int>(data); return (int)data;
} }
/*------------------------------------------------- /*-------------------------------------------------
@ -176,7 +176,7 @@ READ8_MEMBER(beckerport_device::read)
WRITE8_MEMBER(beckerport_device::write) WRITE8_MEMBER(beckerport_device::write)
{ {
char d = static_cast<char>(data); char d = (char)data;
file_error filerr; file_error filerr;
if (m_pSocket == nullptr) if (m_pSocket == nullptr)

View File

@ -114,15 +114,15 @@ void cococart_slot_device::device_timer(emu_timer &timer, device_timer_id id, in
switch(id) switch(id)
{ {
case TIMER_CART: case TIMER_CART:
set_line("CART", m_cart_line, static_cast<cococart_line_value>(param)); set_line("CART", m_cart_line, (cococart_line_value) param);
break; break;
case TIMER_NMI: case TIMER_NMI:
set_line("NMI", m_nmi_line, static_cast<cococart_line_value>(param)); set_line("NMI", m_nmi_line, (cococart_line_value) param);
break; break;
case TIMER_HALT: case TIMER_HALT:
set_line("HALT", m_halt_line, static_cast<cococart_line_value>(param)); set_line("HALT", m_halt_line, (cococart_line_value) param);
break; break;
} }
} }
@ -231,7 +231,7 @@ void cococart_slot_device::set_line_timer(coco_cartridge_line &line, cococart_li
? machine().firstcpu->cycles_to_attotime(line.delay) ? machine().firstcpu->cycles_to_attotime(line.delay)
: attotime::zero; : attotime::zero;
line.timer[line.timer_index]->adjust(delay, static_cast<int>(value)); line.timer[line.timer_index]->adjust(delay, (int) value);
line.timer_index = (line.timer_index + 1) % TIMER_POOL; line.timer_index = (line.timer_index + 1) % TIMER_POOL;
} }

View File

@ -76,7 +76,7 @@ void cpc_smartwatch_device::device_reset()
READ8_MEMBER(cpc_smartwatch_device::rtc_w) READ8_MEMBER(cpc_smartwatch_device::rtc_w)
{ {
UINT8* bank = static_cast<UINT8*>(m_bank->base()); UINT8* bank = (UINT8*)m_bank->base();
if(offset & 1) if(offset & 1)
m_rtc->read_1(space,0); m_rtc->read_1(space,0);
else else
@ -86,6 +86,6 @@ READ8_MEMBER(cpc_smartwatch_device::rtc_w)
READ8_MEMBER(cpc_smartwatch_device::rtc_r) READ8_MEMBER(cpc_smartwatch_device::rtc_r)
{ {
UINT8* bank = static_cast<UINT8*>(m_bank->base()); UINT8* bank = (UINT8*)m_bank->base();
return ((bank[(offset & 1)+4]) & 0xfe) | (m_rtc->read_data(space,0) & 0x01); return ((bank[(offset & 1)+4]) & 0xfe) | (m_rtc->read_data(space,0) & 0x01);
} }

View File

@ -273,10 +273,10 @@ READ8_MEMBER(cpc_symbiface2_device::rom_rewrite_r)
if(bank >= 32) if(bank >= 32)
return 0xff; return 0xff;
m_4xxx_ptr_r = static_cast<UINT8*>(machine().root_device().membank("bank3")->base()); m_4xxx_ptr_r = (UINT8*)machine().root_device().membank("bank3")->base();
m_4xxx_ptr_w = static_cast<UINT8*>(machine().root_device().membank("bank11")->base()); m_4xxx_ptr_w = (UINT8*)machine().root_device().membank("bank11")->base();
m_6xxx_ptr_r = static_cast<UINT8*>(machine().root_device().membank("bank4")->base()); m_6xxx_ptr_r = (UINT8*)machine().root_device().membank("bank4")->base();
m_6xxx_ptr_w = static_cast<UINT8*>(machine().root_device().membank("bank12")->base()); m_6xxx_ptr_w = (UINT8*)machine().root_device().membank("bank12")->base();
machine().root_device().membank("bank3")->set_base(&m_rom_space[bank*16384]); machine().root_device().membank("bank3")->set_base(&m_rom_space[bank*16384]);
machine().root_device().membank("bank4")->set_base(&m_rom_space[bank*16384+8192]); machine().root_device().membank("bank4")->set_base(&m_rom_space[bank*16384+8192]);
machine().root_device().membank("bank11")->set_base(&m_rom_space[bank*16384]); machine().root_device().membank("bank11")->set_base(&m_rom_space[bank*16384]);

View File

@ -399,8 +399,8 @@ bool base_gb_cart_slot_device::call_load()
// Hack to support Donkey Kong Land 2 + 3 in SGB // Hack to support Donkey Kong Land 2 + 3 in SGB
// For some reason, these store the tile data differently. Hacks will go once it's been figured out // For some reason, these store the tile data differently. Hacks will go once it's been figured out
if (strncmp(reinterpret_cast<const char*>(ROM + 0x134), "DONKEYKONGLAND 2", 16) == 0 || if (strncmp((const char*)(ROM + 0x134), "DONKEYKONGLAND 2", 16) == 0 ||
strncmp(reinterpret_cast<const char*>(ROM + 0x134), "DONKEYKONGLAND 3", 16) == 0) strncmp((const char*)(ROM + 0x134), "DONKEYKONGLAND 3", 16) == 0)
m_sgb_hack = 1; m_sgb_hack = 1;
return IMAGE_INIT_PASS; return IMAGE_INIT_PASS;
@ -817,7 +817,7 @@ void base_gb_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 len)
break; break;
} }
strncpy(soft, reinterpret_cast<char *>(&ROM[0x0134]), 16); strncpy(soft, (char *)&ROM[0x0134], 16);
soft[16] = '\0'; soft[16] = '\0';
logerror("Cart Information\n"); logerror("Cart Information\n");
logerror("\tName: %s\n", soft); logerror("\tName: %s\n", soft);

View File

@ -51,7 +51,7 @@ void device_gba_cart_interface::rom_alloc(UINT32 size, const char *tag)
if (m_rom == nullptr) if (m_rom == nullptr)
{ {
// we always alloc 32MB of rom region! // we always alloc 32MB of rom region!
m_rom = reinterpret_cast<UINT32 *>(device().machine().memory().region_alloc(std::string(tag).append(GBASLOT_ROM_REGION_TAG).c_str(), 0x2000000, 4, ENDIANNESS_LITTLE)->base()); m_rom = (UINT32 *)device().machine().memory().region_alloc(std::string(tag).append(GBASLOT_ROM_REGION_TAG).c_str(), 0x2000000, 4, ENDIANNESS_LITTLE)->base();
m_rom_size = size; m_rom_size = size;
} }
} }
@ -176,7 +176,7 @@ bool gba_cart_slot_device::call_load()
} }
m_cart->rom_alloc(size, tag()); m_cart->rom_alloc(size, tag());
ROM = reinterpret_cast<UINT8 *>(m_cart->get_rom_base()); ROM = (UINT8 *)m_cart->get_rom_base();
if (software_entry() == nullptr) if (software_entry() == nullptr)
{ {

View File

@ -96,14 +96,14 @@ void gba_rom_eeprom_device::device_start()
{ {
// for the moment we use a custom eeprom implementation, so we alloc/save it as nvram // for the moment we use a custom eeprom implementation, so we alloc/save it as nvram
nvram_alloc(0x200); nvram_alloc(0x200);
m_eeprom = std::make_unique<gba_eeprom_device>(machine(), reinterpret_cast<UINT8*>(get_nvram_base()), get_nvram_size(), 6); m_eeprom = std::make_unique<gba_eeprom_device>(machine(), (UINT8*)get_nvram_base(), get_nvram_size(), 6);
} }
void gba_rom_eeprom64_device::device_start() void gba_rom_eeprom64_device::device_start()
{ {
// for the moment we use a custom eeprom implementation, so we alloc/save it as nvram // for the moment we use a custom eeprom implementation, so we alloc/save it as nvram
nvram_alloc(0x2000); nvram_alloc(0x2000);
m_eeprom = std::make_unique<gba_eeprom_device>(machine(), reinterpret_cast<UINT8*>(get_nvram_base()), get_nvram_size(), 14); m_eeprom = std::make_unique<gba_eeprom_device>(machine(), (UINT8*)get_nvram_base(), get_nvram_size(), 14);
} }

View File

@ -72,7 +72,7 @@ READ8_MEMBER(generic_rom_plain_device::read_rom)
READ16_MEMBER(generic_rom_plain_device::read16_rom) READ16_MEMBER(generic_rom_plain_device::read16_rom)
{ {
UINT16 *ROM = reinterpret_cast<UINT16 *>(m_rom); UINT16 *ROM = (UINT16 *)m_rom;
if (offset < m_rom_size/2) if (offset < m_rom_size/2)
return ROM[offset]; return ROM[offset];
else else
@ -81,7 +81,7 @@ READ16_MEMBER(generic_rom_plain_device::read16_rom)
READ32_MEMBER(generic_rom_plain_device::read32_rom) READ32_MEMBER(generic_rom_plain_device::read32_rom)
{ {
UINT32 *ROM = reinterpret_cast<UINT32 *>(m_rom); UINT32 *ROM = (UINT32 *)m_rom;
if (offset < m_rom_size/4) if (offset < m_rom_size/4)
return ROM[offset]; return ROM[offset];
else else
@ -96,13 +96,13 @@ READ8_MEMBER(generic_rom_linear_device::read_rom)
READ16_MEMBER(generic_rom_linear_device::read16_rom) READ16_MEMBER(generic_rom_linear_device::read16_rom)
{ {
UINT16 *ROM = reinterpret_cast<UINT16 *>(m_rom); UINT16 *ROM = (UINT16 *)m_rom;
return ROM[offset % (m_rom_size/2)]; return ROM[offset % (m_rom_size/2)];
} }
READ32_MEMBER(generic_rom_linear_device::read32_rom) READ32_MEMBER(generic_rom_linear_device::read32_rom)
{ {
UINT32 *ROM = reinterpret_cast<UINT32 *>(m_rom); UINT32 *ROM = (UINT32 *)m_rom;
return ROM[offset % (m_rom_size/4)]; return ROM[offset % (m_rom_size/4)];
} }

View File

@ -33,7 +33,7 @@ public:
virtual DECLARE_READ16_MEMBER(read_rome0); virtual DECLARE_READ16_MEMBER(read_rome0);
virtual DECLARE_READ16_MEMBER(read_romf0); virtual DECLARE_READ16_MEMBER(read_romf0);
// RAM // RAM
virtual DECLARE_READ16_MEMBER(read_ram) { return static_cast<int>(m_ram[offset & (m_ram.size() - 1)]); } virtual DECLARE_READ16_MEMBER(read_ram) { return (int)m_ram[offset & (m_ram.size() - 1)]; }
virtual DECLARE_WRITE16_MEMBER(write_ram) { m_ram[offset & (m_ram.size() - 1)] = data & 0xff; } virtual DECLARE_WRITE16_MEMBER(write_ram) { m_ram[offset & (m_ram.size() - 1)] = data & 0xff; }
// AY8914 // AY8914
virtual DECLARE_READ16_MEMBER(read_ay); virtual DECLARE_READ16_MEMBER(read_ay);

View File

@ -47,7 +47,7 @@ public:
intv_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); intv_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// reading and writing // reading and writing
virtual DECLARE_READ16_MEMBER(read_ram) { return static_cast<int>(m_ram[offset & (m_ram.size() - 1)]); } virtual DECLARE_READ16_MEMBER(read_ram) { return (int)m_ram[offset & (m_ram.size() - 1)]; }
virtual DECLARE_WRITE16_MEMBER(write_ram) { m_ram[offset & (m_ram.size() - 1)] = data & 0xff; } virtual DECLARE_WRITE16_MEMBER(write_ram) { m_ram[offset & (m_ram.size() - 1)] = data & 0xff; }
}; };
@ -60,7 +60,7 @@ public:
intv_gfact_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); intv_gfact_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// reading and writing // reading and writing
virtual DECLARE_READ16_MEMBER(read_ram) { return static_cast<int>(m_ram[offset & (m_ram.size() - 1)]); } virtual DECLARE_READ16_MEMBER(read_ram) { return (int)m_ram[offset & (m_ram.size() - 1)]; }
virtual DECLARE_WRITE16_MEMBER(write_ram) { m_ram[offset & (m_ram.size() - 1)] = data & 0xff; } virtual DECLARE_WRITE16_MEMBER(write_ram) { m_ram[offset & (m_ram.size() - 1)] = data & 0xff; }
}; };

View File

@ -264,7 +264,7 @@ int intv_cart_slot_device::load_fullpath()
return IMAGE_INIT_FAIL; return IMAGE_INIT_FAIL;
m_cart->rom_alloc(0x20000, tag()); m_cart->rom_alloc(0x20000, tag());
ROM = static_cast<UINT8 *>(m_cart->get_rom_base()); ROM = (UINT8 *)m_cart->get_rom_base();
for (int i = 0; i < num_segments; i++) for (int i = 0; i < num_segments; i++)
{ {
@ -313,7 +313,7 @@ int intv_cart_slot_device::load_fullpath()
std::string extrainfo; std::string extrainfo;
m_cart->rom_alloc(0x20000, tag()); m_cart->rom_alloc(0x20000, tag());
ROM = static_cast<UINT8 *>(m_cart->get_rom_base()); ROM = (UINT8 *)m_cart->get_rom_base();
if (!hashfile_extrainfo(*this, extrainfo)) if (!hashfile_extrainfo(*this, extrainfo))
{ {

View File

@ -61,7 +61,7 @@ iq151_disc2_device::iq151_disc2_device(const machine_config &mconfig, const char
void iq151_disc2_device::device_start() void iq151_disc2_device::device_start()
{ {
m_rom = static_cast<UINT8*>(memregion("disc2")->base()); m_rom = (UINT8*)memregion("disc2")->base();
} }
//------------------------------------------------- //-------------------------------------------------

View File

@ -59,7 +59,7 @@ iq151_minigraf_device::iq151_minigraf_device(const machine_config &mconfig, cons
void iq151_minigraf_device::device_start() void iq151_minigraf_device::device_start()
{ {
m_rom = static_cast<UINT8*>(memregion("minigraf")->base()); m_rom = (UINT8*)memregion("minigraf")->base();
// allocate a bitmap for represent the paper // allocate a bitmap for represent the paper
m_paper = auto_bitmap_ind16_alloc(machine(), PAPER_WIDTH, PAPER_HEIGHT); m_paper = auto_bitmap_ind16_alloc(machine(), PAPER_WIDTH, PAPER_HEIGHT);

View File

@ -58,7 +58,7 @@ iq151_ms151a_device::iq151_ms151a_device(const machine_config &mconfig, const ch
void iq151_ms151a_device::device_start() void iq151_ms151a_device::device_start()
{ {
m_rom = static_cast<UINT8*>(memregion("ms151a")->base()); m_rom = (UINT8*)memregion("ms151a")->base();
// allocate a bitmap for represent the paper // allocate a bitmap for represent the paper
m_paper = auto_bitmap_ind16_alloc(machine(), PAPER_WIDTH, PAPER_HEIGHT); m_paper = auto_bitmap_ind16_alloc(machine(), PAPER_WIDTH, PAPER_HEIGHT);

View File

@ -53,7 +53,7 @@ iq151_rom_device::iq151_rom_device(const machine_config &mconfig, device_type ty
void iq151_rom_device::device_start() void iq151_rom_device::device_start()
{ {
m_rom = static_cast<UINT8*>(memregion("rom")->base()); m_rom = (UINT8*)memregion("rom")->base();
} }
//------------------------------------------------- //-------------------------------------------------

View File

@ -72,8 +72,8 @@ iq151_video32_device::iq151_video32_device(const machine_config &mconfig, const
void iq151_video32_device::device_start() void iq151_video32_device::device_start()
{ {
m_videoram = static_cast<UINT8*>(memregion("videoram")->base()); m_videoram = (UINT8*)memregion("videoram")->base();
m_chargen = static_cast<UINT8*>(memregion("chargen")->base()); m_chargen = (UINT8*)memregion("chargen")->base();
m_gfxdecode->set_gfx(0, global_alloc(gfx_element(m_palette, iq151_video32_charlayout, m_chargen, 0, 1, 0))); m_gfxdecode->set_gfx(0, global_alloc(gfx_element(m_palette, iq151_video32_charlayout, m_chargen, 0, 1, 0)));
} }

View File

@ -71,8 +71,8 @@ iq151_video64_device::iq151_video64_device(const machine_config &mconfig, const
void iq151_video64_device::device_start() void iq151_video64_device::device_start()
{ {
m_videoram = static_cast<UINT8*>(memregion("videoram")->base()); m_videoram = (UINT8*)memregion("videoram")->base();
m_chargen = static_cast<UINT8*>(memregion("chargen")->base()); m_chargen = (UINT8*)memregion("chargen")->base();
m_gfxdecode->set_gfx(0,global_alloc(gfx_element(m_palette, iq151_video64_charlayout, m_chargen, 0, 1, 0))); m_gfxdecode->set_gfx(0,global_alloc(gfx_element(m_palette, iq151_video64_charlayout, m_chargen, 0, 1, 0)));
} }

View File

@ -907,7 +907,7 @@ void threecom3c505_device::device_timer(emu_timer &timer, device_timer_id id, in
void threecom3c505_device::do_command() void threecom3c505_device::do_command()
{ {
pcb_struct &command_pcp = reinterpret_cast<pcb_struct &>(m_command_buffer); pcb_struct &command_pcp = (pcb_struct &) m_command_buffer;
// default to successful completion // default to successful completion
m_response.command = command_pcp.command + CMD_RESPONSE_OFFSET; m_response.command = command_pcp.command + CMD_RESPONSE_OFFSET;
@ -1011,7 +1011,7 @@ void threecom3c505_device::do_command()
memcpy(m_station_address, command_pcp.data.eth_addr, command_pcp.length); memcpy(m_station_address, command_pcp.data.eth_addr, command_pcp.length);
} }
set_filter_list(); set_filter_list();
set_mac(reinterpret_cast<char *>(m_station_address)); set_mac((char *) m_station_address);
break; break;
case CMD_MC_17: // 0x17 case CMD_MC_17: // 0x17

View File

@ -323,11 +323,11 @@ void gf1_device::sound_stream_update(sound_stream &stream, stream_sample_t **inp
if(m_voice[x].voice_ctrl & 0x04) if(m_voice[x].voice_ctrl & 0x04)
{ // 16-bit PCM { // 16-bit PCM
current = ((m_voice[x].current_addr >> 9) & 0xc0000) + (((m_voice[x].current_addr >> 9) & 0x1ffff) << 1); current = ((m_voice[x].current_addr >> 9) & 0xc0000) + (((m_voice[x].current_addr >> 9) & 0x1ffff) << 1);
m_voice[x].sample = static_cast<INT16>((m_wave_ram[current & 0xffffe]) | ((m_wave_ram[(current & 0xffffe)+1])<<8)); m_voice[x].sample = (INT16)((m_wave_ram[current & 0xffffe]) | ((m_wave_ram[(current & 0xffffe)+1])<<8));
} }
else else
{ // 8-bit PCM { // 8-bit PCM
m_voice[x].sample = static_cast<INT16>(m_wave_ram[current & 0xfffff] << 8); m_voice[x].sample = (INT16)(m_wave_ram[current & 0xfffff] << 8);
} }
if(m_voice[x].voice_ctrl & 0x40) // voice direction if(m_voice[x].voice_ctrl & 0x40) // voice direction
m_voice[x].current_addr -= (m_voice[x].freq_ctrl >> 1); m_voice[x].current_addr -= (m_voice[x].freq_ctrl >> 1);
@ -376,7 +376,7 @@ void gf1_device::device_start()
acia6850_device::device_start(); acia6850_device::device_start();
int i; int i;
double out = static_cast<double>(1 << 13); double out = (double)(1 << 13);
m_txirq_handler.resolve_safe(); m_txirq_handler.resolve_safe();
m_rxirq_handler.resolve_safe(); m_rxirq_handler.resolve_safe();
@ -413,7 +413,7 @@ void gf1_device::device_start()
for (i=4095;i>=0;i--) for (i=4095;i>=0;i--)
{ {
m_volume_table[i] = static_cast<INT16>(out); m_volume_table[i] = (INT16)out;
out /= 1.002709201; /* 0.0235 dB Steps */ out /= 1.002709201; /* 0.0235 dB Steps */
} }

View File

@ -95,7 +95,7 @@ void isa8_number_9_rev_device::device_start()
{ {
set_isa_device(); set_isa_device();
m_isa->install_memory(0xc0000, 0xc0001, 0, 0, read8_delegate(FUNC(upd7220_device::read), static_cast<upd7220_device *>(m_upd7220)), write8_delegate(FUNC(upd7220_device::write), static_cast<upd7220_device *>(m_upd7220))); m_isa->install_memory(0xc0000, 0xc0001, 0, 0, read8_delegate(FUNC(upd7220_device::read), (upd7220_device *)m_upd7220), write8_delegate(FUNC(upd7220_device::write), (upd7220_device *)m_upd7220));
m_isa->install_memory(0xc0100, 0xc03ff, 0, 0, read8_delegate(FUNC(isa8_number_9_rev_device::pal8_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::pal8_w), this)); m_isa->install_memory(0xc0100, 0xc03ff, 0, 0, read8_delegate(FUNC(isa8_number_9_rev_device::pal8_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::pal8_w), this));
m_isa->install_memory(0xc0400, 0xc0401, 0, 0, read8_delegate(FUNC(isa8_number_9_rev_device::bank_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::bank_w), this)); m_isa->install_memory(0xc0400, 0xc0401, 0, 0, read8_delegate(FUNC(isa8_number_9_rev_device::bank_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::bank_w), this));
m_isa->install_memory(0xc0500, 0xc06ff, 0, 0, read8_delegate(FUNC(isa8_number_9_rev_device::overlay_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::overlay_w), this)); m_isa->install_memory(0xc0500, 0xc06ff, 0, 0, read8_delegate(FUNC(isa8_number_9_rev_device::overlay_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::overlay_w), this));

View File

@ -1358,7 +1358,7 @@ void omti_disk_image_device::device_reset()
if (exists() && fseek(0, SEEK_END) == 0) if (exists() && fseek(0, SEEK_END) == 0)
{ {
UINT32 disk_size = static_cast<UINT32>(ftell() / OMTI_DISK_SECTOR_SIZE); UINT32 disk_size = (UINT32)(ftell() / OMTI_DISK_SECTOR_SIZE);
UINT16 disk_type = disk_size >= 300000 ? OMTI_DISK_TYPE_348_MB : OMTI_DISK_TYPE_155_MB; UINT16 disk_type = disk_size >= 300000 ? OMTI_DISK_TYPE_348_MB : OMTI_DISK_TYPE_155_MB;
if (disk_type != m_type) { if (disk_type != m_type) {
LOG1(("device_reset_omti_disk: disk size=%d blocks, disk type=%x", disk_size, disk_type )); LOG1(("device_reset_omti_disk: disk size=%d blocks, disk type=%x", disk_size, disk_type ));

View File

@ -343,7 +343,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(isa8_pgc_device::scanline_callback)
// XXX hpos shifts every frame -- fix // XXX hpos shifts every frame -- fix
if (y == 0) DBG_LOG(2,"scanline_cb", if (y == 0) DBG_LOG(2,"scanline_cb",
("frame %d x %.4d y %.3d\n", ("frame %d x %.4d y %.3d\n",
static_cast<int>(m_screen->frame_number()), m_screen->hpos(), y)); (int) m_screen->frame_number(), m_screen->hpos(), y));
if (y < PGC_VERT_START) return; if (y < PGC_VERT_START) return;
y -= PGC_VERT_START; y -= PGC_VERT_START;

View File

@ -263,7 +263,7 @@ void s3virge_vga_device::s3_define_video_mode()
{ {
// Dot clock is set via SR12 and SR13 // Dot clock is set via SR12 and SR13
// DCLK calculation // DCLK calculation
freq = (static_cast<double>(s3.clk_pll_m+2) / static_cast<double>((s3.clk_pll_n+2)*(pow(2.0,s3.clk_pll_r)))) * 14.318; // clock between XIN and XOUT freq = ((double)(s3.clk_pll_m+2) / (double)((s3.clk_pll_n+2)*(pow(2.0,s3.clk_pll_r)))) * 14.318; // clock between XIN and XOUT
xtal = freq * 1000000; xtal = freq * 1000000;
//printf("DCLK set to %dHz M=%i N=%i R=%i\n",xtal,s3.clk_pll_m,s3.clk_pll_n,s3.clk_pll_r); //printf("DCLK set to %dHz M=%i N=%i R=%i\n",xtal,s3.clk_pll_m,s3.clk_pll_n,s3.clk_pll_r);
} }

View File

@ -519,7 +519,7 @@ void sb_device::process_fifo(UINT8 cmd)
m_dsp.adc_length = 1; m_dsp.adc_length = 1;
m_dsp.wbuf_status = 0x80; m_dsp.wbuf_status = 0x80;
m_dsp.dma_no_irq = true; m_dsp.dma_no_irq = true;
m_dack_out = static_cast<UINT8>(m_dsp.prot_value & 0xff); m_dack_out = (UINT8)(m_dsp.prot_value & 0xff);
drq_w(1); drq_w(1);
break; break;
@ -1332,7 +1332,7 @@ void sb16_device::dack16_w(int line, UINT16 data)
// set the transfer timer on the 1st byte // set the transfer timer on the 1st byte
if (!m_dsp.dma_timer_started) if (!m_dsp.dma_timer_started)
{ {
m_timer->adjust(attotime::from_hz(static_cast<double>(m_dsp.frequency)), 0, attotime::from_hz(static_cast<double>(m_dsp.frequency))); m_timer->adjust(attotime::from_hz((double)m_dsp.frequency), 0, attotime::from_hz((double)m_dsp.frequency));
m_dsp.d_rptr = m_dsp.d_wptr = 0; m_dsp.d_rptr = m_dsp.d_wptr = 0;
m_dsp.dma_timer_started = true; m_dsp.dma_timer_started = true;
} }
@ -1379,7 +1379,7 @@ void sb_device::dack_w(int line, UINT8 data)
// set the transfer timer on the 1st byte // set the transfer timer on the 1st byte
if (!m_dsp.dma_timer_started) if (!m_dsp.dma_timer_started)
{ {
m_timer->adjust(attotime::from_hz(static_cast<double>(m_dsp.frequency)), 0, attotime::from_hz(static_cast<double>(m_dsp.frequency))); m_timer->adjust(attotime::from_hz((double)m_dsp.frequency), 0, attotime::from_hz((double)m_dsp.frequency));
m_dsp.d_rptr = m_dsp.d_wptr = 0; m_dsp.d_rptr = m_dsp.d_wptr = 0;
m_dsp.dma_timer_started = true; m_dsp.dma_timer_started = true;
} }

View File

@ -118,7 +118,7 @@ public:
DECLARE_WRITE8_MEMBER(dsp_rbuf_status_w); DECLARE_WRITE8_MEMBER(dsp_rbuf_status_w);
DECLARE_WRITE8_MEMBER(dsp_cmd_w); DECLARE_WRITE8_MEMBER(dsp_cmd_w);
DECLARE_WRITE_LINE_MEMBER( midi_rx_w ) { device_serial_interface::rx_w(static_cast<UINT8>(state)); } DECLARE_WRITE_LINE_MEMBER( midi_rx_w ) { device_serial_interface::rx_w((UINT8)state); }
protected: protected:
// device-level overrides // device-level overrides

View File

@ -469,7 +469,7 @@ void sc499_device::check_tape()
{ {
// tape has changed, get new size // tape has changed, get new size
m_image_length = m_image->tapelen(); m_image_length = m_image->tapelen();
m_ctape_block_count = static_cast<UINT32>((m_image_length + SC499_CTAPE_BLOCK_SIZE - 1) / SC499_CTAPE_BLOCK_SIZE); m_ctape_block_count = (UINT32)((m_image_length + SC499_CTAPE_BLOCK_SIZE - 1) / SC499_CTAPE_BLOCK_SIZE);
} }
LOG1(("check_tape: tape image is %s with %d blocks", m_image->filename(), m_ctape_block_count)); LOG1(("check_tape: tape image is %s with %d blocks", m_image->filename(), m_ctape_block_count));
@ -1311,7 +1311,7 @@ bool sc499_ctape_image_device::call_load()
{ {
UINT32 size; UINT32 size;
io_generic io; io_generic io;
io.file = static_cast<device_image_interface *>(this); io.file = (device_image_interface *)this;
io.procs = &image_ioprocs; io.procs = &image_ioprocs;
io.filler = 0xff; io.filler = 0xff;

View File

@ -229,7 +229,7 @@ void i82371ab_device::device_reset()
{ {
southbridge_device::device_reset(); southbridge_device::device_reset();
memset(m_regs, 0, sizeof(m_regs)); memset(m_regs, 0, sizeof(m_regs));
UINT32 (*regs32)[64] = reinterpret_cast<UINT32 (*)[64]>(m_regs); UINT32 (*regs32)[64] = (UINT32 (*)[64])(m_regs);
/* isa */ /* isa */
regs32[0][0x00] = 0x71108086; regs32[0][0x00] = 0x71108086;

View File

@ -216,9 +216,9 @@ void mpc105_device::pci_write(pci_bus_device *pcibus, int function, int offset,
break; break;
case 0xA0: /* memory enable */ case 0xA0: /* memory enable */
if (m_bank_enable != static_cast<UINT8>(data)) if (m_bank_enable != (UINT8) data)
{ {
m_bank_enable = static_cast<UINT8>(data); m_bank_enable = (UINT8) data;
update_memory(); update_memory();
} }
break; break;

View File

@ -210,9 +210,9 @@ READ64_MEMBER(pci_bus_device::read_64be)
UINT64 result = 0; UINT64 result = 0;
mem_mask = FLIPENDIAN_INT64(mem_mask); mem_mask = FLIPENDIAN_INT64(mem_mask);
if (ACCESSING_BITS_0_31) if (ACCESSING_BITS_0_31)
result |= static_cast<UINT64>(read(space, offset * 2 + 0, mem_mask >> 0)) << 0; result |= (UINT64)read(space, offset * 2 + 0, mem_mask >> 0) << 0;
if (ACCESSING_BITS_32_63) if (ACCESSING_BITS_32_63)
result |= static_cast<UINT64>(read(space, offset * 2 + 1, mem_mask >> 32)) << 32; result |= (UINT64)read(space, offset * 2 + 1, mem_mask >> 32) << 32;
return FLIPENDIAN_INT64(result); return FLIPENDIAN_INT64(result);
} }

View File

@ -153,22 +153,22 @@ southbridge_device::southbridge_device(const machine_config &mconfig, device_typ
/// HACK: the memory system cannot cope with mixing the 8 bit device map from the fdc with a 32 bit handler /// HACK: the memory system cannot cope with mixing the 8 bit device map from the fdc with a 32 bit handler
READ8_MEMBER(southbridge_device::ide_read_cs1_r) READ8_MEMBER(southbridge_device::ide_read_cs1_r)
{ {
return m_ide->read_cs1(space, 1, static_cast<UINT32>(0xff0000)) >> 16; return m_ide->read_cs1(space, 1, (UINT32) 0xff0000) >> 16;
} }
WRITE8_MEMBER(southbridge_device::ide_write_cs1_w) WRITE8_MEMBER(southbridge_device::ide_write_cs1_w)
{ {
m_ide->write_cs1(space, 1, static_cast<UINT32>(data) << 16, static_cast<UINT32>(0xff0000)); m_ide->write_cs1(space, 1, (UINT32) data << 16, (UINT32) 0xff0000);
} }
READ8_MEMBER(southbridge_device::ide2_read_cs1_r) READ8_MEMBER(southbridge_device::ide2_read_cs1_r)
{ {
return m_ide2->read_cs1(space, 1, static_cast<UINT32>(0xff0000)) >> 16; return m_ide2->read_cs1(space, 1, (UINT32) 0xff0000) >> 16;
} }
WRITE8_MEMBER(southbridge_device::ide2_write_cs1_w) WRITE8_MEMBER(southbridge_device::ide2_write_cs1_w)
{ {
m_ide2->write_cs1(space, 1, static_cast<UINT32>(data) << 16, static_cast<UINT32>(0xff0000)); m_ide2->write_cs1(space, 1, (UINT32) data << 16, (UINT32) 0xff0000);
} }
//------------------------------------------------- //-------------------------------------------------
@ -329,7 +329,7 @@ READ8_MEMBER(southbridge_device::pc_dma_read_byte)
if(m_dma_channel == -1) if(m_dma_channel == -1)
return 0xff; return 0xff;
UINT8 result; UINT8 result;
offs_t page_offset = (static_cast<offs_t>(m_dma_offset[0][m_dma_channel]) << 16) & 0xFF0000; offs_t page_offset = (((offs_t) m_dma_offset[0][m_dma_channel]) << 16) & 0xFF0000;
result = prog_space.read_byte(page_offset + offset); result = prog_space.read_byte(page_offset + offset);
return result; return result;
@ -341,7 +341,7 @@ WRITE8_MEMBER(southbridge_device::pc_dma_write_byte)
address_space& prog_space = m_maincpu->space(AS_PROGRAM); // get the right address space address_space& prog_space = m_maincpu->space(AS_PROGRAM); // get the right address space
if(m_dma_channel == -1) if(m_dma_channel == -1)
return; return;
offs_t page_offset = (static_cast<offs_t>(m_dma_offset[0][m_dma_channel]) << 16) & 0xFF0000; offs_t page_offset = (((offs_t) m_dma_offset[0][m_dma_channel]) << 16) & 0xFF0000;
prog_space.write_byte(page_offset + offset, data); prog_space.write_byte(page_offset + offset, data);
} }
@ -353,7 +353,7 @@ READ8_MEMBER(southbridge_device::pc_dma_read_word)
if(m_dma_channel == -1) if(m_dma_channel == -1)
return 0xff; return 0xff;
UINT16 result; UINT16 result;
offs_t page_offset = (static_cast<offs_t>(m_dma_offset[1][m_dma_channel & 3]) << 16) & 0xFE0000; offs_t page_offset = (((offs_t) m_dma_offset[1][m_dma_channel & 3]) << 16) & 0xFE0000;
result = prog_space.read_word(page_offset + ( offset << 1 ) ); result = prog_space.read_word(page_offset + ( offset << 1 ) );
m_dma_high_byte = result & 0xFF00; m_dma_high_byte = result & 0xFF00;
@ -367,7 +367,7 @@ WRITE8_MEMBER(southbridge_device::pc_dma_write_word)
address_space& prog_space = m_maincpu->space(AS_PROGRAM); // get the right address space address_space& prog_space = m_maincpu->space(AS_PROGRAM); // get the right address space
if(m_dma_channel == -1) if(m_dma_channel == -1)
return; return;
offs_t page_offset = (static_cast<offs_t>(m_dma_offset[1][m_dma_channel & 3]) << 16) & 0xFE0000; offs_t page_offset = (((offs_t) m_dma_offset[1][m_dma_channel & 3]) << 16) & 0xFE0000;
prog_space.write_word(page_offset + ( offset << 1 ), m_dma_high_byte | data); prog_space.write_word(page_offset + ( offset << 1 ), m_dma_high_byte | data);
} }

View File

@ -87,7 +87,7 @@ void device_md_cart_interface::rom_alloc(size_t size, const char *tag)
{ {
if (m_rom == nullptr) if (m_rom == nullptr)
{ {
m_rom = reinterpret_cast<UINT16 *>(device().machine().memory().region_alloc(std::string(tag).append(MDSLOT_ROM_REGION_TAG).c_str(), size, 2, ENDIANNESS_LITTLE)->base()); m_rom = (UINT16 *)device().machine().memory().region_alloc(std::string(tag).append(MDSLOT_ROM_REGION_TAG).c_str(), size, 2, ENDIANNESS_LITTLE)->base();
m_rom_size = size; m_rom_size = size;
} }
} }
@ -351,7 +351,7 @@ bool base_md_cart_slot_device::call_load()
if (m_cart->get_nvram_size()) if (m_cart->get_nvram_size())
battery_load(m_cart->get_nvram_base(), m_cart->get_nvram_size(), 0xff); battery_load(m_cart->get_nvram_base(), m_cart->get_nvram_size(), 0xff);
file_logging(reinterpret_cast<UINT8 *>(m_cart->get_rom_base()), m_cart->get_rom_size(), m_cart->get_nvram_size()); file_logging((UINT8 *)m_cart->get_rom_base(), m_cart->get_rom_size(), m_cart->get_nvram_size());
} }
return res; return res;
@ -372,7 +372,7 @@ int base_md_cart_slot_device::load_list()
m_cart->rom_alloc(length, tag()); m_cart->rom_alloc(length, tag());
ROM = m_cart->get_rom_base(); ROM = m_cart->get_rom_base();
memcpy(reinterpret_cast<UINT8 *>(ROM), get_software_region("rom"), get_software_region_length("rom")); memcpy((UINT8 *)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 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")) if (length > get_software_region_length("rom"))
@ -402,7 +402,7 @@ static int genesis_is_SMD(unsigned char *buf, unsigned int len)
return 1; return 1;
/* aq quiz */ /* aq quiz */
if (len > (0xf0 + 8) && !strncmp("UZ(-01 ", reinterpret_cast<const char *>(&buf[0xf0]), 8)) if (len > (0xf0 + 8) && !strncmp("UZ(-01 ", (const char *) &buf[0xf0], 8))
return 1; return 1;
/* Phelios USA redump */ /* Phelios USA redump */
@ -412,11 +412,11 @@ static int genesis_is_SMD(unsigned char *buf, unsigned int len)
return 1; return 1;
/* jap baseball 94 */ /* jap baseball 94 */
if (len > (0xf0 + 9) && !strncmp("OL R-AEAL", reinterpret_cast<const char *>(&buf[0xf0]), 9)) if (len > (0xf0 + 9) && !strncmp("OL R-AEAL", (const char *) &buf[0xf0], 9))
return 1; return 1;
/* devilish Mahjong Tower */ /* devilish Mahjong Tower */
if (len > (0xf3 + 11) && !strncmp("optrEtranet", reinterpret_cast<const char *>(&buf[0xf3]), 11)) if (len > (0xf3 + 11) && !strncmp("optrEtranet", (const char *) &buf[0xf3], 11))
return 1; return 1;
/* golden axe 2 beta */ /* golden axe 2 beta */
@ -424,27 +424,27 @@ static int genesis_is_SMD(unsigned char *buf, unsigned int len)
return 1; return 1;
/* omega race */ /* omega race */
if (len > (0x90 + 8) && !strncmp("OEARC ", reinterpret_cast<const char *>(&buf[0x90]), 8)) if (len > (0x90 + 8) && !strncmp("OEARC ", (const char *) &buf[0x90], 8))
return 1; return 1;
/* budokan beta */ /* budokan beta */
if ((len >= 0x6708 + 8) && !strncmp(" NTEBDKN", reinterpret_cast<const char *>(&buf[0x6708]), 8)) if ((len >= 0x6708 + 8) && !strncmp(" NTEBDKN", (const char *) &buf[0x6708], 8))
return 1; return 1;
/* cdx pro 1.8 bios */ /* cdx pro 1.8 bios */
if (len > (0x2c0 + 7) && !strncmp("so fCXP", reinterpret_cast<const char *>(&buf[0x2c0]), 7)) if (len > (0x2c0 + 7) && !strncmp("so fCXP", (const char *) &buf[0x2c0], 7))
return 1; return 1;
/* ishido (hacked) */ /* ishido (hacked) */
if (len > (0x90 + 8) && !strncmp("sio-Wyo ", reinterpret_cast<const char *>(&buf[0x0090]), 8)) if (len > (0x90 + 8) && !strncmp("sio-Wyo ", (const char *) &buf[0x0090], 8))
return 1; return 1;
/* onslaught */ /* onslaught */
if (len > (0x88 + 8) && !strncmp("SS CAL ", reinterpret_cast<const char *>(&buf[0x0088]), 8)) if (len > (0x88 + 8) && !strncmp("SS CAL ", (const char *) &buf[0x0088], 8))
return 1; return 1;
/* tram terror pirate */ /* tram terror pirate */
if ((len >= 0x3648 + 8) && !strncmp("SG NEPIE", reinterpret_cast<const char *>(&buf[0x3648]), 8)) if ((len >= 0x3648 + 8) && !strncmp("SG NEPIE", (const char *) &buf[0x3648], 8))
return 1; return 1;
/* breath of fire 3 chinese */ /* breath of fire 3 chinese */
@ -452,7 +452,7 @@ static int genesis_is_SMD(unsigned char *buf, unsigned int len)
return 1; return 1;
/*tetris pirate */ /*tetris pirate */
if ((len >= 0x1cbe + 5) && !strncmp("@TTI>", reinterpret_cast<const char *>(&buf[0x1cbe]), 5)) if ((len >= 0x1cbe + 5) && !strncmp("@TTI>", (const char *) &buf[0x1cbe], 5))
return 1; return 1;
return 0; return 0;
@ -486,7 +486,7 @@ int base_md_cart_slot_device::load_nonlist()
m_cart->rom_alloc((len == 0x500000) ? 0x900000 : len, tag()); m_cart->rom_alloc((len == 0x500000) ? 0x900000 : len, tag());
// STEP 3: copy the game data in the appropriate way // STEP 3: copy the game data in the appropriate way
ROM = reinterpret_cast<unsigned char *>(m_cart->get_rom_base()); ROM = (unsigned char *)m_cart->get_rom_base();
if (is_smd) if (is_smd)
{ {
@ -580,7 +580,7 @@ void base_md_cart_slot_device::setup_custom_mappers()
void base_md_cart_slot_device::setup_nvram() void base_md_cart_slot_device::setup_nvram()
{ {
UINT8 *ROM = reinterpret_cast<UINT8 *>(m_cart->get_rom_base()); UINT8 *ROM = (UINT8 *)m_cart->get_rom_base();
m_cart->m_nvram_readonly = 0; m_cart->m_nvram_readonly = 0;
m_cart->m_nvram_active = 0; m_cart->m_nvram_active = 0;
m_cart->m_nvram_handlers_installed = 0; m_cart->m_nvram_handlers_installed = 0;
@ -715,21 +715,21 @@ int base_md_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
if (!memcmp(&ROM[0x08c8], smouse_sig, sizeof(smouse_sig))) if (!memcmp(&ROM[0x08c8], smouse_sig, sizeof(smouse_sig)))
type = SMOUSE; type = SMOUSE;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x7e30e]), "SEGA", 4) || if (!memcmp((char *)&ROM[0x7e30e], "SEGA", 4) ||
!memcmp(reinterpret_cast<char *>(&ROM[0x7e100]), "SEGA", 4) || !memcmp((char *)&ROM[0x7e100], "SEGA", 4) ||
!memcmp(reinterpret_cast<char *>(&ROM[0x7e1e6]), "SEGA", 4)) !memcmp((char *)&ROM[0x7e1e6], "SEGA", 4))
type = REALTEC; type = REALTEC;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM T-50396", 10)) // NHLPA Hockey 93 if (!memcmp((char *)&ROM[0x0180], "GM T-50396", 10)) // NHLPA Hockey 93
type = EA_NHLPA; type = EA_NHLPA;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM MK-1215", 10)) // Evander Holyfield if (!memcmp((char *)&ROM[0x0180], "GM MK-1215", 10)) // Evander Holyfield
type = SEGA_EEPROM; type = SEGA_EEPROM;
break; break;
case 0xc0000: case 0xc0000:
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM G-4060 ", 8)) // Wonder Boy V if (!memcmp((char *)&ROM[0x0180], "GM G-4060 ", 8)) // Wonder Boy V
type = SEGA_EEPROM; type = SEGA_EEPROM;
break; break;
@ -743,25 +743,25 @@ int base_md_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
if (!memcmp(&ROM[0xee0d0], bugsl_sig, sizeof(bugsl_sig))) if (!memcmp(&ROM[0xee0d0], bugsl_sig, sizeof(bugsl_sig)))
type = BUGSLIFE; type = BUGSLIFE;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0172]), "GAME : ELF WOR", 14)) if (!memcmp((char *)&ROM[0x0172], "GAME : ELF WOR", 14))
type = ELFWOR; type = ELFWOR;
if (!memcmp(&ROM[0x123e4], sbub_sig, sizeof(sbub_sig))) if (!memcmp(&ROM[0x123e4], sbub_sig, sizeof(sbub_sig)))
type = SBUBBOB; type = SBUBBOB;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM T-50176", 10)) // Rings of Power if (!memcmp((char *)&ROM[0x0180], "GM T-50176", 10)) // Rings of Power
type = EA_NHLPA; type = EA_NHLPA;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "MK 00001211-00", 14)) // Sports Talk Baseball if (!memcmp((char *)&ROM[0x0180], "MK 00001211-00", 14)) // Sports Talk Baseball
type = SEGA_EEPROM; type = SEGA_EEPROM;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM T-120096-", 12)) // Micro Machines 2 if (!memcmp((char *)&ROM[0x0180], "GM T-120096-", 12)) // Micro Machines 2
type = CODE_MASTERS; type = CODE_MASTERS;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM T-120146-", 12)) // Brian Lara Cricket 96 / Shane Wayne Cricket 96 if (!memcmp((char *)&ROM[0x0180], "GM T-120146-", 12)) // Brian Lara Cricket 96 / Shane Wayne Cricket 96
type = BRIAN_LARA; type = BRIAN_LARA;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0190]), "OJKRPTBVFCA ", 0x10)) // Micro Machines '96 / Military TODO: better way to recognize these? if (!memcmp((char *)&ROM[0x0190], "OJKRPTBVFCA ", 0x10)) // Micro Machines '96 / Military TODO: better way to recognize these?
type = CODE_MASTERS; type = CODE_MASTERS;
break; break;
@ -799,17 +799,17 @@ int base_md_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
if (!memcmp(&ROM[0x17bb2], s15in1_sig, sizeof(s15in1_sig))) if (!memcmp(&ROM[0x17bb2], s15in1_sig, sizeof(s15in1_sig)))
type = MC_PIRATE; type = MC_PIRATE;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM T-081326 ", 12)) // NBA Jam if (!memcmp((char *)&ROM[0x0180], "GM T-081326 ", 12)) // NBA Jam
type = NBA_JAM; type = NBA_JAM;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM MK-1228", 10)) // Greatest Heavyweight of the Ring if (!memcmp((char *)&ROM[0x0180], "GM MK-1228", 10)) // Greatest Heavyweight of the Ring
type = SEGA_EEPROM; type = SEGA_EEPROM;
if ((!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM T-12046", 10)) || // Mega Man if ((!memcmp((char *)&ROM[0x0180], "GM T-12046", 10)) || // Mega Man
(!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM T-12053", 10) && !memcmp(&ROM[0x18e], rockman_sig, sizeof(rockman_sig)))) // / Rock Man (EEPROM version) (!memcmp((char *)&ROM[0x0180], "GM T-12053", 10) && !memcmp(&ROM[0x18e], rockman_sig, sizeof(rockman_sig)))) // / Rock Man (EEPROM version)
type = SEGA_EEPROM; type = SEGA_EEPROM;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0150]), "Virtua Racing", 13)) if (!memcmp((char *)&ROM[0x0150], "Virtua Racing", 13))
type = SEGA_SVP; type = SEGA_SVP;
break; break;
@ -826,10 +826,10 @@ int base_md_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
if (!memcmp(&ROM[0x1fd0d2], kof99_sig, sizeof(kof99_sig))) if (!memcmp(&ROM[0x1fd0d2], kof99_sig, sizeof(kof99_sig)))
type = KOF99; type = KOF99;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM T-81406", 10)) // NBA Jam TE if (!memcmp((char *)&ROM[0x0180], "GM T-81406", 10)) // NBA Jam TE
type = NBA_JAM_TE; type = NBA_JAM_TE;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM T-081276 ", 12)) // NFL Quarterback Club if (!memcmp((char *)&ROM[0x0180], "GM T-081276 ", 12)) // NFL Quarterback Club
type = NBA_JAM_TE; type = NBA_JAM_TE;
break; break;
@ -845,24 +845,24 @@ int base_md_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
if (!memcmp(&ROM[0x1e700], s19in1_sig, sizeof(s19in1_sig))) if (!memcmp(&ROM[0x1e700], s19in1_sig, sizeof(s19in1_sig)))
type = MC_PIRATE; type = MC_PIRATE;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM T-081586-", 12)) // NFL Quarterback Club 96 if (!memcmp((char *)&ROM[0x0180], "GM T-081586-", 12)) // NFL Quarterback Club 96
type = NFL_QB_96; type = NFL_QB_96;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM T-081576 ", 12)) // College Slam if (!memcmp((char *)&ROM[0x0180], "GM T-081576 ", 12)) // College Slam
type = C_SLAM; type = C_SLAM;
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM T-81476", 10)) // Big Hurt Baseball if (!memcmp((char *)&ROM[0x0180], "GM T-81476", 10)) // Big Hurt Baseball
type = C_SLAM; type = C_SLAM;
break; break;
case 0x500000: case 0x500000:
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0120]), "SUPER STREET FIGHTER2 ", 22)) if (!memcmp((char *)&ROM[0x0120], "SUPER STREET FIGHTER2 ", 22))
type = SSF2; type = SSF2;
break; break;
case 0x800000: case 0x800000:
if (!memcmp(reinterpret_cast<char *>(&ROM[0x0180]), "GM T-574023-", 12)) // Pier Solar if (!memcmp((char *)&ROM[0x0180], "GM T-574023-", 12)) // Pier Solar
type = PSOLAR; type = PSOLAR;
break; break;
@ -995,7 +995,7 @@ void base_md_cart_slot_device::file_logging(UINT8 *ROM8, UINT32 rom_len, UINT32
logerror("FILE DETAILS\n"); logerror("FILE DETAILS\n");
logerror("============\n"); logerror("============\n");
logerror("Name: %s\n", basename()); logerror("Name: %s\n", basename());
logerror("File Size: 0x%08x\n", (software_entry() == nullptr) ? static_cast<int>(length()) : static_cast<int>(get_software_region_length("rom"))); logerror("File Size: 0x%08x\n", (software_entry() == nullptr) ? (int)length() : (int)get_software_region_length("rom"));
logerror("Detected type: %s\n", md_get_slot(m_type)); logerror("Detected type: %s\n", md_get_slot(m_type));
logerror("ROM (Allocated) Size: 0x%X\n", rom_len); logerror("ROM (Allocated) Size: 0x%X\n", rom_len);
logerror("NVRAM: %s\n", nvram_len ? "Yes" : "No"); logerror("NVRAM: %s\n", nvram_len ? "Yes" : "No");

View File

@ -191,7 +191,7 @@ md_eeprom_stm95_device::md_eeprom_stm95_device(const machine_config &mconfig, co
void md_eeprom_stm95_device::device_start() void md_eeprom_stm95_device::device_start()
{ {
nvram_alloc(M95320_SIZE); nvram_alloc(M95320_SIZE);
m_stm95 = std::make_unique<stm95_eeprom_device>(machine(), reinterpret_cast<UINT8*>(get_nvram_base())); m_stm95 = std::make_unique<stm95_eeprom_device>(machine(), (UINT8*)get_nvram_base());
save_item(NAME(m_rdcnt)); save_item(NAME(m_rdcnt));
save_item(NAME(m_bank)); save_item(NAME(m_bank));

View File

@ -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)) if (reg == 4 || (m_svp->state().state_int(SSP_ST) & 0x60))
{ {
#define CADDR ((((mode<<16)&0x7f0000)|addr)<<1) #define CADDR ((((mode<<16)&0x7f0000)|addr)<<1)
UINT16 *dram = reinterpret_cast<UINT16 *>(m_dram); UINT16 *dram = (UINT16 *)m_dram;
if (write) if (write)
{ {
int mode = m_pmac_write[reg] >> 16; 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 else if ((mode & 0x47ff) == 0x001c) // IRAM
{ {
int inc = get_inc(mode); int inc = get_inc(mode);
reinterpret_cast<UINT16 *>(m_iram)[addr & 0x3ff] = d; ((UINT16 *)m_iram)[addr & 0x3ff] = d;
m_pmac_write[reg] += inc; m_pmac_write[reg] += inc;
} }
else 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; int addr = m_pmac_read[reg] & 0xffff;
if ((mode & 0xfff0) == 0x0800) // ROM, inc 1, verified to be correct if ((mode & 0xfff0) == 0x0800) // ROM, inc 1, verified to be correct
{ {
UINT16 *ROM = static_cast<UINT16 *>(get_rom_base()); UINT16 *ROM = (UINT16 *)get_rom_base();
m_pmac_read[reg] += 1; m_pmac_read[reg] += 1;
d = ROM[addr | ((mode & 0xf) << 16)]; 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 d;
} }
return static_cast<UINT32>(-1); return (UINT32)-1;
} }
READ16_MEMBER( md_rom_svp_device::read_pm0 ) READ16_MEMBER( md_rom_svp_device::read_pm0 )
{ {
UINT32 d = pm_io(0, 0, 0); UINT32 d = pm_io(0, 0, 0);
if (d != static_cast<UINT32>(-1)) if (d != (UINT32)-1)
return d; return d;
d = m_xst2; d = m_xst2;
m_xst2 &= ~2; // ? m_xst2 &= ~2; // ?
@ -185,7 +185,7 @@ READ16_MEMBER( md_rom_svp_device::read_pm0 )
WRITE16_MEMBER( md_rom_svp_device::write_pm0 ) WRITE16_MEMBER( md_rom_svp_device::write_pm0 )
{ {
UINT32 r = pm_io(0, 1, data); UINT32 r = pm_io(0, 1, data);
if (r != static_cast<UINT32>(-1)) if (r != (UINT32)-1)
return; return;
m_xst2 = data; // ? m_xst2 = data; // ?
} }
@ -193,7 +193,7 @@ WRITE16_MEMBER( md_rom_svp_device::write_pm0 )
READ16_MEMBER( md_rom_svp_device::read_pm1 ) READ16_MEMBER( md_rom_svp_device::read_pm1 )
{ {
UINT32 r = pm_io(1, 0, 0); UINT32 r = pm_io(1, 0, 0);
if (r != static_cast<UINT32>(-1)) if (r != (UINT32)-1)
return r; return r;
logerror("svp: PM1 acces in non PM mode?\n"); logerror("svp: PM1 acces in non PM mode?\n");
return 0; return 0;
@ -202,7 +202,7 @@ READ16_MEMBER( md_rom_svp_device::read_pm1 )
WRITE16_MEMBER( md_rom_svp_device::write_pm1 ) WRITE16_MEMBER( md_rom_svp_device::write_pm1 )
{ {
UINT32 r = pm_io(1, 1, data); UINT32 r = pm_io(1, 1, data);
if (r != static_cast<UINT32>(-1)) if (r != (UINT32)-1)
return; return;
logerror("svp: PM1 acces in non PM mode?\n"); logerror("svp: PM1 acces in non PM mode?\n");
} }
@ -210,7 +210,7 @@ WRITE16_MEMBER( md_rom_svp_device::write_pm1 )
READ16_MEMBER( md_rom_svp_device::read_pm2 ) READ16_MEMBER( md_rom_svp_device::read_pm2 )
{ {
UINT32 r = pm_io(2, 0, 0); UINT32 r = pm_io(2, 0, 0);
if (r != static_cast<UINT32>(-1)) if (r != (UINT32)-1)
return r; return r;
logerror("svp: PM2 acces in non PM mode?\n"); logerror("svp: PM2 acces in non PM mode?\n");
return 0; return 0;
@ -219,7 +219,7 @@ READ16_MEMBER( md_rom_svp_device::read_pm2 )
WRITE16_MEMBER( md_rom_svp_device::write_pm2 ) WRITE16_MEMBER( md_rom_svp_device::write_pm2 )
{ {
UINT32 r = pm_io(2, 1, data); UINT32 r = pm_io(2, 1, data);
if (r != static_cast<UINT32>(-1)) if (r != (UINT32)-1)
return; return;
logerror("svp: PM2 acces in non PM mode?\n"); logerror("svp: PM2 acces in non PM mode?\n");
} }
@ -227,7 +227,7 @@ WRITE16_MEMBER( md_rom_svp_device::write_pm2 )
READ16_MEMBER( md_rom_svp_device::read_xst ) READ16_MEMBER( md_rom_svp_device::read_xst )
{ {
UINT32 d = pm_io(3, 0, 0); UINT32 d = pm_io(3, 0, 0);
if (d != static_cast<UINT32>(-1)) if (d != (UINT32)-1)
return d; return d;
return m_xst; return m_xst;
} }
@ -235,7 +235,7 @@ READ16_MEMBER( md_rom_svp_device::read_xst )
WRITE16_MEMBER( md_rom_svp_device::write_xst ) WRITE16_MEMBER( md_rom_svp_device::write_xst )
{ {
UINT32 r = pm_io(3, 1, data); UINT32 r = pm_io(3, 1, data);
if (r != static_cast<UINT32>(-1)) if (r != (UINT32)-1)
return; return;
m_xst2 |= 1; m_xst2 |= 1;
m_xst = data; m_xst = data;
@ -294,7 +294,7 @@ WRITE16_MEMBER( md_rom_svp_device::write_al )
READ16_MEMBER( md_rom_svp_device::rom_read1 ) READ16_MEMBER( md_rom_svp_device::rom_read1 )
{ {
UINT16 *IRAM = reinterpret_cast<UINT16 *>(m_iram); UINT16 *IRAM = (UINT16 *)m_iram;
return IRAM[offset]; return IRAM[offset];
} }
@ -404,7 +404,7 @@ void md_rom_svp_device::device_start()
READ16_MEMBER(md_rom_svp_device::read) READ16_MEMBER(md_rom_svp_device::read)
{ {
UINT16 *DRAM = reinterpret_cast<UINT16 *>(m_dram); UINT16 *DRAM = (UINT16 *)m_dram;
if (offset >= 0x300000/2 && offset < 0x320000/2) if (offset >= 0x300000/2 && offset < 0x320000/2)
{ {
@ -438,7 +438,7 @@ WRITE16_MEMBER(md_rom_svp_device::write)
if (offset >= 0x300000/2 && offset < 0x320000/2) if (offset >= 0x300000/2 && offset < 0x320000/2)
{ {
UINT32 a1 = offset - 0x300000/2; UINT32 a1 = offset - 0x300000/2;
UINT16 *DRAM = reinterpret_cast<UINT16 *>(m_dram); UINT16 *DRAM = (UINT16 *)m_dram;
DRAM[a1] = data; DRAM[a1] = data;
} }
} }

View File

@ -100,7 +100,7 @@ void ngbootleg_prot_device::kof97oro_px_decode(UINT8* cpurom, UINT32 cpurom_size
{ {
int i; int i;
std::vector<UINT16> tmp( 0x500000 ); std::vector<UINT16> tmp( 0x500000 );
UINT16 *src = reinterpret_cast<UINT16*>(cpurom); UINT16 *src = (UINT16*)cpurom;
for (i = 0; i < 0x500000/2; i++) { for (i = 0; i < 0x500000/2; i++) {
tmp[i] = src[i ^ 0x7ffef]; tmp[i] = src[i ^ 0x7ffef];
@ -190,12 +190,12 @@ void ngbootleg_prot_device::decrypt_kof10th(UINT8* cpurom, UINT32 cpurom_size)
} }
// Altera protection chip patches these over P ROM // Altera protection chip patches these over P ROM
reinterpret_cast<UINT16*>(src)[0x0124/2] = 0x000d; // Enables XOR for RAM moves, forces SoftDIPs, and USA region ((UINT16*)src)[0x0124/2] = 0x000d; // Enables XOR for RAM moves, forces SoftDIPs, and USA region
reinterpret_cast<UINT16*>(src)[0x0126/2] = 0xf7a8; ((UINT16*)src)[0x0126/2] = 0xf7a8;
reinterpret_cast<UINT16*>(src)[0x8bf4/2] = 0x4ef9; // Run code to change "S" data ((UINT16*)src)[0x8bf4/2] = 0x4ef9; // Run code to change "S" data
reinterpret_cast<UINT16*>(src)[0x8bf6/2] = 0x000d; ((UINT16*)src)[0x8bf6/2] = 0x000d;
reinterpret_cast<UINT16*>(src)[0x8bf8/2] = 0xf980; ((UINT16*)src)[0x8bf8/2] = 0xf980;
} }
@ -205,7 +205,7 @@ void ngbootleg_prot_device::decrypt_kof10th(UINT8* cpurom, UINT32 cpurom_size)
void ngbootleg_prot_device::kf10thep_px_decrypt(UINT8* cpurom, UINT32 cpurom_size) void ngbootleg_prot_device::kf10thep_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
{ {
UINT16 *rom = reinterpret_cast<UINT16*>(cpurom); UINT16 *rom = (UINT16*)cpurom;
std::vector<UINT16> buf(0x100000/2); std::vector<UINT16> buf(0x100000/2);
memcpy(&buf[0x000000/2], &rom[0x060000/2], 0x20000); memcpy(&buf[0x000000/2], &rom[0x060000/2], 0x20000);
@ -454,7 +454,7 @@ void ngbootleg_prot_device::patch_cthd2003(cpu_device* maincpu, neogeo_banked_ca
{ {
/* patches thanks to razoola */ /* patches thanks to razoola */
int i; int i;
UINT16 *mem16 = reinterpret_cast<UINT16 *>(cpurom); UINT16 *mem16 = (UINT16 *)cpurom;
/* special ROM banking handler */ /* special ROM banking handler */
maincpu->space(AS_PROGRAM).install_write_handler(0x2ffff0, 0x2fffff, write16_delegate(FUNC(ngbootleg_prot_device::cthd2003_bankswitch_w),this)); maincpu->space(AS_PROGRAM).install_write_handler(0x2ffff0, 0x2fffff, write16_delegate(FUNC(ngbootleg_prot_device::cthd2003_bankswitch_w),this));
@ -561,7 +561,7 @@ void ngbootleg_prot_device::patch_ct2k3sa(UINT8* cpurom, UINT32 cpurom_size)
{ {
/* patches thanks to razoola - same as for cthd2003*/ /* patches thanks to razoola - same as for cthd2003*/
int i; int i;
UINT16 *mem16 = reinterpret_cast<UINT16 *>(cpurom); UINT16 *mem16 = (UINT16 *)cpurom;
// theres still a problem on the character select screen but it seems to be related to cpu core timing issues, // theres still a problem on the character select screen but it seems to be related to cpu core timing issues,
// overclocking the 68k prevents it. // overclocking the 68k prevents it.
@ -631,7 +631,7 @@ void ngbootleg_prot_device::lans2004_decrypt_68k(UINT8* cpurom, UINT32 cpurom_si
/* Descrambling P ROMs - Thanks to Razoola for the info */ /* Descrambling P ROMs - Thanks to Razoola for the info */
int i; int i;
UINT8 *src = cpurom; UINT8 *src = cpurom;
UINT16 *rom = reinterpret_cast<UINT16*>(cpurom); UINT16 *rom = (UINT16*)cpurom;
{ {
static const int sec[] = { 0x3, 0x8, 0x7, 0xC, 0x1, 0xA, 0x6, 0xD }; static const int sec[] = { 0x3, 0x8, 0x7, 0xC, 0x1, 0xA, 0x6, 0xD };
@ -788,7 +788,7 @@ void ngbootleg_prot_device::svcplus_px_decrypt(UINT8* cpurom, UINT32 cpurom_size
void ngbootleg_prot_device::svcplus_px_hack(UINT8* cpurom, UINT32 cpurom_size) void ngbootleg_prot_device::svcplus_px_hack(UINT8* cpurom, UINT32 cpurom_size)
{ {
/* patched by the protection chip? */ /* patched by the protection chip? */
UINT16 *mem16 = reinterpret_cast<UINT16 *>(cpurom); UINT16 *mem16 = (UINT16 *)cpurom;
mem16[0x0f8016/2] = 0x33c1; mem16[0x0f8016/2] = 0x33c1;
} }
@ -839,7 +839,7 @@ void ngbootleg_prot_device::svcsplus_px_decrypt(UINT8* cpurom, UINT32 cpurom_siz
void ngbootleg_prot_device::svcsplus_px_hack(UINT8* cpurom, UINT32 cpurom_size) void ngbootleg_prot_device::svcsplus_px_hack(UINT8* cpurom, UINT32 cpurom_size)
{ {
/* patched by the protection chip? */ /* patched by the protection chip? */
UINT16 *mem16 = reinterpret_cast<UINT16 *>(cpurom); UINT16 *mem16 = (UINT16 *)cpurom;
mem16[0x9e90/2] = 0x000f; mem16[0x9e90/2] = 0x000f;
mem16[0x9e92/2] = 0xc9c0; mem16[0x9e92/2] = 0xc9c0;
mem16[0xa10c/2] = 0x4eb9; mem16[0xa10c/2] = 0x4eb9;
@ -865,7 +865,7 @@ WRITE16_MEMBER( ngbootleg_prot_device::kof2003_w )
{ {
data = COMBINE_DATA(&m_cartridge_ram[offset]); data = COMBINE_DATA(&m_cartridge_ram[offset]);
if (offset == 0x1ff0/2 || offset == 0x1ff2/2) { if (offset == 0x1ff0/2 || offset == 0x1ff2/2) {
UINT8* cr = reinterpret_cast<UINT8 *>(m_cartridge_ram); UINT8* cr = (UINT8 *)m_cartridge_ram;
UINT32 address = (cr[BYTE_XOR_LE(0x1ff3)]<<16)|(cr[BYTE_XOR_LE(0x1ff2)]<<8)|cr[BYTE_XOR_LE(0x1ff1)]; UINT32 address = (cr[BYTE_XOR_LE(0x1ff3)]<<16)|(cr[BYTE_XOR_LE(0x1ff2)]<<8)|cr[BYTE_XOR_LE(0x1ff1)];
UINT8 prt = cr[BYTE_XOR_LE(0x1ff2)]; UINT8 prt = cr[BYTE_XOR_LE(0x1ff2)];
@ -882,7 +882,7 @@ WRITE16_MEMBER( ngbootleg_prot_device::kof2003p_w )
{ {
data = COMBINE_DATA(&m_cartridge_ram[offset]); data = COMBINE_DATA(&m_cartridge_ram[offset]);
if (offset == 0x1ff0/2 || offset == 0x1ff2/2) { if (offset == 0x1ff0/2 || offset == 0x1ff2/2) {
UINT8* cr = reinterpret_cast<UINT8 *>(m_cartridge_ram); UINT8* cr = (UINT8 *)m_cartridge_ram;
UINT32 address = (cr[BYTE_XOR_LE(0x1ff3)]<<16)|(cr[BYTE_XOR_LE(0x1ff2)]<<8)|cr[BYTE_XOR_LE(0x1ff0)]; UINT32 address = (cr[BYTE_XOR_LE(0x1ff3)]<<16)|(cr[BYTE_XOR_LE(0x1ff2)]<<8)|cr[BYTE_XOR_LE(0x1ff0)];
UINT8 prt = cr[BYTE_XOR_LE(0x1ff2)]; UINT8 prt = cr[BYTE_XOR_LE(0x1ff2)];
@ -929,7 +929,7 @@ void ngbootleg_prot_device::kf2k3bl_install_protection(cpu_device* maincpu, neog
void ngbootleg_prot_device::kf2k3pl_px_decrypt(UINT8* cpurom, UINT32 cpurom_size) void ngbootleg_prot_device::kf2k3pl_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
{ {
std::vector<UINT16> tmp(0x100000/2); std::vector<UINT16> tmp(0x100000/2);
UINT16*rom16 = reinterpret_cast<UINT16*>(cpurom); UINT16*rom16 = (UINT16*)cpurom;
int j; int j;
int i; int i;
@ -977,7 +977,7 @@ void ngbootleg_prot_device::kf2k3upl_px_decrypt(UINT8* cpurom, UINT32 cpurom_siz
} }
} }
UINT16*rom16 = reinterpret_cast<UINT16*>(cpurom); UINT16*rom16 = (UINT16*)cpurom;
kof2k3_overlay = rom16[0x58196 / 2]; kof2k3_overlay = rom16[0x58196 / 2];

View File

@ -70,7 +70,7 @@ void kof98_prot_device::kof98_decrypt_68k(UINT8* cpurom, UINT32 cpurom_size)
} }
memmove( &src[0x100000], &src[0x200000], 0x400000 ); memmove( &src[0x100000], &src[0x200000], 0x400000 );
UINT16* mem16 = reinterpret_cast<UINT16*>(cpurom); UINT16* mem16 = (UINT16*)cpurom;
m_default_rom[0] = mem16[0x100 / 2]; m_default_rom[0] = mem16[0x100 / 2];
m_default_rom[1] = mem16[0x102 / 2]; m_default_rom[1] = mem16[0x102 / 2];

View File

@ -46,7 +46,7 @@ void kog_prot_device::kog_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
/* the protection chip does some *very* strange things to the rom */ /* the protection chip does some *very* strange things to the rom */
UINT8 *src = cpurom; UINT8 *src = cpurom;
dynamic_buffer dst( 0x600000 ); dynamic_buffer dst( 0x600000 );
UINT16 *rom = reinterpret_cast<UINT16 *>(cpurom); UINT16 *rom = (UINT16 *)cpurom;
int i; int i;
static const int sec[] = { 0x3, 0x8, 0x7, 0xC, 0x1, 0xA, 0x6, 0xD }; static const int sec[] = { 0x3, 0x8, 0x7, 0xC, 0x1, 0xA, 0x6, 0xD };

View File

@ -125,7 +125,7 @@ bool neogeo_cart_slot_device::call_load()
} }
m_cart->decrypt_all( m_cart->decrypt_all(
reinterpret_cast<UINT8*>(m_cart->get_rom_base()), m_cart->get_rom_size(), (UINT8*)m_cart->get_rom_base(), m_cart->get_rom_size(),
m_cart->get_sprites_base(), m_cart->get_sprites_size(), m_cart->get_sprites_base(), m_cart->get_sprites_size(),
m_cart->get_fixed_base(), m_cart->get_fixed_size(), m_cart->get_fixed_base(), m_cart->get_fixed_size(),
m_cart->get_ym_base(), m_cart->get_ym_size(), m_cart->get_ym_base(), m_cart->get_ym_size(),
@ -151,7 +151,7 @@ void neogeo_cart_slot_device::setup_memory_banks(running_machine &machine)
UINT32 size = get_rom_size(); UINT32 size = get_rom_size();
machine.memory().region_free(":maincpu"); machine.memory().region_free(":maincpu");
machine.memory().region_alloc(":maincpu",size,2, ENDIANNESS_BIG); machine.memory().region_alloc(":maincpu",size,2, ENDIANNESS_BIG);
memcpy(memregion(":maincpu")->base(),reinterpret_cast<UINT8*>(base16),size); memcpy(memregion(":maincpu")->base(),(UINT8*)base16,size);
UINT8* base = get_audio_base(); UINT8* base = get_audio_base();
size = get_audio_size(); size = get_audio_size();

View File

@ -34,7 +34,7 @@ NeoGeo 'V' (PCM) ROM encryption
/* Neo-Pcm2 Drivers for Encrypted V Roms */ /* Neo-Pcm2 Drivers for Encrypted V Roms */
void pcm2_prot_device::neo_pcm2_snk_1999(UINT8* ymrom, UINT32 ymsize, int value) void pcm2_prot_device::neo_pcm2_snk_1999(UINT8* ymrom, UINT32 ymsize, int value)
{ /* thanks to Elsemi for the NEO-PCM2 info */ { /* thanks to Elsemi for the NEO-PCM2 info */
UINT16 *rom = reinterpret_cast<UINT16 *>(ymrom); UINT16 *rom = (UINT16 *)ymrom;
int size = ymsize; int size = ymsize;
int i, j; int i, j;

View File

@ -29,7 +29,7 @@ void sbp_prot_device::device_reset()
READ16_MEMBER( sbp_prot_device::sbp_lowerrom_r ) READ16_MEMBER( sbp_prot_device::sbp_lowerrom_r )
{ {
UINT16* rom = reinterpret_cast<UINT16*>(m_mainrom); UINT16* rom = (UINT16*)m_mainrom;
UINT16 origdata = rom[(offset+(0x200/2))]; UINT16 origdata = rom[(offset+(0x200/2))];
UINT16 data = BITSWAP16(origdata, 11,10,9,8,15,14,13,12,3,2,1,0,7,6,5,4); UINT16 data = BITSWAP16(origdata, 11,10,9,8,15,14,13,12,3,2,1,0,7,6,5,4);
int realoffset = 0x200+(offset*2); int realoffset = 0x200+(offset*2);
@ -78,7 +78,7 @@ void sbp_prot_device::sbp_install_protection(cpu_device* maincpu, UINT8* cpurom,
/* the game code clears the text overlay used ingame immediately after writing it.. why? protection? sloppy code that the hw ignores? imperfect emulation? */ /* the game code clears the text overlay used ingame immediately after writing it.. why? protection? sloppy code that the hw ignores? imperfect emulation? */
{ {
UINT16* rom = reinterpret_cast<UINT16*>(cpurom); UINT16* rom = (UINT16*)cpurom;
rom[0x2a6f8 / 2] = 0x4e71; rom[0x2a6f8 / 2] = 0x4e71;
rom[0x2a6fa / 2] = 0x4e71; rom[0x2a6fa / 2] = 0x4e71;

View File

@ -302,7 +302,7 @@ void sma_prot_device::kof99_decrypt_68k(UINT8* base)
UINT16 *rom; UINT16 *rom;
int i,j; int i,j;
rom = reinterpret_cast<UINT16 *>(base + 0x100000); rom = (UINT16 *)(base + 0x100000);
/* swap data lines on the whole ROMs */ /* swap data lines on the whole ROMs */
for (i = 0;i < 0x800000/2;i++) for (i = 0;i < 0x800000/2;i++)
{ {
@ -321,7 +321,7 @@ void sma_prot_device::kof99_decrypt_68k(UINT8* base)
} }
/* swap address lines & relocate fixed part */ /* swap address lines & relocate fixed part */
rom = reinterpret_cast<UINT16 *>(base); rom = (UINT16 *)base;
for (i = 0;i < 0x0c0000/2;i++) for (i = 0;i < 0x0c0000/2;i++)
{ {
rom[i] = rom[0x700000/2 + BITSWAP24(i,23,22,21,20,19,18,11,6,14,17,16,5,8,10,12,0,4,3,2,7,9,15,13,1)]; rom[i] = rom[0x700000/2 + BITSWAP24(i,23,22,21,20,19,18,11,6,14,17,16,5,8,10,12,0,4,3,2,7,9,15,13,1)];
@ -335,7 +335,7 @@ void sma_prot_device::garou_decrypt_68k(UINT8* base)
int i,j; int i,j;
/* thanks to Razoola and Mr K for the info */ /* thanks to Razoola and Mr K for the info */
rom = reinterpret_cast<UINT16 *>(base + 0x100000); rom = (UINT16 *)(base + 0x100000);
/* swap data lines on the whole ROMs */ /* swap data lines on the whole ROMs */
for (i = 0;i < 0x800000/2;i++) for (i = 0;i < 0x800000/2;i++)
{ {
@ -343,14 +343,14 @@ void sma_prot_device::garou_decrypt_68k(UINT8* base)
} }
/* swap address lines & relocate fixed part */ /* swap address lines & relocate fixed part */
rom = reinterpret_cast<UINT16 *>(base); rom = (UINT16 *)base;
for (i = 0;i < 0x0c0000/2;i++) for (i = 0;i < 0x0c0000/2;i++)
{ {
rom[i] = rom[0x710000/2 + BITSWAP24(i,23,22,21,20,19,18,4,5,16,14,7,9,6,13,17,15,3,1,2,12,11,8,10,0)]; rom[i] = rom[0x710000/2 + BITSWAP24(i,23,22,21,20,19,18,4,5,16,14,7,9,6,13,17,15,3,1,2,12,11,8,10,0)];
} }
/* swap address lines for the banked part */ /* swap address lines for the banked part */
rom = reinterpret_cast<UINT16 *>(base + 0x100000); rom = (UINT16 *)(base + 0x100000);
for (i = 0;i < 0x800000/2;i+=0x8000/2) for (i = 0;i < 0x800000/2;i+=0x8000/2)
{ {
UINT16 buffer[0x8000/2]; UINT16 buffer[0x8000/2];
@ -369,7 +369,7 @@ void sma_prot_device::garouh_decrypt_68k(UINT8* base)
int i,j; int i,j;
/* thanks to Razoola and Mr K for the info */ /* thanks to Razoola and Mr K for the info */
rom = reinterpret_cast<UINT16 *>(base + 0x100000); rom = (UINT16 *)(base + 0x100000);
/* swap data lines on the whole ROMs */ /* swap data lines on the whole ROMs */
for (i = 0;i < 0x800000/2;i++) for (i = 0;i < 0x800000/2;i++)
{ {
@ -377,14 +377,14 @@ void sma_prot_device::garouh_decrypt_68k(UINT8* base)
} }
/* swap address lines & relocate fixed part */ /* swap address lines & relocate fixed part */
rom = reinterpret_cast<UINT16 *>(base); rom = (UINT16 *)base;
for (i = 0;i < 0x0c0000/2;i++) for (i = 0;i < 0x0c0000/2;i++)
{ {
rom[i] = rom[0x7f8000/2 + BITSWAP24(i,23,22,21,20,19,18,5,16,11,2,6,7,17,3,12,8,14,4,0,9,1,10,15,13)]; rom[i] = rom[0x7f8000/2 + BITSWAP24(i,23,22,21,20,19,18,5,16,11,2,6,7,17,3,12,8,14,4,0,9,1,10,15,13)];
} }
/* swap address lines for the banked part */ /* swap address lines for the banked part */
rom = reinterpret_cast<UINT16 *>(base + 0x100000); rom = (UINT16 *)(base + 0x100000);
for (i = 0;i < 0x800000/2;i+=0x8000/2) for (i = 0;i < 0x800000/2;i+=0x8000/2)
{ {
UINT16 buffer[0x8000/2]; UINT16 buffer[0x8000/2];
@ -403,7 +403,7 @@ void sma_prot_device::mslug3_decrypt_68k(UINT8* base)
int i,j; int i,j;
/* thanks to Razoola and Mr K for the info */ /* thanks to Razoola and Mr K for the info */
rom = reinterpret_cast<UINT16 *>(base + 0x100000); rom = (UINT16 *)(base + 0x100000);
/* swap data lines on the whole ROMs */ /* swap data lines on the whole ROMs */
for (i = 0;i < 0x800000/2;i++) for (i = 0;i < 0x800000/2;i++)
{ {
@ -411,14 +411,14 @@ void sma_prot_device::mslug3_decrypt_68k(UINT8* base)
} }
/* swap address lines & relocate fixed part */ /* swap address lines & relocate fixed part */
rom = reinterpret_cast<UINT16 *>(base); rom = (UINT16 *)base;
for (i = 0;i < 0x0c0000/2;i++) for (i = 0;i < 0x0c0000/2;i++)
{ {
rom[i] = rom[0x5d0000/2 + BITSWAP24(i,23,22,21,20,19,18,15,2,1,13,3,0,9,6,16,4,11,5,7,12,17,14,10,8)]; rom[i] = rom[0x5d0000/2 + BITSWAP24(i,23,22,21,20,19,18,15,2,1,13,3,0,9,6,16,4,11,5,7,12,17,14,10,8)];
} }
/* swap address lines for the banked part */ /* swap address lines for the banked part */
rom = reinterpret_cast<UINT16 *>(base + 0x100000); rom = (UINT16 *)(base + 0x100000);
for (i = 0;i < 0x800000/2;i+=0x10000/2) for (i = 0;i < 0x800000/2;i+=0x10000/2)
{ {
UINT16 buffer[0x10000/2]; UINT16 buffer[0x10000/2];
@ -437,7 +437,7 @@ void sma_prot_device::kof2000_decrypt_68k(UINT8* base)
int i,j; int i,j;
/* thanks to Razoola and Mr K for the info */ /* thanks to Razoola and Mr K for the info */
rom = reinterpret_cast<UINT16 *>(base + 0x100000); rom = (UINT16 *)(base + 0x100000);
/* swap data lines on the whole ROMs */ /* swap data lines on the whole ROMs */
for (i = 0;i < 0x800000/2;i++) for (i = 0;i < 0x800000/2;i++)
{ {
@ -456,7 +456,7 @@ void sma_prot_device::kof2000_decrypt_68k(UINT8* base)
} }
/* swap address lines & relocate fixed part */ /* swap address lines & relocate fixed part */
rom = reinterpret_cast<UINT16 *>(base); rom = (UINT16 *)base;
for (i = 0;i < 0x0c0000/2;i++) for (i = 0;i < 0x0c0000/2;i++)
{ {
rom[i] = rom[0x73a000/2 + BITSWAP24(i,23,22,21,20,19,18,8,4,15,13,3,14,16,2,6,17,7,12,10,0,5,11,1,9)]; rom[i] = rom[0x73a000/2 + BITSWAP24(i,23,22,21,20,19,18,8,4,15,13,3,14,16,2,6,17,7,12,10,0,5,11,1,9)];

View File

@ -202,7 +202,7 @@ nes_algq_rom_device::nes_algq_rom_device(const machine_config &mconfig, const ch
void nes_algn_rom_device::device_start() void nes_algn_rom_device::device_start()
{ {
m_rom = static_cast<UINT8*>(memregion("aderom")->base()); m_rom = (UINT8*)memregion("aderom")->base();
save_item(NAME(m_lobank)); save_item(NAME(m_lobank));
} }
@ -214,7 +214,7 @@ void nes_algn_rom_device::device_reset()
void nes_algq_rom_device::device_start() void nes_algq_rom_device::device_start()
{ {
m_rom = static_cast<UINT8*>(memregion("aderom")->base()); m_rom = (UINT8*)memregion("aderom")->base();
save_item(NAME(m_lobank)); save_item(NAME(m_lobank));
save_item(NAME(m_hibank)); save_item(NAME(m_hibank));
save_item(NAME(m_bank_base)); save_item(NAME(m_bank_base));

View File

@ -188,7 +188,7 @@ nes_datach_24c01_device::nes_datach_24c01_device(const machine_config &mconfig,
void nes_datach_rom_device::device_start() void nes_datach_rom_device::device_start()
{ {
m_rom = static_cast<UINT8*>(memregion("datachrom")->base()); m_rom = (UINT8*)memregion("datachrom")->base();
save_item(NAME(m_bank)); save_item(NAME(m_bank));
} }

View File

@ -116,7 +116,7 @@ void nes_disksys_device::device_start()
{ {
common_start(); common_start();
m_2c33_rom = static_cast<UINT8*>(memregion("drive")->base()); m_2c33_rom = (UINT8*)memregion("drive")->base();
m_disk->floppy_install_load_proc(nes_disksys_device::load_proc); m_disk->floppy_install_load_proc(nes_disksys_device::load_proc);
m_disk->floppy_install_unload_proc(nes_disksys_device::unload_proc); m_disk->floppy_install_unload_proc(nes_disksys_device::unload_proc);

View File

@ -158,7 +158,7 @@ nes_kstudio_rom_device::nes_kstudio_rom_device(const machine_config &mconfig, co
void nes_kstudio_rom_device::device_start() void nes_kstudio_rom_device::device_start()
{ {
m_rom = static_cast<UINT8*>(memregion("exrom")->base()); m_rom = (UINT8*)memregion("exrom")->base();
save_item(NAME(m_bank)); save_item(NAME(m_bank));
} }

View File

@ -158,7 +158,7 @@ void device_nes_cart_interface::prg_alloc(size_t size, const char *tag)
// A few pirate carts have PRG made of 32K + 2K or some weird similar config // A few pirate carts have PRG made of 32K + 2K or some weird similar config
// in this case we treat the banking as if this 'extra' PRG is not present and // in this case we treat the banking as if this 'extra' PRG is not present and
// the pcb code has to handle it by accessing directly m_prg! // the pcb code has to handle it by accessing directly m_prg!
printf("Warning! The loaded PRG has size not a multiple of 8KB (0x%X)\n", static_cast<UINT32>(size)); printf("Warning! The loaded PRG has size not a multiple of 8KB (0x%X)\n", (UINT32)size);
m_prg_chunks--; m_prg_chunks--;
} }

View File

@ -136,7 +136,7 @@ nes_ntb_rom_device::nes_ntb_rom_device(const machine_config &mconfig, const char
void nes_ntb_rom_device::device_start() void nes_ntb_rom_device::device_start()
{ {
m_rom = static_cast<UINT8*>(memregion("ntbrom")->base()); m_rom = (UINT8*)memregion("ntbrom")->base();
} }
const rom_entry *nes_ntb_rom_device::device_rom_region() const const rom_entry *nes_ntb_rom_device::device_rom_region() const

View File

@ -124,7 +124,7 @@ void nes_vaus_device::write(UINT8 data)
int old = m_start_conv; int old = m_start_conv;
if (data == 0 && old == 1) if (data == 0 && old == 1)
m_latch = static_cast<UINT8>(m_paddle->read() ^ 0xff); m_latch = (UINT8) (m_paddle->read() ^ 0xff);
m_start_conv = data; m_start_conv = data;
} }

View File

@ -138,7 +138,7 @@ void nubus_device::install_device(offs_t start, offs_t end, read8_delegate rhand
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, mask); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, mask);
break; break;
case 64: case 64:
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, (static_cast<UINT64>(mask)<<32)|mask); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask);
break; break;
default: default:
fatalerror("NUBUS: Bus width %d not supported\n", buswidth); fatalerror("NUBUS: Bus width %d not supported\n", buswidth);
@ -155,7 +155,7 @@ void nubus_device::install_device(offs_t start, offs_t end, read16_delegate rhan
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, mask); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, mask);
break; break;
case 64: case 64:
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, (static_cast<UINT64>(mask)<<32)|mask); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask);
break; break;
default: default:
fatalerror("NUBUS: Bus width %d not supported\n", buswidth); fatalerror("NUBUS: Bus width %d not supported\n", buswidth);
@ -172,7 +172,7 @@ void nubus_device::install_device(offs_t start, offs_t end, read32_delegate rhan
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, mask); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, mask);
break; break;
case 64: case 64:
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, (static_cast<UINT64>(mask)<<32)|mask); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask);
break; break;
default: default:
fatalerror("NUBUS: Bus width %d not supported\n", buswidth); fatalerror("NUBUS: Bus width %d not supported\n", buswidth);
@ -189,7 +189,7 @@ void nubus_device::install_readonly_device(offs_t start, offs_t end, read32_dele
m_maincpu->space(AS_PROGRAM).install_read_handler(start, end, rhandler, mask); m_maincpu->space(AS_PROGRAM).install_read_handler(start, end, rhandler, mask);
break; break;
case 64: case 64:
m_maincpu->space(AS_PROGRAM).install_read_handler(start, end, rhandler, (static_cast<UINT64>(mask)<<32)|mask); m_maincpu->space(AS_PROGRAM).install_read_handler(start, end, rhandler, ((UINT64)mask<<32)|mask);
break; break;
default: default:
fatalerror("NUBUS: Bus width %d not supported\n", buswidth); fatalerror("NUBUS: Bus width %d not supported\n", buswidth);
@ -206,7 +206,7 @@ void nubus_device::install_writeonly_device(offs_t start, offs_t end, write32_de
m_maincpu->space(AS_PROGRAM).install_write_handler(start, end, whandler, mask); m_maincpu->space(AS_PROGRAM).install_write_handler(start, end, whandler, mask);
break; break;
case 64: case 64:
m_maincpu->space(AS_PROGRAM).install_write_handler(start, end, whandler, (static_cast<UINT64>(mask)<<32)|mask); m_maincpu->space(AS_PROGRAM).install_write_handler(start, end, whandler, ((UINT64)mask<<32)|mask);
break; break;
default: default:
fatalerror("NUBUS: Bus width %d not supported\n", buswidth); fatalerror("NUBUS: Bus width %d not supported\n", buswidth);

View File

@ -243,7 +243,7 @@ UINT32 jmfb_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, c
for (y = 0; y < m_yres; y++) for (y = 0; y < m_yres; y++)
{ {
scanline = &bitmap.pix32(y); scanline = &bitmap.pix32(y);
base = reinterpret_cast<UINT32 *>(&m_vram[y * m_stride]); base = (UINT32 *)&m_vram[y * m_stride];
for (x = 0; x < m_xres; x++) for (x = 0; x < m_xres; x++)
{ {
*scanline++ = *base++; *scanline++ = *base++;

View File

@ -205,7 +205,7 @@ UINT32 nubus_cb264_device::screen_update(screen_device &screen, bitmap_rgb32 &bi
case 4: // 24 bpp case 4: // 24 bpp
case 7: // ??? case 7: // ???
{ {
UINT32 *vram32 = reinterpret_cast<UINT32 *>(&m_vram[0]); UINT32 *vram32 = (UINT32 *)&m_vram[0];
for (y = 0; y < 480; y++) for (y = 0; y < 480; y++)
{ {

View File

@ -86,18 +86,18 @@ void messimg_disk_image_device::device_config_complete()
void messimg_disk_image_device::device_start() void messimg_disk_image_device::device_start()
{ {
m_data = static_cast<UINT8 *>(nullptr); m_data = (UINT8 *)nullptr;
if (exists() && fseek(0, SEEK_END) == 0) if (exists() && fseek(0, SEEK_END) == 0)
{ {
m_size = static_cast<UINT32>(ftell()); m_size = (UINT32)ftell();
} }
} }
bool messimg_disk_image_device::call_load() bool messimg_disk_image_device::call_load()
{ {
fseek(0, SEEK_END); fseek(0, SEEK_END);
m_size = static_cast<UINT32>(ftell()); m_size = (UINT32)ftell();
if (m_size > (256*1024*1024)) if (m_size > (256*1024*1024))
{ {
printf("Mac image too large: must be 256MB or less!\n"); printf("Mac image too large: must be 256MB or less!\n");
@ -105,7 +105,7 @@ bool messimg_disk_image_device::call_load()
return IMAGE_INIT_FAIL; return IMAGE_INIT_FAIL;
} }
m_data = reinterpret_cast<UINT8 *>(auto_alloc_array_clear(machine(), UINT32, m_size/sizeof(UINT32))); m_data = (UINT8 *)auto_alloc_array_clear(machine(), UINT32, m_size/sizeof(UINT32));
fseek(0, SEEK_SET); fseek(0, SEEK_SET);
fread(m_data, m_size); fread(m_data, m_size);
m_ejected = false; m_ejected = false;
@ -255,7 +255,7 @@ READ32_MEMBER( nubus_image_device::image_r )
WRITE32_MEMBER( nubus_image_device::image_super_w ) WRITE32_MEMBER( nubus_image_device::image_super_w )
{ {
UINT32 *image = reinterpret_cast<UINT32*>(m_image->m_data); UINT32 *image = (UINT32*)m_image->m_data;
data = ((data & 0xff) << 24) | ((data & 0xff00) << 8) | ((data & 0xff0000) >> 8) | ((data & 0xff000000) >> 24); data = ((data & 0xff) << 24) | ((data & 0xff00) << 8) | ((data & 0xff0000) >> 8) | ((data & 0xff000000) >> 24);
mem_mask = ((mem_mask & 0xff) << 24) | ((mem_mask & 0xff00) << 8) | ((mem_mask & 0xff0000) >> 8) | ((mem_mask & 0xff000000) >> 24); mem_mask = ((mem_mask & 0xff) << 24) | ((mem_mask & 0xff00) << 8) | ((mem_mask & 0xff0000) >> 8) | ((mem_mask & 0xff000000) >> 24);
@ -264,7 +264,7 @@ WRITE32_MEMBER( nubus_image_device::image_super_w )
READ32_MEMBER( nubus_image_device::image_super_r ) READ32_MEMBER( nubus_image_device::image_super_r )
{ {
UINT32 *image = reinterpret_cast<UINT32*>(m_image->m_data); UINT32 *image = (UINT32*)m_image->m_data;
UINT32 data = image[offset]; UINT32 data = image[offset];
return ((data & 0xff) << 24) | ((data & 0xff00) << 8) | ((data & 0xff0000) >> 8) | ((data & 0xff000000) >> 24); return ((data & 0xff) << 24) | ((data & 0xff00) << 8) | ((data & 0xff0000) >> 8) | ((data & 0xff000000) >> 24);
} }
@ -279,24 +279,24 @@ WRITE32_MEMBER( nubus_image_device::file_cmd_w )
filectx.curcmd = data; filectx.curcmd = data;
switch(data) { switch(data) {
case kFileCmdGetDir: case kFileCmdGetDir:
strcpy(reinterpret_cast<char*>(filectx.filename), reinterpret_cast<char*>(filectx.curdir)); strcpy((char*)filectx.filename, (char*)filectx.curdir);
break; break;
case kFileCmdSetDir: case kFileCmdSetDir:
if ((filectx.filename[0] == '/') || (filectx.filename[0] == '$')) { if ((filectx.filename[0] == '/') || (filectx.filename[0] == '$')) {
strcpy(reinterpret_cast<char*>(filectx.curdir), reinterpret_cast<char*>(filectx.filename)); strcpy((char*)filectx.curdir, (char*)filectx.filename);
} else { } else {
strcat(reinterpret_cast<char*>(filectx.curdir), "/"); strcat((char*)filectx.curdir, "/");
strcat(reinterpret_cast<char*>(filectx.curdir), reinterpret_cast<char*>(filectx.filename)); strcat((char*)filectx.curdir, (char*)filectx.filename);
} }
break; break;
case kFileCmdGetFirstListing: case kFileCmdGetFirstListing:
if(filectx.dirp) osd_closedir(filectx.dirp); if(filectx.dirp) osd_closedir(filectx.dirp);
filectx.dirp = osd_opendir(reinterpret_cast<const char *>(filectx.curdir)); filectx.dirp = osd_opendir((const char *)filectx.curdir);
case kFileCmdGetNextListing: case kFileCmdGetNextListing:
if (filectx.dirp) { if (filectx.dirp) {
dp = osd_readdir(filectx.dirp); dp = osd_readdir(filectx.dirp);
if(dp) { if(dp) {
strncpy(reinterpret_cast<char*>(filectx.filename), dp->name, sizeof(filectx.filename)); strncpy((char*)filectx.filename, dp->name, sizeof(filectx.filename));
} else { } else {
memset(filectx.filename, 0, sizeof(filectx.filename)); memset(filectx.filename, 0, sizeof(filectx.filename));
} }
@ -307,18 +307,18 @@ WRITE32_MEMBER( nubus_image_device::file_cmd_w )
break; break;
case kFileCmdGetFile: case kFileCmdGetFile:
memset(fullpath, 0, sizeof(fullpath)); memset(fullpath, 0, sizeof(fullpath));
strcpy(fullpath, reinterpret_cast<const char *>(filectx.curdir)); strcpy(fullpath, (const char *)filectx.curdir);
strcat(fullpath, "/"); strcat(fullpath, "/");
strcat(fullpath, reinterpret_cast<const char*>(filectx.filename)); strcat(fullpath, (const char*)filectx.filename);
if(osd_open(static_cast<const char*>(fullpath), OPEN_FLAG_READ, &filectx.fd, &filectx.filelen) != FILERR_NONE) printf("Error opening %s\n", fullpath); if(osd_open((const char*)fullpath, OPEN_FLAG_READ, &filectx.fd, &filectx.filelen) != FILERR_NONE) printf("Error opening %s\n", fullpath);
filectx.bytecount = 0; filectx.bytecount = 0;
break; break;
case kFileCmdPutFile: case kFileCmdPutFile:
memset(fullpath, 0, sizeof(fullpath)); memset(fullpath, 0, sizeof(fullpath));
strcpy(fullpath, reinterpret_cast<const char *>(filectx.curdir)); strcpy(fullpath, (const char *)filectx.curdir);
strcat(fullpath, "/"); strcat(fullpath, "/");
strcat(fullpath, reinterpret_cast<const char*>(filectx.filename)); strcat(fullpath, (const char*)filectx.filename);
if(osd_open(static_cast<const char*>(fullpath), OPEN_FLAG_WRITE|OPEN_FLAG_CREATE, &filectx.fd, &filesize) != FILERR_NONE) printf("Error opening %s\n", fullpath); if(osd_open((const char*)fullpath, OPEN_FLAG_WRITE|OPEN_FLAG_CREATE, &filectx.fd, &filesize) != FILERR_NONE) printf("Error opening %s\n", fullpath);
filectx.bytecount = 0; filectx.bytecount = 0;
break; break;
} }
@ -377,12 +377,12 @@ READ32_MEMBER( nubus_image_device::file_len_r )
WRITE32_MEMBER( nubus_image_device::file_name_w ) WRITE32_MEMBER( nubus_image_device::file_name_w )
{ {
reinterpret_cast<UINT32*>(filectx.filename)[offset] = ni_ntohl(data); ((UINT32*)(filectx.filename))[offset] = ni_ntohl(data);
} }
READ32_MEMBER( nubus_image_device::file_name_r ) READ32_MEMBER( nubus_image_device::file_name_r )
{ {
UINT32 ret; UINT32 ret;
ret = ni_htonl(reinterpret_cast<UINT32*>(filectx.filename)[offset]); ret = ni_htonl(((UINT32*)(filectx.filename))[offset]);
return ret; return ret;
} }

View File

@ -100,7 +100,7 @@ void nubus_m2hires_device::device_start()
// printf("[m2hires %p] slotspace = %x\n", this, slotspace); // printf("[m2hires %p] slotspace = %x\n", this, slotspace);
m_vram.resize(VRAM_SIZE); m_vram.resize(VRAM_SIZE);
m_vram32 = reinterpret_cast<UINT32 *>(&m_vram[0]); m_vram32 = (UINT32 *)&m_vram[0];
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_m2hires_device::vram_r), this), write32_delegate(FUNC(nubus_m2hires_device::vram_w), this)); m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_m2hires_device::vram_r), this), write32_delegate(FUNC(nubus_m2hires_device::vram_w), this));
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_m2hires_device::vram_r), this), write32_delegate(FUNC(nubus_m2hires_device::vram_w), this)); m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_m2hires_device::vram_r), this), write32_delegate(FUNC(nubus_m2hires_device::vram_w), this));

View File

@ -101,7 +101,7 @@ void nubus_m2video_device::device_start()
// printf("[m2video %p] slotspace = %x\n", this, slotspace); // printf("[m2video %p] slotspace = %x\n", this, slotspace);
m_vram.resize(VRAM_SIZE); m_vram.resize(VRAM_SIZE);
m_vram32 = reinterpret_cast<UINT32 *>(&m_vram[0]); m_vram32 = (UINT32 *)&m_vram[0];
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_m2video_device::vram_r), this), write32_delegate(FUNC(nubus_m2video_device::vram_w), this)); m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_m2video_device::vram_r), this), write32_delegate(FUNC(nubus_m2video_device::vram_w), this));
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_m2video_device::vram_r), this), write32_delegate(FUNC(nubus_m2video_device::vram_w), this)); m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_m2video_device::vram_r), this), write32_delegate(FUNC(nubus_m2video_device::vram_w), this));

View File

@ -97,10 +97,10 @@ void nubus_radiustpd_device::device_start()
slotspace = get_slotspace(); slotspace = get_slotspace();
printf("[radiustpd %p] slotspace = %x\n", static_cast<void *>(this), slotspace); printf("[radiustpd %p] slotspace = %x\n", (void *)this, slotspace);
m_vram.resize(VRAM_SIZE); m_vram.resize(VRAM_SIZE);
m_vram32 = reinterpret_cast<UINT32 *>(&m_vram[0]); m_vram32 = (UINT32 *)&m_vram[0];
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_radiustpd_device::vram_r), this), write32_delegate(FUNC(nubus_radiustpd_device::vram_w), this)); m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_radiustpd_device::vram_r), this), write32_delegate(FUNC(nubus_radiustpd_device::vram_w), this));
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_radiustpd_device::vram_r), this), write32_delegate(FUNC(nubus_radiustpd_device::vram_w), this)); m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_radiustpd_device::vram_r), this), write32_delegate(FUNC(nubus_radiustpd_device::vram_w), this));

View File

@ -102,7 +102,7 @@ void nubus_spec8s3_device::device_start()
// printf("[SPEC8S3 %p] slotspace = %x\n", this, slotspace); // printf("[SPEC8S3 %p] slotspace = %x\n", this, slotspace);
m_vram.resize(VRAM_SIZE); m_vram.resize(VRAM_SIZE);
m_vram32 = reinterpret_cast<UINT32 *>(&m_vram[0]); m_vram32 = (UINT32 *)&m_vram[0];
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_spec8s3_device::vram_r), this), write32_delegate(FUNC(nubus_spec8s3_device::vram_w), this)); m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_spec8s3_device::vram_r), this), write32_delegate(FUNC(nubus_spec8s3_device::vram_w), this));
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_spec8s3_device::vram_r), this), write32_delegate(FUNC(nubus_spec8s3_device::vram_w), this)); m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_spec8s3_device::vram_r), this), write32_delegate(FUNC(nubus_spec8s3_device::vram_w), this));
m_nubus->install_device(slotspace+0xd0000, slotspace+0xfffff, read32_delegate(FUNC(nubus_spec8s3_device::spec8s3_r), this), write32_delegate(FUNC(nubus_spec8s3_device::spec8s3_w), this)); m_nubus->install_device(slotspace+0xd0000, slotspace+0xfffff, read32_delegate(FUNC(nubus_spec8s3_device::spec8s3_r), this), write32_delegate(FUNC(nubus_spec8s3_device::spec8s3_w), this));

View File

@ -119,7 +119,7 @@ void nubus_specpdq_device::device_start()
// printf("[specpdq %p] slotspace = %x\n", this, slotspace); // printf("[specpdq %p] slotspace = %x\n", this, slotspace);
m_vram.resize(VRAM_SIZE); m_vram.resize(VRAM_SIZE);
m_vram32 = reinterpret_cast<UINT32 *>(&m_vram[0]); m_vram32 = (UINT32 *)&m_vram[0];
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_specpdq_device::vram_r), this), write32_delegate(FUNC(nubus_specpdq_device::vram_w), this)); m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_specpdq_device::vram_r), this), write32_delegate(FUNC(nubus_specpdq_device::vram_w), this));
m_nubus->install_device(slotspace+0x400000, slotspace+0xfbffff, read32_delegate(FUNC(nubus_specpdq_device::specpdq_r), this), write32_delegate(FUNC(nubus_specpdq_device::specpdq_w), this)); m_nubus->install_device(slotspace+0x400000, slotspace+0xfbffff, read32_delegate(FUNC(nubus_specpdq_device::specpdq_r), this), write32_delegate(FUNC(nubus_specpdq_device::specpdq_w), this));

View File

@ -100,10 +100,10 @@ void nubus_wsportrait_device::device_start()
slotspace = get_slotspace(); slotspace = get_slotspace();
printf("[wsportrait %p] slotspace = %x\n", static_cast<void *>(this), slotspace); printf("[wsportrait %p] slotspace = %x\n", (void *)this, slotspace);
m_vram.resize(VRAM_SIZE); m_vram.resize(VRAM_SIZE);
m_vram32 = reinterpret_cast<UINT32 *>(&m_vram[0]); m_vram32 = (UINT32 *)&m_vram[0];
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_wsportrait_device::vram_r), this), write32_delegate(FUNC(nubus_wsportrait_device::vram_w), this)); m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_wsportrait_device::vram_r), this), write32_delegate(FUNC(nubus_wsportrait_device::vram_w), this));
m_nubus->install_device(slotspace+0x900000, slotspace+0x900000+VRAM_SIZE-1, read32_delegate(FUNC(nubus_wsportrait_device::vram_r), this), write32_delegate(FUNC(nubus_wsportrait_device::vram_w), this)); m_nubus->install_device(slotspace+0x900000, slotspace+0x900000+VRAM_SIZE-1, read32_delegate(FUNC(nubus_wsportrait_device::vram_r), this), write32_delegate(FUNC(nubus_wsportrait_device::vram_w), this));

View File

@ -103,7 +103,7 @@ void nubus_xceed30hr_device::device_start()
// printf("[xceed30hr %p] slotspace = %x\n", this, slotspace); // printf("[xceed30hr %p] slotspace = %x\n", this, slotspace);
m_vram.resize(VRAM_SIZE); m_vram.resize(VRAM_SIZE);
m_vram32 = reinterpret_cast<UINT32 *>(&m_vram[0]); m_vram32 = (UINT32 *)&m_vram[0];
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_xceed30hr_device::vram_r), this), write32_delegate(FUNC(nubus_xceed30hr_device::vram_w), this)); m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_xceed30hr_device::vram_r), this), write32_delegate(FUNC(nubus_xceed30hr_device::vram_w), this));
m_nubus->install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_r), this), write32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_w), this)); m_nubus->install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_r), this), write32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_w), this));

View File

@ -96,7 +96,7 @@ void nubus_cb264se30_device::device_start()
// printf("[cb264se30 %p] slotspace = %x\n", this, slotspace); // printf("[cb264se30 %p] slotspace = %x\n", this, slotspace);
m_vram.resize(VRAM_SIZE); m_vram.resize(VRAM_SIZE);
m_vram32 = reinterpret_cast<UINT32 *>(&m_vram[0]); m_vram32 = (UINT32 *)&m_vram[0];
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_cb264se30_device::vram_r), this), write32_delegate(FUNC(nubus_cb264se30_device::vram_w), this)); m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_cb264se30_device::vram_r), this), write32_delegate(FUNC(nubus_cb264se30_device::vram_w), this));
m_nubus->install_device(slotspace+0xf00000, slotspace+0xfeffff, read32_delegate(FUNC(nubus_cb264se30_device::cb264se30_r), this), write32_delegate(FUNC(nubus_cb264se30_device::cb264se30_w), this)); m_nubus->install_device(slotspace+0xf00000, slotspace+0xfeffff, read32_delegate(FUNC(nubus_cb264se30_device::cb264se30_r), this), write32_delegate(FUNC(nubus_cb264se30_device::cb264se30_w), this));
@ -215,7 +215,7 @@ UINT32 nubus_cb264se30_device::screen_update(screen_device &screen, bitmap_rgb32
case 4: // 24 bpp case 4: // 24 bpp
{ {
UINT32 *vram32 = reinterpret_cast<UINT32 *>(&m_vram[0]); UINT32 *vram32 = (UINT32 *)&m_vram[0];
UINT32 *base; UINT32 *base;
for (y = 0; y < 480; y++) for (y = 0; y < 480; y++)

View File

@ -99,7 +99,7 @@ void nubus_xceedmc30_device::device_start()
// printf("[xceedmc30 %p] slotspace = %x\n", this, slotspace); // printf("[xceedmc30 %p] slotspace = %x\n", this, slotspace);
m_vram.resize(VRAM_SIZE); m_vram.resize(VRAM_SIZE);
m_vram32 = reinterpret_cast<UINT32 *>(&m_vram[0]); m_vram32 = (UINT32 *)&m_vram[0];
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_xceedmc30_device::vram_r), this), write32_delegate(FUNC(nubus_xceedmc30_device::vram_w), this)); m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_xceedmc30_device::vram_r), this), write32_delegate(FUNC(nubus_xceedmc30_device::vram_w), this));
m_nubus->install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_r), this), write32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_w), this)); m_nubus->install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_r), this), write32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_w), this));
@ -218,7 +218,7 @@ UINT32 nubus_xceedmc30_device::screen_update(screen_device &screen, bitmap_rgb32
case 4: // 24 bpp case 4: // 24 bpp
{ {
UINT32 *vram32 = reinterpret_cast<UINT32 *>(vram); UINT32 *vram32 = (UINT32 *)vram;
UINT32 *base; UINT32 *base;
for (y = 0; y < 480; y++) for (y = 0; y < 480; y++)

View File

@ -102,7 +102,7 @@ void nubus_procolor816_device::device_start()
// printf("[procolor816 %p] slotspace = %x\n", this, slotspace); // printf("[procolor816 %p] slotspace = %x\n", this, slotspace);
m_vram.resize(VRAM_SIZE); m_vram.resize(VRAM_SIZE);
m_vram32 = reinterpret_cast<UINT32 *>(&m_vram[0]); m_vram32 = (UINT32 *)&m_vram[0];
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_procolor816_device::vram_r), this), write32_delegate(FUNC(nubus_procolor816_device::vram_w), this)); m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_procolor816_device::vram_r), this), write32_delegate(FUNC(nubus_procolor816_device::vram_w), this));
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_procolor816_device::vram_r), this), write32_delegate(FUNC(nubus_procolor816_device::vram_w), this)); m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_procolor816_device::vram_r), this), write32_delegate(FUNC(nubus_procolor816_device::vram_w), this));
@ -222,7 +222,7 @@ UINT32 nubus_procolor816_device::screen_update(screen_device &screen, bitmap_rgb
case 4: // 15 bpp case 4: // 15 bpp
{ {
UINT16 *vram16 = reinterpret_cast<UINT16 *>(&m_vram[0]); UINT16 *vram16 = (UINT16 *)&m_vram[0];
UINT16 pixels; UINT16 pixels;
for (y = 0; y < 480; y++) for (y = 0; y < 480; y++)

View File

@ -96,7 +96,7 @@ void nubus_lview_device::device_start()
// printf("[lview %p] slotspace = %x\n", this, slotspace); // printf("[lview %p] slotspace = %x\n", this, slotspace);
m_vram.resize(VRAM_SIZE); m_vram.resize(VRAM_SIZE);
m_vram32 = reinterpret_cast<UINT32 *>(&m_vram[0]); m_vram32 = (UINT32 *)&m_vram[0];
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_lview_device::vram_r), this), write32_delegate(FUNC(nubus_lview_device::vram_w), this)); m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_lview_device::vram_r), this), write32_delegate(FUNC(nubus_lview_device::vram_w), this));
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_lview_device::vram_r), this), write32_delegate(FUNC(nubus_lview_device::vram_w), this)); m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_lview_device::vram_r), this), write32_delegate(FUNC(nubus_lview_device::vram_w), this));

View File

@ -72,8 +72,8 @@ void oricext_device::device_start()
bank_c000_w = membank(":bank_c000_w"); bank_c000_w = membank(":bank_c000_w");
bank_e000_w = membank(":bank_e000_w"); bank_e000_w = membank(":bank_e000_w");
bank_f800_w = membank(":bank_f800_w"); bank_f800_w = membank(":bank_f800_w");
rom = static_cast<UINT8 *>(machine().root_device().memregion(cputag)->base()); rom = (UINT8 *)machine().root_device().memregion(cputag)->base();
ram = static_cast<UINT8 *>(memshare(":ram")->ptr()); ram = (UINT8 *)memshare(":ram")->ptr();
memset(junk_read, 0xff, sizeof(junk_read)); memset(junk_read, 0xff, sizeof(junk_read));
memset(junk_write, 0x00, sizeof(junk_write)); memset(junk_write, 0x00, sizeof(junk_write));

View File

@ -60,7 +60,7 @@ void device_sat_cart_interface::rom_alloc(UINT32 size, const char *tag)
{ {
if (m_rom == nullptr) if (m_rom == nullptr)
{ {
m_rom = reinterpret_cast<UINT32 *>(device().machine().memory().region_alloc(std::string(tag).append(SATSLOT_ROM_REGION_TAG).c_str(), size, 4, ENDIANNESS_LITTLE)->base()); m_rom = (UINT32 *)device().machine().memory().region_alloc(std::string(tag).append(SATSLOT_ROM_REGION_TAG).c_str(), size, 4, ENDIANNESS_LITTLE)->base();
m_rom_size = size; m_rom_size = size;
} }
} }

View File

@ -53,7 +53,7 @@ void acb4070_device::WriteData( UINT8 *data, int dataLength )
switch( command[ 0 ] ) switch( command[ 0 ] )
{ {
case T10SPC_CMD_MODE_SELECT_6: case T10SPC_CMD_MODE_SELECT_6:
adaptec_sense_t *sense=reinterpret_cast<adaptec_sense_t *>(data); adaptec_sense_t *sense=(adaptec_sense_t *) data;
int tracks=(sense->cylinder_count[0]<<8)+sense->cylinder_count[1]; int tracks=(sense->cylinder_count[0]<<8)+sense->cylinder_count[1];
int capacity=(tracks * sense->head_count * 17); int capacity=(tracks * sense->head_count * 17);
logerror("Tracks=%d, Heads=%d sec/track=%d\n",tracks,sense->head_count,sense->sectors_per_track); logerror("Tracks=%d, Heads=%d sec/track=%d\n",tracks,sense->head_count,sense->sectors_per_track);

View File

@ -27,9 +27,9 @@ void sony_cdu76s_device::ReadData( UINT8 *data, int dataLength )
data[3] = 0x02; // response data format = SPC-3 standard data[3] = 0x02; // response data format = SPC-3 standard
// some Konami games freak out if this isn't "Sony", so we'll lie // some Konami games freak out if this isn't "Sony", so we'll lie
// this is the actual drive on my Nagano '98 board // this is the actual drive on my Nagano '98 board
strcpy(reinterpret_cast<char *>(&data[8]), "Sony"); strcpy((char *)&data[8], "Sony");
strcpy(reinterpret_cast<char *>(&data[16]), "CDU-76S"); strcpy((char *)&data[16], "CDU-76S");
strcpy(reinterpret_cast<char *>(&data[32]), "1.0"); strcpy((char *)&data[32], "1.0");
break; break;
default: default:

View File

@ -220,7 +220,7 @@ int sega8_cart_slot_device::verify_cart( UINT8 *magic, int size )
// Verify the file is a valid image - check $7ff0 for "TMR SEGA" // Verify the file is a valid image - check $7ff0 for "TMR SEGA"
if (size >= 0x8000) if (size >= 0x8000)
{ {
if (!strncmp(reinterpret_cast<char*>(&magic[0x7ff0]), "TMR SEGA", 8)) if (!strncmp((char*)&magic[0x7ff0], "TMR SEGA", 8))
retval = IMAGE_VERIFY_PASS; retval = IMAGE_VERIFY_PASS;
} }
@ -578,21 +578,21 @@ int sega8_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
} }
// Terebi Oekaki (TV Draw) // Terebi Oekaki (TV Draw)
if (len >= 0x13b3 + 7 && !strncmp(reinterpret_cast<const char *>(&ROM[0x13b3]), "annakmn", 7)) if (len >= 0x13b3 + 7 && !strncmp((const char *)&ROM[0x13b3], "annakmn", 7))
type = SEGA8_TEREBIOEKAKI; type = SEGA8_TEREBIOEKAKI;
// The Castle (ROM+RAM) // The Castle (ROM+RAM)
if (len >= 0x1cc3 + 10 && !strncmp(reinterpret_cast<const char *>(&ROM[0x1cc3]), "ASCII 1986", 10)) if (len >= 0x1cc3 + 10 && !strncmp((const char *)&ROM[0x1cc3], "ASCII 1986", 10))
type = SEGA8_CASTLE; type = SEGA8_CASTLE;
// BASIC Level 3 // BASIC Level 3
if (len >= 0x6a20 + 29 && !strncmp(reinterpret_cast<const char *>(&ROM[0x6a20]), "SC-3000 BASIC Level 3 ver 1.0", 29)) if (len >= 0x6a20 + 29 && !strncmp((const char *)&ROM[0x6a20], "SC-3000 BASIC Level 3 ver 1.0", 29))
type = SEGA8_BASIC_L3; type = SEGA8_BASIC_L3;
// Music Editor // Music Editor
if (len >= 0x0841 + 5) if (len >= 0x0841 + 5)
{ {
if (!strncmp(reinterpret_cast<const char *>(&ROM[0x0841]), "PIANO", 5) || !strncmp(reinterpret_cast<const char *>(&ROM[0x0841]), "music", 5)) if (!strncmp((const char *)&ROM[0x0841], "PIANO", 5) || !strncmp((const char *)&ROM[0x0841], "music", 5))
type = SEGA8_MUSIC_EDITOR; type = SEGA8_MUSIC_EDITOR;
} }
@ -731,7 +731,7 @@ void sega8_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 len, UIN
logerror("FILE DETAILS\n" ); logerror("FILE DETAILS\n" );
logerror("============\n" ); logerror("============\n" );
logerror("Name: %s\n", basename()); logerror("Name: %s\n", basename());
logerror("File Size: 0x%08x\n", (software_entry() == nullptr) ? static_cast<int>(length()) : static_cast<int>(get_software_region_length("rom"))); logerror("File Size: 0x%08x\n", (software_entry() == nullptr) ? (int)length() : (int)get_software_region_length("rom"));
logerror("Detected type: %s\n", sega8_get_slot(m_type)); logerror("Detected type: %s\n", sega8_get_slot(m_type));
logerror("ROM (Allocated) Size: 0x%X\n", len); logerror("ROM (Allocated) Size: 0x%X\n", len);
logerror("RAM: %s\n", nvram_len ? "Yes" : "No"); logerror("RAM: %s\n", nvram_len ? "Yes" : "No");

View File

@ -45,7 +45,7 @@ static INPUT_PORTS_START( sms_light_phaser )
PORT_BIT( 0xff, 0x00, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_CHANGED_MEMBER(DEVICE_SELF, sms_light_phaser_device, position_changed, nullptr) PORT_BIT( 0xff, 0x00, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_CHANGED_MEMBER(DEVICE_SELF, sms_light_phaser_device, position_changed, nullptr)
PORT_START("LPHASER_Y") PORT_START("LPHASER_Y")
PORT_BIT( 0xff, 0x00, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_CHANGED_MEMBER(DEVICE_SELF, sms_light_phaser_device, position_changed, nullptr) PORT_BIT( 0xff, 0x00, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_CHANGED_MEMBER(DEVICE_SELF, sms_light_phaser_device, position_changed, 0)
INPUT_PORTS_END INPUT_PORTS_END
@ -172,7 +172,7 @@ int sms_light_phaser_device::bright_aim_area( emu_timer *timer, int lgun_x, int
/* step 1: r^2 = dx^2 + dy^2 */ /* step 1: r^2 = dx^2 + dy^2 */
/* step 2: dx^2 = r^2 - dy^2 */ /* step 2: dx^2 = r^2 - dy^2 */
/* step 3: dx = sqrt(r^2 - dy^2) */ /* step 3: dx = sqrt(r^2 - dy^2) */
dx_radius = ceil(static_cast<float>(sqrt(static_cast<float>(r_x_r - (dy * dy))))); dx_radius = ceil((float) sqrt((float) (r_x_r - (dy * dy))));
} }
aim_area.min_x = MAX(lgun_x - dx_radius, visarea.min_x); aim_area.min_x = MAX(lgun_x - dx_radius, visarea.min_x);

View File

@ -349,23 +349,23 @@ UINT8 sns_sa1_device::read_regs(address_space &space, UINT32 offset)
break; break;
case 0x106: case 0x106:
// Math Result bits0-7 // Math Result bits0-7
value = static_cast<UINT64>(m_math_res >> 0) & 0xff; value = (UINT64)(m_math_res >> 0) & 0xff;
break; break;
case 0x107: case 0x107:
// Math Result bits8-15 // Math Result bits8-15
value = static_cast<UINT64>(m_math_res >> 8) & 0xff; value = (UINT64)(m_math_res >> 8) & 0xff;
break; break;
case 0x108: case 0x108:
// Math Result bits16-23 // Math Result bits16-23
value = static_cast<UINT64>(m_math_res >> 16) & 0xff; value = (UINT64)(m_math_res >> 16) & 0xff;
break; break;
case 0x109: case 0x109:
// Math Result bits24-31 // Math Result bits24-31
value = static_cast<UINT64>(m_math_res >> 24) & 0xff; value = (UINT64)(m_math_res >> 24) & 0xff;
break; break;
case 0x10a: case 0x10a:
// Math Result bits32-39 // Math Result bits32-39
value = static_cast<UINT64>(m_math_res >> 32) & 0xff; value = (UINT64)(m_math_res >> 32) & 0xff;
break; break;
case 0x10b: case 0x10b:
// Math Overflow (above 40bit result) // Math Overflow (above 40bit result)
@ -749,7 +749,7 @@ void sns_sa1_device::write_regs(address_space &space, UINT32 offset, UINT8 data)
switch (m_math_ctlr) switch (m_math_ctlr)
{ {
case 0: //signed multiplication case 0: //signed multiplication
m_math_res = static_cast<INT16>(m_math_a) * static_cast<INT16>(m_math_b); m_math_res = (INT16)m_math_a * (INT16)m_math_b;
m_math_b = 0; m_math_b = 0;
break; break;
case 1: //unsigned division case 1: //unsigned division
@ -757,14 +757,14 @@ void sns_sa1_device::write_regs(address_space &space, UINT32 offset, UINT8 data)
m_math_res = 0; m_math_res = 0;
else else
{ {
INT16 quotient = static_cast<INT16>(m_math_a) / static_cast<UINT16>(m_math_b); INT16 quotient = (INT16)m_math_a / (UINT16)m_math_b;
UINT16 remainder = static_cast<INT16>(m_math_a) % static_cast<UINT16>(m_math_b); UINT16 remainder = (INT16)m_math_a % (UINT16)m_math_b;
m_math_res = static_cast<UINT64>((remainder << 16) | quotient); m_math_res = (UINT64)((remainder << 16) | quotient);
} }
break; break;
case 2: //sigma (accumulative multiplication) case 2: //sigma (accumulative multiplication)
case 3: case 3:
UINT64 acum = static_cast<INT16>(m_math_a) * static_cast<INT16>(m_math_b); UINT64 acum = (INT16)m_math_a * (INT16)m_math_b;
UINT64 mask = U64(0xffffffffff); UINT64 mask = U64(0xffffffffff);
m_math_res += acum; m_math_res += acum;
m_math_overflow = (m_math_res > mask) ? 0x80 : 0; m_math_overflow = (m_math_res > mask) ? 0x80 : 0;

View File

@ -428,7 +428,7 @@ void sns_rom_sdd1_device::device_start()
{ {
m_sdd1emu = auto_alloc(machine(), SDD1_emu(machine())); m_sdd1emu = auto_alloc(machine(), SDD1_emu(machine()));
m_buffer.data = static_cast<UINT8*>(auto_alloc_array(machine(), UINT8, 0x10000)); m_buffer.data = (UINT8*)auto_alloc_array(machine(), UINT8, 0x10000);
m_buffer.ready = 0; m_buffer.ready = 0;
save_item(NAME(m_sdd1_enable)); save_item(NAME(m_sdd1_enable));
@ -573,7 +573,7 @@ UINT8 sns_rom_sdd1_device::read_helper(UINT32 addr)
} }
// fetch a decompressed byte; once buffer is depleted, disable channel and invalidate buffer // fetch a decompressed byte; once buffer is depleted, disable channel and invalidate buffer
data = m_buffer.data[static_cast<UINT16>(m_buffer.offset++)]; data = m_buffer.data[(UINT16)m_buffer.offset++];
if (m_buffer.offset >= m_buffer.size) if (m_buffer.offset >= m_buffer.size)
{ {
m_buffer.ready = 0; m_buffer.ready = 0;

View File

@ -843,7 +843,7 @@ void base_sns_cart_slot_device::setup_addon_from_fullpath()
void base_sns_cart_slot_device::setup_nvram() void base_sns_cart_slot_device::setup_nvram()
{ {
UINT8 *ROM = static_cast<UINT8 *>(m_cart->get_rom_base()); UINT8 *ROM = (UINT8 *)m_cart->get_rom_base();
UINT32 size = 0; UINT32 size = 0;
if (software_entry() == nullptr) if (software_entry() == nullptr)
{ {

View File

@ -300,7 +300,7 @@ static const UINT8 spc7110_mode2_context_table[32][2] =
SPC7110_Decomp::SPC7110_Decomp(running_machine &machine) SPC7110_Decomp::SPC7110_Decomp(running_machine &machine)
: m_machine(machine) : m_machine(machine)
{ {
m_decomp_buffer = static_cast<UINT8*>(auto_alloc_array(machine, UINT8, SPC7110_DECOMP_BUFFER_SIZE)); m_decomp_buffer = (UINT8*)auto_alloc_array(machine, UINT8, SPC7110_DECOMP_BUFFER_SIZE);
reset(); reset();
for (int i = 0; i < 256; i++) for (int i = 0; i < 256; i++)
@ -995,7 +995,7 @@ void sns_rom_spc7110_device::spc7110_update_time(UINT8 offset)
month--; month--;
year += (year >= 90) ? 1900 : 2000; year += (year >= 90) ? 1900 : 2000;
second += static_cast<UINT32>(diff); second += (UINT32)diff;
while (second >= 60) while (second >= 60)
{ {
second -= 60; second -= 60;
@ -1120,7 +1120,7 @@ READ8_MEMBER(sns_rom_spc7110_device::chip_read)
adjust = spc7110_data_adjust(); adjust = spc7110_data_adjust();
if (m_r4818 & 8) if (m_r4818 & 8)
{ {
adjust = static_cast<INT16>(adjust); //16-bit sign extend adjust = (INT16)adjust; //16-bit sign extend
} }
adjustaddr = address; adjustaddr = address;
@ -1136,7 +1136,7 @@ READ8_MEMBER(sns_rom_spc7110_device::chip_read)
UINT32 increment = (m_r4818 & 1) ? spc7110_data_increment() : 1; UINT32 increment = (m_r4818 & 1) ? spc7110_data_increment() : 1;
if (m_r4818 & 4) if (m_r4818 & 4)
{ {
increment = static_cast<INT16>(increment); //16-bit sign extend increment = (INT16)increment; //16-bit sign extend
} }
if ((m_r4818 & 16) == 0) if ((m_r4818 & 16) == 0)
@ -1172,7 +1172,7 @@ READ8_MEMBER(sns_rom_spc7110_device::chip_read)
adjust = spc7110_data_adjust(); adjust = spc7110_data_adjust();
if (m_r4818 & 8) if (m_r4818 & 8)
{ {
adjust = static_cast<INT16>(adjust); //16-bit sign extend adjust = (INT16)adjust; //16-bit sign extend
} }
data = ROM[spc7110_datarom_addr(address + adjust, len)]; data = ROM[spc7110_datarom_addr(address + adjust, len)];
@ -1324,7 +1324,7 @@ WRITE8_MEMBER(sns_rom_spc7110_device::chip_write)
UINT32 increment = spc7110_data_adjust() & 0xff; UINT32 increment = spc7110_data_adjust() & 0xff;
if (m_r4818 & 8) if (m_r4818 & 8)
{ {
increment = static_cast<INT8>(increment); //8-bit sign extend increment = (INT8)increment; //8-bit sign extend
} }
spc7110_set_data_pointer(spc7110_data_pointer() + increment); spc7110_set_data_pointer(spc7110_data_pointer() + increment);
} }
@ -1333,7 +1333,7 @@ WRITE8_MEMBER(sns_rom_spc7110_device::chip_write)
UINT32 increment = spc7110_data_adjust(); UINT32 increment = spc7110_data_adjust();
if (m_r4818 & 8) if (m_r4818 & 8)
{ {
increment = static_cast<INT16>(increment); //16-bit sign extend increment = (INT16)increment; //16-bit sign extend
} }
spc7110_set_data_pointer(spc7110_data_pointer() + increment); spc7110_set_data_pointer(spc7110_data_pointer() + increment);
} }
@ -1362,7 +1362,7 @@ WRITE8_MEMBER(sns_rom_spc7110_device::chip_write)
UINT32 increment = spc7110_data_adjust() & 0xff; UINT32 increment = spc7110_data_adjust() & 0xff;
if (m_r4818 & 8) if (m_r4818 & 8)
{ {
increment = static_cast<INT8>(increment); //8-bit sign extend increment = (INT8)increment; //8-bit sign extend
} }
spc7110_set_data_pointer(spc7110_data_pointer() + increment); spc7110_set_data_pointer(spc7110_data_pointer() + increment);
} }
@ -1371,7 +1371,7 @@ WRITE8_MEMBER(sns_rom_spc7110_device::chip_write)
UINT32 increment = spc7110_data_adjust(); UINT32 increment = spc7110_data_adjust();
if (m_r4818 & 8) if (m_r4818 & 8)
{ {
increment = static_cast<INT16>(increment); //16-bit sign extend increment = (INT16)increment; //16-bit sign extend
} }
spc7110_set_data_pointer(spc7110_data_pointer() + increment); spc7110_set_data_pointer(spc7110_data_pointer() + increment);
} }
@ -1406,8 +1406,8 @@ WRITE8_MEMBER(sns_rom_spc7110_device::chip_write)
if (m_r482e & 1) if (m_r482e & 1)
{ {
//signed 16-bit x 16-bit multiplication //signed 16-bit x 16-bit multiplication
INT16 r0 = static_cast<INT16>(m_r4824 + (m_r4825 << 8)); INT16 r0 = (INT16)(m_r4824 + (m_r4825 << 8));
INT16 r1 = static_cast<INT16>(m_r4820 + (m_r4821 << 8)); INT16 r1 = (INT16)(m_r4820 + (m_r4821 << 8));
INT32 result = r0 * r1; INT32 result = r0 * r1;
m_r4828 = result; m_r4828 = result;
@ -1418,8 +1418,8 @@ WRITE8_MEMBER(sns_rom_spc7110_device::chip_write)
else else
{ {
//unsigned 16-bit x 16-bit multiplication //unsigned 16-bit x 16-bit multiplication
UINT16 r0 = static_cast<UINT16>(m_r4824 + (m_r4825 << 8)); UINT16 r0 = (UINT16)(m_r4824 + (m_r4825 << 8));
UINT16 r1 = static_cast<UINT16>(m_r4820 + (m_r4821 << 8)); UINT16 r1 = (UINT16)(m_r4820 + (m_r4821 << 8));
UINT32 result = r0 * r1; UINT32 result = r0 * r1;
m_r4828 = result; m_r4828 = result;
@ -1440,16 +1440,16 @@ WRITE8_MEMBER(sns_rom_spc7110_device::chip_write)
if (m_r482e & 1) if (m_r482e & 1)
{ {
//signed 32-bit x 16-bit division //signed 32-bit x 16-bit division
INT32 dividend = static_cast<INT32>(m_r4820 + (m_r4821 << 8) + (m_r4822 << 16) + (m_r4823 << 24)); INT32 dividend = (INT32)(m_r4820 + (m_r4821 << 8) + (m_r4822 << 16) + (m_r4823 << 24));
INT16 divisor = static_cast<INT16>(m_r4826 + (m_r4827 << 8)); INT16 divisor = (INT16)(m_r4826 + (m_r4827 << 8));
INT32 quotient; INT32 quotient;
INT16 remainder; INT16 remainder;
if (divisor) if (divisor)
{ {
quotient = static_cast<INT32>(dividend / divisor); quotient = (INT32)(dividend / divisor);
remainder = static_cast<INT32>(dividend % divisor); remainder = (INT32)(dividend % divisor);
} }
else else
{ {
@ -1469,16 +1469,16 @@ WRITE8_MEMBER(sns_rom_spc7110_device::chip_write)
else else
{ {
//unsigned 32-bit x 16-bit division //unsigned 32-bit x 16-bit division
UINT32 dividend = static_cast<UINT32>(m_r4820 + (m_r4821 << 8) + (m_r4822 << 16) + (m_r4823 << 24)); UINT32 dividend = (UINT32)(m_r4820 + (m_r4821 << 8) + (m_r4822 << 16) + (m_r4823 << 24));
UINT16 divisor = static_cast<UINT16>(m_r4826 + (m_r4827 << 8)); UINT16 divisor = (UINT16)(m_r4826 + (m_r4827 << 8));
UINT32 quotient; UINT32 quotient;
UINT16 remainder; UINT16 remainder;
if (divisor) if (divisor)
{ {
quotient = static_cast<UINT32>(dividend / divisor); quotient = (UINT32)(dividend / divisor);
remainder = static_cast<UINT16>(dividend % divisor); remainder = (UINT16)(dividend % divisor);
} }
else else
{ {
@ -1575,7 +1575,7 @@ WRITE8_MEMBER(sns_rom_spc7110_device::chip_write)
{ {
m_r4842 = 0x80; m_r4842 = 0x80;
m_rtc_state = RTCS_IndexSelect; m_rtc_state = RTCS_IndexSelect;
m_rtc_mode = static_cast<RTC_Mode>(data); m_rtc_mode = (RTC_Mode)data;
m_rtc_index = 0; m_rtc_index = 0;
} }
break; break;

View File

@ -114,7 +114,7 @@ void snug_bwg_device::operate_ready_line()
WRITE_LINE_MEMBER( snug_bwg_device::fdc_irq_w ) WRITE_LINE_MEMBER( snug_bwg_device::fdc_irq_w )
{ {
if (TRACE_SIGNALS) logerror("bwg: set intrq = %d\n", state); if (TRACE_SIGNALS) logerror("bwg: set intrq = %d\n", state);
m_IRQ = static_cast<line_state>(state); m_IRQ = (line_state)state;
// Unlike the TI FDC, the BwG does not set the INTB line. Anyway, no one cares. // Unlike the TI FDC, the BwG does not set the INTB line. Anyway, no one cares.
// We need to explicitly set the READY line to release the datamux // We need to explicitly set the READY line to release the datamux
operate_ready_line(); operate_ready_line();
@ -123,7 +123,7 @@ WRITE_LINE_MEMBER( snug_bwg_device::fdc_irq_w )
WRITE_LINE_MEMBER( snug_bwg_device::fdc_drq_w ) WRITE_LINE_MEMBER( snug_bwg_device::fdc_drq_w )
{ {
if (TRACE_SIGNALS) logerror("bwg: set drq = %d\n", state); if (TRACE_SIGNALS) logerror("bwg: set drq = %d\n", state);
m_DRQ = static_cast<line_state>(state); m_DRQ = (line_state)state;
// We need to explicitly set the READY line to release the datamux // We need to explicitly set the READY line to release the datamux
operate_ready_line(); operate_ready_line();

View File

@ -811,7 +811,7 @@ void myarc_hfdc_device::set_floppy_motors_running(bool run)
*/ */
WRITE_LINE_MEMBER( myarc_hfdc_device::intrq_w ) WRITE_LINE_MEMBER( myarc_hfdc_device::intrq_w )
{ {
m_irq = static_cast<line_state>(state); m_irq = (line_state)state;
if (TRACE_INT) logerror("%s: INT pin from controller = %d, propagating to INTA*\n", tag(), state); if (TRACE_INT) logerror("%s: INT pin from controller = %d, propagating to INTA*\n", tag(), state);
// Set INTA* // Set INTA*
@ -838,7 +838,7 @@ WRITE_LINE_MEMBER( myarc_hfdc_device::dmarq_w )
*/ */
WRITE_LINE_MEMBER( myarc_hfdc_device::dip_w ) WRITE_LINE_MEMBER( myarc_hfdc_device::dip_w )
{ {
m_dip = static_cast<line_state>(state); m_dip = (line_state)state;
} }
/* /*

View File

@ -101,7 +101,7 @@ void ti_32k_expcard_device::device_start(void)
// ROM_FILL does not seem to allow filling with an alternating pattern // ROM_FILL does not seem to allow filling with an alternating pattern
for (int i=0; i < 0x8000; i+=2) for (int i=0; i < 0x8000; i+=2)
{ {
m_ram_ptr[i] = static_cast<UINT8>(0xff); m_ram_ptr[i] = (UINT8)0xff;
} }
} }

View File

@ -445,7 +445,7 @@ void ti990_hdc_device::store_registers()
m_d[dsk_sel].unsafe = 0; /* I think */ m_d[dsk_sel].unsafe = 0; /* I think */
dma_address = ((static_cast<int>(m_w[6]) << 16) | m_w[5]) & 0x1ffffe; dma_address = ((((int) m_w[6]) << 16) | m_w[5]) & 0x1ffffe;
byte_count = m_w[4] & 0xfffe; byte_count = m_w[4] & 0xfffe;
/* formatted words per track */ /* formatted words per track */
@ -584,7 +584,7 @@ void ti990_hdc_device::read_data()
return; return;
} }
dma_address = ((static_cast<int>(m_w[6]) << 16) | m_w[5]) & 0x1ffffe; dma_address = ((((int) m_w[6]) << 16) | m_w[5]) & 0x1ffffe;
byte_count = m_w[4] & 0xfffe; byte_count = m_w[4] & 0xfffe;
cylinder = m_w[3]; cylinder = m_w[3];
@ -618,7 +618,7 @@ void ti990_hdc_device::read_data()
if (! (m_w[1] & w1_transfer_inhibit)) if (! (m_w[1] & w1_transfer_inhibit))
for (i=0; i<bytes_read; i+=2) for (i=0; i<bytes_read; i+=2)
{ {
machine().device("maincpu")->memory().space(AS_PROGRAM).write_word(dma_address, (static_cast<int>(buffer[i]) << 8) | buffer[i+1]); machine().device("maincpu")->memory().space(AS_PROGRAM).write_word(dma_address, (((int) buffer[i]) << 8) | buffer[i+1]);
dma_address = (dma_address + 2) & 0x1ffffe; dma_address = (dma_address + 2) & 0x1ffffe;
} }
@ -691,7 +691,7 @@ void ti990_hdc_device::write_data()
return; return;
} }
dma_address = ((static_cast<int>(m_w[6]) << 16) | m_w[5]) & 0x1ffffe; dma_address = ((((int) m_w[6]) << 16) | m_w[5]) & 0x1ffffe;
byte_count = m_w[4] & 0xfffe; byte_count = m_w[4] & 0xfffe;
cylinder = m_w[3]; cylinder = m_w[3];
@ -793,6 +793,9 @@ void ti990_hdc_device::unformatted_read()
return; return;
} }
dma_address = ((((int) m_w[6]) << 16) | m_w[5]) & 0x1ffffe;
byte_count = m_w[4] & 0xfffe;
cylinder = m_w[3]; cylinder = m_w[3];
head = m_w[1] & w1_head_address; head = m_w[1] & w1_head_address;
sector = m_w[2] & 0xff; sector = m_w[2] & 0xff;
@ -800,7 +803,7 @@ void ti990_hdc_device::unformatted_read()
if (check_sector_address(dsk_sel, cylinder, head, sector)) if (check_sector_address(dsk_sel, cylinder, head, sector))
return; return;
dma_address = ((static_cast<int>(m_w[6]) << 16) | m_w[5]) & 0x1ffffe; dma_address = ((((int) m_w[6]) << 16) | m_w[5]) & 0x1ffffe;
byte_count = m_w[4] & 0xfffe; byte_count = m_w[4] & 0xfffe;
/* bits 0-4: head address; bits 5-15: cylinder address */ /* bits 0-4: head address; bits 5-15: cylinder address */

View File

@ -164,7 +164,7 @@ void tap_990_device::cmd_read_binary_forward()
m_tape[tap_sel].bot = 0; m_tape[tap_sel].bot = 0;
dma_address = ((static_cast<int>(m_w[6]) << 16) | m_w[5]) & 0x1ffffe; dma_address = ((((int)m_w[6]) << 16) | m_w[5]) & 0x1ffffe;
char_count = m_w[4]; char_count = m_w[4];
read_offset = m_w[3]; read_offset = m_w[3];
@ -191,7 +191,7 @@ void tap_990_device::cmd_read_binary_forward()
goto update_registers; goto update_registers;
} }
} }
reclen = (static_cast<int>(buffer[1]) << 8) | buffer[0]; reclen = (((int) buffer[1]) << 8) | buffer[0];
if (buffer[2] || buffer[3]) if (buffer[2] || buffer[3])
{ /* no idea what these bytes mean */ { /* no idea what these bytes mean */
logerror("Tape error\n"); logerror("Tape error\n");
@ -257,7 +257,7 @@ void tap_990_device::cmd_read_binary_forward()
/* DMA */ /* DMA */
for (i=0; i<bytes_read; i+=2) for (i=0; i<bytes_read; i+=2)
{ {
machine().device("maincpu")->memory().space(AS_PROGRAM).write_word(dma_address, (static_cast<int>(buffer[i]) << 8) | buffer[i+1]); machine().device("maincpu")->memory().space(AS_PROGRAM).write_word(dma_address, (((int) buffer[i]) << 8) | buffer[i+1]);
dma_address = (dma_address + 2) & 0x1ffffe; dma_address = (dma_address + 2) & 0x1ffffe;
} }
@ -308,7 +308,7 @@ skip_trailer:
goto update_registers; goto update_registers;
} }
if (reclen != ((static_cast<int>(buffer[1]) << 8) | buffer[0])) if (reclen != ((((int) buffer[1]) << 8) | buffer[0]))
{ /* eject tape */ { /* eject tape */
logerror("Tape error\n"); logerror("Tape error\n");
m_tape[tap_sel].img->unload(); m_tape[tap_sel].img->unload();
@ -410,7 +410,7 @@ void tap_990_device::cmd_record_skip_forward()
goto update_registers; goto update_registers;
} }
} }
reclen = (static_cast<int>(buffer[1]) << 8) | buffer[0]; reclen = (((int) buffer[1]) << 8) | buffer[0];
if (buffer[2] || buffer[3]) if (buffer[2] || buffer[3])
{ /* no idea what these bytes mean */ { /* no idea what these bytes mean */
logerror("Tape format looks gooofy\n"); logerror("Tape format looks gooofy\n");
@ -451,7 +451,7 @@ void tap_990_device::cmd_record_skip_forward()
goto update_registers; goto update_registers;
} }
if (reclen != ((static_cast<int>(buffer[1]) << 8) | buffer[0])) if (reclen != ((((int) buffer[1]) << 8) | buffer[0]))
{ /* eject tape */ { /* eject tape */
m_tape[tap_sel].img->unload(); m_tape[tap_sel].img->unload();
m_w[0] |= w0_offline; m_w[0] |= w0_offline;
@ -553,7 +553,7 @@ void tap_990_device::cmd_record_skip_reverse()
update_interrupt(); update_interrupt();
goto update_registers; goto update_registers;
} }
reclen = (static_cast<int>(buffer[1]) << 8) | buffer[0]; reclen = (((int) buffer[1]) << 8) | buffer[0];
if (buffer[2] || buffer[3]) if (buffer[2] || buffer[3])
{ /* no idea what these bytes mean */ { /* no idea what these bytes mean */
logerror("Tape format looks gooofy\n"); logerror("Tape format looks gooofy\n");
@ -600,7 +600,7 @@ void tap_990_device::cmd_record_skip_reverse()
update_interrupt(); update_interrupt();
goto update_registers; goto update_registers;
} }
if (reclen != ((static_cast<int>(buffer[1]) << 8) | buffer[0])) if (reclen != ((((int) buffer[1]) << 8) | buffer[0]))
{ /* eject tape */ { /* eject tape */
m_tape[tap_sel].img->unload(); m_tape[tap_sel].img->unload();
m_w[0] |= w0_offline; m_w[0] |= w0_offline;

View File

@ -723,7 +723,7 @@ void mainboard8_device::device_start()
for (int j=1; (j < 8) && (kind == MAP8_UNDEF); j++) for (int j=1; (j < 8) && (kind == MAP8_UNDEF); j++)
{ {
// Pseudo devices are enumerated as 1 ... 6 (see MAP8_SRAM etc.) // Pseudo devices are enumerated as 1 ... 6 (see MAP8_SRAM etc.)
if (strcmp(entry[i].name, pseudodev[j-1])==0) kind = static_cast<mapper8_device_kind>(j); if (strcmp(entry[i].name, pseudodev[j-1])==0) kind = (mapper8_device_kind)j;
} }
if (kind==MAP8_UNDEF) if (kind==MAP8_UNDEF)
{ {
@ -735,13 +735,13 @@ void mainboard8_device::device_start()
{ {
if (entry[i].mode != PHYSIC) if (entry[i].mode != PHYSIC)
{ {
auto ad = new logically_addressed_device(kind, static_cast<device_t*>(dev), entry[i]); auto ad = new logically_addressed_device(kind, (device_t*)dev, entry[i]);
m_logcomp.append(*ad); m_logcomp.append(*ad);
if (TRACE_CONFIG) logerror("%s: Device %s mounted into logical address space.\n", tag(), entry[i].name); if (TRACE_CONFIG) logerror("%s: Device %s mounted into logical address space.\n", tag(), entry[i].name);
} }
else else
{ {
auto ad = new physically_addressed_device(kind, static_cast<device_t*>(dev), entry[i]); auto ad = new physically_addressed_device(kind, (device_t*)dev, entry[i]);
m_physcomp.append(*ad); m_physcomp.append(*ad);
if (TRACE_CONFIG) logerror("%s: Device %s mounted into physical address space.\n", tag(), entry[i].name); if (TRACE_CONFIG) logerror("%s: Device %s mounted into physical address space.\n", tag(), entry[i].name);
} }
@ -1002,7 +1002,7 @@ WRITE8_MEMBER( ti998_spsyn_device::write )
{ {
attotime time_to_ready = attotime::from_double(m_vsp->time_to_ready()); attotime time_to_ready = attotime::from_double(m_vsp->time_to_ready());
int cycles_to_ready = machine().device<cpu_device>("maincpu")->attotime_to_cycles(time_to_ready); int cycles_to_ready = machine().device<cpu_device>("maincpu")->attotime_to_cycles(time_to_ready);
if (TRACE_SPEECH && TRACE_DETAIL) logerror("%s: time to ready: %f -> %d\n", tag(), time_to_ready.as_double(), static_cast<int>(cycles_to_ready)); if (TRACE_SPEECH && TRACE_DETAIL) logerror("%s: time to ready: %f -> %d\n", tag(), time_to_ready.as_double(), (int) cycles_to_ready);
machine().device("maincpu")->execute().adjust_icount(-cycles_to_ready); machine().device("maincpu")->execute().adjust_icount(-cycles_to_ready);
machine().scheduler().timer_set(attotime::zero, FUNC_NULL); machine().scheduler().timer_set(attotime::zero, FUNC_NULL);

View File

@ -375,7 +375,7 @@ WRITE_LINE_MEMBER( ti99_datamux_device::ready_line )
{ {
if (state != m_sysready) logerror("datamux: READY line from PBox = %d\n", state); if (state != m_sysready) logerror("datamux: READY line from PBox = %d\n", state);
} }
m_sysready = static_cast<line_state>(state); m_sysready = (line_state)state;
// Also propagate to CPU via driver // Also propagate to CPU via driver
ready_join(); ready_join();
} }

View File

@ -214,7 +214,7 @@ geneve_mapper_device::geneve_mapper_device(const machine_config &mconfig, const
INPUT_CHANGED_MEMBER( geneve_mapper_device::settings_changed ) INPUT_CHANGED_MEMBER( geneve_mapper_device::settings_changed )
{ {
int number = static_cast<int>(reinterpret_cast<UINT64>(param)&0x03); int number = (int)((UINT64)param&0x03);
int value = newval; int value = newval;
switch (number) switch (number)
@ -298,7 +298,7 @@ WRITE8_MEMBER( geneve_mapper_device::write_grom )
} }
else else
{ {
m_grom_address = (m_grom_address & 0x00ff) | (static_cast<UINT16>(data)<<8); m_grom_address = (m_grom_address & 0x00ff) | ((UINT16)data<<8);
m_gromwaddr_LSB = true; m_gromwaddr_LSB = true;
} }
} }

View File

@ -916,8 +916,8 @@ WRITE8_MEMBER( gkracker_device::cruwrite )
INPUT_CHANGED_MEMBER( gkracker_device::gk_changed ) INPUT_CHANGED_MEMBER( gkracker_device::gk_changed )
{ {
if (TRACE_GKRACKER) logerror("%s: Input changed %d - %d\n", tag(), static_cast<int>(reinterpret_cast<UINT64>(param) & 0x07), newval); if (TRACE_GKRACKER) logerror("%s: Input changed %d - %d\n", tag(), (int)((UINT64)param & 0x07), newval);
m_gk_switch[reinterpret_cast<UINT64>(param) & 0x07] = newval; m_gk_switch[(UINT64)param & 0x07] = newval;
} }
void gkracker_device::insert(int index, ti99_cartridge_device* cart) void gkracker_device::insert(int index, ti99_cartridge_device* cart)
@ -938,12 +938,12 @@ void gkracker_device::remove(int index)
void gkracker_device::gk_install_menu(const char* menutext, int len, int ptr, int next, int start) void gkracker_device::gk_install_menu(const char* menutext, int len, int ptr, int next, int start)
{ {
const int base = 0x0000; const int base = 0x0000;
m_ram_ptr[base + ptr] = static_cast<UINT8>((next >> 8) & 0xff); m_ram_ptr[base + ptr] = (UINT8)((next >> 8) & 0xff);
m_ram_ptr[base + ptr+1] = static_cast<UINT8>(next & 0xff); m_ram_ptr[base + ptr+1] = (UINT8)(next & 0xff);
m_ram_ptr[base + ptr+2] = static_cast<UINT8>((start >> 8) & 0xff); m_ram_ptr[base + ptr+2] = (UINT8)((start >> 8) & 0xff);
m_ram_ptr[base + ptr+3] = static_cast<UINT8>(start & 0xff); m_ram_ptr[base + ptr+3] = (UINT8)(start & 0xff);
m_ram_ptr[base + ptr+4] = static_cast<UINT8>(len & 0xff); m_ram_ptr[base + ptr+4] = (UINT8)(len & 0xff);
memcpy(m_ram_ptr + base + ptr+5, menutext, len); memcpy(m_ram_ptr + base + ptr+5, menutext, len);
} }
@ -2276,7 +2276,7 @@ rpk_socket* rpk_reader::load_rom_resource(zip_file* zip, xml_data_node* rom_reso
if (sha1 != nullptr) if (sha1 != nullptr)
{ {
hash_collection actual_hashes; hash_collection actual_hashes;
actual_hashes.compute(static_cast<const UINT8 *>(contents), length, hash_collection::HASH_TYPES_CRC_SHA1); actual_hashes.compute((const UINT8 *)contents, length, hash_collection::HASH_TYPES_CRC_SHA1);
hash_collection expected_hashes; hash_collection expected_hashes;
expected_hashes.add_from_string(hash_collection::HASH_SHA1, sha1, strlen(sha1)); expected_hashes.add_from_string(hash_collection::HASH_SHA1, sha1, strlen(sha1));
@ -2495,7 +2495,7 @@ rpk* rpk_reader::open(emu_options &options, const char *filename, const char *sy
if (!found) throw rpk_exception(RPK_INVALID_RESOURCE_REF, uses_name); if (!found) throw rpk_exception(RPK_INVALID_RESOURCE_REF, uses_name);
} }
} }
catch (rpk_exception) catch (rpk_exception &exp)
{ {
newrpk->close(); newrpk->close();
if (layout_xml != nullptr) xml_file_free(layout_xml); if (layout_xml != nullptr) xml_file_free(layout_xml);

View File

@ -534,8 +534,8 @@ public:
const char* to_string() const char* to_string()
{ {
if (m_detail==nullptr) return error_text[static_cast<int>(m_err)]; if (m_detail==nullptr) return error_text[(int)m_err];
std::string errormsg = std::string(error_text[static_cast<int>(m_err)]).append(": ").append(m_detail); std::string errormsg = std::string(error_text[(int)m_err]).append(": ").append(m_detail);
return core_strdup(errormsg.c_str()); return core_strdup(errormsg.c_str());
} }

View File

@ -181,7 +181,7 @@ bool ti99_handset_device::poll_keyboard(int num)
previous_key[num] = current_key = previous_key[num] & ~0x20; previous_key[num] = current_key = previous_key[num] & ~0x20;
} }
/* post message */ /* post message */
post_message((static_cast<unsigned>(current_key) << 4) | (num << 1)); post_message((((unsigned)current_key) << 4) | (num << 1));
return true; return true;
} }
} }
@ -208,7 +208,7 @@ bool ti99_handset_device::poll_keyboard(int num)
previous_key[num] = current_key; previous_key[num] = current_key;
/* post message */ /* post message */
post_message((static_cast<unsigned>(current_key) << 4) | (num << 1)); post_message((((unsigned) current_key) << 4) | (num << 1));
return true; return true;
} }
return false; return false;

View File

@ -96,11 +96,11 @@ READ16_MEMBER( ti_exp_video_device::read16 )
if (offset & 1) if (offset & 1)
{ /* read VDP status */ { /* read VDP status */
return static_cast<int>(m_v9938->status_r()) << 8; return ((int) m_v9938->status_r()) << 8;
} }
else else
{ /* read VDP RAM */ { /* read VDP RAM */
return static_cast<int>(m_v9938->vram_r()) << 8; return ((int) m_v9938->vram_r()) << 8;
} }
} }

View File

@ -50,7 +50,7 @@ void device_vboy_cart_interface::rom_alloc(UINT32 size, const char *tag)
{ {
if (m_rom == nullptr) if (m_rom == nullptr)
{ {
m_rom = reinterpret_cast<UINT32 *>(device().machine().memory().region_alloc(std::string(tag).append(VBOYSLOT_ROM_REGION_TAG).c_str(), size, 4, ENDIANNESS_LITTLE)->base()); m_rom = (UINT32 *)device().machine().memory().region_alloc(std::string(tag).append(VBOYSLOT_ROM_REGION_TAG).c_str(), size, 4, ENDIANNESS_LITTLE)->base();
m_rom_size = size/4; m_rom_size = size/4;
m_rom_mask = m_rom_size - 1; m_rom_mask = m_rom_size - 1;
} }
@ -178,7 +178,7 @@ bool vboy_cart_slot_device::call_load()
if (has_eeprom) if (has_eeprom)
m_cart->eeprom_alloc(get_software_region_length("eeprom")); m_cart->eeprom_alloc(get_software_region_length("eeprom"));
ROM = reinterpret_cast<UINT8 *>(m_cart->get_rom_base()); ROM = (UINT8 *)m_cart->get_rom_base();
if (software_entry() == nullptr) if (software_entry() == nullptr)
fread(ROM, len); fread(ROM, len);

View File

@ -308,7 +308,7 @@ bool vcs_cart_slot_device::call_load()
// pass a pointer to the now allocated ROM for the DPC chip // pass a pointer to the now allocated ROM for the DPC chip
if (m_type == A26_DPC) if (m_type == A26_DPC)
m_cart->setup_addon_ptr(static_cast<UINT8 *>(m_cart->get_rom_base()) + 0x2000); m_cart->setup_addon_ptr((UINT8 *)m_cart->get_rom_base() + 0x2000);
return IMAGE_INIT_PASS; return IMAGE_INIT_PASS;
} }

View File

@ -72,7 +72,7 @@ machine_config_constructor z88_1024k_flash_device::device_mconfig_additions() co
UINT8* z88_1024k_flash_device::get_cart_base() UINT8* z88_1024k_flash_device::get_cart_base()
{ {
return static_cast<UINT8*>(m_flash->space().get_read_ptr(0)); return (UINT8*)m_flash->space().get_read_ptr(0);
} }
/*------------------------------------------------- /*-------------------------------------------------