Update copyright notices

This commit is contained in:
John 2023-04-23 11:58:57 -05:00
parent 3839e90b15
commit 92dc899510
14 changed files with 32 additions and 10 deletions

View File

@ -1,3 +1,6 @@
# (c) 2023 John A. Breaux
# This code is licensed under MIT license (see LICENSE for details)
# Some common commands for working on this stuff
# Run All Tests

View File

@ -1,5 +1,5 @@
// (c) 2023 John A. Breaux
// This code is licensed under MIT license (see LICENSE.txt for details)
// This code is licensed under MIT license (see LICENSE for details)
//! Chirp: A chip-8 interpreter in Rust
//! Hello, world!

View File

@ -1,5 +1,5 @@
// (c) 2023 John A. Breaux
// This code is licensed under MIT license (see LICENSE.txt for details)
// This code is licensed under MIT license (see LICENSE for details)
#![allow(missing_docs)]
//! Platform-specific IO/UI code, and some debug functionality.
//! TODO: Destroy this all.

View File

@ -1,5 +1,5 @@
// (c) 2023 John A. Breaux
// This code is licensed under MIT license (see LICENSE.txt for details)
// This code is licensed under MIT license (see LICENSE for details)
//! Decodes and runs instructions

View File

@ -1,5 +1,5 @@
// (c) 2023 John A. Breaux
// This code is licensed under MIT license (see LICENSE.txt for details)
// This code is licensed under MIT license (see LICENSE for details)
//! The Bus connects the CPU to Memory
//!

View File

@ -1,5 +1,5 @@
// (c) 2023 John A. Breaux
// This code is licensed under MIT license (see LICENSE.txt for details)
// This code is licensed under MIT license (see LICENSE for details)
//! Trait for getting a generic integer for a structure.

View File

@ -1,9 +1,13 @@
// (c) 2023 John A. Breaux
// This code is licensed under MIT license (see LICENSE for details)
//! Represents [Flags] that aid in implementation but aren't a part of the Chip-8 spec
use super::{Mode, Quirks};
/// Represents flags that aid in implementation but aren't a part of the Chip-8 spec
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Flags {
/// Set when debug (live disassembly) mode enabled
pub debug: bool,

View File

@ -1,3 +1,6 @@
// (c) 2023 John A. Breaux
// This code is licensed under MIT license (see LICENSE for details)
//! Selects the memory behavior of the [super::CPU]
//!
//! Since [Quirks] implements [`From<Mode>`],
@ -8,7 +11,8 @@ use crate::error::Error;
use std::str::FromStr;
/// Selects the memory behavior of the interpreter
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Mode {
/// VIP emulation mode
#[default]

View File

@ -1,9 +1,13 @@
// (c) 2023 John A. Breaux
// This code is licensed under MIT license (see LICENSE for details)
//! Controls the [Quirks] behavior of the CPU on a granular level.
/// Controls the quirk behavior of the CPU on a granular level.
///
/// `false` is Cosmac-VIP-like behavior
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Quirks {
/// Super Chip: Binary ops in `8xy`(`1`, `2`, `3`) shouldn't set vF to 0
pub bin_ops: bool,

View File

@ -1,5 +1,5 @@
// (c) 2023 John A. Breaux
// This code is licensed under MIT license (see LICENSE.txt for details)
// This code is licensed under MIT license (see LICENSE for details)
//! Unit tests for [super::CPU]
//!

View File

@ -1,5 +1,5 @@
// (c) 2023 John A. Breaux
// This code is licensed under MIT license (see LICENSE.txt for details)
// This code is licensed under MIT license (see LICENSE for details)
//! Error type for Chirp

View File

@ -1,6 +1,6 @@
// (c) 2023 John A. Breaux
// This code is licensed under MIT license (see LICENSE.txt for details)
#![cfg_attr(feature = "unstable", feature(no_coverage))]
// This code is licensed under MIT license (see LICENSE for details)
#![cfg_attr(feature = "nightly", feature(no_coverage))]
#![deny(missing_docs, clippy::all)]
//! This crate implements a Chip-8 interpreter as if it were a real CPU architecture,
//! to the best of my current knowledge. As it's the first emulator project I've

View File

@ -1,3 +1,7 @@
// (c) 2023 John A. Breaux
// This code is licensed under MIT license (see LICENSE for details)
// When compiled, the resulting binary is licensed under version 3 of the GNU General Public License (see chip8-test-suite/LICENSE for details)
//! These are a series of interpreter tests using Timendus's incredible test suite
pub use chirp::*;

View File

@ -3,6 +3,7 @@ use chirp::*;
use std::{collections::hash_map::DefaultHasher, hash::Hash};
#[test]
#[allow(clippy::redundant_clone)]
fn chip8() {
let ch8 = Chip8::default(); // Default
let ch82 = ch8.clone(); // Clone
@ -125,6 +126,7 @@ mod cpu {
use super::*;
//#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[test]
#[allow(clippy::redundant_clone)]
fn clone() {
let cf1 = Flags {
debug: false,
@ -259,6 +261,7 @@ mod quirks {
dma_inc: true,
stupid_jumps: false,
};
#[allow(clippy::clone_on_copy)]
let q2 = q1.clone();
assert_eq!(q1, q2);
}