I have no problems with FreeDOS and BBE on my regular PC, but on my
IBM Thinkpad 360C, I have some problems.

If I do not load emm386.exe, only himem.sys, I can load BBE. But,
normally I have these two lines

DEVICE=C:\THINKPAD\IBMDSS01.SYS
DEVICE=C:\THINKPAD\IBMDOSCS.SYS

in config.sys to activate the PCMCIA slot (or something). If I load
only the first line, or both of them, I get KR-07 when starting BBE.
If I load emm386.exe, then the last line makes the computer reboot.
Normally, when using MS-DOS and QEMM, optimize.exe exclude C000-C3FF
(ARAM=C000-C3FF), so I have tried to exclude that and other areas to
see if it helped. It did not. X=C000-C3FF made the computer freeze
when loading IBMDOSSC.SYS, other areas just made it reboot.

2. If I load emm386.exe, and not the PCMCIA drivers, BBE freeze while
the splashscreen is still on. I started loader.exe with the log
switch, and this is what the log file looks like:

On 2004-08-09 19:20, Thomas L. Christensen wrote:
[color=blue]
>Hi
>
>I have no problems with FreeDOS and BBE on my regular PC, but on my
>IBM Thinkpad 360C, I have some problems.
>
>[/color]
I am not surprised. Portables, like Thinkpad, is somewhat special
compared to ordinary PC:s. And FreeDOS is also a different story
compared to mainstream DOS.
Merge these together will certainly be a task. There is links on the
FreeDOS homepage [url]http://www.freedos.org[/url] that deals with FreeDOS on
portables, you might need to check it out.
[color=blue]
>If I do not load emm386.exe, only himem.sys, I can load BBE. But,
>normally I have these two lines
>
>DEVICE=C:\THINKPAD\IBMDSS01.SYS
>DEVICE=C:\THINKPAD\IBMDOSCS.SYS
>[/color]

OK, seems that cause problems for EMM386.EXE or the other way around.
[color=blue]
>in config.sys to activate the PCMCIA slot (or something). If I load
>only the first line, or both of them, I get KR-07 when starting BBE.
>If I load emm386.exe, then the last line makes the computer reboot.
>Normally, when using MS-DOS and QEMM, optimize.exe exclude C000-C3FF
>(ARAM=C000-C3FF), so I have tried to exclude that and other areas to
>see if it helped. It did not. X=C000-C3FF made the computer freeze
>when loading IBMDOSSC.SYS, other areas just made it reboot.
>
>2. If I load emm386.exe, and not the PCMCIA drivers, BBE freeze while
>the splashscreen is still on. I started loader.exe with the log
>switch, and this is what the log file looks like:
>
>Logging On
>Initializing Timer Module
>Initializing Scrub Thread
>Initializing IM Thread
>Initializing Fonts
>Initializing Graphics Module
>Initializing Window Module
>Initializing vidmem.geo
>Initializing emm.geo
>Initializing xms.geo
>Initializing disk.geo
>Initializing Danish Extended Keyboard
>Initializing nimbus.geo
>Initializing Keyboard driver
>Initializing Sound driver
>Creating Flow Object
>Initializing Specific UI
>Initializing Token DB
>Initializing Screens
>Initializing VESA 256-color SVGA Driver
>
>
>In a normal boot it continues with
>
>Initializing Input Map
>Initializing Screen Blanker
>Initializing Spooler
>Initializing Mailbox
>Initializing - disabled
>Initializing Graphical Setup
>Initializing Mouse driver
>Initializing IBM PS/2 Mouse
>Error - no driver entry in INI file for:
>secondMouse
>Initializing Clipboard
>Initializing Task-Switch Driver
>Initializing Non-Switching Task Driver
>
>
>Could there be something wrong in my config.sys? I don't know much
>about the settings I use, I just copied them from Hans's config.sys.
>[/color]
Well, since you took my Config.sys, I feel a bit responsible ;-)
The buffers value seems a bit low at first sight, so I suggest that you
rise the value of buffers to 30. The exclude command in EMM386.EXE,
X=A000-C7FF, refers to the video shadow RAM and needs to be excluded
from use of EMM386. I would suggest that you try the config.sys, without
loading your drivers.. Try his one instead:

If this works, then you have solved the problem. If it doesn't work, then I think you have a conflict with one or both of your PC-Card (PCMCIA) drivers and your video card, as the PCMCIA driver use C000-C3FF, and will overlap with the shadow RAM area of your graphics adapter A000-C7FF. If you run normal 16 color graphics, you might not notice this as a problem, but if you use Vesa and 256 color, the conflict will be evident. There might also be an issue with the EMM386 driver, but if the EMM386 driver will work in the two first examples, there might be a conflict between the EMM386 and PCMCIA drivers and/or Vesa driver. The testing above will show. Test and please come back with your results, and them I might help you further on.
There are also some more parameters to test in EMM386, that will fine tune the use of upper memory, but they will not help solving your current problems, and therefore, for the moment, irrelevant.

[color=blue]
>The buffers value seems a bit low at first sight, so I suggest that you
>rise the value of buffers to 30.[/color]

I have asked about buffers here before, and the answer was I don't
need buffers at all. It's only to speed up harddisk access a little,
and if you use e.g. smartdrive, you can set buffers to the minimum
value.
[color=blue]
>The exclude command in EMM386.EXE,
>X=A000-C7FF, refers to the video shadow RAM and needs to be excluded
>from use of EMM386. I would suggest that you try the config.sys, without
>loading your drivers.. Try his one instead:
>
>FILES=120
>BUFFERS=30
>LASTDRIVE=H
>SWITCHES=/F /N
>DOS=HIGH,UMB
>DEVICE=a:\FDOS\HIMEM.EXE
>DEVICE=a:\fdos\emm386.exe ALTBOOT X=A000-C7FF
>SHELLHIGH=a:\COMMAND.COM a:\ /E:1024 /F /MSG /K a:\AUTOEXEC.BAT
>[/color]

No luck. The computer freeze while lading BBE. It works if I rem out
the emm386 line...

[color=blue]
>If this works, then you have solved the problem. If it doesn't work, then I think you have a conflict with one or both of your PC-Card (PCMCIA) drivers and your video card, as the PCMCIA driver use C000-C3FF, and will overlap with the shadow RAM area of your graphics adapter A000-C7FF.[/color]

Well, there is a conflict, and it involves emm386.exe. I just tried to
run loader with the nomem option, and this, of course, works fine.

After I send the message, I realized I was confusing two things. The
PCMCIA drivers do not require I exclude memory areas. It is the NIC
that does. With MS-DOS I can load both PCMCIA drivers and the vesa
driver, without excluding anything, and run BBE, so it is only the
FreeDos emm386 that course problems.

I'm not sure I know what this shadow RAM area you talk about is, but
with MS_DOS there is, as said, no reason to exclude anything - in
fact, I can include B000-B7FF and still everything runs fine...

Well, the reason why I asked this very FreeDos related question in
this group, was to show you the geos loader logfil. I thought it could
tell something, if you could see when in the boot process geos
freeze... One thing you _can_ see is it freeze after loading the 256
color driver, so it would be natural to think this could be the
problem. But it also freeze when using 16 colors driver... :-(

What is this "Input Map"? Looks like it course the problem?

Okay, it is not important for me to get FreeDos running on my
Thinkpad. It runs on my desktop PC and that's the most important...

Thomas

09-29-2007, 07:00 PM

unix

Re: Computer freeze while loading BBE on FreeDOS

Hi Thomas,

On 2004-08-11 18:07, Thomas L. Christensen wrote:
[color=blue]
>On Mon, 09 Aug 2004 21:25:28 GMT, Hans Lindgren
><nospamhans.lindgren@abc.se> wrote:
>
>
>
>[color=green]
>>The buffers value seems a bit low at first sight, so I suggest that you
>>rise the value of buffers to 30.
>>
>>[/color][/color]
OK, I just took the value from the Breadbox Ensemble installer. I will
try 8, too! Why waste valueble memory?
[color=blue]
>I have asked about buffers here before, and the answer was I don't
>need buffers at all. It's only to speed up harddisk access a little,
>and if you use e.g. smartdrive, you can set buffers to the minimum
>value.
>
>
>[color=green]
>>The exclude command in EMM386.EXE,
>>X=A000-C7FF, refers to the video shadow RAM and needs to be excluded
>>
>>
>>from use of EMM386. I would suggest that you try the config.sys, without[/color]
>
>[color=green]
>>loading your drivers.. Try his one instead:
>>
>>FILES=120
>>BUFFERS=30
>>LASTDRIVE=H
>>SWITCHES=/F /N
>>DOS=HIGH,UMB
>>DEVICE=a:\FDOS\HIMEM.EXE
>>DEVICE=a:\fdos\emm386.exe ALTBOOT X=A000-C7FF
>>SHELLHIGH=a:\COMMAND.COM a:\ /E:1024 /F /MSG /K a:\AUTOEXEC.BAT
>>
>>
>>[/color]
>
>No luck. The computer freeze while lading BBE. It works if I rem out
>the emm386 line...
>[/color]
Well, it seems to be a problem with EMM386 and your Thinkpad, then.
Maybe the BIOS in the Thinkpad. Have you tried to use the UMBPCI driver,
written by Uwe Sieber: [url]http://www.uwe-sieber.de/umbpci_e.html[/url] ? If it
works with UMBPCI, then there is something with the EMM386 driver, I think.
[color=blue][color=green]
>>If this works, then you have solved the problem. If it doesn't work, then I think you have a conflict with one or both of your PC-Card (PCMCIA) drivers and your video card, as the PCMCIA driver use C000-C3FF, and will overlap with the shadow RAM area of your graphics adapter A000-C7FF.
>>
>>[/color]
>
>Well, there is a conflict, and it involves emm386.exe. I just tried to
>run loader with the nomem option, and this, of course, works fine.
>
>After I send the message, I realized I was confusing two things. The
>PCMCIA drivers do not require I exclude memory areas. It is the NIC
>that does. With MS-DOS I can load both PCMCIA drivers and the vesa
>driver, without excluding anything, and run BBE, so it is only the
>FreeDos emm386 that course problems.
>[/color]
OK, you have already targeted the problem, then?
[color=blue]
>I'm not sure I know what this shadow RAM area you talk about is, but
>with MS_DOS there is, as said, no reason to exclude anything - in
>fact, I can include B000-B7FF and still everything runs fine...
>[/color]
Well, maybe the EMM386 driver in MS-DOS autoscans the upper memory. The
video shadow RAM is there to speed up graphics, as the graphic adapter
dumps the video bios in the Shadow RAM. The B000-B7FF area is the
monochorome area and was used by the good old Hercules adapters. Most
VGA adapters doesn't use it, although some might, the only way is often
to find out, in other words, trial and error. I have a VGA adapter that
requires the area A000-CBFF excluded, otherwise the computer will freeze.
[color=blue]
>Well, the reason why I asked this very FreeDos related question in
>this group, was to show you the geos loader logfil. I thought it could
>tell something, if you could see when in the boot process geos
>freeze... One thing you _can_ see is it freeze after loading the 256
>color driver, so it would be natural to think this could be the
>problem. But it also freeze when using 16 colors driver... :-(
>
>[/color]
Well, I would suspect problems with EMM386 and the video/graphics. This
was a common problem , and maybe still is, if one runs DOS. So your
assumption is right, I think.
[color=blue]
>What is this "Input Map"? Looks like it course the problem?
>[/color]
Well, some incompatibility with EMM386 and the Video BIOS, I would say.
Remember that the FreeDOS EMM386 driver is very young compared to MS-DOS
and PCDOS, or DR DOS. You can contact Michael Devore, and discuss with
him, if you want to? It is hard to me to discuss with him problems that
a third person encounter.
[color=blue]
>Okay, it is not important for me to get FreeDos running on my
>Thinkpad. It runs on my desktop PC and that's the most important...
>
>[/color]
OK. I have a 486 laptop with color LCD screen, that is quite OK, but not
as good as todays TFT screens. That will be my next project, to try
FreeDOS on.

Hilsen
Hans

09-29-2007, 07:01 PM

unix

Re: Computer freeze while loading BBE on FreeDOS

"Thomas L. Christensen" schrieb:[color=blue]
>
> Hi
>
> I have no problems with FreeDOS and BBE on my regular PC, but on my
> IBM Thinkpad 360C, I have some problems.
>
> If I do not load emm386.exe, only himem.sys, I can load BBE. But,
> normally I have these two lines
>
> DEVICE=C:\THINKPAD\IBMDSS01.SYS
> DEVICE=C:\THINKPAD\IBMDOSCS.SYS
>
> in config.sys to activate the PCMCIA slot (or something). If I load
> only the first line, or both of them, I get KR-07 when starting BBE.
> If I load emm386.exe, then the last line makes the computer reboot.
> Normally, when using MS-DOS and QEMM, optimize.exe exclude C000-C3FF
> (ARAM=C000-C3FF), so I have tried to exclude that and other areas to
> see if it helped. It did not. X=C000-C3FF made the computer freeze
> when loading IBMDOSSC.SYS, other areas just made it reboot.[/color]

[color=blue]
> 2. If I load emm386.exe, and not the PCMCIA drivers, BBE freeze while
> the splashscreen is still on. I started loader.exe with the log
> switch, and this is what the log file looks like:[/color]
[color=blue]
> Initializing VESA 256-color SVGA Driver[/color]

So it seems to have problems initializing the video card with EMM386
loaded.
Seems like accessing the VESA functions of the Video bios leads into a
crash when EMM386 is loadet.

So let's take a look at EMM386 UMB functionality.

EMM286 doe snot only provide EMS memory. It puts the processor in V64
mode to enable its internal memory management unit.
With this, every access of a 'logical' memory address causes the
processor to look up its internal memory translation table for the real
physical address associated with the logical address.
This means, while the program code is only accessing the area from 0 to
1MB, the processor can access memory located anywhere on the system.

The EMM function uses this to map portions of memory above 1MB into the
EMS page frame, so a program can access them as if in the first MB. This
is done to simulate the functionality of 'real' EMS cards which had a
64KB window in the first MB where portions of its own memory could be
mapped into.

But since EMM386 is already mangling the memory, it offers more than
just that:

Normally, the memory above 640KB (the conventional memory) is mapped to
different hardware by the chipset. This means, the processor gives a
call to a physical address at e.g. a000:0000 and the chipset redirects
this call to the video card memory.
EMM386, however, can tell the processor to access a difdferent area in
physical ram above 1MB instead, while the application is still calling
for a000:0000.
This has the effect that areas between 640KB and 1MB which are not used
by external hardware can be virtually filled with ram for upper memory
usage. Also, used, but after bootign unnecessary areas of used UMB space
(such as the BIOS setup code) can be replaced with usable ram. And as an
addition, emm386 can copy the slow ROMs (PC-BIOS and VGA-BIOS and maybe
other cards) into ram and map this ram where the ROM originally was.
This makes the execution in the ROM faster.

After all, when you access the area above 640K, you're accessing
completely different memory areas spread all over the system RAM, after
emm386 has been loaded. And the software does not notice the change.

Not it comes to the problems:

On a normal PC, the area a000:0000 to a000:ffff is used for color video
memory. B000:0000 to b000:7fff is hercules monochrome memory (only used
when hercules mdoe is activated and if the cards emulates a hercules
card at all). It could be replaced with RAM.
B800:000 to b800:7ff (or b000:ffff, which is the same) is the memory
area for normal text video.
And after this, c000:0000 to c000:7fff is usually the video BIOS.
Then comes a big gap and at f000:0000 normally the PC BIOS starts.

But now the problems start:
On a mobile, the video card usually isn't standard. From additional RAM
area trough a larger or differently placed or even multiplexed ROM for
the LCD to additional areas where adapters (like the PC card slot) put
their RAM into.
If emm386 just replaces all this with normal system ram, it's obvious
that a crash will happen.
If the ROM is switched (in order to not occupy more than the normal 32KB
video BIOS area while the video bios is larger) it must not be copied
into RAM but has to be executed as untouched ROM. Same for the system
BIOS.
And of course it won't help to replace the access window for a PC card
with normal RAM and load a driver into this area.

QEMM comes with an utility called Manifest (mft). It can show you the
current state of the upper memory.
YOu should configure QEMM to initially do NOTHING except monitoring
access to the ram/rom/whatever.
Load qemm as first driver with no parameters (or any parameter that
prevents qemm from doing anything, like /noframe etc.). Then load qemm
again with the /reset switch. It will clear the access table.
Once the system has booted to the DOS prompt, start manifest and check
what it tells you about the first MB. Maybe it identifies adapter RAM
(for PC card) or additional ROMS. It should not show any mapped memory
or page frame in this step. Then you can add parameters to copy the BIOS
rom the VGA BIOS or whatever. After each change, reboot and test your
software for crashes THis way you can identify the offending area.
After running your software successfully, launch MFT again and check the
usage map. It will point you to parts of the upper memory which haven't
been accessed at all by your software. It is likely that you can include
them for UMB usage (QEMM I parameter), while parts that have been
accessed while there was no ram are likely to be necessary for normal
operation and need to be untouced by QEMM.

It's a long and sometimes complicated process, but it will bring you the
maximum UMB space as well as no crashes.

The optimize utility you got with QEMM, does not help there. It just
tries to optimally load your drivers into the pieces of mapped RAM after
you figured out where you can place RAM at all in upper memory.