summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/coolpool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/coolpool.cpp')
-rw-r--r--src/mame/drivers/coolpool.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/mame/drivers/coolpool.cpp b/src/mame/drivers/coolpool.cpp
index a1ed7a94ad4..e88bb24f46e 100644
--- a/src/mame/drivers/coolpool.cpp
+++ b/src/mame/drivers/coolpool.cpp
@@ -43,7 +43,7 @@
-static const UINT16 nvram_unlock_seq[] =
+static const uint16_t nvram_unlock_seq[] =
{
0x3fb, 0x3fb, 0x3f8, 0x3fc, 0x3fa, 0x3fe, 0x3f9, 0x3fd, 0x3fb, 0x3ff
};
@@ -57,8 +57,8 @@ static const UINT16 nvram_unlock_seq[] =
TMS340X0_SCANLINE_RGB32_CB_MEMBER(coolpool_state::amerdart_scanline)
{
- UINT16 *vram = &m_vram_base[(params->rowaddr << 8) & 0xff00];
- UINT32 *dest = &bitmap.pix32(scanline);
+ uint16_t *vram = &m_vram_base[(params->rowaddr << 8) & 0xff00];
+ uint32_t *dest = &bitmap.pix32(scanline);
rgb_t pens[16];
int coladdr = params->coladdr;
int x;
@@ -67,13 +67,13 @@ TMS340X0_SCANLINE_RGB32_CB_MEMBER(coolpool_state::amerdart_scanline)
if (scanline < 256)
for (x = 0; x < 16; x++)
{
- UINT16 pal = m_vram_base[x];
+ uint16_t pal = m_vram_base[x];
pens[x] = rgb_t(pal4bit(pal >> 4), pal4bit(pal >> 8), pal4bit(pal >> 12));
}
for (x = params->heblnk; x < params->hsblnk; x += 4)
{
- UINT16 pixels = vram[coladdr++ & 0xff];
+ uint16_t pixels = vram[coladdr++ & 0xff];
dest[x + 0] = pens[(pixels >> 0) & 15];
dest[x + 1] = pens[(pixels >> 4) & 15];
dest[x + 2] = pens[(pixels >> 8) & 15];
@@ -84,15 +84,15 @@ TMS340X0_SCANLINE_RGB32_CB_MEMBER(coolpool_state::amerdart_scanline)
TMS340X0_SCANLINE_RGB32_CB_MEMBER(coolpool_state::coolpool_scanline)
{
- UINT16 *vram = &m_vram_base[(params->rowaddr << 8) & 0x1ff00];
- UINT32 *dest = &bitmap.pix32(scanline);
+ uint16_t *vram = &m_vram_base[(params->rowaddr << 8) & 0x1ff00];
+ uint32_t *dest = &bitmap.pix32(scanline);
const rgb_t *pens = m_tlc34076->get_pens();
int coladdr = params->coladdr;
int x;
for (x = params->heblnk; x < params->hsblnk; x += 2)
{
- UINT16 pixels = vram[coladdr++ & 0xff];
+ uint16_t pixels = vram[coladdr++ & 0xff];
dest[x + 0] = pens[pixels & 0xff];
dest[x + 1] = pens[pixels >> 8];
}
@@ -291,8 +291,8 @@ static int amerdart_trackball_dec(int data)
int coolpool_state::amerdart_trackball_direction(int num, int data)
{
- UINT16 result_x = (data & 0x0c) >> 2;
- UINT16 result_y = (data & 0x03) >> 0;
+ uint16_t result_x = (data & 0x0c) >> 2;
+ uint16_t result_y = (data & 0x03) >> 0;
if ((m_dx[num] == 0) && (m_dy[num] < 0)) { /* Up */
@@ -388,10 +388,10 @@ READ16_MEMBER(coolpool_state::amerdart_trackball_r)
m_newx[2] = ioport("XAXIS2")->read(); /* Trackball 2 Left - Right */
m_newy[2] = ioport("YAXIS2")->read(); /* Trackball 2 Up - Down */
- m_dx[1] = (INT8)(m_newx[1] - m_oldx[1]);
- m_dy[1] = (INT8)(m_newy[1] - m_oldy[1]);
- m_dx[2] = (INT8)(m_newx[2] - m_oldx[2]);
- m_dy[2] = (INT8)(m_newy[2] - m_oldy[2]);
+ m_dx[1] = (int8_t)(m_newx[1] - m_oldx[1]);
+ m_dy[1] = (int8_t)(m_newy[1] - m_oldy[1]);
+ m_dx[2] = (int8_t)(m_newx[2] - m_oldx[2]);
+ m_dy[2] = (int8_t)(m_newy[2] - m_oldy[2]);
/* Determine Trackball 1 direction state */
m_result = (m_result & 0xf0ff) | (amerdart_trackball_direction(1, ((m_result >> 8) & 0xf)) << 8);
@@ -505,7 +505,7 @@ READ16_MEMBER(coolpool_state::dsp_hold_line_r)
READ16_MEMBER(coolpool_state::dsp_rom_r)
{
- UINT8 *rom = memregion("user2")->base();
+ uint8_t *rom = memregion("user2")->base();
return rom[m_iop_romaddr & (memregion("user2")->bytes() - 1)];
}
@@ -538,8 +538,8 @@ READ16_MEMBER(coolpool_state::coolpool_input_r)
m_result = (ioport("IN1")->read() & 0x00ff) | (m_lastresult & 0xff00);
m_newx[1] = ioport("XAXIS")->read();
m_newy[1] = ioport("YAXIS")->read();
- m_dx[1] = (INT8)(m_newx[1] - m_oldx[1]);
- m_dy[1] = (INT8)(m_newy[1] - m_oldy[1]);
+ m_dx[1] = (int8_t)(m_newx[1] - m_oldx[1]);
+ m_dy[1] = (int8_t)(m_newy[1] - m_oldy[1]);
if (m_dx[1] < 0)
{
@@ -1129,10 +1129,10 @@ DRIVER_INIT_MEMBER(coolpool_state,coolpool)
DRIVER_INIT_MEMBER(coolpool_state,9ballsht)
{
int a, len;
- UINT16 *rom;
+ uint16_t *rom;
/* decrypt the main program ROMs */
- rom = (UINT16 *)memregion("user1")->base();
+ rom = (uint16_t *)memregion("user1")->base();
len = memregion("user1")->bytes();
for (a = 0;a < len/2;a++)
{
@@ -1156,12 +1156,12 @@ DRIVER_INIT_MEMBER(coolpool_state,9ballsht)
}
/* decrypt the sub data ROMs */
- rom = (UINT16 *)memregion("user2")->base();
+ rom = (uint16_t *)memregion("user2")->base();
len = memregion("user2")->bytes();
for (a = 1;a < len/2;a+=4)
{
/* just swap bits 1 and 2 of the address */
- UINT16 tmp = rom[a];
+ uint16_t tmp = rom[a];
rom[a] = rom[a+1];
rom[a+1] = tmp;
}