fixed PPC compilation errors
This commit is contained in:
parent
ae56e34cc5
commit
e45499646c
|
@ -53,10 +53,10 @@ static INLINE u32 T1ReadLong(u8 * mem, u32 addr)
|
|||
static INLINE u64 T1ReadQuad(u8 * mem, u32 addr)
|
||||
{
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
return (mem[addr + 7] << 56 | mem[addr + 6] << 48 |
|
||||
mem[addr + 5] << 40 | mem[addr + 4] << 32 |
|
||||
mem[addr + 3] << 24 | mem[addr + 2] << 16 |
|
||||
mem[addr + 1] << 8 | mem[addr]);
|
||||
return (u64(mem[addr + 7]) << 56 | u64(mem[addr + 6]) << 48 |
|
||||
u64(mem[addr + 5]) << 40 | u64(mem[addr + 4]) << 32 |
|
||||
u64(mem[addr + 3]) << 24 | u64(mem[addr + 2]) << 16 |
|
||||
u64(mem[addr + 1]) << 8 | u64(mem[addr ]));
|
||||
#else
|
||||
return *((u64 *) (mem + addr));
|
||||
#endif
|
||||
|
|
|
@ -188,7 +188,7 @@ SFORMAT SF_MMU[]={
|
|||
{ "MDCY", 4, 8, MMU.DMACycle},
|
||||
{ "MDCR", 4, 8, MMU.DMACrt},
|
||||
{ "MDMA", 4, 8, MMU.DMAing},
|
||||
|
||||
|
||||
//begin memory chips
|
||||
//we are skipping the firmware, because we really don't want to save the firmware to the savestate
|
||||
//but, we will need to think about the philosophy of this.
|
||||
|
@ -512,7 +512,7 @@ static bool ReadStateChunk(std::istream* is, SFORMAT *sf, int size)
|
|||
while(is->tellg()<temp+size)
|
||||
{
|
||||
u32 sz, count;
|
||||
|
||||
|
||||
char toa[4];
|
||||
is->read(toa,4);
|
||||
if(is->fail())
|
||||
|
@ -532,8 +532,7 @@ static bool ReadStateChunk(std::istream* is, SFORMAT *sf, int size)
|
|||
is->read((char *)tmp->v + i*sz,sz);
|
||||
|
||||
#ifndef LOCAL_LE
|
||||
if(rlsb)
|
||||
FlipByteOrder((u8*)tmp->v + i*sz,sz);
|
||||
FlipByteOrder((u8*)tmp->v + i*sz,sz);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -567,8 +566,8 @@ static int SubWrite(std::ostream* os, SFORMAT *sf)
|
|||
int count = sf->count;
|
||||
int size = sf->size;
|
||||
|
||||
acc+=12; //Description + size + count
|
||||
|
||||
//add size of current node to the accumulator
|
||||
acc += sizeof(sf->desc) + sizeof(sf->size) + sizeof(sf->count);
|
||||
acc += count * size;
|
||||
|
||||
if(os) //Are we writing or calculating the size of this block?
|
||||
|
@ -583,16 +582,15 @@ static int SubWrite(std::ostream* os, SFORMAT *sf)
|
|||
} else {
|
||||
for(int i=0;i<count;i++) {
|
||||
|
||||
#ifndef LOCAL_LE
|
||||
FlipByteOrder((u8*)sf->v,sf->s&(~SS_FLAGS));
|
||||
#ifndef LOCAL_LE vv
|
||||
FlipByteOrder((u8*)sf->v + i*size, size);
|
||||
#endif
|
||||
|
||||
os->write((char*)sf->v + i*size,size);
|
||||
|
||||
//Now restore the original byte order.
|
||||
#ifndef LOCAL_LE
|
||||
if(rlsb)
|
||||
FlipByteOrder((u8*)sf->v,sf->s&(~SS_FLAGS));
|
||||
FlipByteOrder((u8*)sf->v + i*size, size);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -806,7 +804,7 @@ static bool savestate_load(std::istream* is)
|
|||
//GO!! READ THE SAVESTATE
|
||||
//THERE IS NO GOING BACK NOW
|
||||
//reset the emulator first to clean out the host's state
|
||||
|
||||
|
||||
//while the series of resets below should work,
|
||||
//we are testing the robustness of the savestate system with this full reset.
|
||||
//the full reset wipes more things, so we can make sure that they are being restored correctly
|
||||
|
|
Loading…
Reference in New Issue