Announcement

Collapse
No announcement yet.

PB in dosemu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    PB in dosemu

    I have PB 3.0c, and I just finished setting up dosemu with Caldera
    DR-DOS in Red Hat 9. I was wondering if anyone already has experience
    using PB in dosemu. Does it work well? Any known pitfalls?

    ------------------
    Erich Schulman (KT4VOL/KTN4CA)
    Go Big Orange

    #2
    You may also want to give a look at DosBox.
    It's a complete PC+DOS emulator; I find it a better platform to run PB (or other DOS things) than DOSEmu.

    Bye!

    ------------------
    Try Online TrID file identifier! Recognize over 1.470 filetypes and counting...
    Give a powerfull scriptable Lua interface to your application with PowerBLua
    PBTracer - Tracer / Profiler for PowerBASIC (soon!)
    -- The universe tends toward maximum irony. Don't push it.

    File Extension Seeker - Metasearch engine for file extensions / file types
    Online TrID file identifier | TrIDLib - Identify thousands of file formats

    Comment


      #3
      I have a rather elaborate multi-user database program that I wrote in PB3.5. It runs fine on Fedora Core 3, using the dosemu rpm that has freedos built-in.

      The Fedora server is a 3.2GHz Intel CPU with 1.5gb of ram, and it runs http://www.ltsp.org software to allow multiple X terminals (currently 5) to be attached. It runs a small publishing company.

      dosemu works fine, and I have never had a problem with my database that I can attribute to a bug in dosemu.

      Hints:
      1. The SHARE program that comes with freedos works fine with PB applications. You get an error 75 on any collisions and can handle them with an "on error" structure (see my previous post in this area for more information from me and others about this.)
      2. The simplest way that I have found to keep track of who is using a PB program under dosemu is to write a script that calls whoami and puts a file into the user's home directory with his username. Then PB applications can read it with "open "d:\whoami" for input as #1". I use this stunt with an employee timeclock (punch-in and punch-out, generate shift reports) that has a different menu for the supervisor.

      Here is my "rundosemu.scr" script that is called from an icon on everyone's desktop when they want to access the database and other PB programs:

      umask 002
      whoami > ~/whoami
      unix2dos ~/whoami
      xdosemu

      I have a symbolic link in everyone's ~/dosemu/freedos directory that points to a directory under /opt, then I can just cd to the shared directory under /opt and read and write the database there.
      The last line of everyone's autoexec.bat calls another batch file; this is the first three lines of the second batch file:

      @echo off
      loadhi share
      cd c:\barghntr
      frontend

      c:\barghntr is a symbolic link to /opt/barghntr. And the umask statement in the bash script allows all users in the current group to read and write files in /opt/barghntr. So as long as you belong to the right group, you can read and write the databases in /opt/barghntr.

      This is all completely transparent to the user and automatic, of course. frontend just calls a menu that exits with various errorlevels that are handled by the rest of my second batch file to call other PB programs as required. Clever use of symbolic links can cover a multitude of sins in that regard.

      3. I have found that the easiest way to get pretty reports (assigning fonts and whatnot) from PB applications is to write the report to a html file, then import it into OpenOffice for viewing and printing. OpenOffice honours a chr$(12) in a html file, so you can put page breaks where-ever you like. For desktop publishing using Scribus, it's best to run your html file through OpenOffice, then save it as a sxw file and import that into Scribus as the OpenOffice import filter is much more complete than the html filter in Scribus.

      You can read and write "shared data" to files under your symbolic link to /opt, and read and write "private data" to anywhere under "d:\" that you like. And your shared database (or whatever) is easy to backup because it's all in one place that way.


      ------------------

      Comment


        #4
        That is way cool what Frank is doing with PB and Dosemu.

        Having run both Dosemu and DosBox, here are some features and issues with each:

        Dosemu:
        - Virtualization not emulation so programs execute at 100% cpu speed
        - Dosemu runs in an X window, allowing some graphics modes and the mouse to be emulated
        - Dosemu runs in a terminal too, allowing remote access to dos programs. I've actually run PB over ssh before. Very cool
        - Dosemu can, under some video cards, run on the native console, allowing full access to the video card (all modes). Needed for some programs
        - Programs under Dosemu can often take 100% of the cpu, due to lack of any kind of time slicing. This may be possible to overcome with standard Windows 9x interrupt calls to release the time slice
        - Any DOS version like DR-DOS, MS-DOS, PC-DOS or FreeDOS can be used as the OS in dosemu. FreeDOS is the best as far as features go. Had it been available years ago, MS-DOS would have died. For best compatibility, though, real MS-DOS should be used.
        - Some graphics modes just won't work properly in xdosemu and terminal mode is limited
        - Can boot off of a virtual disk that is actually a subdirectory on the host linux machine. Very cool since I can use a CD-ROM of my old hard drive to boot off of (in this mode, there need not be a boot sector; dosemu will find the io.sys file just fine)
        - Can boot off of raw device like a floppy
        - Can mount arbitrary host linux subdirectories as drive letters
        - Runs on intel-compatible systems only
        - emulation of joystick and sound card
        - emulates ne2000 network card to allow packet drivers and things to run. you can indeed run a full tcp/ip stack in DOS and even map drives from samba using the lanmanager protocol
        - emulates expanded and extended memory
        - may support 32-bit extended mode programs (DPMI only, no VCPI or whatever it was called)

        DosBox:
        - Runs under windows, Unix, linux, any platform
        - True emulation of the CPU, so it can accurately replicate things.
        - Emulates video card, so all video modes are supported within the dosbox window.
        - no terminal mode
        - slow
        - hogs all the cpu mostly all the time
        - emulates sound and joystick
        - Great for running old sierra games (Space Quest III, etc)
        - can mount any arbitrary host linux subdirectory as a drive letter
        - has DOS built-in, so you can't run an arbitrary version of say MS-DOS
        - don't think it emulates any network interface card
        - emulates expanded and extended memory
        - don't think 32-bit extended mode programs will run

        PB runs fine on both emulators (note that dosemu isn't really an emulator but a virtual machine). While I wouldn't use a dos-program in dosemu to do cgi, there are still many useful things you can do to tide you over until the ever-hoped-for PB/Linux comes along.

        ------------------

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎