Processor - aaronboult/emulator-8080 GitHub Wiki

Processor8080

A struct representing the Intel 8080 processor, as well as the memory it works with.

Fields

  • custom_registers: Vec<u16> - A method of representing any additional hardware that a given game may require, e.g. Space Invaders custom shift hardware
  • memory: Vec<u8> - The memory that the CPU operates on
  • interrupt_value: u8 - The value of the interrupt to be generated; 8x the interrupt value is the address to call upon interrupt generation
  • testing: bool - Used to determine if the processor is performing a diagnostic test or not; aimed at enabling debug hotkeys through SDL2
  • debug: bool - Whether or not to output debug information for each instruction
  • logger: std::boxed::Box<dyn std::io::Write> - The method of output to be used for logging; used in conjunction with the write!(...) macro

Methods

Contents


.generate_interrupt(...)

Declaration

pub fn generate_interrupt(&mut self)

Description

If interrupts are enabled, the processor pushes the program counter onto the stack and unconditionally jumps to the address at 8x the interrupt_value, then disables interrupts


.debug_output(...)

Declaration

pub fn debug_output(&mut self)

Description

Outputs debug information for the current instruction; disassembles the current instruction, displays register values, flag values, the byte the program counter points to as well as the next two bytes, the program counter's value and the stack pointers value. All data is written to the logger

⚠️ **GitHub.com Fallback** ⚠️