Memory management is done in this file. It controls shared acces to the memory structure via the CRITICAL_SECTION synchronization primitive. In trouble you can also uncomment the define DEBUG directive. It will create an out.txt file in which all accesses into memory will be written (except 0xA000 - 0xD000, but you can comment this)
Definition in file mem.c.#include "mem.h"
#include <memory.h>
#include <windows.h>
#include <stdio.h>
Go to the source code of this file.
Functions | |
unsigned char | memgetb (UINT adr) |
memory reading function | |
void | memsetb (UINT adr, unsigned char bset) |
memory writing function | |
void | InitMem () |
Zeroes memio and initializes CSMemory. | |
void | SetIOFunc (pIOFunc piof, UINT loadr, UINT hiadr) |
Binds given io function to range of adresses. | |
void | SetMemory (char *buf) |
Fills memory with given data. | |
Variables | |
unsigned char | memory [MEMSIZE+4] |
Variable containing accessible memory +4 as pillow. | |
pIOFunc | memio [IOHI-IOLO+1] |
IO part of memory. | |
CRITICAL_SECTION | CSMemory |
A synchronization primitive used for shared acces to memory. |
|
Zeroes memio and initializes CSMemory.
|
|
memory reading function
Calls iofunc when neccesary
|
|
memory writing function
Calls iofunc when neccesary
|
|
Binds given io function to range of adresses.
|
|
Fills memory with given data.
|
|
A synchronization primitive used for shared acces to memory.
|
|
IO part of memory.
Containins pointers to io functions of devices mapped into the io part of memory.
|
|
Variable containing accessible memory +4 as pillow.
|