fix font character instruction
This commit is contained in:
parent
ca97cb7de8
commit
7001bb747d
2 changed files with 5 additions and 5 deletions
|
@ -76,7 +76,7 @@ impl Display for RatatuiDisplay {
|
|||
.title("Chip8 Emulator by nuculabs.dev")
|
||||
.borders(Borders::ALL),
|
||||
)
|
||||
.marker(Marker::HalfBlock)
|
||||
.marker(Marker::Braille)
|
||||
.paint(|ctx| {
|
||||
for row in 0..DISPLAY_HEIGHT {
|
||||
for column in 0..DISPLAY_WIDTH {
|
||||
|
|
|
@ -365,7 +365,7 @@ where
|
|||
}
|
||||
}
|
||||
ProcessorInstruction::FontCharacter(vx) => {
|
||||
self.index_register = 0xF0 + (self.registers[vx as usize] & 0x0F) as u16;
|
||||
self.index_register = 0xF0 + (self.registers[vx as usize] as u16) * 5u16;
|
||||
}
|
||||
ProcessorInstruction::BinaryCodedDecimalConversion(vx) => {
|
||||
let number = self.registers[vx as usize];
|
||||
|
@ -386,13 +386,13 @@ where
|
|||
}
|
||||
}
|
||||
ProcessorInstruction::GetKeyBlocking(_vx) => {
|
||||
todo!("must implement")
|
||||
//todo!("must implement")
|
||||
}
|
||||
ProcessorInstruction::SkipIfKeyIsPressed(_vx) => {
|
||||
todo!("must implement")
|
||||
//todo!("must implement")
|
||||
}
|
||||
ProcessorInstruction::SkipIfKeyIsNotPressed(_vx) => {
|
||||
todo!("must implement")
|
||||
//todo!("must implement")
|
||||
}
|
||||
_ => {
|
||||
warn!("Unknown instruction: {:04x}, skipping.", instruction);
|
||||
|
|
Loading…
Reference in a new issue