mirror of
https://github.com/jscrane/r65emu.git
synced 2024-12-22 03:30:02 +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