Data on EB's graphics compression routine Load one byte from the ROM, call that value Z. Look at the high three bits of Z (Bitwise AND with 0x0E). That value will be used as a "control code". Keeping the last five bits as zeros, that gives us 8 possible combinations. In hex: 0x00, 0x20, 0x40, 0x60, 0x80, 0xA0, 0xC0, 0xE0. For codes 00-C0, take the low 5 bits of Z, call that value i. 00 - Print i + 1 bytes to the graphics output 20 - Print 1 byte i + 1 times 40 - Read two bytes and print them alternatly i + 1 number of times 60 - Print 0 to the graphics output i + 1 times For codes 80-C0, read two bytes from the ROM, swap the high and low bytes, add the mystery byte (It's prepared before the decompressor is called so I don't know where it pulls it from) and we'll call that value Y. These codes are intended to reuse stuff in the graphics buffer to save space. 80 - Print i + 1 bytes from the graphics buffer + Y to the graphics output A0 - Print 1 byte i + 1 from the graphics buffer + Y times C0 - Print i + 1 bytes to the graphics output, backwards from postion Y in the graphics buffer E0 - The E0 code is special. Take the mid 3 bits of the byte (Bitwise AND with 0x1C), that's your new control code. Read another byte from the ROM, that is your new i.