Not enough memory when using GP2Lap and GP2Video

Here you can post questions about GP2, your favourite GP2 things and errorreports/problems!
Post Reply
131073
GP2 Newbie
Posts: 10
Joined: 17.12.2011, 20:09

Not enough memory when using GP2Lap and GP2Video

Post by 131073 »

When using GP2Lap and GP2Video together, an error message comes up saying "DOS/4GW Professional Error(1307): not enough memory". The readme file for GP2Video suggests to increase the allocated memory but how would I do this? (it works without using GP2Lap)
User avatar
AD
GP2 Acc
Posts: 720
Joined: 12.09.2006, 15:02

Re: Not enough memory when using GP2Lap and GP2Video

Post by AD »

This is actually an old piece of fun with MS-DOS era programs. To give you a brief background, DOS divided the system's memory into a "conventional memory", which went up to 640 KB, and an "extended memory", which could hold 16 MB or much, much more.

If nothing else is specified, .exe files are loaded into the conventional memory. Then, if too many programs are trying to cram into that space at the same time, there's an error. So from what you're describing, I'd say gp2lap and gp2video (and the dos4gw.exe, which is the API to make ordinary executables be able to access conventional memory) would need more than the conventional memory. Hence the error message.

The usual tactic with "actual" DOS installations (as opposed to modern emulators, such as Dosbox) was to try and load as much stuff as possible into the extended memory (more room there). With DOS (or the earlier DOS-dependent Windows versions), that means configuring a file called config.sys to contain this:

Code: Select all

device=c:\dos\himem.sys
device=c:\dos\emm386.exe noems
dos=high,umb
And then trying to chuck every program you want to execute after the system has started up this way into the higher memory as well, using the command

Code: Select all

loadhigh theprogramyouwannarun.exe
.


If you're using Dosbox to emulate, you don't have to worry about messing with configuration files, as that already handles the memory management stuff. Per default, Dosbox assigns 16 MB of extended memory. (And I doubt it would take more to run the kinds of tools we're talking about here.)

So with Dosbox, I'd suggest you could use "loadhigh" to run gp2lap and/or gp2video in extended memory.


By the way, if you want to check how much memory there is available, you can type in "mem" at the command line and you'd get an overview like this:

Code: Select all

  632 Kb free conventional memory
   63 Kb free upper memory in 1 blocks (largest UMB 63 Kb)
15168 Kb free extended memory
15168 Kb free expanded memory
1996 .. 2017 .. 21 years and counting ..
131073
GP2 Newbie
Posts: 10
Joined: 17.12.2011, 20:09

Re: Not enough memory when using GP2Lap and GP2Video

Post by 131073 »

It worked, but it ran quite slowly. But now when i try to run ANYTHING in dosbox, it now goes slow. GP2 used to use about 70% PO but now it is 200-400% PO (even without gp2lap or gp2video). Even F1GP is over 100%. Can anyone help as I can't play Gp2 if it is like this :( .

EDIT: It works now! :D :D :D Not setting the number of cycles to "max" and setting it to 140000 seems to work! "Max" worked before though.
2nd edit: But it keeps going faster and slower (but the PO doesn't change) and saying "Divide by zero" every few minutes... ](*,)
131073
GP2 Newbie
Posts: 10
Joined: 17.12.2011, 20:09

Re: Not enough memory when using GP2Lap and GP2Video

Post by 131073 »

Still trying to change the settings so it works, It still doesn't. No matter what number of cycles I try, it either goes faster then slower, or just slow. It never says that the PO is above 100%, yet it seems like it is when I play anything on DOSBox. Can anyone help? It worked fine before.
131073
GP2 Newbie
Posts: 10
Joined: 17.12.2011, 20:09

Re: Not enough memory when using GP2Lap and GP2Video

Post by 131073 »

Have now tried to reset the config file and set everything to "auto". Still goes slowly with 150+ PO. ](*,) Will anything work?

Sorry for posting a lot in this topic, but I can't play GP2 and no-one seems to be helping :( .
User avatar
AD
GP2 Acc
Posts: 720
Joined: 12.09.2006, 15:02

Re: Not enough memory when using GP2Lap and GP2Video

Post by AD »

I'm sorry you're still having problems. Finding the "right" amount of cycles for a given game involves some tinkering and, frankly, guesswork, as it depends on how fast your hardware is, so unfortunately, no one can just give you a reference number that will work for you.

The "divide by zero" error is a good hint, though, that the number of cycles you tried last was too high. Zero division can happen when the CPU tries "too many" calculations at the same time, with little precision. Also, apparently, as the wiki for DosBox points out:
How high you can go depends on the power of your host CPU and on the selected core (above). If the value is too high for your CPU the emulation will slow down and the sound starts to skip.
Which is the other symptom you're describing here - it's running very slowly. So the bottom line is that a lower number of cycles should be better.

If you can't be sure you've reverted your config file to what it was originally and you don't have a backup of it (I should have pointed out the obvious on that one before I made my suggestions earlier), I'd recommend reinstalling DosBox, as that will give you a clean slate.
1996 .. 2017 .. 21 years and counting ..
User avatar
GP2tifoso28
GP2 Starter
Posts: 86
Joined: 29.09.2015, 14:21

Re: Not enough memory when using GP2Lap and GP2Video

Post by GP2tifoso28 »

I have the answer, and hopefully it's not 4 years too late!

In your dosbox conf file these should be a section [dosbox]
memsize=16

Change that value, I have it on the maximum which is 63 however I previously had it working perfectly fine on 24, I just put it up to 63 recently as I'm forever tinkering with my conf file trying to find perfection. I noticed no difference between 24, 32, or 63. I get the same error as you with it on the default setting of 16.

Hopefully you haven't stopped playing the legendary GP2
Post Reply