Skip to content

Commit

Permalink
tui: Add TODO about centering disassembler view around program counter
Browse files Browse the repository at this point in the history
  • Loading branch information
Granddave committed Jan 3, 2024
1 parent c4e7676 commit 4880ccc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ Here we see `0x0a`, which in decimal is `10` just we intended!
- `.word $8000`
- `#"A"`
- **Emulator**
- Graphical state for the emulator
- Peripherals - I/O would be fun to have...
- Decimal mode
- Stack overflow detection
Expand All @@ -123,7 +122,7 @@ Here we see `0x0a`, which in decimal is `10` just we intended!
- Memory view
- Stack
- Scrollable area
- disassembler view
- Centered disassembler view


## References
Expand Down
2 changes: 2 additions & 0 deletions src/emulator/tui/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ fn disassembly(app: &mut App) -> Paragraph {

lines.push(Line::raw(" Addr Hexdump Instruction"));

// TODO: Center around program counter.
// Would be possible to disassemble the memory instead of the loaded program
let pc = app.state().pc.get() as usize;
let mut addr = app.program_start as usize;
for (_, node) in app.disassembled_program.iter().enumerate() {
Expand Down

0 comments on commit 4880ccc

Please sign in to comment.