// 160 x 144 /* void renderTiles() * { * this.tileset.forEach((v1, i1) => * { * v1.forEach((v2, i2) => * { * v2.forEach((pixel, i3) => * { * if (pixel == undefined) return; * * var WIDTH = 256; * * var x = ((i1 * 8) + i3) % WIDTH; * var row = Math.floor(((i1 * 8) + i3) / WIDTH); * var y = i2 + (row * 8); * * var c = colors[this.bgPaletteData.shades[pixel]]; * * this.imageTilesetArr[4 * ((y * WIDTH) + x) + 0] = c[0]; * this.imageTilesetArr[4 * ((y * WIDTH) + x) + 1] = c[1]; * this.imageTilesetArr[4 * ((y * WIDTH) + x) + 2] = c[2]; * this.imageTilesetArr[4 * ((y * WIDTH) + x) + 3] = 0xFF; // 100% alpha * }); * }); * }); * } */ public GPU(GameBoy gb) { this.gb = gb; }
public ExternalBus(GameBoy gb) { this.gb = gb; this.mbc = new NullMBC(this); }