PZ80emu  0.1
Functions
display.c File Reference

display functions for curses management and displaying system info More...

#include <stdint.h>
#include <ncurses.h>
#include "z80.h"
#include "display.h"
#include "utils.h"
Include dependency graph for display.c:

Functions

void curses_display_mem (WINDOW *win, uint8_t *memory)
 display the contents of a block of memory to a curses window More...
 
void curses_display_registers (WINDOW *win, struct z80 *cpu)
 display the current register state to a curses window More...
 
WINDOW * create_newwin (int height, int width, int starty, int startx)
 creates a new curses window More...
 
void create_newscreen (int main_row, int main_col)
 creates a new curses screen More...
 
void display_mem (uint8_t *memory)
 display the current memory contents to STDOUT More...
 
void display_registers (struct z80 *cpu)
 display the current register state to STDOUT More...
 
void display_bus (struct bus *bus)
 

Detailed Description

display functions for curses management and displaying system info

Author
Peter H. Ezetta
Date
2015-05-03

Function Documentation

◆ create_newscreen()

void create_newscreen ( int  main_row,
int  main_col 
)

creates a new curses screen

Parameters
main_rowThe starting row for the new screen
main_colThe starting column for the new screen

◆ create_newwin()

WINDOW* create_newwin ( int  height,
int  width,
int  starty,
int  startx 
)

creates a new curses window

Parameters
heightThe height of the window.
widthThe width of the window.
startyThe starting y coordinate for the new window.
startxThe starting x coordinate for the new window.
Returns
curses WINDOW
Todo:
check return value of box()
Todo:
check return value of wrefresh()

◆ curses_display_mem()

void curses_display_mem ( WINDOW *  win,
uint8_t *  memory 
)

display the contents of a block of memory to a curses window

Parameters
winThe curses window in which to display memory.
memoryA pointer to the block of memory to display
Todo:
check mvwprintw() return status
Todo:
check wprintw() return statuses
Todo:
check wrefresh() return status

◆ curses_display_registers()

void curses_display_registers ( WINDOW *  win,
struct z80 cpu 
)

display the current register state to a curses window

Parameters
winThe curses window in which to display register state.
cpuA pointer to a z80 cpu struct for which to display registers.
Todo:
check return status of mvwprintw()
Todo:
check return status of wrefresh()

◆ display_mem()

void display_mem ( uint8_t *  memory)

display the current memory contents to STDOUT

Parameters
memorypointer to a memory for which to display registers.
Todo:
check return of printf()

◆ display_registers()

void display_registers ( struct z80 cpu)

display the current register state to STDOUT

Parameters
cpuA pointer to a z80 cpu struct for which to display registers.