Previous 199869 Revisions Next

r41836 Monday 23rd November, 2015 at 12:57:44 UTC by David Haywood
disallow unaligned accesses for se3208?

this allows officeye and donghaer to work, but I'm not entirely convinced it's correct.
[src/devices/cpu/se3208]se3208.cpp

trunk/src/devices/cpu/se3208/se3208.cpp
r250347r250348
3838//Precompute the instruction decoding in a big table
3939#define INST(a) void se3208_device::a(UINT16 Opcode)
4040
41// officeye and donghaer perform unaligned DWORD accesses, allowing them to happen causes the games to malfunction.
42// are such accesses simply illegal, be handled in a different way, or simply not be happening in the first place?
43#define ALLOW_UNALIGNED_DWORD_ACCESS 0
4144
4245const device_type SE3208 = &device_creator<se3208_device>;
4346
r250347r250348
5861   case 1:
5962   case 2:
6063   case 3:
61//      printf("dword read unaligned %d\n", address & 3);
64      printf("%08x: dword READ unaligned %d\n", m_PC, address);
65#if ALLOW_UNALIGNED_DWORD_ACCESS
6266      return space.read_byte(address) | space.read_byte(address + 1) << 8 | space.read_byte(address + 2) << 16 | space.read_byte(address + 3) << 24;
63
67#else
68      return 0;
69#endif
6470   }
6571
6672   return 0;
r250347r250348
8591   case 1:
8692   case 2:
8793   case 3:
94#if ALLOW_UNALIGNED_DWORD_ACCESS
8895      space.write_byte(address, data & 0xff);
8996      space.write_byte(address + 1, (data >> 8) & 0xff);
9097      space.write_byte(address + 2, (data >> 16) & 0xff);
9198      space.write_byte(address + 3, (data >> 24) & 0xff);
92//      printf("dword write unaligned %d\n", address & 3);
99#endif
100      printf("%08x: dword WRITE unaligned %d\n", m_PC, address);
101
93102      break;
94103   }
95104


Previous 199869 Revisions Next


© 1997-2024 The MAME Team