PZ80emu  0.1
Functions
z80.c File Reference
#include "../config.h"
#include <err.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include "display.h"
#include "interpreter.h"
#include "z80.h"
Include dependency graph for z80.c:

Functions

struct z80new_cpu (void)
 
void reset_cpu (struct z80 *cpu)
 
int run (struct z80 *cpu, uint8_t *memory, long runcycles, bool s_flag)
 

Detailed Description

Author
Peter H. Ezetta
Date
2015-05-03

Function Documentation

◆ new_cpu()

struct z80* new_cpu ( void  )

Fills out a new z80 CPU struct

Returns
A z80 struct

◆ reset_cpu()

void reset_cpu ( struct z80 cpu)

Triggers the reset state on the z80 CPU

Parameters
cpuA z80 struct to reset.

◆ run()

int run ( struct z80 cpu,
uint8_t *  memory,
long  runcycles,
bool  s_flag 
)

Runs the cpu

Parameters
cpuA z80 cpu struct to run.
memoryAn allocated block of memory to pass to the cpu.
runcyclesThe number of clock cycles to run the cpu.
s_flagEnable running in step mode
Returns
Count of cycles executed.
Here is the call graph for this function: