diff --git a/component/assembler/asm.js b/component/assembler/asm.js index 9abcf05..1359b8e 100644 --- a/component/assembler/asm.js +++ b/component/assembler/asm.js @@ -2588,7 +2588,7 @@ var Parser = function(e) { n += "%" + function(e) { return r(255 & e, 2) }(e[s]); - t || (t = "asm80.sna"), + t || (t = "Zeal-WebEmulator-File.txt"), download(t, n) } , tapdata = function(e, t) { diff --git a/frontend/css/emulator.css b/frontend/css/emulator.css index 9db03d4..d4787bb 100644 --- a/frontend/css/emulator.css +++ b/frontend/css/emulator.css @@ -296,6 +296,14 @@ hr { user-select: none; } +.recterm-onfalse { + color: rgb(163, 49, 34); +} + +.recterm-ontrue { + color: rgb(93, 199, 63); +} + #dumpfields { margin-bottom: 1em; } diff --git a/frontend/misc.js b/frontend/misc.js index 8a4ffcd..431dde2 100644 --- a/frontend/misc.js +++ b/frontend/misc.js @@ -12,10 +12,6 @@ $(".tab").on("click", function(){ $(this).addClass("active"); }); -$("#clearterm").on("click", function() { - terminal.reset(); -}); - $(".regaddr").click(function() { const virtaddr = parseInt($(this).text(), 16); if (virtaddr || virtaddr == 0) { diff --git a/frontend/panel.js b/frontend/panel.js index 827647b..eee231e 100644 --- a/frontend/panel.js +++ b/frontend/panel.js @@ -78,6 +78,23 @@ $("#uart-file-send").on("click", function() { } }); +$("#clearterm").on("click", function() { + terminal.reset(); +}); + +var recterm = false; +var reced_array = []; + +$("#recterm").on("click", function() { + recterm =! recterm; + if (recterm == false) { + mkdown(reced_array, "uart_received.bin"); + reced_array = []; + } + $("#recterm-on").removeClass(); + $("#recterm-on").addClass("recterm-on"+recterm); +}); + $("#baudrate").on("change", function() { const baudrate = $(this).val(); uart.set_baudrate(baudrate); diff --git a/hardemu/uart.js b/hardemu/uart.js index 197b02c..de6cd1c 100644 --- a/hardemu/uart.js +++ b/hardemu/uart.js @@ -40,6 +40,9 @@ function UART(Zeal, PIO) { } value |= (line << i); } + if (recterm == true) { + reced_array.push(value); + } /* The terminal is a global variable */ terminal.write([value]); /* Reset the FIFO in any case */ diff --git a/index.html b/index.html index cf09234..a832856 100644 --- a/index.html +++ b/index.html @@ -192,6 +192,8 @@

Ready?

+ +