diff --git a/src/app/globals.css b/src/app/globals.css index 6b717ad..13eaaf6 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -7,13 +7,6 @@ --foreground: #171717; } -@media (prefers-color-scheme: dark) { - :root { - --background: #0a0a0a; - --foreground: #ededed; - } -} - body { color: var(--foreground); background: var(--background); diff --git a/src/app/ui/emulator.module.css b/src/app/ui/emulator.module.css index b13d63a..89d94f0 100644 --- a/src/app/ui/emulator.module.css +++ b/src/app/ui/emulator.module.css @@ -2,6 +2,11 @@ margin: 1em; } +.versionInfo { + position: absolute; + right: 10px; +} + .paper { margin: 5px; } diff --git a/src/components/emulator/emulator.tsx b/src/components/emulator/emulator.tsx index faafcb3..07bef10 100644 --- a/src/components/emulator/emulator.tsx +++ b/src/components/emulator/emulator.tsx @@ -1,13 +1,14 @@ "use client"; import { + AppBar, Breadcrumbs, Button, Card, FormControlLabel, Link, Paper, Switch, - TextField, + TextField, Toolbar, Tooltip, Typography } from "@mui/material"; @@ -245,9 +246,6 @@ export default function Emulator() { ] for(let step = 0; step < steps; step++) { - if(PC > 65535) - PC = PC - 65536; - if(PC < 0) PC = 65535 + PC + 1 @@ -425,6 +423,10 @@ export default function Emulator() { } PC = didJump ? PC : PC + 1; + + if(PC > 65535) { + PC = PC - 65536; + } } setReg_PC(PC); @@ -721,8 +723,6 @@ export default function Emulator() { const setRegisterSrcDest = (memoryAddr: number, reg: number, type: number) => { ram[memoryAddr] |= parseInt(('000' + reg.toString(2)).slice(-3).split("").reverse().join(""), 2) << (7 + type * 3); - - byteCount += 2; } const findRegisterTokenOffset = (i: number, token: number) => { @@ -797,7 +797,6 @@ export default function Emulator() { immVal = 65536 + immVal; ram[addr++] = immVal; - byteCount += 2; break; } @@ -825,7 +824,6 @@ export default function Emulator() { immVal = 65536 + immVal; ram[addr++] = immVal; - byteCount += 2; } error = false; @@ -862,6 +860,18 @@ export default function Emulator() { } return <> + + + + Hackerspace NTNU + Breadboard Computer + Emulator + + + {process.env.BUILD_VERSION ? "v" + process.env.BUILD_VERSION : "v1.081224a"} + + +