thejpster / monotron

A simple 8-bit home computer style application for the TI Tiva-C Launchpad
Apache License 2.0
191 stars 9 forks source link

Enable screen echo to USB_UART #62

Open IGBC opened 5 years ago

IGBC commented 5 years ago

I don't always have a VGA monitor to hand.

Enabling UART loopback of the screen allows for development on the go.

# Connect to the monotron in an understandable way
picocom -b 115200 --imap lfcrlf /dev/ttyACM0 -q
# The banner will still be screwed up but the REPL is readable

Example

thejpster commented 5 years ago

Nice! I wonder though if we can make this optional? The uart fifo is only 16 bytes and some of the fancier demos (like the flames) can't afford to wait for a 115,200 uart. Some possibilities:

Once that's in place, I'd probably also add keyboard language selection using the same mechanism.

thejpster commented 5 years ago

Now I'm also wondering if I should scrap the weird escape codes I invented and make the framebuffer handle standard ANSI / VT100 codes. Then your serial terminal would look correct, and simple UNIX programs would be easier to port...

IGBC commented 5 years ago

I would agree with scraping any proprietory escape seqences, this is something I can investigate myself.

The logical place for config would be the SD card RN, however I would insist that the UART echo default to on.

thejpster commented 5 years ago

escape sequences

Cool. I'll look for the PR on vga-framebuffer and/or console-traits. Would be nice to make a crate that Phil Opperman could use on his OS blog.

SD card

Sounds good. A UI command would be useful. I can look at this.

I would insist that the UART echo default to on

In the absence of an SD card? That's fine - I'll always have an SD card fitted for demos.

IGBC commented 5 years ago

Cool. I'll look for the PR on vga-framebuffer and/or console-traits. Would be nice to make a crate that Phil Opperman could use on his OS blog.

Not sure who own's the console-traits crate, but that's where the code needs to go, sadly that currently doesn't support multichar escape sequences. I can probably patch it, but for that I need to know where it's repo is. docs.rs does not list a repo for console-traits.

EDIT: @thejpster of course it's one of yours, I am starting to think you're some kind of embedded Jedi. PR in console-traits coming when I figure it out.

thejpster commented 5 years ago

Oh, it's one of mine. I pulled it out of vga-framebuffer, which was getting a bit big and scary.

Yeah, it doesn't do multi-byte. Sorry.

thejpster commented 5 years ago

I've started full ANSI support in https://github.com/thejpster/console-traits/pull/1. Updates / fixes / more tests welcome!

thejpster commented 5 years ago

Also, if you want to rebase this, I'll merge it as-is, then think about adding the opt-out.

thejpster commented 4 years ago

Any further thoughts on this one?

IGBC commented 4 years ago

Haven't had time or energy to work on this in the last few months.

Sorry, more to come when I fixed my monotron XD