From f9902e39cf85214617650c30cee0ac00bd2e16c8 Mon Sep 17 00:00:00 2001 From: Ross Andrews Date: Mon, 6 Jun 2022 23:08:55 -0500 Subject: [PATCH] Renamed vasm to vasm_core --- .idea/vulcan-emu.iml | 2 +- Cargo.toml | 2 +- {vasm => vasm_core}/Cargo.toml | 0 {vasm => vasm_core}/src/ast.rs | 0 {vasm => vasm_core}/src/lib.rs | 0 {vasm => vasm_core}/src/parse_error.rs | 0 {vasm => vasm_core}/src/vasm.pest | 0 {vasm => vasm_core}/src/vasm_assembler.rs | 0 {vasm => vasm_core}/src/vasm_evaluator.rs | 0 {vasm => vasm_core}/src/vasm_parser.rs | 0 {vasm => vasm_core}/src/vasm_preprocessor.rs | 0 vemu/Cargo.toml | 2 +- vemu/src/main.rs | 9 +++++---- vtest/Cargo.toml | 2 +- 14 files changed, 9 insertions(+), 8 deletions(-) rename {vasm => vasm_core}/Cargo.toml (100%) rename {vasm => vasm_core}/src/ast.rs (100%) rename {vasm => vasm_core}/src/lib.rs (100%) rename {vasm => vasm_core}/src/parse_error.rs (100%) rename {vasm => vasm_core}/src/vasm.pest (100%) rename {vasm => vasm_core}/src/vasm_assembler.rs (100%) rename {vasm => vasm_core}/src/vasm_evaluator.rs (100%) rename {vasm => vasm_core}/src/vasm_parser.rs (100%) rename {vasm => vasm_core}/src/vasm_preprocessor.rs (100%) diff --git a/.idea/vulcan-emu.iml b/.idea/vulcan-emu.iml index 6279895..cd90ee6 100644 --- a/.idea/vulcan-emu.iml +++ b/.idea/vulcan-emu.iml @@ -5,9 +5,9 @@ - + diff --git a/Cargo.toml b/Cargo.toml index a13218a..c22e198 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = [ "vcore", "vemu", - "vasm", + "vasm_core", "vtest", "vlua" ] \ No newline at end of file diff --git a/vasm/Cargo.toml b/vasm_core/Cargo.toml similarity index 100% rename from vasm/Cargo.toml rename to vasm_core/Cargo.toml diff --git a/vasm/src/ast.rs b/vasm_core/src/ast.rs similarity index 100% rename from vasm/src/ast.rs rename to vasm_core/src/ast.rs diff --git a/vasm/src/lib.rs b/vasm_core/src/lib.rs similarity index 100% rename from vasm/src/lib.rs rename to vasm_core/src/lib.rs diff --git a/vasm/src/parse_error.rs b/vasm_core/src/parse_error.rs similarity index 100% rename from vasm/src/parse_error.rs rename to vasm_core/src/parse_error.rs diff --git a/vasm/src/vasm.pest b/vasm_core/src/vasm.pest similarity index 100% rename from vasm/src/vasm.pest rename to vasm_core/src/vasm.pest diff --git a/vasm/src/vasm_assembler.rs b/vasm_core/src/vasm_assembler.rs similarity index 100% rename from vasm/src/vasm_assembler.rs rename to vasm_core/src/vasm_assembler.rs diff --git a/vasm/src/vasm_evaluator.rs b/vasm_core/src/vasm_evaluator.rs similarity index 100% rename from vasm/src/vasm_evaluator.rs rename to vasm_core/src/vasm_evaluator.rs diff --git a/vasm/src/vasm_parser.rs b/vasm_core/src/vasm_parser.rs similarity index 100% rename from vasm/src/vasm_parser.rs rename to vasm_core/src/vasm_parser.rs diff --git a/vasm/src/vasm_preprocessor.rs b/vasm_core/src/vasm_preprocessor.rs similarity index 100% rename from vasm/src/vasm_preprocessor.rs rename to vasm_core/src/vasm_preprocessor.rs diff --git a/vemu/Cargo.toml b/vemu/Cargo.toml index 4c83198..be66e24 100644 --- a/vemu/Cargo.toml +++ b/vemu/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] vcore = { path = "../vcore" } -vasm = { path = "../vasm" } +vasm = { path = "../vasm_core" } rand = "0.8.0" winit = "0.26.1" pixels = "0.9.0" \ No newline at end of file diff --git a/vemu/src/main.rs b/vemu/src/main.rs index 950ae86..2c52767 100644 --- a/vemu/src/main.rs +++ b/vemu/src/main.rs @@ -45,11 +45,12 @@ fn main() { let memory = Memory::from(rng); let mut cpu = CPU::new(memory); display::reset(&mut cpu); - // let code = assemble_snippet(include_str!("typewriter.asm").lines().map(String::from)).expect("Assemble error"); + let code = assemble_snippet(include_str!("typewriter.asm").lines().map(String::from)) + .expect("Assemble error"); // let code = assemble_file("init.asm").expect("Assemble error"); - let mut file = File::open("4th.rom").expect("ROM not found"); - let mut code = Vec::new(); - file.read_to_end(&mut code).expect("Couldn't read ROM"); + // let mut file = File::open("4th.rom").expect("ROM not found"); + // let mut code = Vec::new(); + // file.read_to_end(&mut code).expect("Couldn't read ROM"); println!("ROM size: {} bytes", code.len()); cpu.poke_slice(0x400.into(), code.as_slice()); cpu.start(); diff --git a/vtest/Cargo.toml b/vtest/Cargo.toml index ca8e2fc..7592f18 100644 --- a/vtest/Cargo.toml +++ b/vtest/Cargo.toml @@ -7,4 +7,4 @@ edition = "2021" [dependencies] vcore = { path = "../vcore" } -vasm = { path = "../vasm" } \ No newline at end of file +vasm = { path = "../vasm_core" } \ No newline at end of file