Re: [Freedos-user] From BTTR: FAT32 ramdisk, SvarCOM shell, Doszip commander

2022-06-16 Thread dmccunney
On Thu, Jun 16, 2022 at 7:17 PM Jim Hall  wrote:
> On Thu, Jun 16, 2022 at 5:57 PM dmccunney  wrote:
> >[..]
> > I haven't read through the entire thread, but I am curious about why
> > the person whose email request was referenced *wanted* a RAMdrive for
> > DOS targer than 8GB.
> >[..]
> > With a big enough RAMdrive, you could create it on startup and copy
> > *everything* you used to it and run entirely off the RAMdrive.  I
> > could do something like that with the Win64 RAMdrive.  You can define
> > an image file to be loaded to it after it is instantiated, and I could
> > theoretically load everything I use to it, but the benefits don't
> > justify the effort.
>
> It's an interesting technical achievement, to be sure. So on that end,
> I think it's cool. But I'm not convinced an 8 GB RAM drive for DOS is
> the best way to use that memory.

I concur

> + pros: When the system boots up, you can copy all of DOS into the RAM
> drive, and everything will run faster after that.
>
> - cons: The initial copy is slow because you're copying everything.
> And changes in the RAM drive aren't preserved when you reboot.

I dealt with that setting up Firefox to use a profile on the RAMdrive.
It proved to be *much* faster to keep the profile in a Zip archive on
HD, which was extracted to the RAMdrive using a cmmand line unzip in
my Windows startup process, onstead of using  copy operations on scads
of files.

Capturing and preserving changes was a similar issue.  Ordinarily,
Firefox execution was wrtpped in a script, and exiting Firefox
normally triggered a shutdown step that zipped the entire RAMdrive
profile back to a Zip archive to preserve changes in that session.
Win7 (and 10) Pro had access to Group Policy Manager,  Using GPM, I
could listen for and trap shutdown/reboot event signals, and run the
script that zipped the Firefox profile back to the Zip archive if
those events occurred.

And my script preserved 5 days worth of Zip files. If I made an error
that trashed the current file, I could unzip an older copy instead.
At most, I lost a day' s work. Once I got it properly set up, it Just
Worked, and it was fun setting it up, but I'm just as happy to not
need to do it now. Hardware gets steadily smaller, faster, and
cheaper, and SSDs are close to making HDs obsolete.

> RAM drives make sense on DOS for cached files or a temporary area ...
> but does DOS need an 8 GB temp area?

Does it need a *4GB* area?  I'd still love to know what the
requester's use case was.
__
Dennis


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


[Freedos-user] Printing to PDF on FreeDOS

2022-06-16 Thread Ben Collver
This message is based on a recent log entry of mine.  It describes
how to print to PDF on FreeDOS.  In my example, i take a
screenshot and print it using the COPY command.  However, the
method should work with most DOS programs that can print to an
Epson printer.  All of the utilities used in this post include source
except for Ladybug LOGO, which is what i took a screenshot of, and
it is merely freeware.  You can fetch the gopher links using either
curl or lynx.

-Ben

# Printing to PDF on FreeDOS

I wanted to print from DOS applications, but i no longer have a
hardware printer.  After some tinkering, i came up with the following
solution in FreeDOS.  Note that this process does not work in dosbox
nor in dosbox-x.

The first thing i learned is that the most common type of printer for
DOS is Epson Esc/P.  See the link below for a detailed reference to
Esc/P printer language.

* Esc/P Reference
  https://files.support.epson.com/pdf/general/escp2ref.pdf

First, the ingredients for this recipe:

* Ghostscript (FreeDOS)
  
http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/unix/ghostscript/8.71/gs871.7z
* Ladybug LOGO (Simtelnet)
  http://cd.textfiles.com/simtel/simtel20/MSDOS/LOGO/LADYBUG.ZIP
* NetPBM (DJGPP)
  http://www.delorie.com/pub/djgpp/current/v2apps/npbm916b.zip
* PRN2FILE (Garbo)
  http://cd.textfiles.com/garbo/PC/PRINTER/PRN2FIL3.ZIP
* SNARF screen shot utility
  http://pixelmetrics.com/Snarf/Snarf.zip
* EscParse Esc/P to PDF/PS/SVG converter by Nikita Zimin
  gopher://tilde.pink/1/~bencollver/files/dos/util/escparse/escparse.zip
* Filter to fix Epson printer graphics output by NetPBM
  gopher://tilde.pink/1/~bencollver/files/dos/util/escpfltr/escpfltr.zip

For this example, i chose to use Ladybug LOGO, which i described in
an earlier log entry:

* Ladybug Quest
  gopher://tilde.pink/1/~bencollver/log/2018-01-27-ladybug-quest/

I unzipped all of the "ingredients" and made sure they were in my
path.

I saved a simple LOGO program called flwrlife.bug:
```
C:\>cd \ladybug
C:\ladybug>copy con flwrlife.bug
to circle :size :angle
repeat ( 360 / :angle ) [ fd :size rt :angle ]
end
home cs ht rt 90 repeat 6 [ circle 1 1 rt 60 ]
^Z
```

I ran the snarf screen shot utility, then ran the LOGO program:

```
C:\ladybug>snarf.exe
C:\ladybug>ladybug.exe
? load flwrlife.bug
```

I pressed Alt+S to take a screenshot.

* Ladybug flower of life screenshot
  
gopher://tilde.pink/1/~bencollver/log/2022-06-15-print-quest/ladybug-screenshot.png

I quit LOGO:

```
? bye
```

I converted the screenshot to Esc/P data using NetPBM.  By the way,
when i run NetPBM's Epson graphics through a printer emulator, the
graphical output is staggered and incoherent.  For this reason i
wrote escpfltr to add a carriage return before each line of graphics
and unstagger them.

```
C:\ladybug>bmptoppm.exe SNARF000.BMP >flwrlife.pnm
bmptoppm.exe: Windows BMP, 320x200x4
C:\ladybug>ppmtopgm.exe flwrlife.pnm >flwrlife.pgm
C:\ladybug>pgmtopbm.exe flwrlife.pgm >flwrlife.pbm
C:\ladybug>pnmmerge.exe pnminvert flwrlife.pbm >inverted.pbm
C:\ladybug>pbmmerge.exe pbmtoepson inverted.pbm >inverted.esc
C:\ladybug>escpfltr.com flwrlife.esc
```

I found an old utility named prn2file that captures the print job
being sent to the printer.  It works even when there is no printer
attached.  I used options to save to C:\print.out using a 64KB
buffer.  Note that prn2file does not work in dosbox nor in dosbox-x.

```
C:\ladybug>prn2file.com /b64 /f C:\print.out
 PRN2FILE 1.1 (c) 1987 Ziff Communications Co.
Modifications (c) 1991 Automated Answers
LPT1 Redirected to: C:\print.out
```

Then i used the COPY command to "print" the screenshot.  It is
important to pass the /b option.  This uses an ioctl() to set binary
mode.  Otherwise, DOS will truncate the print data the first time it
sees a Ctrl-Z (ASCII character 26, SUB).  I used prn2file to ensure
that the whole print job was flushed to disk.

```
C:\ladybug>copy /b flwrlife.esc prn
C:\ladybug>prn2file.com
 PRN2FILE 1.1 (c) 1987 Ziff Communications Co.
Modifications (c) 1991 Automated Answers
LPT1 Redirected to: PRN
```

Then i compared the captured print job data to the original file.

```
C:\ladybug>comp flwrlife.esc \print.out
Files compare OK.
```

What can i do with these captured print jobs on DOS?  The "escparse"
utility can convert Esc/P to PDF.  I could copy the PDF to a thumb
drive and print it from another computer.  Because the DOS PDF
viewers don't work well for me, i'll also convert the PDF to JPEG
page images to preview using the links browser.

```
C:\ladybug>escparse.exe -pdf C:\print.out >flwrlife.pdf
ESCParser utility  by Nikita Zimin  Jun 15 2022 17:08:37
Pages total: 2
Page 2
C:\ladybug>gs.exe -r72x72 -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -sDEVICE=jpeg 
-dJPEGQ=90 -o page-%03d.jpg flwrlife.pdf
GPL Ghostscript 8.71 (2010-02-10)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 

Re: [Freedos-user] From BTTR: FAT32 ramdisk, SvarCOM shell, Doszip commander

2022-06-16 Thread Jim Hall
On Thu, Jun 16, 2022 at 5:57 PM dmccunney  wrote:
>[..]
> I haven't read through the entire thread, but I am curious about why
> the person whose email request was referenced *wanted* a RAMdrive for
> DOS targer than 8GB.
>[..]
> With a big enough RAMdrive, you could create it on startup and copy
> *everything* you used to it and run entirely off the RAMdrive.  I
> could do something like thet with the Win64 RAMdrive.  You can define
> an image file to be loaded to it after it is instantiated, and I could
> theoretically load everything I use to it, but the benefits don't
> justify the effort.


It's an interesting technical achievement, to be sure. So on that end,
I think it's cool. But I'm not convinced an 8 GB RAM drive for DOS is
the best way to use that memory.

+ pros: When the system boots up, you can copy all of DOS into the RAM
drive, and everything will run faster after that.

- cons: The initial copy is slow because you're copying everything.
And changes in the RAM drive aren't preserved when you reboot.


RAM drives make sense on DOS for cached files or a temporary area ...
but does DOS need an 8 GB temp area?


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] From BTTR: FAT32 ramdisk, SvarCOM shell, Doszip commander

2022-06-16 Thread dmccunney
On Sun, Mar 13, 2022 at 10:50 AM Eric Auer  wrote:
>
> > RDRVSX32: FAT32 RAM drive for HimemSX (Announce)
> >
> > posted by jadoxa, Queensland, Australia, 13.03.2022, 13:58
> >
> > I had a request (via email) to create a RAM drive greater than 4GiB.
> > It sort of works (works on his and mine 8GiB AMD, but has issues with
> > his 32GiB Intel) so if anyone has the time and inclination to test,
> > that'd be great. You will need more than 4GiB RAM (in order to access
> > super-extended memory), preferably more than 8GiB (in order to test
> > accessing beyond 4GiB). Our testing has been simple so far: just copy
> > large files (he was able to create a 28GiB RAM drive, copy hundreds
> > of 64MiB files, but it fails copying a 1GiB file).

I haven't read through the entire thread, but I am curious about why
the person whose email request was referenced *wanted* a RAMdrive for
DOS targer than 8GB.

On bare metal DOS back in the PC XT days, Ihad an AST 7-Pak card that
added an extra megabyte of RAM, with software that could use it to
create a RAMdrive and/or a disk cache.  I did both, with a 512KB
RAMdrive sees as Z:\. and  256KB disk cache.  My AUTOEXEC.BAT file
copied frequently used utilities likew Vern Buerg's LIST and my
texteditor to the RAMdrive, and various things that could be told
where to create temp file like PKZIP used the RAMdrive when they
created them.  Z:\.was the first entry in my DOS %PATH%.  That and the
disk cache sped things up a treat.

I still use a RAMdrive under Win10 Pro. I found an open source 64bit
Windows RAMdrive driver that would allocate arbitrary amounts of
physical RAM to one or more RAMdrives. Here, I hafe 20GB RAM, and
512MB is allocated to Z:], a RAMdrive used for browser cache.
(Firefox makes that easy.  Chrome requires serious hacking.)  I don't
do development on this machine. If I did, I'd likely find other uses
for the RAM. On my prior desktop running Win7, I had Firefox set up to
run entirely from the RAMdrive, with the profile iyt used stored tehre
too.  The currrent machine boots of a 256GB SSD, and testing revealed
no observable speedup from rthe profile on the RAMdrive vs having it
on SSD, so I didn't bother recreating the previous setup.

With a big enough RAMdrive, you could create it on startup and copy
*everything* you used to it and run entirely off the RAMdrive.  I
could do something like thet with the Win64 RAMdrive.  You can define
an image file to be loaded to it after it is instantiated, and I could
theoretically load everything I use to it, but the benefits don't
justify the effort. .
__
Dennis


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] From BTTR: FAT32 ramdisk, SvarCOM shell, Doszip commander

2022-06-16 Thread Louis Santillan
This is super awesome to hear!  Thanks for linking!

On Wed, Jun 15, 2022 at 1:18 PM Dan Schmidt  wrote:

> Off topic and flagrant necromancy, yet I'll briefly note somebody (kind
> of) did. * (Disclaimer: "correct" loosely defined)*
>
> https://bestofcpp.com/repo/AnttiTakala-SSH2DOS
>
> P.S.  Thanks Eric
>
> On Sun, Mar 13, 2022 at 5:45 PM Karen Lewellen 
> wrote:
>
>> Seems like some fine efforts.
>> Speaking personally, I wish someone would devote time to  upgrading ssh
>> for  dos, so that the  dh key exchange issue was corrected.
>> Kare
>>
>>
>>
>> On Sun, 13 Mar 2022, Eric Auer wrote:
>>
>> >
>> > Hi!
>> >
>> > Today is a day full of announcements on BTTR-SOFTWARE.DE :-)
>> >
>> > https://www.bttr-software.de/forum/forum_entry.php?id=18797
>> >
>> >>  RDRVSX32: FAT32 RAM drive for HimemSX (Announce)
>> >>
>> >>  posted by jadoxa, Queensland, Australia, 13.03.2022, 13:58
>> >>
>> >>  I had a request (via email) to create a RAM drive greater than 4GiB.
>> >>  It sort of works (works on his and mine 8GiB AMD, but has issues with
>> >>  his 32GiB Intel) so if anyone has the time and inclination to test,
>> >>  that'd be great. You will need more than 4GiB RAM (in order to access
>> >>  super-extended memory), preferably more than 8GiB (in order to test
>> >>  accessing beyond 4GiB). Our testing has been simple so far: just copy
>> >>  large files (he was able to create a 28GiB RAM drive, copy hundreds
>> >>  of 64MiB files, but it fails copying a 1GiB file).
>> >
>> > Link: http://shsufdrv.adoxa.vze.com/rdrvsx32.zip
>> >
>> >
>> >
>> > https://www.bttr-software.de/forum/forum_entry.php?id=18799
>> >
>> >>  Doszip Commander version 2.63 available (Announce)
>> >>
>> >>  posted by rr, Berlin, Germany, 13.03.2022, 14:20
>> >>
>> >>  On 02 March 2022 Hjort Nidudsson released a new version.
>> >>
>> >>  Home page: https://github.com/nidud/doszip
>> >>  Download: https://github.com/nidud/doszip/releases/tag/v2.63
>> >>
>> >>  Changes since version 2.55 are:
>> >>  Changes in 2.63 - 2 Mar 2022
>> >>  - extended country-specific date format
>> >>
>> >>  Changes in 2.58 - 15 Feb 2022
>> >>  - added country-specific date format
>> >>
>> >>  Changes in 2.57 - 12 Feb 2022
>> >>  - changed "Jump" to "Skip" in Delete dialog
>> >>  - fixed color issue in Move dialog
>> >>  - fixed issue with pipe command -- unzip -hh | more
>> >
>> >
>> >
>> > https://www.bttr-software.de/forum/forum_entry.php?id=18798
>> >
>> >>  On 13 March 2022 Mateusz Viste released SvarCOM version 2022.3.
>> >>
>> >>  What is SvarCOM?
>> >>
>> >>  Quoting from http://svardos.org/svarcom/:
>> >>  SvarCOM is the SvarDOS command line interpreter, known usually under
>> >>  the name "COMMAND.COM". It is designed and maintained by Mateusz
>> >>  Viste, and distributed under the terms of the MIT license.
>> >>
>> >>  For the time being, it is a work-in-progress project that - although
>> >>  functional - is not entirely polished yet and might miss a few bits
>> >>  and pieces. SvarCOM version 2022.0 must be considered a "preview"
>> >>  version. See the documentation included in the zip file for details.
>> >>
>> >>  SvarCOM is minimalist and I'd like to keep it that way. It aims to be
>> >>  functionaly equivalent to COMMAND.COM from MS-DOS 5.x/6.x. No LFN
>> >>  support.
>> >>
>> >>  As of version 2022.0, SvarCOM's resident footprint is under 2 KiB.
>> >>
>> >>  What is new in version 2022.3?
>> >>
>> >>  Here is his 2022.3 announcement to the SvarDOS mailing list:
>> >>  Hello all,
>> >>
>> >>  SvarCOM 2022.3 has been published right now. It comes with many
>> >>  improvements and bug fixes. Many thanks to Robert Riebisch who
>> dedicated
>> >>  a lot of time to perform extensive tests on SvarCOM and had the
>> strength
>> >>  to annoy me over and over about the various glitches he found.
>> >>
>> >>  The new SvarCOM package is already available on the SvarDOS packages
>> >>  repository. It can also be downloaded from the SvarCOM sub-project
>> page
>> >>  at http://svardos.org/svarcom
>> >>
>> >>  As an experiment I did a SvarDOS build that uses SvarCOM instead of
>> >>  FreeCOM. It is the build 20220312, available in the "files" section of
>> >>  the website: http://svardos.org/?p=files
>> >>
>> >>  If this build proves stable enough, it might become the default
>> download
>> >>  presented on the main page, but for now it needs some testing. There
>> is
>> >>  also still one or two things that needs to be added (like DIR/O
>> support).
>> >>
>> >>  The main advantage of SvarCOM over the legacy FreeCOM is that the
>> former
>> >>  is much lighter (2K of memory footprint), which is esp. important on
>> >>  pre-386 machines.
>> >>
>> >>  An interesting side effect of replacing FreeCOM by SvarCOM is that
>> some
>> >>  of the SvarDOS floppy sets decreased:
>> >>
>> >>  720K set went from 4 floppies to 3 floppies
>> >>  1.2M set went from 3 floppies to 2 floppies
>> >>
>> >>  Other sets remained the same amount of floppies (6x 360K, 2x 1.44M and
>>