mirror of
https://github.com/jscrane/r65emu.git
synced 2025-01-02 13:30:53 +00:00
template param for chip capacity
This commit is contained in:
parent
1cf4c02039
commit
0fc3575c93
3
ram.h
3
ram.h
@ -1,9 +1,10 @@
|
|||||||
#ifndef __RAM_H__
|
#ifndef __RAM_H__
|
||||||
#define __RAM_H__
|
#define __RAM_H__
|
||||||
|
|
||||||
|
template<unsigned n = 1024>
|
||||||
class ram: public Memory::Device {
|
class ram: public Memory::Device {
|
||||||
public:
|
public:
|
||||||
static const unsigned page_size = 1024;
|
static const unsigned page_size = n;
|
||||||
|
|
||||||
virtual void operator= (uint8_t c) { _mem[_acc] = c; }
|
virtual void operator= (uint8_t c) { _mem[_acc] = c; }
|
||||||
virtual operator uint8_t () { return _mem[_acc]; }
|
virtual operator uint8_t () { return _mem[_acc]; }
|
||||||
|
Loading…
Reference in New Issue
Block a user