trunk/src/devices/cpu/se3208/se3208.cpp
r250347 | r250348 | |
38 | 38 | //Precompute the instruction decoding in a big table |
39 | 39 | #define INST(a) void se3208_device::a(UINT16 Opcode) |
40 | 40 | |
| 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 |
41 | 44 | |
42 | 45 | const device_type SE3208 = &device_creator<se3208_device>; |
43 | 46 | |
r250347 | r250348 | |
58 | 61 | case 1: |
59 | 62 | case 2: |
60 | 63 | 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 |
62 | 66 | 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 |
64 | 70 | } |
65 | 71 | |
66 | 72 | return 0; |
r250347 | r250348 | |
85 | 91 | case 1: |
86 | 92 | case 2: |
87 | 93 | case 3: |
| 94 | #if ALLOW_UNALIGNED_DWORD_ACCESS |
88 | 95 | space.write_byte(address, data & 0xff); |
89 | 96 | space.write_byte(address + 1, (data >> 8) & 0xff); |
90 | 97 | space.write_byte(address + 2, (data >> 16) & 0xff); |
91 | 98 | 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 | |
93 | 102 | break; |
94 | 103 | } |
95 | 104 | |