mirror of
https://github.com/jscrane/r65emu.git
synced 2024-12-25 22:31:51 +00:00
add ram::page_size; sizes are unsigned
This commit is contained in:
parent
42566200c1
commit
5f8bb62648
@ -6,7 +6,7 @@
|
|||||||
#define KBD_DATA 34
|
#define KBD_DATA 34
|
||||||
#define KBD_IRQ 35
|
#define KBD_IRQ 35
|
||||||
|
|
||||||
#define RAM_SIZE 0
|
#define RAM_SIZE 0u
|
||||||
|
|
||||||
// SPI-RAM
|
// SPI-RAM
|
||||||
#undef USE_SPIRAM
|
#undef USE_SPIRAM
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#define KBD_DATA 34
|
#define KBD_DATA 34
|
||||||
#define KBD_IRQ 35
|
#define KBD_IRQ 35
|
||||||
|
|
||||||
#define RAM_SIZE 65536
|
#define RAM_SIZE 0x10000u
|
||||||
|
|
||||||
// SPI-RAM
|
// SPI-RAM
|
||||||
#undef USE_SPIRAM
|
#undef USE_SPIRAM
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#define KBD_DATA 34
|
#define KBD_DATA 34
|
||||||
#define KBD_IRQ 35
|
#define KBD_IRQ 35
|
||||||
|
|
||||||
#define RAM_SIZE 65536
|
#define RAM_SIZE 0x10000u
|
||||||
|
|
||||||
// SPI-RAM
|
// SPI-RAM
|
||||||
#undef USE_SPIRAM
|
#undef USE_SPIRAM
|
||||||
|
@ -15,13 +15,13 @@
|
|||||||
#define KBD_DATA D3
|
#define KBD_DATA D3
|
||||||
#define KBD_IRQ D4
|
#define KBD_IRQ D4
|
||||||
|
|
||||||
#define RAM_SIZE 32768
|
#define RAM_SIZE 0x8000u
|
||||||
|
|
||||||
// SPI-RAM
|
// SPI-RAM
|
||||||
#define USE_SPIRAM
|
#define USE_SPIRAM
|
||||||
#define SPIRAM_DEV SPI
|
#define SPIRAM_DEV SPI
|
||||||
#define SPIRAM_CS D0
|
#define SPIRAM_CS D0
|
||||||
#define SPIRAM_SIZE 32768
|
#define SPIRAM_SIZE 0x8000u
|
||||||
|
|
||||||
// "tape" storage...
|
// "tape" storage...
|
||||||
#undef USE_SD
|
#undef USE_SD
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#define KBD_DATA D3
|
#define KBD_DATA D3
|
||||||
#define KBD_IRQ D4
|
#define KBD_IRQ D4
|
||||||
|
|
||||||
#define RAM_SIZE 32768
|
#define RAM_SIZE 0x8000u
|
||||||
|
|
||||||
// SPI-RAM
|
// SPI-RAM
|
||||||
#undef USE_SPIRAM
|
#undef USE_SPIRAM
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#define KBD_DATA D3
|
#define KBD_DATA D3
|
||||||
#define KBD_IRQ D4
|
#define KBD_IRQ D4
|
||||||
|
|
||||||
#define RAM_SIZE 32768
|
#define RAM_SIZE 0x8000u
|
||||||
|
|
||||||
// SPI-RAM
|
// SPI-RAM
|
||||||
#undef USE_SPIRAM
|
#undef USE_SPIRAM
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#define KBD_DATA D3
|
#define KBD_DATA D3
|
||||||
#define KBD_IRQ D4
|
#define KBD_IRQ D4
|
||||||
|
|
||||||
#define RAM_SIZE 32768
|
#define RAM_SIZE 0x8000u
|
||||||
|
|
||||||
// SPI-RAM
|
// SPI-RAM
|
||||||
#undef USE_SPIRAM
|
#undef USE_SPIRAM
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#define KBD_DATA PE_4
|
#define KBD_DATA PE_4
|
||||||
#define KBD_IRQ PE_5
|
#define KBD_IRQ PE_5
|
||||||
|
|
||||||
#define RAM_SIZE 0x3000
|
#define RAM_SIZE 0x3000u
|
||||||
|
|
||||||
// SPI-RAM
|
// SPI-RAM
|
||||||
#define USE_SPIRAM
|
#define USE_SPIRAM
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#define KBD_DATA PE_4
|
#define KBD_DATA PE_4
|
||||||
#define KBD_IRQ PE_5
|
#define KBD_IRQ PE_5
|
||||||
|
|
||||||
#define RAM_SIZE 0x3000
|
#define RAM_SIZE 0x3000u
|
||||||
|
|
||||||
// SPI-RAM
|
// SPI-RAM
|
||||||
#undef USE_SPIRAM
|
#undef USE_SPIRAM
|
||||||
|
4
ram.h
4
ram.h
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
class ram: public Memory::Device {
|
class ram: public Memory::Device {
|
||||||
public:
|
public:
|
||||||
|
static const unsigned page_size = 1024;
|
||||||
|
|
||||||
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]; }
|
||||||
|
|
||||||
@ -14,6 +16,6 @@ public:
|
|||||||
ram (): Memory::Device(sizeof(_mem)) {}
|
ram (): Memory::Device(sizeof(_mem)) {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t _mem[1024];
|
uint8_t _mem[page_size];
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user