2023-08-31 23:16:38 +00:00
|
|
|
[workspace]
|
|
|
|
members = ["chirp-imgui", "chirp-minifb"]
|
|
|
|
# default-members = ["chirp-imgui"]
|
|
|
|
|
|
|
|
[workspace.package]
|
2023-04-15 03:20:30 +00:00
|
|
|
version = "0.1.1"
|
Initial commit:
Created outline of emulator:
The emulator has a Bus, which attaches a CPU to some Memory (Mapped Devices)
The design isn't particularly efficient, but the interpreter only needs to
run at ~500Hz or so. It's Rust. It can do that.
Instructions yet to be implemented:
Cxbb: "Store a random number, masked by bitmask bb, into vX"
Dxyn: "Draw an 8 by n sprite to the screen at coordinates (x, y)"
Fx0A: "Wait for a key, then set vX to the value of the pressed key"
Fx33: "BCD convert X, storing the results in &I[0..3]"
Thoughts going forward:
- It's probably a good idea to parse instructions out into an enum.
I had this in an earlier design, but it didn't really look that good.
However, I haven't read many other emulators before, so I don't know the
style people generally go for.
- I haven't used a native graphics library before, and my cg class was done
entirely in a web browser. That kinda sucks, honestly. Sure the skill
might transfer well, but, >JS
2023-03-08 12:07:33 +00:00
|
|
|
edition = "2021"
|
2023-03-27 23:30:31 +00:00
|
|
|
authors = ["John Breaux"]
|
|
|
|
license = "MIT"
|
2023-04-15 03:20:30 +00:00
|
|
|
publish = false
|
|
|
|
|
2023-08-31 23:16:38 +00:00
|
|
|
[package]
|
|
|
|
name = "chirp"
|
|
|
|
version.workspace = true
|
|
|
|
edition.workspace = true
|
|
|
|
authors.workspace = true
|
|
|
|
license.workspace = true
|
|
|
|
publish.workspace = true
|
|
|
|
|
2023-04-15 03:20:30 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "chirp"
|
|
|
|
path = "src/bin/chirp-minifb/main.rs"
|
|
|
|
required-features = ["minifb"]
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "chirp-disasm"
|
|
|
|
required-features = ["default"]
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "chirp-shot-viewer"
|
|
|
|
required-features = ["default", "drawille"]
|
|
|
|
|
2023-04-23 17:10:02 +00:00
|
|
|
[features]
|
2023-08-31 23:16:38 +00:00
|
|
|
default = ["drawille", "serde"]
|
2023-04-23 17:10:02 +00:00
|
|
|
nightly = []
|
|
|
|
drawille = ["dep:drawille"]
|
|
|
|
minifb = ["dep:minifb"]
|
|
|
|
rhexdump = ["dep:rhexdump"]
|
|
|
|
|
Initial commit:
Created outline of emulator:
The emulator has a Bus, which attaches a CPU to some Memory (Mapped Devices)
The design isn't particularly efficient, but the interpreter only needs to
run at ~500Hz or so. It's Rust. It can do that.
Instructions yet to be implemented:
Cxbb: "Store a random number, masked by bitmask bb, into vX"
Dxyn: "Draw an 8 by n sprite to the screen at coordinates (x, y)"
Fx0A: "Wait for a key, then set vX to the value of the pressed key"
Fx33: "BCD convert X, storing the results in &I[0..3]"
Thoughts going forward:
- It's probably a good idea to parse instructions out into an enum.
I had this in an earlier design, but it didn't really look that good.
However, I haven't read many other emulators before, so I don't know the
style people generally go for.
- I haven't used a native graphics library before, and my cg class was done
entirely in a web browser. That kinda sucks, honestly. Sure the skill
might transfer well, but, >JS
2023-03-08 12:07:33 +00:00
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
2023-03-25 23:17:55 +00:00
|
|
|
[profile.release]
|
tests: Coverage and cleanup/speedup
- Improved test coverage to >80% of lines, functions
- When doctests are included.
- Wrote new unit tests:
- Explicit tests for invalid instructions in the
ranges {`5xyn`, `8xyn`, `9xyn`, `Fxbb`}
- `rand` Tests for 1052671 cycles, to ensure
randomly generated number is < ANDed byte
- `Ex9E` (sek), `ExA1`(snek) will press only the expected key,
then every key except the expected key, for every address
- `Fx0A` (waitk) asserts based on the waveform of a keypress.
After all, an A press is an A press.
- Improved test performance by printing slightly less
- Removed nightly requirement
- (now optional, with feature = "unstable")
- Amended justfile to test with `cargo nextest` (nice)
- Changed release builds to optlevel 3
2023-03-28 12:33:17 +00:00
|
|
|
opt-level = 3
|
2023-03-25 23:17:55 +00:00
|
|
|
debug = false
|
|
|
|
rpath = false
|
|
|
|
lto = true
|
|
|
|
debug-assertions = false
|
|
|
|
codegen-units = 1
|
|
|
|
panic = 'unwind'
|
tests: Coverage and cleanup/speedup
- Improved test coverage to >80% of lines, functions
- When doctests are included.
- Wrote new unit tests:
- Explicit tests for invalid instructions in the
ranges {`5xyn`, `8xyn`, `9xyn`, `Fxbb`}
- `rand` Tests for 1052671 cycles, to ensure
randomly generated number is < ANDed byte
- `Ex9E` (sek), `ExA1`(snek) will press only the expected key,
then every key except the expected key, for every address
- `Fx0A` (waitk) asserts based on the waveform of a keypress.
After all, an A press is an A press.
- Improved test performance by printing slightly less
- Removed nightly requirement
- (now optional, with feature = "unstable")
- Amended justfile to test with `cargo nextest` (nice)
- Changed release builds to optlevel 3
2023-03-28 12:33:17 +00:00
|
|
|
incremental = false
|
2023-03-25 23:17:55 +00:00
|
|
|
overflow-checks = false
|
|
|
|
|
Initial commit:
Created outline of emulator:
The emulator has a Bus, which attaches a CPU to some Memory (Mapped Devices)
The design isn't particularly efficient, but the interpreter only needs to
run at ~500Hz or so. It's Rust. It can do that.
Instructions yet to be implemented:
Cxbb: "Store a random number, masked by bitmask bb, into vX"
Dxyn: "Draw an 8 by n sprite to the screen at coordinates (x, y)"
Fx0A: "Wait for a key, then set vX to the value of the pressed key"
Fx33: "BCD convert X, storing the results in &I[0..3]"
Thoughts going forward:
- It's probably a good idea to parse instructions out into an enum.
I had this in an earlier design, but it didn't really look that good.
However, I haven't read many other emulators before, so I don't know the
style people generally go for.
- I haven't used a native graphics library before, and my cg class was done
entirely in a web browser. That kinda sucks, honestly. Sure the skill
might transfer well, but, >JS
2023-03-08 12:07:33 +00:00
|
|
|
|
|
|
|
[dependencies]
|
2023-04-15 01:58:28 +00:00
|
|
|
|
2023-04-23 17:10:02 +00:00
|
|
|
drawille = { version = "0.3.0", optional = true }
|
|
|
|
rhexdump = { version = "0.1.1", optional = true }
|
|
|
|
serde = { version = "1.0.0", features = ["derive"], optional = true }
|
|
|
|
minifb = { version = "0.24.0", optional = true }
|
|
|
|
|
|
|
|
gumdrop = "0.8.1"
|
2023-03-30 07:12:03 +00:00
|
|
|
imperative-rs = "0.3.1"
|
2023-04-23 17:10:02 +00:00
|
|
|
owo-colors = "3"
|
|
|
|
rand = "0.8.5"
|
|
|
|
thiserror = "1.0.39"
|