private void DrawTile(int tile, Bitmap img, int x, int y, int zoom) { int vram = tile * SNESGraphics.bytesPerTile[bpp]; int cgram = pal * SNESGraphics.colorsPerPalette[bpp]; SNESGraphics.Draw8x8Tile(vram, bpp, false, false, cgram, img, x, y, zoom, 0); }
private void DrawTile(int tile, bool h, bool v, int c, Bitmap img, int x, int y, int zoom, int t) { int nameBase = 0xE000 & ((Data.GetPPUReg(0x01) & 0x7) << 14); int nameOffset = 0x6000 & ((Data.GetPPUReg(0x01) & 0x18) << 10); int tileOffset = tile * 0x20; int vram = 0xFFFF & (nameBase + (tile >= 0x100 ? nameOffset : 0) + tileOffset); int cgram = 0x80 + 0x10 * c; SNESGraphics.Draw8x8Tile(vram, 1, h, v, cgram, img, x, y, zoom, t); }
private void DrawTile(int tile, bool h, bool v, int c, Bitmap img, int x, int y, int zoom, int t) { int bg = bgOfInterest - 1; int mode = Data.GetPPUReg(0x05) & 0x7; int bpp = BGBitDepths[mode, bg]; if (bpp >= 0) { if (bpp == 3) { int vram = 0x80 * tile; SNESGraphics.Draw8x8Tile(vram, bpp, h, v, 0, img, x, y, zoom, t); } else { int nameBase = 0xE000 & (Data.GetPPUReg(0x0B + (bg / 2)) << (((bg & 1) == 0) ? 13 : 9)); int tileOffset = tile * SNESGraphics.bytesPerTile[bpp]; int vram = nameBase + tileOffset; int cgram = (mode == 0 ? (c + 8 * bg) : (bpp <= 1 ? c : 0)) * SNESGraphics.colorsPerPalette[bpp]; SNESGraphics.Draw8x8Tile(vram, bpp, h, v, cgram, img, x, y, zoom, t); } } }