Skip to content

Commit

Permalink
ncurses window is now 82x32 -> 80x25 for emulation
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertvanheusden committed Mar 31, 2022
1 parent 9164411 commit 1b2ad83
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@ uint16_t bus::write(const uint16_t a, const bool word_mode, uint16_t value, cons
int run_mode = c->getPSW() >> 14;

if (a >= 0160000) {
if (word_mode)
fprintf(stderr, "WRITE I/O %06o in byte mode\n", a);

if (word_mode) {
if (a == 0177776 || a == 0177777) { // PSW
D(fprintf(stderr, "writeb PSW %s\n", a & 1 ? "MSB" : "LSB");)
Expand Down
7 changes: 4 additions & 3 deletions console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <string.h>

#include "console.h"
#include "gen.h"
#include "utils.h"


Expand Down Expand Up @@ -84,13 +85,13 @@ void console::put_char(const char c)

void console::put_string_ll(const std::string & what)
{
for(int x=0; x<what.size(); x++)
for(size_t x=0; x<what.size(); x++)
put_char_ll(what.at(x));
}

void console::operator()()
{
debug("Console thread started");
D(fprintf(stderr, "Console thread started\n");)

while(!*terminate) {
int c = wait_for_char(500);
Expand Down Expand Up @@ -118,5 +119,5 @@ void console::operator()()
}
}

debug("Console thread terminating");
D(fprintf(stderr, "Console thread terminating\n");)
}
4 changes: 2 additions & 2 deletions console_ncurses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ void console_ncurses::resize_terminal()
delete_window(w_main_b);
delete_window(w_main);

create_win_border(0, 0, max_x - 2, max_y - 6, "window", &w_main_b, &w_main, false);
create_win_border(0, 0, 80, 25, "terminal", &w_main_b, &w_main, false);

create_win_border(0, max_y - 4, max_x - 2, 2, "panel", &w_panel_b, &w_panel, false);
create_win_border(0, 26, 80, 3, "panel", &w_panel_b, &w_panel, false);

scrollok(w_main -> win, TRUE);

Expand Down

0 comments on commit 1b2ad83

Please sign in to comment.