|
|
|
|
|
View previous topic - View next topic |
Author |
Message |
Tenshi Everyone's Peachy Lil' Bitch
Joined: 31 May 2002 Posts: 386 Location: Newport News
|
Posted: Wed Oct 02, 2002 9:07 pm Post subject: XMS, Unmei Densetsu, and Windows |
[quote] |
|
- Just posting something since I've had some people ask me about game progress recently.
*********************
- Heh, I managed to get communication between the main program and the battle engine working properly using a series of file saves to store arrays and data from conventional memory. I even wisened up and divided XMS usage into two polls, one that the battle engine allocates when called, and one that the main program uses, that the battle engine doesn't care about. Yay.
- However, the time comes to return to the main program. Well, we make our saves and RUN the main executable. It's set to Load from temporary files if a certain file exists (well, if there is a dummy variable inside of the file to give it size, more specifically). We get: DIVISION BY ZERO .
- Why? I'm assuming that Windows deallocates the XMS Poll that is allocated by the main executable when the program exits to RUN the battle engine.
UDMAIN.EXE
{ allocates 3.4MB XMS to handle storing Map data and environment, and Scripts and their graphics.
Stores the pointer to this XMS in "Main program data only" file. }
BATTLE.EXE
{ allocates 1.6 XMS to handle storing its own graphics and script graphics for spells and such. Terminates on exit }
- So this presents a problem. Since any script can load graphics or other scripts into memory (hence why I just allocated a 1MB block) each script would have to be parsed over again if I just went with a "well, just load everything all over again" idea, not to mention that reloading a large map would be a ridiculous waste of time. So... what are more sensible options?
1. A "DiskToXMS" function to load a large file into memory
And then it's corresponding "XMStoDisk" function to store the chunk.
- What's wrong with this? I'm storing and loading 3MB of data (possibly unused at times) every single time battle is called. bad.
2. A more viable option I'm going to try is to write a tiny program that will actually run both of the programs. Most likely it will use a file flag to determine which program to run (via "SHELL ... .EXE"). It itself will allocate [at least] the Main program's XMS block and store that in a file so that (since the program is still open) Windows won't deallocate the block and the pointer will be usable even when the programs switch.
- I will test this later.
- I have new graphics and such to post shortly, but as to why I've not been around with UD stuff much? We moved and I didn't have ethernet in my room for a couple of weeks. That threw off my rhythmn. Now my server's lagging so I'm gonna go give them a call and find out why. =( _________________ - Jaeda
|
|
Back to top |
|
|
|
Page 1 of 1 |
All times are GMT
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|