Skip to content
Snippets Groups Projects
Verified Commit 34bde6ca authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

feat: small set of fixes

parent c2e969f3
No related branches found
No related tags found
1 merge request!2Initial web version of boytacean
...@@ -26,7 +26,7 @@ html { ...@@ -26,7 +26,7 @@ html {
body { body {
color: #ffffff; 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; margin: 0px 0px 0px 0px;
padding: 12px 12px 52px 12px; padding: 12px 12px 52px 12px;
} }
......
...@@ -49,7 +49,7 @@ const KEYS: Record<string, number> = { ...@@ -49,7 +49,7 @@ const KEYS: Record<string, number> = {
}; };
// @ts-ignore: ts(2580) // @ts-ignore: ts(2580)
const ROM_PATH = require("../../res/roms/ld_r_r.gb"); const ROM_PATH = require("../../res/roms/tetris.gb");
type State = { type State = {
gameBoy: GameBoy; gameBoy: GameBoy;
...@@ -180,7 +180,7 @@ const main = async () => { ...@@ -180,7 +180,7 @@ const main = async () => {
await clearCanvas(undefined, { await clearCanvas(undefined, {
// @ts-ignore: ts(2580) // @ts-ignore: ts(2580)
image: require("./res/storm.png"), image: require("./res/storm.png"),
imageScale: 0.4 imageScale: 0.2
}); });
await wasm(); await wasm();
......
...@@ -40,6 +40,10 @@ impl GameBoy { ...@@ -40,6 +40,10 @@ impl GameBoy {
GameBoy { cpu: cpu } GameBoy { cpu: cpu }
} }
pub fn pc(&self) -> u16 {
self.cpu.pc()
}
pub fn clock(&mut self) -> u8 { pub fn clock(&mut self) -> u8 {
let cycles = self.cpu_clock(); let cycles = self.cpu_clock();
self.ppu_clock(cycles); self.ppu_clock(cycles);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment