mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-23 04:33:24 +00:00
little endian fixes
This commit is contained in:
parent
cd86ff9e94
commit
cbb8efd492
@ -420,15 +420,15 @@ void CheckLoad(uint32 type, int16 id, uint16 *p, uint32 size)
|
||||
|
||||
} else if (type == FOURCC('n','s','r','d') && id == 1) {
|
||||
D(bug("nsrd 1 found\n"));
|
||||
if (p[(0x378 + 0x570) >> 1] == 0x7c08 && p[(0x37a + 0x570) >> 1] == 0x02a6) {
|
||||
if (p[(0x378 + 0x570) >> 1] == htons(0x7c08) && p[(0x37a + 0x570) >> 1] == htons(0x02a6)) {
|
||||
// Don't overwrite our serial drivers (8.0, 8.1)
|
||||
p[(0x378 + 0x570) >> 1] = 0x4e80; // blr
|
||||
p[(0x37a + 0x570) >> 1] = 0x0020;
|
||||
p[(0x378 + 0x570) >> 1] = htons(0x4e80); // blr
|
||||
p[(0x37a + 0x570) >> 1] = htons(0x0020);
|
||||
D(bug(" patch 1 applied\n"));
|
||||
} else if (p[(0x378 + 0x6c0) >> 1] == 0x7c08 && p[(0x37a + 0x6c0) >> 1] == 0x02a6) {
|
||||
} else if (p[(0x378 + 0x6c0) >> 1] == htons(0x7c08) && p[(0x37a + 0x6c0) >> 1] == htons(0x02a6)) {
|
||||
// Don't overwrite our serial drivers (8.5, 8.6)
|
||||
p[(0x378 + 0x6c0) >> 1] = 0x4e80; // blr
|
||||
p[(0x37a + 0x6c0) >> 1] = 0x0020;
|
||||
p[(0x378 + 0x6c0) >> 1] = htons(0x4e80); // blr
|
||||
p[(0x37a + 0x6c0) >> 1] = htons(0x0020);
|
||||
D(bug(" patch 2 applied\n"));
|
||||
}
|
||||
|
||||
@ -438,7 +438,7 @@ void CheckLoad(uint32 type, int16 id, uint16 *p, uint32 size)
|
||||
while (size--) {
|
||||
if (PM(0,0x203c) && PM(1,0x0100) && PM(2,0x0000) && PM(3,0xc0ae) && PM(4,0xfffc)) {
|
||||
// Don't replace SCSI Manager (8.1, 8.5, 8.6)
|
||||
p[5] = htons((p[5] & 0xff) | 0x6000); // beq
|
||||
p[5] = htons((ntohs(p[5]) & 0xff) | 0x6000); // beq
|
||||
D(bug(" patch 1 applied\n"));
|
||||
break;
|
||||
}
|
||||
@ -447,14 +447,14 @@ void CheckLoad(uint32 type, int16 id, uint16 *p, uint32 size)
|
||||
|
||||
} else if (type == FOURCC('t','h','n','g')) {
|
||||
// Collect info about used audio sifters
|
||||
uint32 c_type = 0[(uint32 *)p];
|
||||
uint32 sub_type = 1[(uint32 *)p];
|
||||
uint32 c_type = ntohl(0[(uint32 *)p]);
|
||||
uint32 sub_type = ntohl(1[(uint32 *)p]);
|
||||
if (c_type == FOURCC('s','d','e','v') && sub_type == FOURCC('s','i','n','g')) {
|
||||
1[(uint32 *)p] = FOURCC('a','w','g','c');
|
||||
1[(uint32 *)p] = htonl(FOURCC('a','w','g','c'));
|
||||
D(bug("thng %d, type %c%c%c%c (%08x), sub type %c%c%c%c (%08x), data %p\n", id, c_type >> 24, (c_type >> 16) & 0xff, (c_type >> 8) & 0xff, c_type & 0xff, c_type, sub_type >> 24, (sub_type >> 16) & 0xff, (sub_type >> 8) & 0xff, sub_type & 0xff, sub_type, p));
|
||||
AddSifter(*(uint32 *)(((uintptr)p)+20), p[12]);
|
||||
if (p[28]) // componentPFCount
|
||||
AddSifter(*(uint32 *)(((uintptr)p)+62), p[33]);
|
||||
AddSifter(ReadMacInt32(((uintptr)p)+20), ntohs(p[12]));
|
||||
if (ntohs(p[28])) // componentPFCount
|
||||
AddSifter(ReadMacInt32(((uintptr)p)+62), ntohs(p[33]));
|
||||
}
|
||||
|
||||
} else if (type == FOURCC('s','i','f','t') || type == FOURCC('n','i','f','t')) {
|
||||
|
Loading…
Reference in New Issue
Block a user