Ver a proveniência

added some comments

master
Isabelle L. há 5 anos
ascendente
cometimento
e49ac92835
5 ficheiros alterados com 15 adições e 5 eliminações
  1. +1
    -1
      Cargo.toml
  2. +6
    -4
      README.md
  3. +5
    -0
      ceres-sys/src/lib.rs
  4. +1
    -0
      ceres-sys/src/memory.rs
  5. +2
    -0
      ceres-sys/src/video.rs

+ 1
- 1
Cargo.toml Ver ficheiro

@@ -12,5 +12,5 @@ ceres-sys = { path = "ceres-sys" }

[workspace]
members = [
"ceres-sys"
"ceres-sys",
]

+ 6
- 4
README.md Ver ficheiro

@@ -1,9 +1,11 @@
# Ceres
a shitty fantasy console written in rust using a proprietary MIPS based asm instruction set. a bit of inspiration from PICO-8
# CERES-16
a shitty fantasy console written in rust using a proprietary MIPS based asm instruction set. a lot of inspiration from PICO-8. ceres is structured of these crates:

### GRAPHICS
- ceres-sys: the core system structure of ceres-16

uhhhhh funny 256x144 screen
### Graphics

ceres uses a 256x144 screen with a separate video buffer from the standard memory. colors are 16-bit structured like `0b0000_rrrr_gggg_bbbb` where the first four bits are ignored. the video buffer is structured row major where each u16 is an individual pixel

### Register layout and info



+ 5
- 0
ceres-sys/src/lib.rs Ver ficheiro

@@ -6,10 +6,14 @@ pub use memory::Memory;
pub use registers::Registers;
pub use video::VideoMemory;

/// ceres screen width
pub const SCREEN_WIDTH: usize = 256;
/// ceres screen height
pub const SCREEN_HEIGHT: usize = 144;
/// ceres video memory buffer length
pub const VIDEO_MEMORY_LEN: usize = SCREEN_HEIGHT * SCREEN_WIDTH;

/// the core system structure of ceres
pub struct System {
pub registers: Registers,
pub memory: Memory,
@@ -17,6 +21,7 @@ pub struct System {
}

impl System {
/// initialize a new system and all of it's component parts
pub fn init() -> System {
System {
registers: Registers::init(),


+ 1
- 0
ceres-sys/src/memory.rs Ver ficheiro

@@ -4,6 +4,7 @@ pub struct Memory {
}

impl Memory {
/// initialize the main memory buffer
pub fn init() -> Memory {
Memory { data: [0x00; std::u16::MAX as usize] }
}


+ 2
- 0
ceres-sys/src/video.rs Ver ficheiro

@@ -1,8 +1,10 @@
/// video memory
pub struct VideoMemory {
data: [u16; crate::VIDEO_MEMORY_LEN],
}

impl VideoMemory {
/// initialize the video memory
pub fn init() -> VideoMemory {
VideoMemory { data: [0x0000; crate::VIDEO_MEMORY_LEN] }
}


Carregando…
Cancelar
Guardar