summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/igs028.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/igs028.cpp')
-rw-r--r--src/mame/machine/igs028.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/mame/machine/igs028.cpp b/src/mame/machine/igs028.cpp
index 5e71c2bff64..9ce225d5783 100644
--- a/src/mame/machine/igs028.cpp
+++ b/src/mame/machine/igs028.cpp
@@ -11,7 +11,7 @@
#include "igs028.h"
-igs028_device::igs028_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+igs028_device::igs028_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, IGS028, "IGS028", tag, owner, clock, "igs028", __FILE__)
{
}
@@ -53,7 +53,7 @@ void igs028_device::device_reset()
}
-UINT32 igs028_device::olds_prot_addr(UINT16 addr)
+uint32_t igs028_device::olds_prot_addr(uint16_t addr)
{
switch (addr & 0xff)
{
@@ -74,22 +74,22 @@ UINT32 igs028_device::olds_prot_addr(UINT16 addr)
return 0;
}
-UINT32 igs028_device::olds_read_reg(UINT16 addr)
+uint32_t igs028_device::olds_read_reg(uint16_t addr)
{
- UINT32 protaddr = (olds_prot_addr(addr) - 0x400000) / 2;
+ uint32_t protaddr = (olds_prot_addr(addr) - 0x400000) / 2;
return m_sharedprotram[protaddr] << 16 | m_sharedprotram[protaddr + 1];
}
-void igs028_device::olds_write_reg( UINT16 addr, UINT32 val )
+void igs028_device::olds_write_reg( uint16_t addr, uint32_t val )
{
m_sharedprotram[((olds_prot_addr(addr) - 0x400000) / 2) + 0] = val >> 16;
m_sharedprotram[((olds_prot_addr(addr) - 0x400000) / 2) + 1] = val & 0xffff;
}
-void igs028_device::IGS028_do_dma(UINT16 src, UINT16 dst, UINT16 size, UINT16 mode)
+void igs028_device::IGS028_do_dma(uint16_t src, uint16_t dst, uint16_t size, uint16_t mode)
{
- UINT16 param = mode >> 8;
- UINT16 *PROTROM = (UINT16*)memregion(":user1")->base();
+ uint16_t param = mode >> 8;
+ uint16_t *PROTROM = (uint16_t*)memregion(":user1")->base();
// logerror ("mode: %2.2x, src: %4.4x, dst: %4.4x, size: %4.4x, data: %4.4x\n", (mode &0xf), src, dst, size, mode);
@@ -111,12 +111,12 @@ void igs028_device::IGS028_do_dma(UINT16 src, UINT16 dst, UINT16 size, UINT16 mo
case 0x07: // unused?
{
- UINT8 extraoffset = param & 0xff;
- UINT8 *dectable = (UINT8 *)(PROTROM + (0x100 / 2));
+ uint8_t extraoffset = param & 0xff;
+ uint8_t *dectable = (uint8_t *)(PROTROM + (0x100 / 2));
- for (INT32 x = 0; x < size; x++)
+ for (int32_t x = 0; x < size; x++)
{
- UINT16 dat2 = PROTROM[src + x];
+ uint16_t dat2 = PROTROM[src + x];
int taboff = ((x*2)+extraoffset) & 0xff; // must allow for overflow in instances of odd offsets
unsigned short extraxor = ((dectable[taboff + 0]) << 0) | (dectable[taboff + 1] << 8);
@@ -129,7 +129,7 @@ void igs028_device::IGS028_do_dma(UINT16 src, UINT16 dst, UINT16 size, UINT16 mo
else
{
// if other modes are used we need to know about them
- UINT16 extraxor2 = 0;
+ uint16_t extraxor2 = 0;
if ((x & 0x003) == 0x000) extraxor2 |= 0x0049; // 'I'
if ((x & 0x003) == 0x001) extraxor2 |= 0x0047; // 'G'
if ((x & 0x003) == 0x002) extraxor2 |= 0x0053; // 'S'
@@ -142,7 +142,7 @@ void igs028_device::IGS028_do_dma(UINT16 src, UINT16 dst, UINT16 size, UINT16 mo
if ((x & 0x300) == 0x300) extraxor2 |= 0x2000; // ' '
- printf("mode %d - %04x (%04x %04x %04x - %04x %04x %04x - %04x %04x \n", mode, dat2, (UINT16)(dat2-extraxor), (UINT16)(dat2+extraxor), (UINT16)(dat2^extraxor), (UINT16)(dat2-extraxor2), (UINT16)(dat2+extraxor2), (UINT16)(dat2^extraxor2), ((dat2 & 0xf0f0) >> 4)|((dat2 & 0x0f0f) << 4), ((dat2 &0x00ff) << 8) | ((dat2 &0xff00) >> 8) );
+ printf("mode %d - %04x (%04x %04x %04x - %04x %04x %04x - %04x %04x \n", mode, dat2, (uint16_t)(dat2-extraxor), (uint16_t)(dat2+extraxor), (uint16_t)(dat2^extraxor), (uint16_t)(dat2-extraxor2), (uint16_t)(dat2+extraxor2), (uint16_t)(dat2^extraxor2), ((dat2 & 0xf0f0) >> 4)|((dat2 & 0x0f0f) << 4), ((dat2 &0x00ff) << 8) | ((dat2 &0xff00) >> 8) );
dat2 = 0x4e75; // hack
}
@@ -158,7 +158,7 @@ void igs028_device::IGS028_do_dma(UINT16 src, UINT16 dst, UINT16 size, UINT16 mo
void igs028_device::IGS028_handle()
{
- UINT16 cmd = m_sharedprotram[0x3026 / 2];
+ uint16_t cmd = m_sharedprotram[0x3026 / 2];
// logerror ("command: %x\n", cmd);
@@ -166,10 +166,10 @@ void igs028_device::IGS028_handle()
{
case 0x12:
{
- UINT16 mode = m_sharedprotram[0x303e / 2]; // ?
- UINT16 src = m_sharedprotram[0x306a / 2] >> 1; // ?
- UINT16 dst = m_sharedprotram[0x3084 / 2] & 0x1fff;
- UINT16 size = m_sharedprotram[0x30a2 / 2] & 0x1fff;
+ uint16_t mode = m_sharedprotram[0x303e / 2]; // ?
+ uint16_t src = m_sharedprotram[0x306a / 2] >> 1; // ?
+ uint16_t dst = m_sharedprotram[0x3084 / 2] & 0x1fff;
+ uint16_t size = m_sharedprotram[0x30a2 / 2] & 0x1fff;
IGS028_do_dma(src, dst, size, mode);
}
@@ -177,10 +177,10 @@ void igs028_device::IGS028_handle()
case 0x64: // incomplete?
{
- UINT16 p1 = m_sharedprotram[0x3050 / 2];
- UINT16 p2 = m_sharedprotram[0x3082 / 2];
- UINT16 p3 = m_sharedprotram[0x3054 / 2];
- UINT16 p4 = m_sharedprotram[0x3088 / 2];
+ uint16_t p1 = m_sharedprotram[0x3050 / 2];
+ uint16_t p2 = m_sharedprotram[0x3082 / 2];
+ uint16_t p3 = m_sharedprotram[0x3054 / 2];
+ uint16_t p4 = m_sharedprotram[0x3088 / 2];
if (p2 == 0x02)
olds_write_reg(p1, olds_read_reg(p1) + 0x10000);