I made a virtual dot matrix printer

  Рет қаралды 3,748

FreeDOS

FreeDOS

Ай бұрын

Over the weekend, I wrote a program that I found rather interesting. It’s a program that emulates a very simple dot matrix printer.
Get it here:
github.com/freedosproject/vp
Visit our website
www.freedos.org/
Join us on Facebook
/ freedosproject
Follow us on Mastodon
fosstodon.org/@freedosproject
Consider supporting me on Patreon
/ freedos
And don't forget to Like and Subscribe!
Standard comment rules apply.

Пікірлер: 32
@zirize
@zirize Ай бұрын
About two decades ago, I was working on POS software for a company. At that time, most receipt printers used RS232 communication, and I remember a project where we created virtual printer based on communication data generated by the PC's RS232 port. The purpose was to test whether software outputs were accurate without actually using a printer.
@freedosproject
@freedosproject Ай бұрын
That's a great project - and practical!
@monad_tcp
@monad_tcp Ай бұрын
That's was a cool idea, when I had that problem, I wrote a table of command translation between the matrix printer and ESC/P so I could just send the thing to a fast laser printer, It was very fast to make tests, but wasted paper.
@ahmad-murery
@ahmad-murery Ай бұрын
I and my friend worked together to replace an old (1-pin with 9 colors ribbon) dot printer which was a part of scintigraphy thyroid scanner. this scanner was built as a tank and it prints as it scanning, the printer and the sensor mounted on one big moving arm and it prints directly on a paper laid down and held on a metal plate using adhesive tape , you really have to see it 😁🤦‍♂ The reason to do the app is that the stock ran out from compatible ink ribbons The problem was it doesn't output any digital signals to rely on and al what we got is analog sound generator producing a wave depending on the strength of the radiation detected by the sensor. My friend designed an electronic interface circuit to convert these waves to something our program can read via RS232, and I built the app to mimic the output of the printer in order to print it on a modern inkjet printer. Thanks Jim, you bring back so many memories
@freedosproject
@freedosproject Ай бұрын
That project sounds pretty awesome!
@ahmad-murery
@ahmad-murery Ай бұрын
@@freedosproject It was indeed, we enjoy doing it to revive an old machine. Thanks for the great reply Jim
@mlongval
@mlongval Ай бұрын
Thanks for this Jim. I always find your videos very interesting. Keep up the great work. Cheers from Canada!
@freedosproject
@freedosproject Ай бұрын
Thanks! I'm glad you liked it.
@gingered
@gingered Ай бұрын
I would have thought converting the character set would be much more involved, this is very cool! I had a moment to think about it, and I think it will be 30 years this year since I last used a dot matrix printer. The sound as it tracks across the sheet and advances rows is very nostalgic.
@freedosproject
@freedosproject Ай бұрын
The old dot matrix sound was kind of soothing, in a way. 😄
@gingered
@gingered Ай бұрын
@@freedosproject it helps that now it doesn't come with a parent shouting "stop that screeching!" from the next room 😃
@skilletpan5674
@skilletpan5674 Ай бұрын
​@@freedosprojectI still remember the IBM pro printer. Such a nice sound.
@andimachovec2719
@andimachovec2719 Ай бұрын
@@skilletpan5674 : Legendary!
@williefleete
@williefleete Ай бұрын
In amongst my stuff I have the manual for the star NX1000 mono dot matrix printer, The manual includes some BASIC listings for testing the capabilities of the printer, including user defined characters. Maybe include support for sending “escape” codes (char 27) for enabling underline, sending data for user defined characters, etc
@freedosproject
@freedosproject Ай бұрын
My printer at the time was Epson, and Epson printers had that ESC/P print control. The name actually comes from Epson Standard Code for Printers because Epson made it. I hope to update this in future to add ESC/P print control like underline and even graphics mode.
@LordHog
@LordHog Ай бұрын
Very cool
@brucetungsten5714
@brucetungsten5714 Ай бұрын
Great video!
@freedosproject
@freedosproject Ай бұрын
Glad you enjoyed it
@wherami
@wherami Ай бұрын
most excellent
@kelli217
@kelli217 Ай бұрын
Too bad that delay() requires an integer argument. Otherwise you could adjust the delay to something closer to, say, an Epson LX.
@freedosproject
@freedosproject Ай бұрын
One way to slow it down to a fraction of a millisecond would be to use a counter, and then you add the delay for every 2nd or 3rd byte. A live human might not spot the difference. Basically this: int count = 0; ... if ((++count % 3) == 0) { delay(1); count=0; }
@monad_tcp
@monad_tcp Ай бұрын
Also needs sound emulation.
@rwoliver2
@rwoliver2 Ай бұрын
This is awesome. I wonder how difficult it would be to redirect output to LPT1 to this as a TSR?
@ssl3546
@ssl3546 Ай бұрын
Depends if you already have a robust TSR framework to build on, there's just a few int 21 calls to intercept and you'd have to parse pathnames for 3Dh. Making a TSR that knows when it can take over the system is the tricky part, and it would need to be quite big for the graphics buffer.
@fnjesusfreak
@fnjesusfreak Ай бұрын
@@ssl3546 It's actually not int21, but int17 (AH=0 lpt_putch, AH=1 lpt_init, AH=2 lpt_status).
@freedosproject
@freedosproject Ай бұрын
I think an easier way would be to redirect printing to a file (many DOS word processors can already do that) and then use this to "print" it to the screen.
@raxadian
@raxadian 27 күн бұрын
I still have a dot matrix printer dunno if works.
@plato4ek
@plato4ek 3 күн бұрын
again, you had some issues with sound, just in one place
@Kyoz
@Kyoz Ай бұрын
🤍
@DanielLenskiy
@DanielLenskiy Ай бұрын
What is purpose of this program, because result is clearly unreadable...
@NextMomentOnEarth
@NextMomentOnEarth Ай бұрын
15:23 it's mostly a demonstration of the way dot matrix printers work without wasting paper on several demonstrations
@plato4ek
@plato4ek 3 күн бұрын
Note, that he didn't supply any font (he mentioned that twice, but with other words), so the program uses the random bitmaps for characters. That's why it is unreadable. If you modify the program to load correct shapes for characters everything will be readable enough.
Using the MS-DOS 4 release to compile programs
19:35
FreeDOS
Рет қаралды 5 М.
Writing your own file viewer
25:57
FreeDOS
Рет қаралды 6 М.
HAPPY BIRTHDAY @mozabrick 🎉 #cat #funny
00:36
SOFIADELMONSTRO
Рет қаралды 17 МЛН
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 6 МЛН
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 59 МЛН
Happy 4th of July 😂
00:12
Alyssa's Ways
Рет қаралды 63 МЛН
Linux like original Unix
44:55
FreeDOS
Рет қаралды 302 М.
I built my own 16-Bit CPU in Excel
16:28
Inkbox
Рет қаралды 1,4 МЛН
Happy 29th anniversary to FreeDOS!
33:11
FreeDOS
Рет қаралды 7 М.
The greatest clock (and map) ever made
21:19
Attoparsec
Рет қаралды 434 М.
A look back at original style C
17:35
FreeDOS
Рет қаралды 37 М.
Remember noisy receipt printers? - Epson TM-U325
11:24
VWestlife
Рет қаралды 83 М.
Why Western Designs Fail in Developing Countries
27:36
Design Theory
Рет қаралды 682 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 695 М.
EXEED VX 2024: Не өзгерді?
9:06
Oljas Oqas
Рет қаралды 46 М.
Это Xiaomi Su7 Max 🤯 #xiaomi #su7max
1:01
Tynalieff Shorts
Рет қаралды 1,1 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 57 МЛН
Зачем ЭТО электрику? #секрет #прибор #энерголикбез
0:56
Александр Мальков
Рет қаралды 624 М.