public void notifyScanline(int line) {

		if ((framesDrawn % frameSkip) != 0) {
			return;
		}

		if (line == 0) {
			clearFrameBuffer();
			/*if (spritesEnabledThisFrame)*/ drawSprites(drawingBuffer.getGraphics(), 1);
			spritesEnabledThisFrame = spritesEnabled;
			windowStopLine = 144;
			windowEnableThisLine = winEnabled;
		}

		// SpritesEnabledThisFrame should be true if sprites were ever on this frame
		if (spritesEnabled) spritesEnabledThisFrame = true;

		if (windowEnableThisLine) {
			if (!winEnabled) {
				windowStopLine = line;
				windowEnableThisLine = false;
				//	System.out.println("Stop line: " + windowStopLine);
			}
		}

		// Fix to screwed up status bars.  Record which data area is selected on the
		// first line the window is to be displayed.  Will work unless this is changed
		// after window is started
		// NOTE: Still no real support for hblank effects on window/sprites
		if (line == LowLevelData.unsign(dmgcpu.ioHandler.getRegisters()[0x4A]) + 1) {		// Compare against WY reg
			savedWindowDataSelect = bgWindowDataSelect;
		}

		// Can't disable background on GBC (?!).  Apperently not, according to BGB
		if ((!bgEnabled) && (!dmgcpu.isGbcFeatures())) return;

		int xPixelOfs = LowLevelData.unsign(dmgcpu.ioHandler.getRegisters()[0x43]) % 8;
		int yPixelOfs = LowLevelData.unsign(dmgcpu.ioHandler.getRegisters()[0x42]) % 8;

		//  if ((yPixelOfs + 4) % 8 == line % 8) {

		if ( ((yPixelOfs + line) % 8 == 4) || (line == 0)) {

			if ((line >= 144) && (line < 152)) notifyScanline(line + 8);

			Graphics back = drawingBuffer.getGraphics();

			int xTileOfs = LowLevelData.unsign(dmgcpu.ioHandler.getRegisters()[0x43]) / 8;
			int yTileOfs = LowLevelData.unsign(dmgcpu.ioHandler.getRegisters()[0x42]) / 8;
			int bgStartAddress, tileNum;

			int y = ((line + yPixelOfs) / 8);

			//   System.out.println(y + "," + line);
			//    System.out.println((8 * y) - yPixelOfs);

			if (hiBgTileMapAddress) {
				bgStartAddress = 0x1C00;  /* 1C00 */
			} else {
				bgStartAddress = 0x1800;
			}

			int tileNumAddress, attributeData, vidMemAddr;

			for (int x = 0; x < 21; x++) {
				if (bgWindowDataSelect) {
					tileNumAddress = bgStartAddress +
					(((y + yTileOfs) % 32) * 32) + ((x + xTileOfs) % 32);

					tileNum = LowLevelData.unsign(videoRam[tileNumAddress]);
					attributeData = LowLevelData.unsign(videoRam[tileNumAddress + 0x2000]);
				} else {
					tileNumAddress = bgStartAddress +
					(((y + yTileOfs) % 32) * 32) + ((x + xTileOfs) % 32);

					tileNum = 256 + videoRam[tileNumAddress];
					attributeData = LowLevelData.unsign(videoRam[tileNumAddress + 0x2000]);
				}

				int attribs = 0;

				if (dmgcpu.isGbcFeatures()) {

					if ((attributeData & 0x08) != 0) {
						vidMemAddr = 0x2000 + (tileNum << 4);
						tileNum += 384;
					} else {
						vidMemAddr = (tileNum << 4);
					}
					if ((attributeData & 0x20) != 0) {
						attribs |= TILE_FLIPX;
					}
					if ((attributeData & 0x40) != 0) {
						attribs |= TILE_FLIPY;
					}
					attribs += ((attributeData & 0x07) * 4);

				} else {
					vidMemAddr = (tileNum << 4);
					attribs = TILE_BKG;
				}


				if (tiles[tileNum].invalid(attribs)) {
					tiles[tileNum].validate(videoRam, vidMemAddr, attribs);
				}
				tiles[tileNum].
				draw(back, (8 * x) - xPixelOfs, (8 * y) - yPixelOfs, attribs);
			}
			//   System.out.print((8 * y) - yPixelOfs + " ");

		}



	}