MMU Class Reference

`#include <mmu.h>`

Inheritance diagram for MMU:

## Public Member Functions

| MMU (EventContext *context, IOBank *ioBank)
void | reset ()
void | setRoms (const uint8_t *kernal, const uint8_t *basic, const uint8_t *character)
uint8_t | readMemByte (uint_least16_t addr)
uint_least16_t | readMemWord (uint_least16_t addr)
void | writeMemByte (uint_least16_t addr, uint8_t value)
void | writeMemWord (uint_least16_t addr, uint_least16_t value)
void | fillRam (uint_least16_t start, uint8_t value, unsigned int size)
void | fillRam (uint_least16_t start, const uint8_t *source, unsigned int size)
void | installResetHook (uint_least16_t addr)
void | installBasicTrap (uint_least16_t addr)
void | setBasicSubtune (uint8_t tune)
uint8_t | cpuRead (uint_least16_t addr) const
void | cpuWrite (uint_least16_t addr, uint8_t data)

## Detailed Description

The C64 MMU chip.

## Member Function Documentation

uint8_t MMU::cpuRead | ( | uint_least16_t | addr | ) | const

inline

Access memory as seen by CPU.

Parameters

  addr | the address where to read from

Returns
  value at address

void MMU::cpuWrite | ( | uint_least16_t | addr,
|  | uint8_t | data
| ) |  |

inline

Access memory as seen by CPU.

Parameters

  addr | the address where to write
  data | the value to write

void MMU::fillRam | ( | uint_least16_t | start,
|  | uint8_t | value,
|  | unsigned int | size
| ) |  |

inline virtual

Fill ram area with a constant value.

Parameters

  start | the start of memory location where to write
  value | the value to write
  size | the number of bytes to fill

Implements sidmemory.

void MMU::fillRam | ( | uint_least16_t | start,
|  | const uint8_t * | source,
|  | unsigned int | size
| ) |  |

inline virtual

Copy a buffer into a ram area.

Parameters

  start | the start of memory location where to write
  source | the source buffer
  size | the number of bytes to copy

Implements sidmemory.

void MMU::installBasicTrap | ( | uint_least16_t | addr | ) |

inline virtual

Set BASIC Warm Start address.

Parameters

  addr | the new addres to point to

Implements sidmemory.

void MMU::installResetHook | ( | uint_least16_t | addr | ) |

inline virtual

Change the RESET vector.

Parameters

  addr | the new addres to point to

Implements sidmemory.

uint8_t MMU::readMemByte | ( | uint_least16_t | addr | ) |

inline virtual

Read one byte from memory.

Parameters

  addr | the memory location from which to read from

Implements sidmemory.

uint_least16_t MMU::readMemWord | ( | uint_least16_t | addr | ) |

inline virtual

Read two contiguous bytes from memory.

Parameters

  addr | the memory location from which to read from

Implements sidmemory.

void MMU::setBasicSubtune | ( | uint8_t | tune | ) |

inline virtual

Set the start tune.

Parameters

  tune | the tune number

Implements sidmemory.

void MMU::writeMemByte | ( | uint_least16_t | addr,
|  | uint8_t | value
| ) |  |

inline virtual

Write one byte to memory.

Parameters

  addr | the memory location where to write
  value | the value to write

Implements sidmemory.

void MMU::writeMemWord | ( | uint_least16_t | addr,
|  | uint_least16_t | value
| ) |  |

inline virtual

Write two contiguous bytes to memory.

Parameters

  addr | the memory location where to write
  value | the value to write

Implements sidmemory.

The documentation for this class was generated from the following files:

- mmu.h
- mmu.cpp