tty console
This commit is contained in:
parent
3387852028
commit
a1073b2f83
20 changed files with 32 additions and 21 deletions
13
bus.cpp
13
bus.cpp
|
@ -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
2
bus.h
|
@ -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>
|
||||
|
|
4
cpu.cpp
4
cpu.cpp
|
@ -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
2
cpu.h
|
@ -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
2
gen.h
|
@ -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
|
||||
|
|
2
main.cpp
2
main.cpp
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
2
memory.h
2
memory.h
|
@ -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>
|
||||
|
|
2
rk05.cpp
2
rk05.cpp
|
@ -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
2
rk05.h
|
@ -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>
|
||||
|
|
2
rx02.cpp
2
rx02.cpp
|
@ -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
2
rx02.h
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
2
tests.h
2
tests.h
|
@ -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);
|
||||
|
|
|
@ -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
tm-11.h
2
tm-11.h
|
@ -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>
|
||||
|
|
2
tty.cpp
2
tty.cpp
|
@ -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
2
tty.h
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
2
utils.h
2
utils.h
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue