32 bit TSR in FreeBasic (yes, it worked, in the end)

DOS specific questions.
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by Gablea »

@caseih

I have seen what you mean with the X11 I can start it via the command

startx ./NPoS/NPoS and that starts up the X11 server and then boots into the PoS applications and on the more modern systems it is quick.

Would X11 allow me to use dual Monitors? (one on the DVI Port and the other on the VGA port)

the machines I can get from NCR are 600MHz CPU with 512MB RAM and dual screen ports (ideal as I would really love to use 2 screen on the tills as here in the UK we do not have meany Full graphical customer displays like you do is the USA)
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by caseih »

Yes X11 should be able to use two monitors. I'm not totally sure what configuration would be necessary, or if it would just detect it automatically.

What I'd do if I were doing something like your POS would be to use a normal login manager set to auto login as the POS user, and then I'd use a $HOME/.xinitrc script to fire up the POS program, rather than using some kind of console script and startx, although that would work.
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by Gablea »

Ok so let’s say I have the till software booting up how do I get it so one app is on the customer display and the other is showing on the user display?

In windows and VB I can use the new point command

Eg frmbackgroud.location = new point(800,0)

How would that work in FB?
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by St_W »

While X11 supports multiple monitors, FreeBasic unfortunately does not. You'll need some hacky solution to use multiple monitors with FB's gfxlib2.
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by Gablea »

I’m happy to use 2 programs but in my tests on Windows if one fb program went full screen it would kick the other one out of full screen.

Maybe I’m doing it wrong.
St_W
Posts: 1619
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by St_W »

Fullscreen mode is usually exclusive. Recommended approach is to create a borderless display-sized window. Note that your rendering code has to support different display resolutions in that case, but that should be the case anyway if its good code. Also note that you'll have to include a dpi manifest on Windows, otherwise it won't work correctly on certain displays.

Example: http://users.freebasic-portal.de/stw/fi ... e-demo.zip
rugxulo
Posts: 219
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by rugxulo »

MrSwiss wrote:
... app in the background on Linux, would that be a standard app?
Yes, Linux is multitasking, like Windows.
DOS fails on that ... (as already many times stated!).
You can still buy DR-DOS 7.03 online, but it's a personal license, so you can't redistribute it (proprietary). It does have preemptive multitasking, but it's limited to 64 MB per task (and requires its own EMM386 and DPMI enabled). Not sure how well it'll work on modern, big-RAM machines. I think it lies about XMSv3 support, so you're still stuck to 64 MB, even with a better XMS driver (e.g. HIMEMX) loaded first. Actually, this EMM386 doesn't need a separate HIMEM.SYS at all.

DR-DOS is quite old (1999), but what else is there? I guess DOSEMU (or DOSEMU2 prerelease) under Linux? Or does that defeat the point?
rugxulo
Posts: 219
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by rugxulo »

angros47 wrote:In Linux you can run a standard app (or more than one) in background. And several Linux distributions have the same hardware requirements than DOS with a 32 bit extender (aka the environment you are currently using). Also, I programmed under Linux, and I programmed under DOS, so trust me: programming under Linux is easier.
Which Linux distro exactly would even pretend to be appropriate? Perhaps TinyCore ("Core" = 11 MB). Or maybe something that never comes with X11 by default, e.g. FreeBSD? Or even Minix3?
rugxulo
Posts: 219
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by rugxulo »

Maybe I'm a little naive (I never worked with FB-DOS), but wouldn't it be possible to emulate multithreading by periodically switching through multiple segments of the program, each time saving and restoring the set of processor registers? I coded something similar for an AVR microcontroller some years ago, and it worked fine.
I know nothing of threads, but the available libs for DJGPP that I know of are as follows: CLWP, GNU Pth, FSU Pthreads. I have no idea if they work properly or correctly for your needs. They are not widely used (not that too too many projects are still active).
If it had to be DOS however, I'd use something like (the now free) Desqview/X. Used it for BBSes for a long time, and it is stable and fairly comfortable. There are also some int 2F services for dos apps to communicate with DV/X and eachother (IPC like, e.g. to give a signal to eachother), though often just semaphore files were used.
With all due respect, legality of that probably depends on your country of residence. Certainly I've heard the rumors, but it's vague at best. As a non-lawyer, I don't personally consider it "freeware" to download (esp. as U.S. citizen, which is allegedly stricter than the Netherlands), but it's hard to know for sure.

BTW, I think Desqview/X (1994??) used an old DJGPP v1-based devkit. It's still on the DJGPP mirrors, but I have no experience with that either.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by caseih »

How old of a machine are you talking of here? The X11 server is actually quite small and efficient and can run on minimal hardware. I was running it on ancient handheld devices 15 years ago or more. Of course you're not going to run Gnome on it but basic X11 and apps such as you'd produce in FB can run just fine on it. Depending on the hardware, a distribution like LEDE (now OpenWrt) maybe be ideal. We're talking just a few MB of flash storage here, and not so much RAM.
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by angros47 »

rugxulo wrote: Which Linux distro exactly would even pretend to be appropriate? Perhaps TinyCore ("Core" = 11 MB). Or maybe something that never comes with X11 by default, e.g. FreeBSD? Or even Minix3?
BasLinux fits on two floppies.... and XWOAF fits on a single floppy, and it features a working GUI. Basically, it is as small as KolibriOS
rugxulo
Posts: 219
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by rugxulo »

angros47 wrote:BasLinux fits on two floppies.... and XWOAF fits on a single floppy, and it features a working GUI. Basically, it is as small as KolibriOS
BlueFlops (2006?) fits on two floppies and has Links2 and IRC. But all of those are quite ancient.

Heck, we have a DJGPP port of Links2 nowadays (and Wget, FTP, etc).

I'm just saying, slim / lite / tiny Linux distros don't really exist anymore. They're old and unsupported. You're not much better off with them unless you know exactly what you're doing, willing to experiment, solve everything yourself (with lots of sweat, time, etc). TinyCore is probably your best (only?) bet.
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by angros47 »

Newer versions of Linux are supposed to support more hardware, and of course they are useless on old hardware. And on new hardware, the constraint of a floppy size makes no sense, since new computers don't have floppy units any more
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by caseih »

rugxulo wrote:I'm just saying, slim / lite / tiny Linux distros don't really exist anymore. They're old and unsupported. You're not much better off with them unless you know exactly what you're doing, willing to experiment, solve everything yourself (with lots of sweat, time, etc). TinyCore is probably your best (only?) bet.
I wouldn't say they don't exist or are old or unsupported. slim/lite/tiny distros *do* exist and are under active development. OpenWrt (was LEDE) is one example, probably the main distro. It supports very small platforms (4-8 MB of flash storage). Right now there's a plethora of tiny SoC boards with very limited resources that run Linux for various purposes. So it's an active field of endeavor. In fact this is one area where Linux seems to be reigning supreme and likely will for years yet.

Of course you don't need to be an expert to use Linux on small, low-powered devices. But yes you do need to be willing to experiment and learn how to solve problems. That's why you're here using FB, right?

I note that you've never have stated just what kind of hardware you wanting to run on. If you want answers to your question about Linux on it, you'll have to provide more details.
rugxulo
Posts: 219
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

Re: 32 bit TSR in FreeBasic (yes, it worked, in the end)

Post by rugxulo »

caseih wrote:I note that you've never have stated just what kind of hardware you wanting to run on. If you want answers to your question about Linux on it, you'll have to provide more details.
I'm not the guy asking (but you maybe knew that already):
Gablea wrote: the machines I can get from NCR are 600MHz CPU with 512MB RAM and dual screen ports (ideal as I would really love to use 2 screen on the tills as here in the UK we do not have meany Full graphical customer displays like you do is the USA)
Post Reply