diff --git a/examples/web/index.css b/examples/web/index.css index 31f6533f372fd16b64435dfc0c076ff4d6a0a3c5..4f046ba50f59189f42c08b2263b348a5a084c5d5 100644 --- a/examples/web/index.css +++ b/examples/web/index.css @@ -26,7 +26,7 @@ html { body { color: #ffffff; - font-family: "VT323", "Robot", "Open Sans", Arial, Helvetica, sans-serif; + font-family: "VT323", "Roboto", "Open Sans", Arial, Helvetica, sans-serif; margin: 0px 0px 0px 0px; padding: 12px 12px 52px 12px; } diff --git a/examples/web/index.ts b/examples/web/index.ts index c25f67d196587ac0e9fce3a74f2d96dc25a000aa..8d4d0a3779367c8409648a9af5156443570e9958 100644 --- a/examples/web/index.ts +++ b/examples/web/index.ts @@ -49,7 +49,7 @@ const KEYS: Record<string, number> = { }; // @ts-ignore: ts(2580) -const ROM_PATH = require("../../res/roms/ld_r_r.gb"); +const ROM_PATH = require("../../res/roms/tetris.gb"); type State = { gameBoy: GameBoy; @@ -180,7 +180,7 @@ const main = async () => { await clearCanvas(undefined, { // @ts-ignore: ts(2580) image: require("./res/storm.png"), - imageScale: 0.4 + imageScale: 0.2 }); await wasm(); diff --git a/src/gb.rs b/src/gb.rs index 67bafdbc76e5dbede6fb053547e5898f090013ed..a70e2cfe869cd57ad7774973a559ac63b890ea6e 100644 --- a/src/gb.rs +++ b/src/gb.rs @@ -40,6 +40,10 @@ impl GameBoy { GameBoy { cpu: cpu } } + pub fn pc(&self) -> u16 { + self.cpu.pc() + } + pub fn clock(&mut self) -> u8 { let cycles = self.cpu_clock(); self.ppu_clock(cycles);