u16 data = (CPUReadByte(source++)<<8) | CPUReadByte(source++);
u16 data = CPUReadByte(source++) << 8; data |= CPUReadByte(source++);
void BIOS_LZ77UnCompVram(){#ifdef DEV_VERSION  if(systemVerbose & VERBOSE_SWI) {    log("LZ77UnCompVram: 0x%08x,0x%08x (VCOUNT=%d)\n",        reg[0].I,        reg[1].I,        VCOUNT);  }#endif    u32 source = reg[0].I;  u32 dest = reg[1].I;  u32 header = CPUReadMemory(source);  source += 4;  if(((source & 0xe000000) == 0) ||     ((source + ((header >> 8) & 0x1fffff)) & 0xe000000) == 0)    return;        int byteCount = 0;  int byteShift = 0;  u32 writeValue = 0;    int len = header >> 8;  while(len > 0) {    u8 d = CPUReadByte(source++);    if(d) {      for(int i = 0; i < 8; i++) {        if(d & 0x80) {          u16 data = (CPUReadByte(source++)<<8) | CPUReadByte(source++);          int length = (data >> 12) + 3;          int offset = (data & 0x0FFF);          u32 windowOffset = dest + byteCount - offset - 1;          for(int i = 0; i < length; i++) {            writeValue |= (CPUReadByte(windowOffset++) << byteShift);            byteShift += 8;            byteCount++;            if(byteCount == 2) {              CPUWriteHalfWord(dest, writeValue);              dest += 2;              byteCount = 0;              byteShift = 0;              writeValue = 0;            }            len--;            if(len == 0)              return;          }        } else {          writeValue |= (CPUReadByte(source++) << byteShift);          byteShift += 8;          byteCount++;          if(byteCount == 2) {            CPUWriteHalfWord(dest, writeValue);            dest += 2;            byteCount = 0;            byteShift = 0;            writeValue = 0;          }          len--;          if(len == 0)            return;        }        d <<= 1;      }    } else {      for(int i = 0; i < 8; i++) {        writeValue |= (CPUReadByte(source++) << byteShift);        byteShift += 8;        byteCount++;        if(byteCount == 2) {          CPUWriteHalfWord(dest, writeValue);          dest += 2;                byteShift = 0;          byteCount = 0;          writeValue = 0;        }        len--;        if(len == 0)          return;      }    }  }}