mirror of
https://github.com/jscrane/r65emu.git
synced 2024-12-21 12:29:51 +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__
|
||||
#define __RAM_H__
|
||||
|
||||
template<unsigned n = 1024>
|
||||
class ram: public Memory::Device {
|
||||
public:
|
||||
static const unsigned page_size = 1024;
|
||||
static const unsigned page_size = n;
|
||||
|
||||
virtual void operator= (uint8_t c) { _mem[_acc] = c; }
|
||||
virtual operator uint8_t () { return _mem[_acc]; }
|
||||
|
Loading…
Reference in New Issue
Block a user