4 ms·
Hello, author here. Eeeaggh. Yes, this took a while. I started after lunch and finished sometime after midnight (look at the clock in the bottom right hand cor
by david-given 7y ago
Hello, author here.
Eeeaggh. Yes, this took a while. I started after lunch and finished sometime after midnight (look at the clock in the bottom right hand corner of the screen). I'm still kicking myself at some of the dead ends I went through.
The result (even after I cleaned it up after the stream) is still a bit slow. The biggest issue is that it redraws the entire line every time you press a key in insert mode; fixing this is moderately straightforward, as I have all the information to know where the first modified character is, but it'll require some refactoring.
The biggest think I want next is a yank buffer, but the only realistic option is to store it on disk, which would be painfully slow. Being able to do repeated inserts would be nice, too.
I actually know Bram Moolenaar; maybe I should ask how he did it...
- kragen 7y agoBravo! You should be super proud! On a 9600 baud terminal, a whole line is 77 milliseconds, so it's going to feel a bit slow even if you only redraw half the line, and at 2400 baud it would be painful. Insert-character escape sequences are going to make a big difference. I’m no expert, but I think the Kaypro doesn't have a real serial port between the terminal and the computer the way a lot of CP/M machines did (Altair and IMSAI usually, H-8 and H-88 and H-89 always, while the Osborne used a memory-mapped screen like the Apple). I don't know how fast it can repaint the screen. I don't think firing the loud solenoids on the floppy drive and waiting a second or two every time you delete something (or (p)ut it) is going to be a good user experience; the yank buffer probably needs to be in RAM to be usable. You could maybe prompt the user whether to discard the deletion if the text being deleted is over a threshold of size.
- rbanffy 7y agoAltairs and IMSAIs didn't have standard terminals. You could add an S-100 video board with video output and keyboard input (usually something that would output ASCII) or you could attach a real terminal over a serial line on an S-100 board (which is kind of nice if you want to be far from the computer but not that useful for a desktop). Many CP/M desktops used the "bus attached" terminal (because it saves components). A common arrangement (and not only for CP/M machines) would be a CRT controller managing its own memory where the program/OS would address the video memory through the microprocessor's IO channels. This was slow compared to having video driven from main memory (like the Apple II) but CRTCs did a lot the hardware designer wouldn't need to worry about, it was many orders of magnitude faster than a 9600 bps serial terminal, and allowed moving terminal emulation to software/BIOS. The Apple II had a couple "terminal" boards more or less like what I described that allowed it to display 80 and 132-column video. Their memory and registers would be manipulated through memory access as the 6502 didn't have dedicated IO functions. One very common was the Videx Videoterm, that used a 6845 just like the IBM CGA and MDA boards (but with a much nicer VT-100-like font). The Microsoft CP/M SoftCard emulates a SOROQ IQ-120 terminal in software.
- ncmncm 7y agoThank you, I worked on the Videx gadget. We used to put the font ROM in VT52 terminals because it looked so much better than what they had. (These were also sold as Zenith and even Heathkit brands.)
- rbanffy 7y agoWow! I always thought the VT-52 had the same font as the Videx.
- kragen 7y agoWhat Heathkit model was a rebadged VT52? The H9 was crudely similar to a VT50 but in many ways less capable (it didn't even have a character like the AMD-3A’s ^K to move the cursor up, as far as I can tell), and though its successor the H19 supported VT52 sequences, it also supported extensions like ESC E and also an ANSI mode. Or do you mean Heathkit made a Videx-based terminal (presumably not the H9)?
- ncmncm 7y agoIt's been a long time, but H19 rings a bell. It feels like it was the same as the Zenith terminal I used with an LSI-11 running BSD 2.8 Unix (which was Vax Unix implausibly backported; imagine virtual memory with address space for only two swappable 8k pages!), and only emulated the VT-52. Anyway the bit layout in the 2708 EPROM it used was identical to the Videx card's. I think the fonts we used were a late development, and that for most of its life the Videx font ROM was as bad as the original terminals'. We came to realize that the verticals really needed to be two pixels wide. Probably if we had the good sense to use an emitter follower output stage, we could have got good sharp verticals. I need to make clear that the only connections between the terminal and card were that both used a 6845 display driver and a 2708 character ROM.
- kragen 7y agoThanks for all the extra information! I never programmed on the Kaypro or a S-100 crate with a CRTC, just CP/M machines with serial terminals, and of course the Apple.
- mistaken 7y agoAnother improvement: for large files the editor could read / write the file in chunks and maintain only the changes in memory.
- catoc 7y agoHow I wish I had the time to do these kind of projects... I have a wife and two daughters - that I absolutely adore - but I so crave the times when I could sit down and spend 9 hours coding. So count me envious, of your skills and freedom. Good for you! :-)
- zerr 7y agoDo you think using a proper IDE and an intelligent code completion would make things bit faster?