mirror of
https://github.com/mre/mos6502.git
synced 2024-12-23 03:29:51 +00:00
Shuffle things around a little. For now a library called machine6502 will be the main code base. 6502-rs is inconvenient to use in a rust context since it starts with a number. The test_exe is no longer the main cargo build target
This commit is contained in:
parent
b22b36bc2a
commit
0b2c805a96
2
.gitignore
vendored
2
.gitignore
vendored
@ -56,7 +56,7 @@ Cargo.lock
|
||||
/*-*-*/
|
||||
/Makefile
|
||||
/doc
|
||||
/target/
|
||||
target/
|
||||
/test/
|
||||
/tmp/
|
||||
TAGS
|
||||
|
11
Cargo.toml
11
Cargo.toml
@ -27,14 +27,11 @@
|
||||
|
||||
[package]
|
||||
|
||||
name = "6502-rs"
|
||||
name = "machine6502"
|
||||
version = "0.0.1"
|
||||
authors = ["The 6502-rs Developers"]
|
||||
|
||||
[[bin]]
|
||||
name = "6502-rs"
|
||||
path = "src/exe/main.rs"
|
||||
|
||||
[dependencies.defs6502]
|
||||
path="src/defs6502"
|
||||
[lib]
|
||||
name = "machine6502"
|
||||
path = "src/machine6502/lib.rs"
|
||||
|
||||
|
@ -25,15 +25,5 @@
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
pub use machine::ProcessorStatus;
|
||||
pub use machine::Machine;
|
||||
pub use machine::StackPointer;
|
||||
pub use machine::STACK_POINTER_IN_MEMORY_LO;
|
||||
pub use machine::STACK_POINTER_IN_MEMORY_HI;
|
||||
pub use machine::MemoryAddr;
|
||||
pub use machine::stack_pointer_to_addr;
|
||||
pub use machine::Instruction;
|
||||
pub use machine::AddressingMode;
|
||||
|
||||
mod machine;
|
||||
pub mod machine;
|
||||
|
@ -50,18 +50,26 @@ pub bitflags! {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub struct Machine {
|
||||
A : u8,
|
||||
X : u8,
|
||||
Y : u8,
|
||||
SP : u8,
|
||||
P : ProcessorStatus,
|
||||
PC : u16,
|
||||
pub A : u8,
|
||||
pub X : u8,
|
||||
pub Y : u8,
|
||||
pub SP : u8,
|
||||
pub P : ProcessorStatus,
|
||||
pub PC : u16,
|
||||
}
|
||||
|
||||
impl Machine {
|
||||
pub fn new() -> Machine {
|
||||
Machine { A: 0, X: 0, Y: 0, SP: 0, P: ProcessorStatus::empty(), PC: 0 }
|
||||
Machine {
|
||||
A: 0,
|
||||
X: 0,
|
||||
Y: 0,
|
||||
SP: 0,
|
||||
P: ProcessorStatus::empty(),
|
||||
PC: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,11 +26,14 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
[package]
|
||||
name = "defs6502"
|
||||
name = "test_exe"
|
||||
version = "0.0.1"
|
||||
authors = [ "The 6502-rs Developers" ]
|
||||
|
||||
[lib]
|
||||
name = "defs6502"
|
||||
path = "lib.rs"
|
||||
[[bin]]
|
||||
name = "test_exe"
|
||||
path = "main.rs"
|
||||
|
||||
[dependencies.machine6502]
|
||||
path="../../"
|
||||
|
@ -25,9 +25,9 @@
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
extern crate defs6502;
|
||||
extern crate machine6502;
|
||||
|
||||
use defs6502::Machine;
|
||||
use machine6502::machine::Machine;
|
||||
|
||||
fn main() {
|
||||
let _q = Machine::new();
|
Loading…
Reference in New Issue
Block a user