public GraphicsChip(Dmgcpu d) {  
		dmgcpu = d;

		backgroundPalette = new GameboyPalette(0, 1, 2, 3);
		obj1Palette = new GameboyPalette(0, 1, 2, 3);
		obj2Palette = new GameboyPalette(0, 1, 2, 3);

		for (int r = 0; r < 8; r++) {
			gbcBackground[r] = new GameboyPalette(0, 1, 2, 3);
			gbcSprite[r] = new GameboyPalette(0, 1, 2, 3);
		}

		drawingBuffer = new BufferedImage(160 * mag, 144 * mag, BufferedImage.TYPE_INT_RGB);
		backBuffer = new BufferedImage(160 * mag, 144 * mag, BufferedImage.TYPE_INT_RGB);
		
	}