VirtualT, Tandy TRS-80 Model 100 emulator for DevTerm A06 & A04

I’ve pushed the changes I’m using to build VirtualT for DevTerm A06.

I’ll accept pull-requests and I’ve added a discussion area. This is not my code. I just hacked it to build on DevTerm A06.

todo: Fix fullscreen mode.

8 Likes

Added a quick hack to the makefile to allow building on A04. Maybe.

A04 users. please test and let me know if it works.

(Or send me an A04, of course.)

Hi Steven.

Really appreciate your work on this. I just tried running it on my A04 and it failed.

Many errors or warnings during the install.

Here’s my log of the make attempt:

Summary
cpi@clockworkpi-a04:~/VirtualT-DevTerm$ make
Compiling doins.c
Compiling genwrap.c
Compiling intelhex.c
Compiling io.c
src/io.c: In function ‘hirestimer’:
src/io.c:120:5: warning: implicit declaration of function ‘gettimeofday’ [-Wimplicit-function-declaration]
  120 |     gettimeofday(&tv, NULL);
      |     ^~~~~~~~~~~~
Compiling kc85rom.c
Compiling m100emu.c
Compiling m100rom.c
Compiling m10rom.c
Compiling m200rom.c
Compiling memory.c
src/memory.c: In function ‘save_remem_ram’:
src/memory.c:1068:43: warning: ‘%s’ directive writing up to 255 bytes into a region of size 74 [-Wformat-overflow=]
 1068 |   sprintf(msg, "Could not save Remem file %s", mem_setup.remem_file);
      |                                           ^~   ~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:866,
                 from src/memory.c:14:
/usr/include/aarch64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 27 and 282 bytes into a destination of size 100
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |       __glibc_objsize (__s), __fmt,
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |       __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~
src/memory.c: In function ‘save_rampac_ram’:
src/memory.c:1108:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 73 [-Wformat-overflow=]
 1108 |   sprintf(msg, "Could not save Rampac file %s", mem_setup.rampac_file);
      |                                            ^~   ~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:866,
                 from src/memory.c:14:
/usr/include/aarch64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 28 and 283 bytes into a destination of size 100
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |       __glibc_objsize (__s), __fmt,
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |       __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~
src/memory.c: In function ‘save_rex2_ram’:
src/memory.c:1147:46: warning: ‘%s’ directive writing up to 255 bytes into a region of size 71 [-Wformat-overflow=]
 1147 |   sprintf(msg, "Could not save REX2 RAM file %s", mem_setup.rex2_ram_file);
      |                                              ^~   ~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:866,
                 from src/memory.c:14:
/usr/include/aarch64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 30 and 285 bytes into a destination of size 100
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |       __glibc_objsize (__s), __fmt,
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |       __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~
src/memory.c: In function ‘save_rex_flash’:
src/memory.c:1183:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 76 [-Wformat-overflow=]
 1183 |   sprintf(msg, "Could not save REX file %s", mem_setup.rex_flash_file);
      |                                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:866,
                 from src/memory.c:14:
/usr/include/aarch64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 25 and 280 bytes into a destination of size 100
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |       __glibc_objsize (__s), __fmt,
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |       __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~
src/memory.c: In function ‘load_rampac_ram’:
src/memory.c:1404:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 73 [-Wformat-overflow=]
 1404 |   sprintf(msg, "Could not open Rampac file %s", mem_setup.rampac_file);
      |                                            ^~   ~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:866,
                 from src/memory.c:14:
/usr/include/aarch64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 28 and 283 bytes into a destination of size 100
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |       __glibc_objsize (__s), __fmt,
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |       __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~
src/memory.c: In function ‘load_rex2_ram’:
src/memory.c:1481:46: warning: ‘%s’ directive writing up to 255 bytes into a region of size 71 [-Wformat-overflow=]
 1481 |   sprintf(msg, "Could not open REX2 RAM file %s", mem_setup.rex2_ram_file);
      |                                              ^~   ~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:866,
                 from src/memory.c:14:
/usr/include/aarch64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 30 and 285 bytes into a destination of size 100
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |       __glibc_objsize (__s), __fmt,
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |       __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~
src/memory.c: In function ‘load_remem_ram’:
src/memory.c:1329:43: warning: ‘%s’ directive writing up to 255 bytes into a region of size 74 [-Wformat-overflow=]
 1329 |   sprintf(msg, "Could not open Remem file %s", mem_setup.remem_file);
      |                                           ^~   ~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:866,
                 from src/memory.c:14:
/usr/include/aarch64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 27 and 282 bytes into a destination of size 100
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |       __glibc_objsize (__s), __fmt,
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |       __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~
src/memory.c: In function ‘load_rex_flash’:
src/memory.c:1441:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 76 [-Wformat-overflow=]
 1441 |   sprintf(msg, "Could not open REX file %s", mem_setup.rex_flash_file);
      |                                         ^~   ~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:866,
                 from src/memory.c:14:
/usr/include/aarch64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 25 and 280 bytes into a destination of size 100
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |       __glibc_objsize (__s), __fmt,
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |       __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~
Compiling n8201rom.c
Compiling n8300rom.c
Compiling reximages.c
Compiling romstrings.c
Compiling serial.c
Compiling sound.c
Compiling strcase.c
Compiling tsdosimages.c
Compiling a85parse.cpp
Compiling assemble.cpp
Compiling autofile.cpp
src/autofile.cpp: In member function ‘MString VTAutoFile::GenFilename()’:
src/autofile.cpp:138:22: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
  138 |     sprintf(page, "%d", seq);
      |                      ^
In file included from /usr/include/stdio.h:866,
                 from /usr/include/FL/fl_utf8.h:34,
                 from /usr/include/FL/Fl.H:32,
                 from src/autofile.cpp:30:
/usr/include/aarch64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 2 and 11 bytes into a destination of size 10
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |       __glibc_objsize (__s), __fmt,
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |       __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~           
Compiling chargen.cpp
Compiling clock.cpp
Compiling cpuregs.cpp
Compiling disassemble.cpp
Compiling display.cpp
src/display.cpp:1203:48: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
 1203 |     { Fl_Box* o = new Fl_Box(95, 265, 195, 25, "V "VERSION);
      |                                                ^
src/display.cpp: In function ‘void cb_coldBoot(Fl_Widget*, void*)’:
src/display.cpp:758:18: warning: too many arguments for format [-Wformat-extra-args]
  758 |    a = fl_choice("Cold Boot.  Reload System ROM too?", "Cancel", "Yes", "No", NULL);
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compiling file.cpp
Compiling fileprint.cpp
src/fileprint.cpp: In member function ‘MString VTFilePrint::GenFilename()’:
src/fileprint.cpp:452:22: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
  452 |     sprintf(page, "%d", seq);
      |                      ^
In file included from /usr/include/stdio.h:866,
                 from /usr/include/FL/fl_utf8.h:34,
                 from /usr/include/FL/Fl.H:32,
                 from src/fileprint.cpp:30:
/usr/include/aarch64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 2 and 11 bytes into a destination of size 10
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |       __glibc_objsize (__s), __fmt,
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |       __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~           
Compiling fileview.cpp
Compiling fl_action_icon.cpp
Compiling Flu_Button.cpp
Compiling Flu_Combo_Box.cpp
Compiling Flu_Combo_List.cpp
Compiling Flu_Combo_Tree.cpp
Compiling Flu_DND.cpp
Compiling Flu_File_Chooser.cpp
Compiling flu_file_chooser_pixmaps.cpp
Compiling Flu_Label.cpp
Compiling flu_pixmaps.cpp
Compiling Flu_Return_Button.cpp
Compiling fl_usage_box.cpp
Compiling Flu_Separator.cpp
Compiling FluSimpleString.cpp
Compiling Flu_Tree_Browser.cpp
Compiling Flu_Wrap_Group.cpp
Compiling fx80print.cpp
Compiling fx80rom.cpp
Compiling highlight.cpp
Compiling hostprint.cpp
Compiling ide.cpp
Compiling idetabs.cpp
Compiling linker.cpp
Compiling lpt.cpp
Compiling memedit.cpp
Compiling MStringArray.cpp
Compiling MString.cpp
Compiling multieditwin.cpp
Compiling multiwin.cpp
Compiling multiwin_icons.cpp
Compiling My_Text_Buffer.cpp
Compiling My_Text_Display.cpp
src/My_Text_Display.cpp: In constructor ‘My_Text_Display::My_Text_Display(int, int, int, int, const char*)’:
src/My_Text_Display.cpp:160:20: warning: ‘void* __builtin_memset(void*, int, long unsigned int)’ writing between 4 and 8589934584 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
  160 |     mLineStarts[i] = -1;
      |     ~~~~~~~~~~~~~~~^~~~
Compiling My_Text_Editor.cpp
Compiling periph.cpp
Compiling pref_form.cpp
Compiling printer.cpp
Compiling project.cpp
Compiling rememcfg.cpp
Compiling remote.cpp
Compiling rpn_eqn.cpp
Compiling serversocket.cpp
Compiling setup.cpp
Compiling socket.cpp
Compiling socketdlg.cpp
Compiling tdock.cpp
Compiling tdockvid.cpp
Compiling tpddclient.cpp
Compiling tpddserver.cpp
Compiling tpddserverlog.cpp
Compiling vtobj.cpp
Compiling vtpaper.cpp
src/vtpaper.cpp: In member function ‘void VTPSPaper::WriteHeader()’:
src/vtpaper.cpp:1122:17: warning: too many arguments for format [-Wformat-extra-args]
 1122 |  fprintf(m_pFd, "%%%%Title:  FX-80 Emulation Print\n", VERSION);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compiling watchtable.cpp
src/watchtable.cpp: In constructor ‘VT_Watch_Table::VT_Watch_Table(int, int, int, int)’:
src/watchtable.cpp:168:19: warning: iteration 3 invokes undefined behavior [-Waggressive-loop-optimizations]
  168 |   m_ColStart[c+1] = m_ColStart[c] + m_ColWidth[c];
      |   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/watchtable.cpp:167:16: note: within this loop
  167 |  for (c = 1; c < 5; c++)
      |              ~~^~~
Linking virtualt
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libfltk.a(Fl_Double_Window.o): undefined reference to symbol 'XRenderSetPictureClipRegion'
/usr/bin/ld: /lib/aarch64-linux-gnu/libXrender.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [GNUmakefile:125: virtualt] Error 1
cpi@clockworkpi-a04:~/VirtualT-DevTerm$ ./virtualt
bash: ./virtualt: No such file or directory
cpi@clockworkpi-a04:~/VirtualT-DevTerm$ 

Happy to help troubleshoot this for A04 users.

1 Like

That’s actually good. You reached the linking stage.

Try this and let me know how it goes:

VirtualT-DevTerm$ cat clockworkpi-a06.mk > clockworkpi-a04.mk
VirtualT-DevTerm$ make clean
VirtualT-DevTerm$ make
1 Like

That did it! Thanks so much for your help with this!

1 Like

Nice. Fixed repo. Should build out of the box on A04 and A06 now.

1 Like

Released VirtualT-DevTerm v1.7.1 4/15/2022

Includes pre-built binary. UNTESTED.

devterm-basic

Now includes the original TRS-80 Model 100 user manual pdf!

4 Likes

Released VirtualT-DevTerm v1.7.2 4/17/2022

  • New: v1.7.2 4/17/2022 - “DevTerm” Emulation->Display option. Almost fullscreen.

virtualt-devterm-display-reopen

2 Likes

Ah! I got fullscreen working by accident after a chaos filled hacking session. Now to figure out how. :wink:

P.S. Pushed a bezel cleanup fix to the repo. Also, you can upgrade without fear of overwriting your configs with these builds. Just a ‘git pull’ is all you need to do in the existing VirtualT-DevTerm directory.

Thanks to the 10 old-timers that appreciate this work. :wink:

3 Likes

This is definitely some amazing work. I love it. The only issue I have at the moment is some fullscreen issues in i3, but I absolutely love this :slight_smile:

1 Like

Works perfectly on A06. Is there any way to force it to fullscreen for that pure retro look? I tried F11, no go. Love this regardless. Thanks for porting it over for us.

  • TRS-80 Model 100 Owner and User
1 Like

Unfortunately, it looks like devterm’s xfce isn’t honoring the fltk gui library’s method of calling fullscreen. So fullscreen may never work on the devterm. I have created a ‘devterm’ size that gets pretty close (auto-hide the menubar for best effect.) Honestly, the code is spaghetti because it was trying to be compatible across windows, osx, and linux. Cleaning it up just for devterm helps, but hacking it has been difficult.

That said, I have pushed a fix that allows it to build on the manjaro devterm spins and nearly any other linux system. I’ll cleanup the readme for manjaro building when I get a chance.

Here’s a screenshot of VirtualT-DevTerm compiled and running on Ubuntu on Windows 11 and using the new native Windows X11 subsystem…

1 Like

@Steven_Boger could you share a commit with your fullscreen attempt?
I’ll see if it helps by using lowlevel x11 calls.

Like this?

Edit: PR sent. fullscreen fix by yatli · Pull Request #2 · sboger/VirtualT-DevTerm · GitHub

4 Likes

Awesome! I was hoping for some community involvement! My DevTerm is currently in pieces. Let me get it back together and a OS installed and I’ll get some testing in so I can get it accepted.

-S

PR merged! Thanks Yatao Li! I’ll need to clean up the readme and try to get fullscreen to be a proper checkbox option, but we’re FULLSCREEN now! (I’ll push an official release once the other stuff is complete.)

20684720

-S

2 Likes

Now we’re talking! I demo’d VirtualT in my latest YouTube channel video, said I was hoping for fullscreen, then checked back on this post forgetting I had asked about it earlier! And planning on experimenting with the Manjaro distro in the next weekend or two.

1 Like

VirtualT-DevTerm v1.7.3 5/23/2022

  1. FULLSCREEN MODE! Thanks Yatli!
  2. Reduced white space around borders
  3. Fix to build on most Linux systems, including the Manjaro Arm images for Devterm.
2 Likes

@Steven_Boger are you aware of some sample programs to play with? :smiley:

1 Like

I’m having the same issues but getting a “cat: clockworkpi-a06.mk: No such file ore directory” error at this stage.