Global rom = LoadBank("0686.gba") Graphics 640, 640 + 12, 0, 32 Global StartOffset = 907276 'DD80C Global x = 0 Global y = 0 Global PaletteIndex = 0 Function DrawPalette() 'what fucken palette are we on?: DrawText "Palette Num: " + PaletteIndex/3/256 + " Offset: " + (StartOffset + PaletteIndex), 0, GraphicsHeight() - 12 '256 colours, Z is counter For z = 0 To 255 'R G B SetColor(PeekByte(rom, StartOffset + PaletteIndex), PeekByte(rom, StartOffset + PaletteIndex + 1), PeekByte(rom, StartOffset + PaletteIndex + 2)) '640 divide 16 is 40, so each colour can be 40 pixels wide so it's visible DrawRect(x * 40, y * 40,40,40) x = x + 1 'go to a new line after 16 colours If(x >= 16) x = 0 y = y + 1 EndIf PaletteIndex = PaletteIndex + 3 Next SetColor(255, 255, 255) 'After 96 palettes it's back to garbage data If(PaletteIndex/3/256 >= 96) PaletteIndex = 0 EndIf Flip 'Draw x = 0 y = 0 End Function While(Not KeyDown(1)) DrawPalette WaitKey Cls Wend