add spiram

This commit is contained in:
Stephen Crane 2014-11-14 12:27:56 +00:00
parent b68f563dc6
commit a37eaee362
3 changed files with 8 additions and 0 deletions

View File

@ -51,6 +51,7 @@ void setup() {
for (unsigned i = 0; i < RAM_SIZE; i += 1024)
memory.put(pages[i / 1024], i);
memory.put(sram, SPIRAM_BASE, SPIRAM_EXTENT);
memory.put(io, 0xd000);
memory.put(b, 0xe000);
memory.put(m, 0xff00);

View File

@ -2,6 +2,9 @@
#define _CONFIG_H
#define RAM_SIZE 4096
#define SPIRAM_BASE 0x1000
#define SPIRAM_EXTENT (28 * 1024 / 256)
#define CPU_INSTRUCTIONS 1000
#define TFT_FG VGA_LIME

4
io.cpp
View File

@ -181,18 +181,22 @@ io::operator byte() {
switch (_acc % 4) {
case 0:
/*
Serial.print("<");
Serial.print(_acc, 16);
Serial.print(" ");
Serial.println(kbd, 16);
*/
return kbd;
case 1:
if (kbd_int && kbd_cr >= 0x80) {
kbd_cr = 0;
/*
Serial.print("<");
Serial.print(_acc, 16);
Serial.print(" ");
Serial.println(0xa7, 16);
*/
if (_loading) {
if (tape.more())
enter(tape.read());