summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/micro3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/micro3d.cpp')
-rw-r--r--src/mame/machine/micro3d.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/mame/machine/micro3d.cpp b/src/mame/machine/micro3d.cpp
index 5b0ac44f06f..d5d6d4c13f2 100644
--- a/src/mame/machine/micro3d.cpp
+++ b/src/mame/machine/micro3d.cpp
@@ -214,19 +214,19 @@ READ32_MEMBER(micro3d_state::micro3d_scc_r)
*
*************************************/
-static inline INT64 dot_product(micro3d_vtx *v1, micro3d_vtx *v2)
+static inline int64_t dot_product(micro3d_vtx *v1, micro3d_vtx *v2)
{
- INT64 result = ((INT64)v1->x * (INT64)v2->x) +
- ((INT64)v1->y * (INT64)v2->y) +
- ((INT64)v1->z * (INT64)v2->z);
+ int64_t result = ((int64_t)v1->x * (int64_t)v2->x) +
+ ((int64_t)v1->y * (int64_t)v2->y) +
+ ((int64_t)v1->z * (int64_t)v2->z);
return result;
}
-static inline INT64 normalised_multiply(INT32 a, INT32 b)
+static inline int64_t normalised_multiply(int32_t a, int32_t b)
{
- INT64 result;
+ int64_t result;
- result = (INT64)a * (INT64)b;
+ result = (int64_t)a * (int64_t)b;
return result >> 14;
}
@@ -264,15 +264,15 @@ READ32_MEMBER(micro3d_state::micro3d_mac2_r)
WRITE32_MEMBER(micro3d_state::micro3d_mac2_w)
{
- UINT32 cnt = data & 0xff;
- UINT32 inst = (data >> 8) & 0x1f;
- UINT32 mac_cycles = 1;
+ uint32_t cnt = data & 0xff;
+ uint32_t inst = (data >> 8) & 0x1f;
+ uint32_t mac_cycles = 1;
- UINT32 mrab11;
- UINT32 vtx_addr;
- UINT32 sram_r_addr;
- UINT32 sram_w_addr;
- UINT32 *mac_sram;
+ uint32_t mrab11;
+ uint32_t vtx_addr;
+ uint32_t sram_r_addr;
+ uint32_t sram_w_addr;
+ uint32_t *mac_sram;
m_mac_stat = BIT(data, 13);
m_mac_inst = inst & 0x7;
@@ -299,11 +299,11 @@ WRITE32_MEMBER(micro3d_state::micro3d_mac2_w)
case 0x08:
{
int i;
- const UINT16 *rom = (UINT16*)m_vertex->base();
+ const uint16_t *rom = (uint16_t*)m_vertex->base();
for (i = 0; i <= cnt; ++i)
{
- INT64 acc;
+ int64_t acc;
micro3d_vtx v1;
v1.x = VTXROM_FMT(rom[vtx_addr]); vtx_addr++;
@@ -338,11 +338,11 @@ WRITE32_MEMBER(micro3d_state::micro3d_mac2_w)
case 0x0c:
{
int i;
- const UINT16 *rom = (UINT16*)m_vertex->base();
+ const uint16_t *rom = (uint16_t*)m_vertex->base();
for (i = 0; i <= cnt; ++i)
{
- INT64 acc;
+ int64_t acc;
micro3d_vtx v1;
v1.x = VTXROM_FMT(rom[vtx_addr]); vtx_addr++;
@@ -371,7 +371,7 @@ WRITE32_MEMBER(micro3d_state::micro3d_mac2_w)
case 0x0f:
{
int i;
- const UINT16 *rom = (UINT16*)m_vertex->base();
+ const uint16_t *rom = (uint16_t*)m_vertex->base();
for (i = 0; i <= cnt; ++i, vtx_addr += 4)
{
@@ -398,7 +398,7 @@ WRITE32_MEMBER(micro3d_state::micro3d_mac2_w)
for (i = 0; i <= cnt; ++i)
{
micro3d_vtx v1;
- INT64 dp;
+ int64_t dp;
v1.x = mac_sram[sram_r_addr++];
v1.y = mac_sram[sram_r_addr++];
@@ -424,7 +424,7 @@ WRITE32_MEMBER(micro3d_state::micro3d_mac2_w)
{
micro3d_vtx v1;
micro3d_vtx v2;
- INT64 dp;
+ int64_t dp;
v1.x = mac_sram[sram_r_addr++];
v1.y = mac_sram[sram_r_addr++];
@@ -467,16 +467,16 @@ WRITE32_MEMBER(micro3d_state::micro3d_mac2_w)
READ16_MEMBER(micro3d_state::micro3d_encoder_h_r)
{
- UINT16 x_encoder = m_joystick_x.read_safe(0);
- UINT16 y_encoder = m_joystick_y.read_safe(0);
+ uint16_t x_encoder = m_joystick_x.read_safe(0);
+ uint16_t y_encoder = m_joystick_y.read_safe(0);
return (y_encoder & 0xf00) | ((x_encoder & 0xf00) >> 8);
}
READ16_MEMBER(micro3d_state::micro3d_encoder_l_r)
{
- UINT16 x_encoder = m_joystick_x.read_safe(0);
- UINT16 y_encoder = m_joystick_y.read_safe(0);
+ uint16_t x_encoder = m_joystick_x.read_safe(0);
+ uint16_t y_encoder = m_joystick_y.read_safe(0);
return ((y_encoder & 0xff) << 8) | (x_encoder & 0xff);
}
@@ -487,7 +487,7 @@ TIMER_CALLBACK_MEMBER(micro3d_state::adc_done_callback)
{
case 0: m_adc_val = m_throttle.read_safe(0);
break;
- case 1: m_adc_val = (UINT8)((255.0/100.0) * m_volume->read() + 0.5);
+ case 1: m_adc_val = (uint8_t)((255.0/100.0) * m_volume->read() + 0.5);
break;
case 2: break;
case 3: break;