if(((source & 0xe000000) == 0) || ((source + len) & 0xe000000) == 0) return;
void BIOS_BitUnPack(){#ifdef DEV_VERSION    if(systemVerbose & VERBOSE_SWI) {    log("BitUnPack: %08x,%08x,%08x (VCOUNT=%2d)\n",        reg[0].I,        reg[1].I,        reg[2].I,        VCOUNT);  }#endif  u32 source = reg[0].I;  u32 dest = reg[1].I;  u32 header = reg[2].I;    int len = CPUReadHalfWord(header);  // check address  int bits = CPUReadByte(header+2);  int revbits = 8 - bits;   // u32 value = 0;  u32 base = CPUReadMemory(header+4);  bool addBase = (base & 0x80000000) ? true : false;  base &= 0x7fffffff;  int dataSize = CPUReadByte(header+3);  int data = 0;   int bitwritecount = 0;   while(1) {    len -= 1;    if(len < 0)      break;    int mask = 0xff >> revbits;     u8 b = CPUReadByte(source);     source++;    int bitcount = 0;    while(1) {      if(bitcount >= 8)        break;      u32 d = b & mask;      u32 temp = d >> bitcount;      if(!temp && addBase) {        temp += base;      }      data |= temp << bitwritecount;      bitwritecount += dataSize;      if(bitwritecount >= 32) {        CPUWriteMemory(dest, data);        dest += 4;        data = 0;        bitwritecount = 0;      }      mask <<= bits;      bitcount += bits;    }  }}