diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2016-10-22 11:31:49 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2016-10-22 11:31:49 +0200 |
commit | 23ad94073f4c2f7131fa0c95b6202f2f9027db41 (patch) | |
tree | 4f4e1e27a22ace8fea49b63030d4462db7cb68a1 /src/mame | |
parent | 255bf78b316a9dc9e4c53a65143000471a6927d3 (diff) |
use standard types uintptr_t, char16_t and char32_t instead of FPTR, utf16_char, unicode_char (nw)
Diffstat (limited to 'src/mame')
74 files changed, 150 insertions, 150 deletions
diff --git a/src/mame/drivers/a310.cpp b/src/mame/drivers/a310.cpp index f86afe2db95..dcc55ab7b9c 100644 --- a/src/mame/drivers/a310.cpp +++ b/src/mame/drivers/a310.cpp @@ -169,8 +169,8 @@ ADDRESS_MAP_END INPUT_CHANGED_MEMBER(a310_state::key_stroke) { - UINT8 row_val = (UINT8)(FPTR)(param) >> 4; - UINT8 col_val = (UINT8)(FPTR)(param) & 0xf; + UINT8 row_val = (UINT8)(uintptr_t)(param) >> 4; + UINT8 col_val = (UINT8)(uintptr_t)(param) & 0xf; if(newval && !oldval) m_kart->send_keycode_down(row_val,col_val); diff --git a/src/mame/drivers/acefruit.cpp b/src/mame/drivers/acefruit.cpp index 82d32c65e85..a9b01d35d77 100644 --- a/src/mame/drivers/acefruit.cpp +++ b/src/mame/drivers/acefruit.cpp @@ -202,7 +202,7 @@ UINT32 acefruit_state::screen_update_acefruit(screen_device &screen, bitmap_ind1 CUSTOM_INPUT_MEMBER(acefruit_state::sidewndr_payout_r) { - int bit_mask = (FPTR)param; + int bit_mask = (uintptr_t)param; switch (bit_mask) { @@ -218,7 +218,7 @@ CUSTOM_INPUT_MEMBER(acefruit_state::sidewndr_payout_r) CUSTOM_INPUT_MEMBER(acefruit_state::starspnr_coinage_r) { - int bit_mask = (FPTR)param; + int bit_mask = (uintptr_t)param; switch (bit_mask) { @@ -238,7 +238,7 @@ CUSTOM_INPUT_MEMBER(acefruit_state::starspnr_coinage_r) CUSTOM_INPUT_MEMBER(acefruit_state::starspnr_payout_r) { - int bit_mask = (FPTR)param; + int bit_mask = (uintptr_t)param; switch (bit_mask) { diff --git a/src/mame/drivers/amiga.cpp b/src/mame/drivers/amiga.cpp index 4b561e6eab2..308071d5dc4 100644 --- a/src/mame/drivers/amiga.cpp +++ b/src/mame/drivers/amiga.cpp @@ -907,7 +907,7 @@ CUSTOM_INPUT_MEMBER( cd32_state::cd32_input ) CUSTOM_INPUT_MEMBER( cd32_state::cd32_sel_mirror_input ) { - UINT8 bits = m_player_ports[(int)(FPTR)param]->read(); + UINT8 bits = m_player_ports[(int)(uintptr_t)param]->read(); return (bits & 0x20)>>5; } diff --git a/src/mame/drivers/apc.cpp b/src/mame/drivers/apc.cpp index 7076123f631..b19e032034c 100644 --- a/src/mame/drivers/apc.cpp +++ b/src/mame/drivers/apc.cpp @@ -500,7 +500,7 @@ INPUT_CHANGED_MEMBER(apc_state::key_stroke) { if(newval && !oldval) { - m_keyb.data = (UINT8)(FPTR)(param) & 0xff; + m_keyb.data = (UINT8)(uintptr_t)(param) & 0xff; //m_keyb.status &= ~1; machine().device<pic8259_device>("pic8259_master")->ir4_w(1); } diff --git a/src/mame/drivers/arsystems.cpp b/src/mame/drivers/arsystems.cpp index 5195cc5d8ab..d54a3f723f6 100644 --- a/src/mame/drivers/arsystems.cpp +++ b/src/mame/drivers/arsystems.cpp @@ -154,7 +154,7 @@ WRITE8_MEMBER(arcadia_amiga_state::arcadia_cia_0_portb_w) CUSTOM_INPUT_MEMBER(arcadia_amiga_state::coin_counter_r) { - int coin = (FPTR)param; + int coin = (uintptr_t)param; /* return coin counter values */ return m_coin_counter[coin] & 3; @@ -163,7 +163,7 @@ CUSTOM_INPUT_MEMBER(arcadia_amiga_state::coin_counter_r) INPUT_CHANGED_MEMBER(arcadia_amiga_state::coin_changed_callback) { - int coin = (FPTR)param; + int coin = (uintptr_t)param; /* check for a 0 -> 1 transition */ if (!oldval && newval && m_coin_counter[coin] < 3) diff --git a/src/mame/drivers/bnstars.cpp b/src/mame/drivers/bnstars.cpp index db3beac36f2..ed01ca3fd5a 100644 --- a/src/mame/drivers/bnstars.cpp +++ b/src/mame/drivers/bnstars.cpp @@ -708,7 +708,7 @@ GFXDECODE_END CUSTOM_INPUT_MEMBER(bnstars_state::mahjong_ctrl_r) { - required_ioport_array<4> &keys = (((int)(FPTR)param) == 0) ? m_p1_keys : m_p2_keys; + required_ioport_array<4> &keys = (((int)(uintptr_t)param) == 0) ? m_p1_keys : m_p2_keys; switch (m_bnstars1_mahjong_select & 0x2080) { diff --git a/src/mame/drivers/by17.cpp b/src/mame/drivers/by17.cpp index f6ea6742774..128ea6eb3fb 100644 --- a/src/mame/drivers/by17.cpp +++ b/src/mame/drivers/by17.cpp @@ -431,8 +431,8 @@ INPUT_PORTS_END CUSTOM_INPUT_MEMBER( by17_state::outhole_x0 ) { - int bit_shift = ((FPTR)param & 0x07); - int port = (((FPTR)param >> 4) & 0x07); + int bit_shift = ((uintptr_t)param & 0x07); + int port = (((uintptr_t)param >> 4) & 0x07); /* Here we simulate the ball sitting in the Outhole so the Outhole Solenoid can release it */ @@ -444,8 +444,8 @@ CUSTOM_INPUT_MEMBER( by17_state::outhole_x0 ) CUSTOM_INPUT_MEMBER( by17_state::saucer_x3 ) { - int bit_shift = ((FPTR)param & 0x07); - int port = (((FPTR)param >> 4) & 0x07); + int bit_shift = ((uintptr_t)param & 0x07); + int port = (((uintptr_t)param >> 4) & 0x07); /* Here we simulate the ball sitting in a Saucer so the Saucer Solenoid can release it */ @@ -460,8 +460,8 @@ CUSTOM_INPUT_MEMBER( by17_state::drop_target_x2 ) { /* Here we simulate fallen Drop Targets so the Drop Target Reset Solenoids can release the switches */ - int bit_shift = ((FPTR)param & 0x07); - int port = (((FPTR)param >> 4) & 0x07); + int bit_shift = ((uintptr_t)param & 0x07); + int port = (((uintptr_t)param >> 4) & 0x07); switch (bit_shift) { diff --git a/src/mame/drivers/by35.cpp b/src/mame/drivers/by35.cpp index 85eda358902..6728f12eae1 100644 --- a/src/mame/drivers/by35.cpp +++ b/src/mame/drivers/by35.cpp @@ -430,8 +430,8 @@ INPUT_PORTS_END CUSTOM_INPUT_MEMBER( by35_state::outhole_x0 ) { - int bit_shift = ((FPTR)param & 0x07); - int port = (((FPTR)param >> 4) & 0x07); + int bit_shift = ((uintptr_t)param & 0x07); + int port = (((uintptr_t)param >> 4) & 0x07); /* Here we simulate the ball sitting in the Outhole so the Outhole Solenoid can release it */ @@ -443,8 +443,8 @@ CUSTOM_INPUT_MEMBER( by35_state::outhole_x0 ) CUSTOM_INPUT_MEMBER( by35_state::kickback_x3 ) { - int bit_shift = ((FPTR)param & 0x07); - int port = (((FPTR)param >> 4) & 0x07); + int bit_shift = ((uintptr_t)param & 0x07); + int port = (((uintptr_t)param >> 4) & 0x07); /* Here we simulate the ball sitting in a Saucer so the Saucer Solenoid can release it */ @@ -458,8 +458,8 @@ CUSTOM_INPUT_MEMBER( by35_state::drop_target_x0 ) { /* Here we simulate the Drop Target switch states so the Drop Target Reset Solenoid can also release the switches */ - int bit_shift = ((FPTR)param & 0x07); - int port = (((FPTR)param >> 4) & 0x07); + int bit_shift = ((uintptr_t)param & 0x07); + int port = (((uintptr_t)param >> 4) & 0x07); switch (bit_shift) { diff --git a/src/mame/drivers/cc40.cpp b/src/mame/drivers/cc40.cpp index e8e04132d12..3385d032ef9 100644 --- a/src/mame/drivers/cc40.cpp +++ b/src/mame/drivers/cc40.cpp @@ -389,7 +389,7 @@ ADDRESS_MAP_END INPUT_CHANGED_MEMBER(cc40_state::sysram_size_changed) { - init_sysram((int)(FPTR)param, newval << 11); + init_sysram((int)(uintptr_t)param, newval << 11); } static INPUT_PORTS_START( cc40 ) diff --git a/src/mame/drivers/cdi.cpp b/src/mame/drivers/cdi.cpp index fb0bdbf47e4..0ed78ba75e0 100644 --- a/src/mame/drivers/cdi.cpp +++ b/src/mame/drivers/cdi.cpp @@ -140,7 +140,7 @@ INPUT_CHANGED_MEMBER(cdi_state::mcu_input) { bool send = false; - switch((FPTR)param) + switch((uintptr_t)param) { case 0x39: if (m_input1.read_safe(0) & 0x01) send = true; @@ -177,7 +177,7 @@ INPUT_CHANGED_MEMBER(cdi_state::mcu_input) if(send) { - UINT8 data = (UINT8)((FPTR)param & 0x000000ff); + UINT8 data = (UINT8)((uintptr_t)param & 0x000000ff); m_scc->quizard_rx(data); } } diff --git a/src/mame/drivers/chessmst.cpp b/src/mame/drivers/chessmst.cpp index 771b281ebd2..0da9d76a24f 100644 --- a/src/mame/drivers/chessmst.cpp +++ b/src/mame/drivers/chessmst.cpp @@ -117,7 +117,7 @@ INPUT_CHANGED_MEMBER(chessmst_state::view_monitor_button) INPUT_CHANGED_MEMBER(chessmst_state::chessmst_sensor) { - UINT8 pos = (UINT8)(FPTR)param; + UINT8 pos = (UINT8)(uintptr_t)param; if (newval) { diff --git a/src/mame/drivers/cischeat.cpp b/src/mame/drivers/cischeat.cpp index 50c2a04b9bb..8e6ed65744e 100644 --- a/src/mame/drivers/cischeat.cpp +++ b/src/mame/drivers/cischeat.cpp @@ -786,7 +786,7 @@ void cischeat_state::captflag_motor_move(int side, UINT16 data) CUSTOM_INPUT_MEMBER(cischeat_state::captflag_motor_pos_r) { const UINT8 pos[4] = {1,0,2,3}; // -> 2,3,1,0 offsets -> 0123 - return ~pos[m_captflag_motor_pos[(FPTR)param]]; + return ~pos[m_captflag_motor_pos[(uintptr_t)param]]; } CUSTOM_INPUT_MEMBER(cischeat_state::captflag_motor_busy_r) diff --git a/src/mame/drivers/cop01.cpp b/src/mame/drivers/cop01.cpp index 650895fd373..9485816f51a 100644 --- a/src/mame/drivers/cop01.cpp +++ b/src/mame/drivers/cop01.cpp @@ -99,7 +99,7 @@ READ8_MEMBER(cop01_state::cop01_sound_command_r) CUSTOM_INPUT_MEMBER(cop01_state::mightguy_area_r) { - int bit_mask = (FPTR)param; + int bit_mask = (uintptr_t)param; return (ioport("FAKE")->read() & bit_mask) ? 0x01 : 0x00; } diff --git a/src/mame/drivers/crystal.cpp b/src/mame/drivers/crystal.cpp index e25b715c507..7664c0422ea 100644 --- a/src/mame/drivers/crystal.cpp +++ b/src/mame/drivers/crystal.cpp @@ -389,7 +389,7 @@ WRITE32_MEMBER(crystal_state::Banksw_w) TIMER_CALLBACK_MEMBER(crystal_state::Timercb) { - int which = (int)(FPTR)ptr; + int which = (int)(uintptr_t)ptr; static const int num[] = { 0, 1, 9, 10 }; if (!(m_Timerctrl[which] & 2)) @@ -772,7 +772,7 @@ void crystal_state::machine_start() int i; for (i = 0; i < 4; i++) - m_Timer[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(crystal_state::Timercb),this), (void*)(FPTR)i); + m_Timer[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(crystal_state::Timercb),this), (void*)(uintptr_t)i); PatchReset(); diff --git a/src/mame/drivers/cubo.cpp b/src/mame/drivers/cubo.cpp index 010c59a762e..5532adb9171 100644 --- a/src/mame/drivers/cubo.cpp +++ b/src/mame/drivers/cubo.cpp @@ -522,7 +522,7 @@ CUSTOM_INPUT_MEMBER( cubo_state::cubo_input ) CUSTOM_INPUT_MEMBER( cubo_state::cd32_sel_mirror_input ) { - UINT8 bits = m_player_ports[(int)(FPTR)param]->read(); + UINT8 bits = m_player_ports[(int)(uintptr_t)param]->read(); return (bits & 0x20)>>5; } diff --git a/src/mame/drivers/deshoros.cpp b/src/mame/drivers/deshoros.cpp index 17a67a9a56c..a3fce6cb892 100644 --- a/src/mame/drivers/deshoros.cpp +++ b/src/mame/drivers/deshoros.cpp @@ -156,7 +156,7 @@ INPUT_CHANGED_MEMBER(destiny_state::coin_inserted) m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); // coincounter on coin insert - if (((int)(FPTR)param) == 0) + if (((int)(uintptr_t)param) == 0) machine().bookkeeping().coin_counter_w(0, newval); } diff --git a/src/mame/drivers/digel804.cpp b/src/mame/drivers/digel804.cpp index 8e56c443a0f..05ab0883ca3 100644 --- a/src/mame/drivers/digel804.cpp +++ b/src/mame/drivers/digel804.cpp @@ -350,7 +350,7 @@ INPUT_CHANGED_MEMBER( digel804_state::mode_change ) { if (!newval && !m_keyen_state) { - switch ((int)(FPTR)param) + switch ((int)(uintptr_t)param) { case MODE_OFF: m_key_mode = m_remote_mode = m_sim_mode = 1; diff --git a/src/mame/drivers/esq1.cpp b/src/mame/drivers/esq1.cpp index daa63b3904d..51310b25c8d 100644 --- a/src/mame/drivers/esq1.cpp +++ b/src/mame/drivers/esq1.cpp @@ -571,13 +571,13 @@ INPUT_CHANGED_MEMBER(esq1_state::key_stroke) { if (oldval == 0 && newval == 1) { - send_through_panel((UINT8)(FPTR)param); - send_through_panel((UINT8)(FPTR)0x00); + send_through_panel((UINT8)(uintptr_t)param); + send_through_panel((UINT8)(uintptr_t)0x00); } else if (oldval == 1 && newval == 0) { - send_through_panel((UINT8)(FPTR)param&0x7f); - send_through_panel((UINT8)(FPTR)0x00); + send_through_panel((UINT8)(uintptr_t)param&0x7f); + send_through_panel((UINT8)(uintptr_t)0x00); } } diff --git a/src/mame/drivers/esq5505.cpp b/src/mame/drivers/esq5505.cpp index 05a7f163791..b9e72bec995 100644 --- a/src/mame/drivers/esq5505.cpp +++ b/src/mame/drivers/esq5505.cpp @@ -548,7 +548,7 @@ WRITE8_MEMBER(esq5505_state::fdc_write_byte) #if KEYBOARD_HACK INPUT_CHANGED_MEMBER(esq5505_state::key_stroke) { - int val = (UINT8)(FPTR)param; + int val = (UINT8)(uintptr_t)param; int cmp = 0x60; if (m_system_type == SQ1) @@ -591,7 +591,7 @@ INPUT_CHANGED_MEMBER(esq5505_state::key_stroke) } else if (oldval == 1 && newval == 0) { - // printf("key off %x\n", (UINT8)(FPTR)param); + // printf("key off %x\n", (UINT8)(uintptr_t)param); m_panel->xmit_char(val&0x7f); m_panel->xmit_char(0x00); } diff --git a/src/mame/drivers/fantland.cpp b/src/mame/drivers/fantland.cpp index b175a144897..552fe5a4869 100644 --- a/src/mame/drivers/fantland.cpp +++ b/src/mame/drivers/fantland.cpp @@ -719,7 +719,7 @@ INPUT_PORTS_END CUSTOM_INPUT_MEMBER(fantland_state::wheelrun_wheel_r) { - int player = (FPTR)param; + int player = (uintptr_t)param; int delta = ioport(player ? "WHEEL1" : "WHEEL0")->read(); delta = (delta & 0x7f) - (delta & 0x80) + 4; diff --git a/src/mame/drivers/firetrap.cpp b/src/mame/drivers/firetrap.cpp index 05f577354a0..6a2dc7d14a5 100644 --- a/src/mame/drivers/firetrap.cpp +++ b/src/mame/drivers/firetrap.cpp @@ -409,7 +409,7 @@ INPUT_CHANGED_MEMBER(firetrap_state::coin_inserted) /* coin insertion causes an IRQ */ if(newval) { - m_coin_command_pending = (UINT8)(FPTR)(param); + m_coin_command_pending = (UINT8)(uintptr_t)(param); /* Make sure coin IRQ's aren't generated when another command is pending, the main cpu definitely doesn't expect them as it locks out the coin routine */ diff --git a/src/mame/drivers/firetrk.cpp b/src/mame/drivers/firetrk.cpp index edefbdff506..c0f4bf3539c 100644 --- a/src/mame/drivers/firetrk.cpp +++ b/src/mame/drivers/firetrk.cpp @@ -45,7 +45,7 @@ INPUT_CHANGED_MEMBER(firetrk_state::gear_changed) { if (newval) { - m_gear = (FPTR)param; + m_gear = (uintptr_t)param; output().set_value("P1gear", m_gear+1); } } @@ -179,20 +179,20 @@ READ8_MEMBER(firetrk_state::montecar_dip_r) CUSTOM_INPUT_MEMBER(firetrk_state::steer_dir_r) { - return m_steer_dir[(FPTR)param]; + return m_steer_dir[(uintptr_t)param]; } CUSTOM_INPUT_MEMBER(firetrk_state::steer_flag_r) { - return m_steer_flag[(FPTR)param]; + return m_steer_flag[(uintptr_t)param]; } CUSTOM_INPUT_MEMBER(firetrk_state::skid_r) { UINT32 ret; - int which = (FPTR)param; + int which = (uintptr_t)param; if (which != 2) ret = m_skid[which]; @@ -206,7 +206,7 @@ CUSTOM_INPUT_MEMBER(firetrk_state::skid_r) CUSTOM_INPUT_MEMBER(firetrk_state::crash_r) { UINT32 ret; - int which = (FPTR)param; + int which = (uintptr_t)param; if (which != 2) ret = m_crash[which]; @@ -219,7 +219,7 @@ CUSTOM_INPUT_MEMBER(firetrk_state::crash_r) CUSTOM_INPUT_MEMBER(firetrk_state::gear_r) { - return (m_gear == (FPTR)param) ? 1 : 0; + return (m_gear == (uintptr_t)param) ? 1 : 0; } diff --git a/src/mame/drivers/gaelco3d.cpp b/src/mame/drivers/gaelco3d.cpp index a5c101635aa..27491d2e0ee 100644 --- a/src/mame/drivers/gaelco3d.cpp +++ b/src/mame/drivers/gaelco3d.cpp @@ -397,7 +397,7 @@ WRITE16_MEMBER(gaelco3d_state::sound_status_w) CUSTOM_INPUT_MEMBER(gaelco3d_state::analog_bit_r) { - int which = (FPTR)param; + int which = (uintptr_t)param; return (m_analog_ports[which] >> 7) & 0x01; } diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index 0fa21ee33e7..ce8bb01b2eb 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -1300,7 +1300,7 @@ WRITE8_MEMBER(galaxian_state::zigzag_ay8910_w) CUSTOM_INPUT_MEMBER(galaxian_state::azurian_port_r) { - return (ioport("FAKE")->read() >> (FPTR)param) & 1; + return (ioport("FAKE")->read() >> (uintptr_t)param) & 1; } diff --git a/src/mame/drivers/galaxold.cpp b/src/mame/drivers/galaxold.cpp index 9fffe24187b..79f0270fb06 100644 --- a/src/mame/drivers/galaxold.cpp +++ b/src/mame/drivers/galaxold.cpp @@ -781,7 +781,7 @@ ADDRESS_MAP_END /* Lives Dips are spread across two input ports */ CUSTOM_INPUT_MEMBER(galaxold_state::vpool_lives_r) { - int bit_mask = (FPTR)param; + int bit_mask = (uintptr_t)param; switch (bit_mask) { @@ -1024,7 +1024,7 @@ INPUT_PORTS_END /* Coinage Dips are spread across two input ports */ CUSTOM_INPUT_MEMBER(galaxold_state::ckongg_coinage_r) { - int bit_mask = (FPTR)param; + int bit_mask = (uintptr_t)param; switch (bit_mask) { @@ -1536,7 +1536,7 @@ INPUT_PORTS_END /* Coinage Dips are spread across two input ports */ CUSTOM_INPUT_MEMBER(galaxold_state::dkongjrm_coinage_r) { - int bit_mask = (FPTR)param; + int bit_mask = (uintptr_t)param; switch (bit_mask) { diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp index 607fee7e7c2..f05c534146c 100644 --- a/src/mame/drivers/gba.cpp +++ b/src/mame/drivers/gba.cpp @@ -154,7 +154,7 @@ TIMER_CALLBACK_MEMBER(gba_state::dma_complete) { static const UINT32 ch_int[4] = { INT_DMA0, INT_DMA1, INT_DMA2, INT_DMA3 }; - FPTR ch = param; + uintptr_t ch = param; // printf("dma complete: ch %d\n", ch); @@ -394,7 +394,7 @@ void gba_state::audio_tick(int ref) TIMER_CALLBACK_MEMBER(gba_state::timer_expire) { static const UINT32 tmr_ints[4] = { INT_TM0_OVERFLOW, INT_TM1_OVERFLOW, INT_TM2_OVERFLOW, INT_TM3_OVERFLOW }; - FPTR tmr = (FPTR) param; + uintptr_t tmr = (uintptr_t) param; // "The reload value is copied into the counter only upon following two situations: Automatically upon timer overflows," // "or when the timer start bit becomes changed from 0 to 1." diff --git a/src/mame/drivers/geniusiq.cpp b/src/mame/drivers/geniusiq.cpp index 95a038ea0bd..bb1ec82b0aa 100644 --- a/src/mame/drivers/geniusiq.cpp +++ b/src/mame/drivers/geniusiq.cpp @@ -498,7 +498,7 @@ INPUT_CHANGED_MEMBER( geniusiq_state::send_mouse_input ) INPUT_CHANGED_MEMBER( geniusiq_state::send_input ) { - UINT16 data = (UINT16)(FPTR)param; + UINT16 data = (UINT16)(uintptr_t)param; // set bit 7 if the key is released if (!newval) diff --git a/src/mame/drivers/gp32.cpp b/src/mame/drivers/gp32.cpp index a72a0575f56..b4050f0a39e 100644 --- a/src/mame/drivers/gp32.cpp +++ b/src/mame/drivers/gp32.cpp @@ -1602,18 +1602,18 @@ WRITE32_MEMBER(gp32_state::s3c240x_mmc_w) void gp32_state::s3c240x_machine_start() { - m_s3c240x_pwm_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(FPTR)0); - m_s3c240x_pwm_timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(FPTR)1); - m_s3c240x_pwm_timer[2] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(FPTR)2); - m_s3c240x_pwm_timer[3] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(FPTR)3); - m_s3c240x_pwm_timer[4] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(FPTR)4); - m_s3c240x_dma_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(FPTR)0); - m_s3c240x_dma_timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(FPTR)1); - m_s3c240x_dma_timer[2] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(FPTR)2); - m_s3c240x_dma_timer[3] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(FPTR)3); - m_s3c240x_iic_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_iic_timer_exp),this), (void *)(FPTR)0); - m_s3c240x_iis_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_iis_timer_exp),this), (void *)(FPTR)0); - m_s3c240x_lcd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_lcd_timer_exp),this), (void *)(FPTR)0); + m_s3c240x_pwm_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(uintptr_t)0); + m_s3c240x_pwm_timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(uintptr_t)1); + m_s3c240x_pwm_timer[2] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(uintptr_t)2); + m_s3c240x_pwm_timer[3] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(uintptr_t)3); + m_s3c240x_pwm_timer[4] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_pwm_timer_exp),this), (void *)(uintptr_t)4); + m_s3c240x_dma_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(uintptr_t)0); + m_s3c240x_dma_timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(uintptr_t)1); + m_s3c240x_dma_timer[2] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(uintptr_t)2); + m_s3c240x_dma_timer[3] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_dma_timer_exp),this), (void *)(uintptr_t)3); + m_s3c240x_iic_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_iic_timer_exp),this), (void *)(uintptr_t)0); + m_s3c240x_iis_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_iis_timer_exp),this), (void *)(uintptr_t)0); + m_s3c240x_lcd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gp32_state::s3c240x_lcd_timer_exp),this), (void *)(uintptr_t)0); m_eeprom_data = std::make_unique<UINT8[]>(0x2000); m_nvram->set_base(m_eeprom_data.get(), 0x2000); smc_init(); diff --git a/src/mame/drivers/guab.cpp b/src/mame/drivers/guab.cpp index 222a23b86f5..62a04e77e23 100644 --- a/src/mame/drivers/guab.cpp +++ b/src/mame/drivers/guab.cpp @@ -304,7 +304,7 @@ INPUT_CHANGED_MEMBER(guab_state::coin_inserted) address_space &space = m_maincpu->space(AS_PROGRAM); /* Get the current credit value and add the new coin value */ - credit = space.read_dword(0x8002c) + (UINT32)(FPTR)param; + credit = space.read_dword(0x8002c) + (UINT32)(uintptr_t)param; space.write_dword(0x8002c, credit); } } diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp index ce85efeda38..677e3be8862 100644 --- a/src/mame/drivers/hh_hmcs40.cpp +++ b/src/mame/drivers/hh_hmcs40.cpp @@ -341,7 +341,7 @@ void hh_hmcs40_state::set_interrupt(int line, int state) INPUT_CHANGED_MEMBER(hh_hmcs40_state::single_interrupt_line) { - set_interrupt((int)(FPTR)param, newval); + set_interrupt((int)(uintptr_t)param, newval); } diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp index 546e268cacf..06c03be9a80 100644 --- a/src/mame/drivers/hh_tms1k.cpp +++ b/src/mame/drivers/hh_tms1k.cpp @@ -381,7 +381,7 @@ WRITE_LINE_MEMBER(hh_tms1k_state::auto_power_off) INPUT_CHANGED_MEMBER(hh_tms1k_state::power_button) { - m_power_on = (bool)(FPTR)param; + m_power_on = (bool)(uintptr_t)param; m_maincpu->set_input_line(INPUT_LINE_RESET, m_power_on ? CLEAR_LINE : ASSERT_LINE); } @@ -6857,7 +6857,7 @@ INPUT_CHANGED_MEMBER(phpball_state::flipper_button) { // rectangular LEDs under LEDs D,F and E,G are directly connected // to the left and right flipper buttons - output them to lamp90 and 91 - output().set_lamp_value(90 + (int)(FPTR)param, newval); + output().set_lamp_value(90 + (int)(uintptr_t)param, newval); } diff --git a/src/mame/drivers/hp49gp.cpp b/src/mame/drivers/hp49gp.cpp index 4dbfe0bdb56..fcadcfa0f87 100644 --- a/src/mame/drivers/hp49gp.cpp +++ b/src/mame/drivers/hp49gp.cpp @@ -238,7 +238,7 @@ WRITE32_MEMBER(hp49gp_state::s3c2410_gpio_port_w) INPUT_CHANGED_MEMBER(hp49gp_state::port_changed) { - m_s3c2410->s3c2410_request_eint( (FPTR)param + 8); + m_s3c2410->s3c2410_request_eint( (uintptr_t)param + 8); } // ... diff --git a/src/mame/drivers/juicebox.cpp b/src/mame/drivers/juicebox.cpp index 12b7749f2d7..f24d24f85ff 100644 --- a/src/mame/drivers/juicebox.cpp +++ b/src/mame/drivers/juicebox.cpp @@ -243,7 +243,7 @@ WRITE32_MEMBER(juicebox_state::juicebox_nand_w) INPUT_CHANGED_MEMBER(juicebox_state::port_changed) { - m_s3c44b0->request_eint((FPTR)param); + m_s3c44b0->request_eint((uintptr_t)param); } // ... diff --git a/src/mame/drivers/megadriv.cpp b/src/mame/drivers/megadriv.cpp index c66df4adb8d..53bf399171f 100644 --- a/src/mame/drivers/megadriv.cpp +++ b/src/mame/drivers/megadriv.cpp @@ -266,7 +266,7 @@ MACHINE_START_MEMBER(md_cons_state, md_common) // setup timers for 6 button pads for (int i = 0; i < 3; i++) - m_io_timeout[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(md_base_state::io_timeout_timer_callback),this), (void*)(FPTR)i); + m_io_timeout[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(md_base_state::io_timeout_timer_callback),this), (void*)(uintptr_t)i); m_vdp->stop_timers(); diff --git a/src/mame/drivers/megadrvb.cpp b/src/mame/drivers/megadrvb.cpp index b2ed760453a..8f8a438f7f9 100644 --- a/src/mame/drivers/megadrvb.cpp +++ b/src/mame/drivers/megadrvb.cpp @@ -694,7 +694,7 @@ MACHINE_START_MEMBER(md_boot_state, md_6button) // setup timers for 6 button pads for (int i = 0; i < 3; i++) - m_io_timeout[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(md_base_state::io_timeout_timer_callback),this), (void*)(FPTR)i); + m_io_timeout[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(md_base_state::io_timeout_timer_callback),this), (void*)(uintptr_t)i); } static MACHINE_CONFIG_START( megadrvb_6b, md_boot_state ) diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp index 5a653bfb399..749834b0879 100644 --- a/src/mame/drivers/model2.cpp +++ b/src/mame/drivers/model2.cpp @@ -352,7 +352,7 @@ WRITE32_MEMBER(model2_state::timers_w) TIMER_DEVICE_CALLBACK_MEMBER(model2_state::model2_timer_cb) { - int tnum = (int)(FPTR)ptr; + int tnum = (int)(uintptr_t)ptr; int bit = tnum + 2; if(m_timerrun[tnum] == 0) @@ -2354,13 +2354,13 @@ static MACHINE_CONFIG_START( model2o, model2_state ) MCFG_NVRAM_ADD_1FILL("backup2") MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)0) + MCFG_TIMER_PTR((uintptr_t)0) MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)1) + MCFG_TIMER_PTR((uintptr_t)1) MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)2) + MCFG_TIMER_PTR((uintptr_t)2) MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)3) + MCFG_TIMER_PTR((uintptr_t)3) MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff) MCFG_S24TILE_DEVICE_PALETTE("palette") @@ -2402,13 +2402,13 @@ static MACHINE_CONFIG_START( model2a, model2_state ) MCFG_NVRAM_ADD_1FILL("backup1") MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)0) + MCFG_TIMER_PTR((uintptr_t)0) MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)1) + MCFG_TIMER_PTR((uintptr_t)1) MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)2) + MCFG_TIMER_PTR((uintptr_t)2) MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)3) + MCFG_TIMER_PTR((uintptr_t)3) MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff) MCFG_S24TILE_DEVICE_PALETTE("palette") @@ -2519,13 +2519,13 @@ static MACHINE_CONFIG_START( model2b, model2_state ) MCFG_NVRAM_ADD_1FILL("backup1") MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)0) + MCFG_TIMER_PTR((uintptr_t)0) MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)1) + MCFG_TIMER_PTR((uintptr_t)1) MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)2) + MCFG_TIMER_PTR((uintptr_t)2) MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)3) + MCFG_TIMER_PTR((uintptr_t)3) MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff) MCFG_S24TILE_DEVICE_PALETTE("palette") @@ -2584,13 +2584,13 @@ static MACHINE_CONFIG_START( model2c, model2_state ) MCFG_NVRAM_ADD_1FILL("backup1") MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)0) + MCFG_TIMER_PTR((uintptr_t)0) MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)1) + MCFG_TIMER_PTR((uintptr_t)1) MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)2) + MCFG_TIMER_PTR((uintptr_t)2) MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb) - MCFG_TIMER_PTR((FPTR)3) + MCFG_TIMER_PTR((uintptr_t)3) MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff) MCFG_S24TILE_DEVICE_PALETTE("palette") diff --git a/src/mame/drivers/namcos22.cpp b/src/mame/drivers/namcos22.cpp index c2e709fbb10..bd79f9fcb95 100644 --- a/src/mame/drivers/namcos22.cpp +++ b/src/mame/drivers/namcos22.cpp @@ -3310,7 +3310,7 @@ INPUT_PORTS_END CUSTOM_INPUT_MEMBER(namcos22_state::alpine_motor_read) { - return m_motor_status >> (FPTR)param & 1; + return m_motor_status >> (uintptr_t)param & 1; } static INPUT_PORTS_START( alpiner ) diff --git a/src/mame/drivers/palm.cpp b/src/mame/drivers/palm.cpp index ced463dbe00..eeff23b6fbe 100644 --- a/src/mame/drivers/palm.cpp +++ b/src/mame/drivers/palm.cpp @@ -77,7 +77,7 @@ INPUT_CHANGED_MEMBER(palm_state::pen_check) INPUT_CHANGED_MEMBER(palm_state::button_check) { UINT8 button_state = m_io_portd->read(); - m_lsi->set_port_d_lines(button_state, (int)(FPTR)param); + m_lsi->set_port_d_lines(button_state, (int)(uintptr_t)param); } WRITE8_MEMBER(palm_state::palm_port_f_out) diff --git a/src/mame/drivers/palmz22.cpp b/src/mame/drivers/palmz22.cpp index e89bbd5c85e..9d3af49b602 100644 --- a/src/mame/drivers/palmz22.cpp +++ b/src/mame/drivers/palmz22.cpp @@ -237,13 +237,13 @@ READ32_MEMBER(palmz22_state::s3c2410_adc_data_r ) INPUT_CHANGED_MEMBER(palmz22_state::palmz22_input_changed) { - if (((int)(FPTR)param) == 0) + if (((int)(uintptr_t)param) == 0) { m_s3c2410->s3c2410_touch_screen( (newval & 0x01) ? 1 : 0); } else { - m_s3c2410->s3c2410_request_eint( (FPTR)param - 1); + m_s3c2410->s3c2410_request_eint( (uintptr_t)param - 1); } } diff --git a/src/mame/drivers/pecom.cpp b/src/mame/drivers/pecom.cpp index 3a62a0fe84a..5a32fcf84e6 100644 --- a/src/mame/drivers/pecom.cpp +++ b/src/mame/drivers/pecom.cpp @@ -52,7 +52,7 @@ mappings, this is another situation where natural keyboard comes very handy! INPUT_CHANGED_MEMBER(pecom_state::ef_w) { - m_cdp1802->set_input_line((int)(FPTR)param, newval); + m_cdp1802->set_input_line((int)(uintptr_t)param, newval); } static INPUT_PORTS_START( pecom ) diff --git a/src/mame/drivers/peyper.cpp b/src/mame/drivers/peyper.cpp index 51d55034081..19b9e947b03 100644 --- a/src/mame/drivers/peyper.cpp +++ b/src/mame/drivers/peyper.cpp @@ -174,7 +174,7 @@ WRITE8_MEMBER(peyper_state::sol_w) CUSTOM_INPUT_MEMBER(peyper_state::wolfman_replay_hs_r) { - int bit_mask = (FPTR)param; + int bit_mask = (uintptr_t)param; switch (bit_mask) { diff --git a/src/mame/drivers/pntnpuzl.cpp b/src/mame/drivers/pntnpuzl.cpp index 397ffd87d55..9fed245dda1 100644 --- a/src/mame/drivers/pntnpuzl.cpp +++ b/src/mame/drivers/pntnpuzl.cpp @@ -312,7 +312,7 @@ INPUT_CHANGED_MEMBER(pntnpuzl_state::coin_inserted) { /* TODO: change this! */ if(newval) - generic_pulse_irq_line(*m_maincpu, (UINT8)(FPTR)param, 1); + generic_pulse_irq_line(*m_maincpu, (UINT8)(uintptr_t)param, 1); } static INPUT_PORTS_START( pntnpuzl ) diff --git a/src/mame/drivers/pong.cpp b/src/mame/drivers/pong.cpp index 3b0eb06ea82..aeaa7103462 100644 --- a/src/mame/drivers/pong.cpp +++ b/src/mame/drivers/pong.cpp @@ -255,7 +255,7 @@ NETLIST_END() INPUT_CHANGED_MEMBER(pong_state::input_changed) { - int numpad = (FPTR) (param); + int numpad = (uintptr_t) (param); switch (numpad) { diff --git a/src/mame/drivers/psikyo4.cpp b/src/mame/drivers/psikyo4.cpp index 1e598ba4afc..4b832442e0d 100644 --- a/src/mame/drivers/psikyo4.cpp +++ b/src/mame/drivers/psikyo4.cpp @@ -171,7 +171,7 @@ INTERRUPT_GEN_MEMBER(psikyo4_state::psikyosh_interrupt) CUSTOM_INPUT_MEMBER(psikyo4_state::mahjong_ctrl_r)/* used by hotgmck/hgkairak */ { - int player = (FPTR)param; + int player = (uintptr_t)param; int ret = 0xff; if (m_io_select & 1) ret &= m_keys[player+0]->read(); diff --git a/src/mame/drivers/px4.cpp b/src/mame/drivers/px4.cpp index 2d0f10e592d..9cca2aab819 100644 --- a/src/mame/drivers/px4.cpp +++ b/src/mame/drivers/px4.cpp @@ -1075,7 +1075,7 @@ INPUT_CHANGED_MEMBER( px4_state::key_callback ) if (delta & (1 << i)) { down = (newvalue & (1 << i)) ? 0x10 : 0x00; - scancode = (FPTR)param * 32 + i; + scancode = (uintptr_t)param * 32 + i; // control keys if ((scancode & 0xa0) == 0xa0) diff --git a/src/mame/drivers/qx10.cpp b/src/mame/drivers/qx10.cpp index 0ac10280aba..19851555a03 100644 --- a/src/mame/drivers/qx10.cpp +++ b/src/mame/drivers/qx10.cpp @@ -518,7 +518,7 @@ ADDRESS_MAP_END { if(newval && !oldval) { - m_keyb.rx = (UINT8)(FPTR)(param) & 0x7f; + m_keyb.rx = (UINT8)(uintptr_t)(param) & 0x7f; m_pic_m->ir4_w(1); } diff --git a/src/mame/drivers/scobra.cpp b/src/mame/drivers/scobra.cpp index 64d65fdd805..7adc4fb4f4c 100644 --- a/src/mame/drivers/scobra.cpp +++ b/src/mame/drivers/scobra.cpp @@ -324,7 +324,7 @@ ADDRESS_MAP_END /* stratgyx coinage DIPs are spread across two input ports */ CUSTOM_INPUT_MEMBER(scobra_state::stratgyx_coinage_r) { - int bit_mask = (FPTR)param; + int bit_mask = (uintptr_t)param; return (ioport("IN4")->read() & bit_mask) ? 0x01 : 0x00; } diff --git a/src/mame/drivers/scramble.cpp b/src/mame/drivers/scramble.cpp index 60dceb9b7ec..37da3330846 100644 --- a/src/mame/drivers/scramble.cpp +++ b/src/mame/drivers/scramble.cpp @@ -539,7 +539,7 @@ INPUT_PORTS_END /* ckongs coinage DIPs are spread across two input ports */ CUSTOM_INPUT_MEMBER(scramble_state::ckongs_coinage_r) { - int bit_mask = (FPTR)param; + int bit_mask = (uintptr_t)param; return (ioport("FAKE")->read() & bit_mask) ? 0x01 : 0x00; } diff --git a/src/mame/drivers/seibuspi.cpp b/src/mame/drivers/seibuspi.cpp index 4f29c2fda4c..2c13b3cd65e 100644 --- a/src/mame/drivers/seibuspi.cpp +++ b/src/mame/drivers/seibuspi.cpp @@ -1198,7 +1198,7 @@ CUSTOM_INPUT_MEMBER(seibuspi_state::ejanhs_encode) Start - 111 port A */ static const UINT8 encoding[] = { 6, 5, 4, 3, 2, 7 }; - ioport_value state = ~m_key[(FPTR)param]->read(); + ioport_value state = ~m_key[(uintptr_t)param]->read(); for (int bit = 0; bit < ARRAY_LENGTH(encoding); bit++) if (state & (1 << bit)) @@ -1349,16 +1349,16 @@ static INPUT_PORTS_START( spi_ejanhs ) PORT_INCLUDE( spi_mahjong_keyboard ) PORT_START("INPUTS") - PORT_BIT( 0x00000007, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (FPTR)3) - PORT_BIT( 0x00000038, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (FPTR)4) - PORT_BIT( 0x00000700, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (FPTR)2) - PORT_BIT( 0x00003800, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (FPTR)0) + PORT_BIT( 0x00000007, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)3) + PORT_BIT( 0x00000038, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)4) + PORT_BIT( 0x00000700, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)2) + PORT_BIT( 0x00003800, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)0) PORT_SPECIAL_ONOFF_DIPLOC( 0x00008000, 0x00000000, Flip_Screen, "SW1:1" ) PORT_BIT( 0xffff4000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("SYSTEM") // These need a noncontiguous encoding, but are nonfunctional in any case - //PORT_BIT( 0x00000013, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (FPTR)1) + //PORT_BIT( 0x00000013, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)1) PORT_SERVICE_NO_TOGGLE( 0x00000004, IP_ACTIVE_LOW ) PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x000000f3, IP_ACTIVE_LOW, IPT_UNKNOWN ) diff --git a/src/mame/drivers/snk.cpp b/src/mame/drivers/snk.cpp index 96d29d098f0..54de1dc057f 100644 --- a/src/mame/drivers/snk.cpp +++ b/src/mame/drivers/snk.cpp @@ -719,7 +719,7 @@ hand, always returning 0xf inbetween valid values confuses the game. CUSTOM_INPUT_MEMBER(snk_state::gwar_rotary) { static const char *const ports[] = { "P1ROT", "P2ROT" }; - int which = (int)(FPTR)param; + int which = (int)(uintptr_t)param; int value = ioport(ports[which])->read(); if ((m_last_value[which] == 0x5 && value == 0x6) || (m_last_value[which] == 0x6 && value == 0x5)) @@ -795,7 +795,7 @@ CUSTOM_INPUT_MEMBER(snk_state::countryc_trackball_y) CUSTOM_INPUT_MEMBER(snk_state::snk_bonus_r) { - int bit_mask = (FPTR)param; + int bit_mask = (uintptr_t)param; switch (bit_mask) { diff --git a/src/mame/drivers/socrates.cpp b/src/mame/drivers/socrates.cpp index 6b2535e6fd4..3f660d21dc4 100644 --- a/src/mame/drivers/socrates.cpp +++ b/src/mame/drivers/socrates.cpp @@ -947,7 +947,7 @@ WRITE8_MEMBER( iqunlim_state::colors_w ) INPUT_CHANGED_MEMBER( iqunlim_state::send_input ) { - UINT8 data = (UINT8)(FPTR)param; + UINT8 data = (UINT8)(uintptr_t)param; if (newval) { diff --git a/src/mame/drivers/sprint4.cpp b/src/mame/drivers/sprint4.cpp index 87a54f7daed..5b250ae5c65 100644 --- a/src/mame/drivers/sprint4.cpp +++ b/src/mame/drivers/sprint4.cpp @@ -21,7 +21,7 @@ Atari Sprint 4 driver CUSTOM_INPUT_MEMBER(sprint4_state::get_lever) { - int n = (FPTR) param; + int n = (uintptr_t) param; return 4 * m_gear[n] > m_da_latch; } @@ -29,7 +29,7 @@ CUSTOM_INPUT_MEMBER(sprint4_state::get_lever) CUSTOM_INPUT_MEMBER(sprint4_state::get_wheel) { - int n = (FPTR) param; + int n = (uintptr_t) param; return 8 * m_steer_FF1[n] + 8 * m_steer_FF2[n] > m_da_latch; } @@ -37,7 +37,7 @@ CUSTOM_INPUT_MEMBER(sprint4_state::get_wheel) CUSTOM_INPUT_MEMBER(sprint4_state::get_collision) { - int n = (FPTR) param; + int n = (uintptr_t) param; return m_collision[n]; } diff --git a/src/mame/drivers/ssem.cpp b/src/mame/drivers/ssem.cpp index b9b82319932..a36d8d09916 100644 --- a/src/mame/drivers/ssem.cpp +++ b/src/mame/drivers/ssem.cpp @@ -108,7 +108,7 @@ INPUT_CHANGED_MEMBER(ssem_state::panel_check) UINT8 edit3_state = ioport("EDIT3")->read(); UINT8 misc_state = ioport("MISC")->read(); - switch( (int)(FPTR)param ) + switch( (int)(uintptr_t)param ) { case PANEL_BIT0: if(edit0_state & 0x01) m_store[(m_store_line << 2) | 0] ^= 0x80; diff --git a/src/mame/drivers/taito_f3.cpp b/src/mame/drivers/taito_f3.cpp index 1df78f00958..72eec9fcdbd 100644 --- a/src/mame/drivers/taito_f3.cpp +++ b/src/mame/drivers/taito_f3.cpp @@ -45,7 +45,7 @@ CUSTOM_INPUT_MEMBER(taito_f3_state::f3_analog_r) { - int num = (FPTR)param; + int num = (uintptr_t)param; int data = m_dial[num]->read(); return ((data & 0xf)<<12) | ((data & 0xff0)>>4); } @@ -53,7 +53,7 @@ CUSTOM_INPUT_MEMBER(taito_f3_state::f3_analog_r) CUSTOM_INPUT_MEMBER(taito_f3_state::f3_coin_r) { - int num = (FPTR)param; + int num = (uintptr_t)param; return m_coin_word[num]; } diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp index 73ec4835d65..75c0f6117e3 100644 --- a/src/mame/drivers/taitosj.cpp +++ b/src/mame/drivers/taitosj.cpp @@ -268,7 +268,7 @@ CUSTOM_INPUT_MEMBER(taitosj_state::kikstart_gear_r) { const char *port_tag; - int player = (int)(FPTR)param; + int player = (int)(uintptr_t)param; if (player == 0) port_tag = "GEARP1"; diff --git a/src/mame/drivers/tamag1.cpp b/src/mame/drivers/tamag1.cpp index 1275d33f0c7..36dd47e59e7 100644 --- a/src/mame/drivers/tamag1.cpp +++ b/src/mame/drivers/tamag1.cpp @@ -105,7 +105,7 @@ INPUT_CHANGED_MEMBER(tamag1_state::input_changed) { // inputs are hooked up backwards here, because MCU input // ports are all tied to its interrupt controller - int line = (int)(FPTR)param; + int line = (int)(uintptr_t)param; int state = newval ? ASSERT_LINE : CLEAR_LINE; m_maincpu->set_input_line(line, state); } diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp index 92591ad9a72..dea10f66d29 100644 --- a/src/mame/drivers/tispeak.cpp +++ b/src/mame/drivers/tispeak.cpp @@ -725,7 +725,7 @@ READ8_MEMBER(tispeak_state::k28_read_k) INPUT_CHANGED_MEMBER(tispeak_state::power_button) { - int on = (int)(FPTR)param; + int on = (int)(uintptr_t)param; if (on && !m_power_on) { diff --git a/src/mame/drivers/tispellb.cpp b/src/mame/drivers/tispellb.cpp index 258ccc82a0e..4d1198f1d93 100644 --- a/src/mame/drivers/tispellb.cpp +++ b/src/mame/drivers/tispellb.cpp @@ -243,7 +243,7 @@ WRITE16_MEMBER(tispellb_state::rev2_write_r) INPUT_CHANGED_MEMBER(tispellb_state::power_button) { - int on = (int)(FPTR)param; + int on = (int)(uintptr_t)param; if (on && !m_power_on) { diff --git a/src/mame/drivers/turrett.cpp b/src/mame/drivers/turrett.cpp index 1dbb60575b4..fcb637a4525 100644 --- a/src/mame/drivers/turrett.cpp +++ b/src/mame/drivers/turrett.cpp @@ -254,7 +254,7 @@ UINT32 turrett_state::update_inputs(void) INPUT_CHANGED_MEMBER( turrett_state::ipt_change ) { - int p = (FPTR)param; + int p = (uintptr_t)param; if (newval != oldval) { diff --git a/src/mame/drivers/ultratnk.cpp b/src/mame/drivers/ultratnk.cpp index 50d0904e836..a3f05dcc257 100644 --- a/src/mame/drivers/ultratnk.cpp +++ b/src/mame/drivers/ultratnk.cpp @@ -22,7 +22,7 @@ Atari Ultra Tank driver CUSTOM_INPUT_MEMBER(ultratnk_state::get_collision) { - return m_collision[(FPTR) param]; + return m_collision[(uintptr_t) param]; } diff --git a/src/mame/drivers/vicdual.cpp b/src/mame/drivers/vicdual.cpp index 746ca1883ee..3547570b3bd 100644 --- a/src/mame/drivers/vicdual.cpp +++ b/src/mame/drivers/vicdual.cpp @@ -1299,10 +1299,10 @@ ADDRESS_MAP_END CUSTOM_INPUT_MEMBER(vicdual_state::fake_lives_r) { /* use the low byte for the bitmask */ - UINT8 bit_mask = ((FPTR)param) & 0xff; + UINT8 bit_mask = ((uintptr_t)param) & 0xff; /* and use d8 for the port */ - int port = ((FPTR)param) >> 8 & 1; + int port = ((uintptr_t)param) >> 8 & 1; return (m_fake_lives[port].read_safe(0) & bit_mask) ? 0 : 1; } @@ -2106,7 +2106,7 @@ WRITE8_MEMBER(vicdual_state::samurai_protection_w) CUSTOM_INPUT_MEMBER(vicdual_state::samurai_protection_r) { - int offset = (FPTR)param; + int offset = (uintptr_t)param; UINT32 answer = 0; if (m_samurai_protection_data == 0xab) @@ -2282,7 +2282,7 @@ INPUT_CHANGED_MEMBER(vicdual_state::nsub_coin_in) { if (newval) { - int which = (int)(FPTR)param; + int which = (int)(uintptr_t)param; int coinage = m_coinage->read(); switch (which) diff --git a/src/mame/drivers/wolfpack.cpp b/src/mame/drivers/wolfpack.cpp index 549628162ae..2f3eee098d8 100644 --- a/src/mame/drivers/wolfpack.cpp +++ b/src/mame/drivers/wolfpack.cpp @@ -48,7 +48,7 @@ void wolfpack_state::machine_reset() CUSTOM_INPUT_MEMBER(wolfpack_state::wolfpack_dial_r) { - int bit = (FPTR)param; + int bit = (uintptr_t)param; return ((ioport("DIAL")->read() + bit) / 2) & 0x01; } diff --git a/src/mame/drivers/x07.cpp b/src/mame/drivers/x07.cpp index cc56896b589..9181618dd37 100644 --- a/src/mame/drivers/x07.cpp +++ b/src/mame/drivers/x07.cpp @@ -916,7 +916,7 @@ inline UINT8 x07_state::get_char(UINT16 pos) INPUT_CHANGED_MEMBER( x07_state::kb_func_keys ) { UINT8 data = 0; - UINT8 idx = (UINT8)(FPTR)param; + UINT8 idx = (UINT8)(uintptr_t)param; if (m_kb_on && newval) { @@ -943,7 +943,7 @@ INPUT_CHANGED_MEMBER( x07_state::kb_keys ) UINT8 modifier; UINT8 a1 = ioport("A1")->read(); UINT8 bz = ioport("BZ")->read(); - UINT8 keycode = (UINT8)(FPTR)param; + UINT8 keycode = (UINT8)(uintptr_t)param; if (m_kb_on && !newval) { diff --git a/src/mame/drivers/xxmissio.cpp b/src/mame/drivers/xxmissio.cpp index b826848f1d5..b5ee061d7ad 100644 --- a/src/mame/drivers/xxmissio.cpp +++ b/src/mame/drivers/xxmissio.cpp @@ -23,7 +23,7 @@ WRITE8_MEMBER(xxmissio_state::bank_sel_w) CUSTOM_INPUT_MEMBER(xxmissio_state::status_r) { - int bit_mask = (FPTR)param; + int bit_mask = (uintptr_t)param; return (m_status & bit_mask) ? 1 : 0; } diff --git a/src/mame/drivers/z100.cpp b/src/mame/drivers/z100.cpp index f6cdba22820..e94fc57e98d 100644 --- a/src/mame/drivers/z100.cpp +++ b/src/mame/drivers/z100.cpp @@ -422,7 +422,7 @@ INPUT_CHANGED_MEMBER(z100_state::key_stroke) if(newval && !oldval) { /* TODO: table */ - m_keyb_press = (UINT8)(FPTR)(param) & 0xff; + m_keyb_press = (UINT8)(uintptr_t)(param) & 0xff; //pic8259_ir6_w(m_picm, 1); m_keyb_status = 1; } diff --git a/src/mame/drivers/zaxxon.cpp b/src/mame/drivers/zaxxon.cpp index bd861f66f6e..cfcf6844566 100644 --- a/src/mame/drivers/zaxxon.cpp +++ b/src/mame/drivers/zaxxon.cpp @@ -350,7 +350,7 @@ READ8_MEMBER(zaxxon_state::razmataz_counter_r) CUSTOM_INPUT_MEMBER(zaxxon_state::razmataz_dial_r) { - int num = (FPTR)param; + int num = (uintptr_t)param; int res; int delta = m_dials[num]->read(); @@ -399,14 +399,14 @@ INPUT_CHANGED_MEMBER(zaxxon_state::zaxxon_coin_inserted) { if (newval) { - m_coin_status[(int)(FPTR)param] = m_coin_enable[(int)(FPTR)param]; + m_coin_status[(int)(uintptr_t)param] = m_coin_enable[(int)(uintptr_t)param]; } } CUSTOM_INPUT_MEMBER(zaxxon_state::zaxxon_coin_r) { - return m_coin_status[(int)(FPTR)param]; + return m_coin_status[(int)(uintptr_t)param]; } diff --git a/src/mame/machine/amiga.cpp b/src/mame/machine/amiga.cpp index 3fab6018d37..8a8b111de72 100644 --- a/src/mame/machine/amiga.cpp +++ b/src/mame/machine/amiga.cpp @@ -396,7 +396,7 @@ UINT16 amiga_state::joy1dat_r() CUSTOM_INPUT_MEMBER( amiga_state::amiga_joystick_convert ) { - UINT8 bits = m_joy_ports[(int)(FPTR)param].read_safe(0xff); + UINT8 bits = m_joy_ports[(int)(uintptr_t)param].read_safe(0xff); int up = (bits >> 0) & 1; int down = (bits >> 1) & 1; diff --git a/src/mame/machine/dgn_beta.cpp b/src/mame/machine/dgn_beta.cpp index 44ce021c4d2..3ce329ca8fe 100644 --- a/src/mame/machine/dgn_beta.cpp +++ b/src/mame/machine/dgn_beta.cpp @@ -202,7 +202,7 @@ void dgn_beta_state::UpdateBanks(int first, int last) m_PageRegs[m_TaskReg][Page].memory=readbank; membank(page_num)->set_base(readbank); - LOG_BANK_UPDATE(("UpdateBanks:MapPage=$%02X readbank=$%X\n",MapPage,(int)(FPTR)readbank)); + LOG_BANK_UPDATE(("UpdateBanks:MapPage=$%02X readbank=$%X\n",MapPage,(int)(uintptr_t)readbank)); LOG_BANK_UPDATE(("PageRegsSet Task=%X Page=%x\n",m_TaskReg,Page)); //LOG_BANK_UPDATE(("%X)\n",membank(Page+1))); LOG_BANK_UPDATE(("memory_install_write8_handler CPU=0\n")); diff --git a/src/mame/machine/gaelco2.cpp b/src/mame/machine/gaelco2.cpp index 099520b2813..1b6700caf24 100644 --- a/src/mame/machine/gaelco2.cpp +++ b/src/mame/machine/gaelco2.cpp @@ -221,7 +221,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(bang_state::bang_irq) CUSTOM_INPUT_MEMBER(wrally2_state::wrally2_analog_bit_r) { - int which = (FPTR)param; + int which = (uintptr_t)param; return (m_analog_ports[which] >> 7) & 0x01; } diff --git a/src/mame/machine/galaxold.cpp b/src/mame/machine/galaxold.cpp index 1414e4c3cb2..0aa0eec1673 100644 --- a/src/mame/machine/galaxold.cpp +++ b/src/mame/machine/galaxold.cpp @@ -146,7 +146,7 @@ WRITE8_MEMBER(galaxold_state::_4in1_bank_w) CUSTOM_INPUT_MEMBER(galaxold_state::_4in1_fake_port_r) { static const char *const portnames[] = { "FAKE1", "FAKE2", "FAKE3", "FAKE4" }; - int bit_mask = (FPTR)param; + int bit_mask = (uintptr_t)param; return (ioport(portnames[m__4in1_bank])->read() & bit_mask) ? 0x01 : 0x00; } diff --git a/src/mame/machine/megadriv.cpp b/src/mame/machine/megadriv.cpp index 17a20fde8cc..25449375a16 100644 --- a/src/mame/machine/megadriv.cpp +++ b/src/mame/machine/megadriv.cpp @@ -93,7 +93,7 @@ WRITE8_MEMBER(md_base_state::megadriv_68k_YM2612_write) // this is used by 6 button pads and gets installed in machine_start for drivers requiring it TIMER_CALLBACK_MEMBER(md_base_state::io_timeout_timer_callback) { - m_io_stage[(int)(FPTR)ptr] = -1; + m_io_stage[(int)(uintptr_t)ptr] = -1; } diff --git a/src/mame/machine/nextkbd.cpp b/src/mame/machine/nextkbd.cpp index 7ff946b7916..0fc545050ca 100644 --- a/src/mame/machine/nextkbd.cpp +++ b/src/mame/machine/nextkbd.cpp @@ -246,7 +246,7 @@ WRITE32_MEMBER( nextkbd_device::kmdata_w ) INPUT_CHANGED_MEMBER( nextkbd_device::update ) { - int bank = (int)(FPTR)param; + int bank = (int)(uintptr_t)param; switch(bank) { case 0: case 1: case 2: { int index; diff --git a/src/mame/machine/pc9801_kbd.cpp b/src/mame/machine/pc9801_kbd.cpp index 3e4cd4373f8..520b73c31e4 100644 --- a/src/mame/machine/pc9801_kbd.cpp +++ b/src/mame/machine/pc9801_kbd.cpp @@ -47,10 +47,10 @@ pc9801_kbd_device::pc9801_kbd_device(const machine_config &mconfig, const char * INPUT_CHANGED_MEMBER(pc9801_kbd_device::key_stroke) { if(newval && !oldval) - m_rx_buf[(UINT8)(FPTR)(param) & 0x7f] = 1; + m_rx_buf[(UINT8)(uintptr_t)(param) & 0x7f] = 1; if(oldval && !newval) - m_rx_buf[(UINT8)(FPTR)(param) & 0x7f] = 2; + m_rx_buf[(UINT8)(uintptr_t)(param) & 0x7f] = 2; } static INPUT_PORTS_START( pc9801_kbd ) diff --git a/src/mame/video/rungun.cpp b/src/mame/video/rungun.cpp index 47de04f887b..514f52c1345 100644 --- a/src/mame/video/rungun.cpp +++ b/src/mame/video/rungun.cpp @@ -18,7 +18,7 @@ /* TTL text plane stuff */ TILE_GET_INFO_MEMBER(rungun_state::ttl_get_tile_info) { - UINT32 base_addr = (FPTR)tilemap.user_data(); + UINT32 base_addr = (uintptr_t)tilemap.user_data(); UINT8 *lvram = (UINT8 *)m_ttl_vram.get() + base_addr; int attr, code; @@ -58,7 +58,7 @@ WRITE16_MEMBER(rungun_state::rng_psac2_videoram_w) TILE_GET_INFO_MEMBER(rungun_state::get_rng_936_tile_info) { - UINT32 base_addr = (FPTR)tilemap.user_data(); + UINT32 base_addr = (uintptr_t)tilemap.user_data(); int tileno, colour, flipx; tileno = m_psac2_vram[tile_index * 2 + 1 + base_addr] & 0x3fff; @@ -102,11 +102,11 @@ void rungun_state::video_start() for(UINT32 screen_num = 0;screen_num < 2;screen_num++) { m_ttl_tilemap[screen_num] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(rungun_state::ttl_get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); - m_ttl_tilemap[screen_num]->set_user_data((void *)(FPTR)(screen_num * 0x2000)); + m_ttl_tilemap[screen_num]->set_user_data((void *)(uintptr_t)(screen_num * 0x2000)); m_ttl_tilemap[screen_num]->set_transparent_pen(0); m_936_tilemap[screen_num] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(rungun_state::get_rng_936_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 128, 128); - m_936_tilemap[screen_num]->set_user_data((void *)(FPTR)(screen_num * 0x80000)); + m_936_tilemap[screen_num]->set_user_data((void *)(uintptr_t)(screen_num * 0x80000)); m_936_tilemap[screen_num]->set_transparent_pen(0); } |