Prepare for migration to iced
This commit is contained in:
parent
b7c3e3113d
commit
9195d439e3
1918
Cargo.lock
generated
1918
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,7 @@ license = "MIT"
|
||||
[features]
|
||||
default = ["unstable"]
|
||||
unstable = []
|
||||
iced = ["dep:iced"]
|
||||
rhexdump = ["dep:rhexdump"]
|
||||
serde = ["dep:serde"]
|
||||
|
||||
@ -26,6 +27,7 @@ overflow-checks = false
|
||||
|
||||
[dependencies]
|
||||
gumdrop = "^0.8.1"
|
||||
iced = {version = "0.8.0", optional = true}
|
||||
minifb = { version = "^0.24.0", features = ["wayland"] }
|
||||
owo-colors = "^3"
|
||||
rand = "^0.8.5"
|
||||
|
26
src/bin/chirp-iced.rs
Normal file
26
src/bin/chirp-iced.rs
Normal file
@ -0,0 +1,26 @@
|
||||
#![allow(unused_imports)]
|
||||
use chirp::prelude::*;
|
||||
#[cfg(features = "iced")]
|
||||
use iced::{
|
||||
executor, time, window, Alignment, Application, Command, Element, Length, Settings,
|
||||
Subscription,
|
||||
};
|
||||
|
||||
#[cfg(features = "iced")]
|
||||
fn main() -> iced::Result {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(not(features = "iced"))]
|
||||
fn main() -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// TODO: `impl Application for Emulator {}`
|
||||
#[derive(Clone, Debug, Default, PartialEq)]
|
||||
struct Emulator {
|
||||
mem: Bus,
|
||||
cpu: CPU,
|
||||
fps: f64,
|
||||
ipf: usize,
|
||||
}
|
@ -91,7 +91,7 @@ impl State {
|
||||
ch8: Chip8 {
|
||||
bus: bus! {
|
||||
// Load the charset into ROM
|
||||
Charset [0x0050..0x00A0] = include_bytes!("mem/charset.bin"),
|
||||
Charset [0x0050..0x00A0] = include_bytes!("../mem/charset.bin"),
|
||||
// Load the ROM file into RAM
|
||||
Program [0x0200..0x1000] = &read(&options.file)?,
|
||||
// Create a screen
|
Loading…
Reference in New Issue
Block a user