sixvid icon indicating copy to clipboard operation
sixvid copied to clipboard

Detect and utilize VT340 double-buffering via Page Memory.

Open clort81 opened this issue 4 months ago • 3 comments

I don't know how to draw to the alternate screen, then page flip. Do you? I think we should add this to the list of DECCTL's if not possible.

Maybe we should tell all the terminal emulator authors to give us a bitmask for 16 layers or buffers = render targets. bitmask to write and bitmask to display. That way write ops can be to 'alternate buffer' or any of the other 14 buffers. And display can render one or several (with transparency)

clort81 avatar Aug 09 '25 18:08 clort81

Yes, the VT340 has sixteen 132x24 pages in "page memory", and one can write to them and page flip. It's been a while since I tried it with sixel graphics so I can't recall if that worked on a genuine VT340. I believe @j4james flipped pages for his VT-Rex game on a VT525. I am not sure if he was doing double-buffering.

hackerb9 avatar Aug 10 '25 11:08 hackerb9

FYI, I did post a little two-frame sixel animation in your vt340test repo a while back: https://github.com/hackerb9/vt340test/issues/33#issuecomment-2131265837

I don't know if you ever tried it out though - probably would have taken a long time to load. It only used two frames because I think you said the VT340 only let you write sixels to two of its pages.

As for double-buffering in my games, I typically do compositing on a background page, and then copy that page to the foreground with DECCRA, rather than flipping the background page to the foreground. This way I don't necessarily have to copy the full page, which can be more efficient. It also gives me more flexibility in how the game data is manipulated in the background.

j4james avatar Aug 10 '25 14:08 j4james

I somehow missed your Badger, Badger!

I won't be at home for awhile, but I intend to test it when I get back. You can always feel free to ping me as things slip off my stack when I'm away.

Last year I almost bought a VT340 without its CRT on eBay for tests like this when I'm out of town. I could control it remotely using the printer port as a keyboard and use MediaCopy to get images of what would be shown on the CRT. Unfortunately, the people selling it had thrown out some of the necessary circuit boards when the screen broke.

hackerb9 avatar Aug 10 '25 18:08 hackerb9