tty console

This commit is contained in:
folkert van heusden 2022-03-13 11:09:45 +01:00
parent 3387852028
commit a1073b2f83
20 changed files with 32 additions and 21 deletions

13
bus.cpp
View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#include <assert.h>
#include <stdio.h>
@ -74,6 +74,11 @@ uint16_t bus::read(const uint16_t a, const bool word_mode, const bool use_prev)
return 0x80;
}
if (a == 0177564) { // console tty status register
fprintf(stderr, "console tty status register\n");
return 0x80;
}
/// MMU ///
if (a >= 0172300 && a < 0172320) {
uint16_t t = pages[((a & 017) >> 1)].pdr;
@ -407,6 +412,12 @@ uint16_t bus::write(const uint16_t a, const bool word_mode, uint16_t value, cons
return 128;
}
if (a == 0177566) { // console tty buffer register
fprintf(stderr, "bus::write TTY buffer %c\n", value);
printf("%c", value & 127);
return 128;
}
if (a & 1)
D(fprintf(stderr, "bus::writeWord: odd address UNHANDLED\n");)
D(fprintf(stderr, "UNHANDLED write %o(%c): %o\n", a, word_mode ? 'B' : ' ', value);)

2
bus.h
View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#pragma once
#include <stdint.h>

View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// (C) 2018-2022 by Folkert van Heusden
// Released under Apache License v2.0
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>

2
cpu.h
View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#pragma once
#include <assert.h>

2
gen.h
View file

@ -1,5 +1,5 @@
// (C) 2018-2022 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#ifndef NDEBUG
#define D(x) do { x } while(0);
#else

View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#include <poll.h>
#include <signal.h>
#include <string.h>

View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#include <string.h>
#include "memory.h"

View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#pragma once
#include <stdint.h>

View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#include <errno.h>
#include <string.h>

2
rk05.h
View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#pragma once
#include <stdint.h>

View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#include <errno.h>
#include <string.h>

2
rx02.h
View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#pragma once
#include <stdint.h>

View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>

View file

@ -1,3 +1,3 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
void tests(cpu *const c);

View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#include <errno.h>
#include <string.h>

View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#pragma once
#include <stdint.h>

View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// // Released under AGPL v3.0
// // Released under Apache License v2.0
#include <errno.h>
#include <poll.h>
#include <string.h>

2
tty.h
View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#pragma once
#include <stdint.h>

View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#include <stdarg.h>
#include <stdint.h>
#include <string>

View file

@ -1,5 +1,5 @@
// (C) 2018 by Folkert van Heusden
// Released under AGPL v3.0
// Released under Apache License v2.0
#include <stdint.h>
#include <string>