diff options
author | 2016-10-22 13:13:17 +0200 | |
---|---|---|
committer | 2016-10-22 13:13:17 +0200 | |
commit | ddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch) | |
tree | a70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/mame/drivers/monzagp.cpp | |
parent | 333bff8de64dfaeb98134000412796b4fdef970b (diff) |
NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
Diffstat (limited to 'src/mame/drivers/monzagp.cpp')
-rw-r--r-- | src/mame/drivers/monzagp.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/mame/drivers/monzagp.cpp b/src/mame/drivers/monzagp.cpp index 6f08b216b86..6b36dcc15f7 100644 --- a/src/mame/drivers/monzagp.cpp +++ b/src/mame/drivers/monzagp.cpp @@ -64,7 +64,7 @@ public: virtual void video_start() override; TIMER_DEVICE_CALLBACK_MEMBER(time_tick_timer); DECLARE_PALETTE_INIT(monzagp); - UINT32 screen_update_monzagp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_monzagp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; @@ -80,16 +80,16 @@ public: required_ioport m_dsw; private: - UINT8 m_p1; - UINT8 m_p2; - UINT8 m_video_ctrl[2][8]; + uint8_t m_p1; + uint8_t m_p2; + uint8_t m_video_ctrl[2][8]; bool m_time_tick; bool m_cp_ruote; - UINT8 m_collisions_ff; - UINT8 m_collisions_clk; - UINT8 m_mycar_pos; - std::unique_ptr<UINT8[]> m_vram; - std::unique_ptr<UINT8[]> m_score_ram; + uint8_t m_collisions_ff; + uint8_t m_collisions_clk; + uint8_t m_mycar_pos; + std::unique_ptr<uint8_t[]> m_vram; + std::unique_ptr<uint8_t[]> m_score_ram; }; @@ -115,7 +115,7 @@ PALETTE_INIT_MEMBER(monzagp_state, monzagp) for (int i = 0; i < 0x100; i++) { int bit0 = 0, bit1 = 0, bit2 = 0; - UINT8 d = m_proms->base()[0x400 + i] ^ 0x0f; + uint8_t d = m_proms->base()[0x400 + i] ^ 0x0f; if (d & 0x08) { @@ -141,8 +141,8 @@ PALETTE_INIT_MEMBER(monzagp_state, monzagp) void monzagp_state::video_start() { - m_vram = std::make_unique<UINT8[]>(0x800); - m_score_ram = std::make_unique<UINT8[]>(0x100); + m_vram = std::make_unique<uint8_t[]>(0x800); + m_score_ram = std::make_unique<uint8_t[]>(0x100); m_time_tick = 0; m_cp_ruote = 0; m_mycar_pos = 0; @@ -154,7 +154,7 @@ void monzagp_state::video_start() m_nvram->set_base(m_score_ram.get(), 0x100); } -UINT32 monzagp_state::screen_update_monzagp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t monzagp_state::screen_update_monzagp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { /* for(int i=0;i<8;i++) @@ -168,12 +168,12 @@ UINT32 monzagp_state::screen_update_monzagp(screen_device &screen, bitmap_ind16 bitmap.fill(0, cliprect); // background tilemap - UINT8 *tile_table = m_proms->base() + 0x100; - UINT8 *collisions_prom = m_proms->base() + 0x200; + uint8_t *tile_table = m_proms->base() + 0x100; + uint8_t *collisions_prom = m_proms->base() + 0x200; - UINT8 start_tile = m_video_ctrl[0][0] ^ 0xff; - UINT8 inv_counter = m_video_ctrl[0][1] ^ 0xff; - UINT8 mycar_y = m_mycar_pos; + uint8_t start_tile = m_video_ctrl[0][0] ^ 0xff; + uint8_t inv_counter = m_video_ctrl[0][1] ^ 0xff; + uint8_t mycar_y = m_mycar_pos; bool inv = false; for(int y=0; y<=256; y++, start_tile += inv ? -1 : +1) @@ -181,12 +181,12 @@ UINT32 monzagp_state::screen_update_monzagp(screen_device &screen, bitmap_ind16 if (inv_counter++ == 0xff) inv = true; - UINT16 start_x = (((m_video_ctrl[0][3] << 8) | m_video_ctrl[0][2]) ^ 0xffff); - UINT8 mycar_x = m_video_ctrl[1][2]; + uint16_t start_x = (((m_video_ctrl[0][3] << 8) | m_video_ctrl[0][2]) ^ 0xffff); + uint8_t mycar_x = m_video_ctrl[1][2]; for(int x=0; x<=256; x++, start_x++) { - UINT8 tile_attr = m_tile_attr->base()[((start_x >> 5) & 0x1ff) | ((m_video_ctrl[0][3] & 0x80) ? 0 : 0x200)]; + uint8_t tile_attr = m_tile_attr->base()[((start_x >> 5) & 0x1ff) | ((m_video_ctrl[0][3] & 0x80) ? 0 : 0x200)]; //if (tile_attr & 0x10) printf("dark on\n"); //if (tile_attr & 0x20) printf("light on\n"); @@ -195,8 +195,8 @@ UINT32 monzagp_state::screen_update_monzagp(screen_device &screen, bitmap_ind16 int tile_idx = tile_table[((tile_attr & 0x0f) << 4) | (inv ? 0x08 : 0) | ((start_tile >> 5) & 0x07)]; int bit_pos = 3 - (start_x & 3); - UINT8 tile_data = m_gfx3->base()[(tile_idx << 8) | (((start_x << 3) & 0xe0) ^ 0x80) | (start_tile & 0x1f)]; - UINT8 tile_color = (BIT(tile_data, 4 + bit_pos) << 1) | BIT(tile_data, bit_pos); + uint8_t tile_data = m_gfx3->base()[(tile_idx << 8) | (((start_x << 3) & 0xe0) ^ 0x80) | (start_tile & 0x1f)]; + uint8_t tile_color = (BIT(tile_data, 4 + bit_pos) << 1) | BIT(tile_data, bit_pos); int color = (tile_idx << 2) | tile_color; @@ -218,8 +218,8 @@ UINT32 monzagp_state::screen_update_monzagp(screen_device &screen, bitmap_ind16 else if (m_cp_ruote && (m_video_ctrl[1][3] & 0x10)) sprite_idx ^= 0x01; int bitpos = 3 - (hpos & 3); - UINT8 sprite_data = m_gfx2->base()[(sprite_idx << 5) | (vpos & 0x1f)]; - UINT8 sprite_color = (BIT(sprite_data, 4 + bitpos) << 1) | BIT(sprite_data, bitpos); + uint8_t sprite_data = m_gfx2->base()[(sprite_idx << 5) | (vpos & 0x1f)]; + uint8_t sprite_color = (BIT(sprite_data, 4 + bitpos) << 1) | BIT(sprite_data, bitpos); if ((sprite_color & 3) != 3) { @@ -233,8 +233,8 @@ UINT32 monzagp_state::screen_update_monzagp(screen_device &screen, bitmap_ind16 bitmap.pix16(y, x) = color; // collisions - UINT8 coll_prom_addr = BITSWAP8(tile_idx, 7, 6, 5, 4, 2, 0, 1, 3); - UINT8 collisions = collisions_prom[((mycar && othercars) ? 0 : 0x80) | (inv ? 0x40 : 0) | (coll_prom_addr << 2) | (mycar ? 0 : 0x02) | (tile_color & 0x01)]; + uint8_t coll_prom_addr = BITSWAP8(tile_idx, 7, 6, 5, 4, 2, 0, 1, 3); + uint8_t collisions = collisions_prom[((mycar && othercars) ? 0 : 0x80) | (inv ? 0x40 : 0) | (coll_prom_addr << 2) | (mycar ? 0 : 0x02) | (tile_color & 0x01)]; m_collisions_ff |= ((m_collisions_clk ^ collisions) & collisions); m_collisions_clk = collisions; } @@ -264,7 +264,7 @@ ADDRESS_MAP_END READ8_MEMBER(monzagp_state::port_r) { - UINT8 data = 0xff; + uint8_t data = 0xff; if (!(m_p1 & 0x01)) // 8350 videoram { //printf("ext 0 r P1:%02x P2:%02x %02x\n", m_p1, m_p2, offset); @@ -354,7 +354,7 @@ WRITE8_MEMBER(monzagp_state::port_w) if ((ram_offset & 0x07) == 0) { // 74LS47 BCD-to-Seven-Segment Decoder - static UINT8 bcd2hex[] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0x58, 0x4c, 0x62, 0x49, 0x78, 0x00 }; + static uint8_t bcd2hex[] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0x58, 0x4c, 0x62, 0x49, 0x78, 0x00 }; output().set_digit_value(ram_offset >> 3, bcd2hex[data & 0x0f]); } } @@ -375,7 +375,7 @@ WRITE8_MEMBER(monzagp_state::port_w) if ((offset & 0x80) && (m_video_ctrl[1][3] & 0x01)) { - UINT8 steering_wheel = m_steering_wheel->read(); + uint8_t steering_wheel = m_steering_wheel->read(); if (steering_wheel & 0x01) m_mycar_pos--; if (steering_wheel & 0x02) m_mycar_pos++; } |