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

Functions

static long memory_load (void *self, const char *filename)
 
static void memory_free (void *self)
 
struct memorymemory_new (void)
 

Detailed Description

Author
Peter H. Ezetta
Date
2015-05-03

Function Documentation

◆ memory_free()

static void memory_free ( void *  self)
static

Frees an allocated memory object

Parameters
selfmemory object to free
Here is the call graph for this function:

◆ memory_load()

static long memory_load ( void *  self,
const char *  filename 
)
static

Loads the contents of a ROM file into memory

Parameters
filenameString containing the filename of the ROM image.
selfPointer to the block of RAM to load the ROM into.
Returns
Number of bytes loaded into RAM.
Here is the call graph for this function:

◆ memory_new()

struct memory* memory_new ( void  )

Allocates a block of RAM of size MEMSIZE

Returns
Pointer to allocated block of RAM.
Here is the call graph for this function: