DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

[Info] Freeing Up Memory - A Must Read!
Page 4 of 5 Goto page Previous  1, 2, 3, 4, 5  Next
DieHard Wolfers Forum Index -> Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 16 Apr 2018

Topics: 55
Posts: 2128
Location: Canada
blank.gif

PostPosted: Sat Jul 02, 2005 2:23 pm
   Subject: 256 to 320 just add water instant recipe
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Ah, this is an easy one to fix Kyle. Just open up WL_MENU.C and use the code in red:

::: CODE :::
   //
   // DRAW MAIN MEMORY
   //
   memory=6969;
   for (i=0;i<10;i++)
      if (memory>=main[i])
         VWB_Bar(49,163-8*i,6,5,MAINCOLOR-i);

There, everyone is happy now. For even more memory, change i<10 to i<69 as well. Hope you enjoyed this tutorial man! Wink
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 10:29 ago.

Topics: 163
Posts: 8120
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Sat Jul 02, 2005 6:28 pm
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

On a more serious note, you picked an excellent time to post in this thread, because I have some memory-conservation tips of my own:

* Go into WL_DEF.H, and remove or comment out all references to MAPWL6.H, as the code doesn't call the maps by name.

* Remove all uses of "PicturePause" in the C files, including WL_MENU.C and WL_INTER.C (the latter is the only module in which the PicturePause code actually works).

* There's a very useless "Extra VBLs" portion of the code that's utterly useless now, and has been for over a decade. Memory is still reserved for it in WL_DEF.H, so free that part up! Look for the line with "extravbls" and remove or comment it out.
KyleRTCW
DieHard Officer
DieHard Officer


Joined: 30 Jul 2003
Last Visit: 11 Apr 2018

Topics: 45
Posts: 510
Location: Ohio
usa.gif

PostPosted: Sun Jul 03, 2005 6:50 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks Chirs!! Its up to 320 now thanks to ur tutorial i did the i<69 thing and the bar went off the chart! Smile

~Kyle

_________________
Steam: http://steamcommunity.com/id/stormx312
Codetech84
Code Master
Code Master


Joined: 12 Mar 2003
Last Visit: 01 Apr 2018

Topics: 22
Posts: 1283
Location: Rauma - Finland
finland.gif

PostPosted: Sun Jul 03, 2005 8:57 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I'll be using your memboost source, thanks for sparing me the trouble. No other modifications made except the memory boost part, I suppose. That and apply my own memory boost stuff...

Hint: Remove the sprite names array or enum or what it was can't remember, anyway (The one in WL_DEF.H with all the SPR_xxxx things).. Just use the sprite number from flo-edit, chaos-edit or wdc.

Warning: Removing this will cause massive errors in many places, mostly in WL_ACT2.C and reconstructing the source code
will take a long while, but I suppose it will all be worth it.

But I'll remove all enemies from the source code, and reinsert (and rename) them according to my needs...
Call me stupid, but it will make the source more easily interpreted to me. I'm also getting rid of starthitpoints array, and
hitpoints are given by enemy identifier in their spawn routine multiplying it with (gamestate.difficulty/3), or some other formula.

_________________
Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Sun Jul 03, 2005 5:04 pm
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thank god, cause playin a game with the necessity of EMS is a drag.

Boobs Laughing
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 16 Apr 2018

Topics: 55
Posts: 2128
Location: Canada
blank.gif

PostPosted: Mon Jul 04, 2005 11:42 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@Codetech84 & Tricob: Enums will turn into the number where they are used once they get compiled (like, PACMAN_MUS will turn into 26; for example), or they'll just store no information if they aren't directed anywhere. Either way, you won't save any memory by getting rid of them. Though, the one about removing the MAPSWL6.H file and it's declaration in ID_HEADS.H is a good idea if you want to make your project directory look less cluttered. Wink

That starthitpoints idea (putting all 4 skills into one that's directed from somewhere else) seems cool though, atleast for an addon.

Tricob wrote:
including WL_MENU.C and WL_INTER.C (the latter is the only module in which the PicturePause code actually works).

I think PicturePause works to the same level everywhere. For example, go into the "Mouse Sensitivity" option and press Tab-P (when in debugmode), then press ENTER. Now go into the game or the intermission screen and try the same thing. The "Pause" button (where you see the Paused screen come up) is something different, and doesn't use PicturePause at all. Like you said, PicturePause and ExtraVBLs can be deleted if you don't want them, though the memory you'd save is pretty minimal. I just used a tag that lets you compile without all the debug codes if you don't want the player to cheat and/or play around with all that stuff. It's all a matter of personal opinion anyway, some people are partial to different debugging codes (like MCS finds Tab-T quite pointless, but I always thought it was cool; same with Tab-V).
Codetech84
Code Master
Code Master


Joined: 12 Mar 2003
Last Visit: 01 Apr 2018

Topics: 22
Posts: 1283
Location: Rauma - Finland
finland.gif

PostPosted: Fri Jul 08, 2005 5:10 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Chris wrote:
@Codetech84 & Tricob: Enums will turn into the number where they are used once they get compiled


I know that...

But I didn't know the enum is not actually stored in memory, thanks for the info..

_________________
Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
TexZK
DieHard SS
DieHard SS


Joined: 07 Feb 2004
Last Visit: 17 Oct 2016

Topics: 19
Posts: 370
Location: Northern Italy
italy.gif

PostPosted: Sat Aug 20, 2005 4:54 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

We can also delete the "farmapylookup[]" array by replacing every token with "(whatever_y<<6)". In fact, the values of the array are just multiplies of 64. I've thought this while looking at the texture coordinates, where every row is shifted left by 6. Textrues are 64*64, and maps are too.
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

Topics: 153
Posts: 2255
Location: Ontario
canada.gif

PostPosted: Sun Aug 28, 2005 6:06 pm
   Subject: Re: [Info] Saving 256 bytes of the data segment in ID_SD_A.A
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Chris wrote:
I never really noticed this until last night, but those stereo tables in WL_GAME.C have alot of unrequired data. If you want to save another 896 near bytes, you can try replacing the leftchannel[] and rightchannel[] arrays with something like this:

Code deleted.... for quote....


Hi Chris... I finally found out what was wrong with Advanced and what was causing the lockups... Believe it or not.. it's this code... It doesn't get along with the "Raycastor" tutorial for some reason.

What it looks like it is doing is when there is a door opening/closing in the distance (because of a guard or a door that you have opened and run far away from) the sound some how falls outside the values of the table... and the program locks... It may be that the Raycastor code is a little faster in generating frames and thus the information maybe changes too fast.... I don't know... but when I went back to the following, everything was fine:

::: CODE :::

#define ATABLEMAX   15
byte righttable[9][ATABLEMAX *   2]   = {
{ 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 6, 0, 0, 0, 0, 0, 1, 3, 5, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 6, 4, 0, 0, 0, 0, 0, 2, 4, 6, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 4, 1, 0, 0, 0, 1, 2, 4, 6, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 6, 5, 4, 2, 1, 0, 1, 2, 3, 5, 7, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 6, 5, 4, 3, 2, 2, 3, 3, 5, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 6, 6, 5, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 6, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8}
};
byte lefttable[9][ATABLEMAX   * 2] = {
{ 8, 8, 8, 8, 8, 8, 8, 8, 5, 3, 1, 0, 0, 0, 0, 0, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 6, 4, 2, 0, 0, 0, 0, 0, 4, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 6, 4, 2, 1, 0, 0, 0, 1, 4, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 3, 2, 1, 0, 1, 2, 4, 5, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 5, 3, 3, 2, 2, 3, 4, 5, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 6, 5, 4, 4, 4, 4, 5, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 6, 6, 5, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8},
{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8}
};

void SetSoundLoc(fixed gx,fixed gy)
{
   fixed   xt,yt;
   int      x,y;

//   translate point to view   centered   coordinates
   gx   -=   viewx;
   gy   -=   viewy;

//   calculate newx
   xt   = FixedByFrac(gx,viewcos);
   yt   = FixedByFrac(gy,viewsin);
   x = (xt - yt) >> TILESHIFT;

//   calculate newy
   xt   = FixedByFrac(gx,viewsin);
   yt   = FixedByFrac(gy,viewcos);
   y = (yt + xt) >> TILESHIFT;

   if   (y   >=   ATABLEMAX) y = ATABLEMAX - 1;
   else if (y <= -ATABLEMAX) y = -ATABLEMAX;
   if   (x   < 0) x = -x;
   if (x>8) x = 8;

   leftchannel    =    lefttable[x][y +   ATABLEMAX];
   rightchannel =   righttable[x][y +   ATABLEMAX];
}


The above saves memory by reducing the array needed to hold the channels (but not as much as yours did), but works with both the original raycastor and the "RayCastor" tutorial... If you find out why, I'd really be interested in knowing why it causes lockups....

Greg
BrotherTank
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 16 Apr 2018

Topics: 55
Posts: 2128
Location: Canada
blank.gif

PostPosted: Sun Aug 28, 2005 8:24 pm
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

It's cool that you figured out what was causing your exe problems Greg, and how you were still able to reduce the table. Smile

Taking a trip back in time, I remember making two initial suggestions when we once talked on MSN. One was to look for the edit in the stereotable post, and the other was to restrict invalid floorcodes. I know you tried the second one, but I'm curious, did you try the first one? I'm assuming yes, but was just curious; as the original y/16 idea I posted would let you pick -15 to 15 instead of 0 to 15, as I didn't consider that -0.x would get chopped down to 0 and become false at the time (so 0 has a round threshold of 2 instead of 1! Haha). The original y/16 way would lead to the table going out of range sometimes, which could be what wolf3dbreaker was talking about as well.

If it still doesn't work as "y<0 || y>15", though, I think you could try some debugging ideas below the code like this to narrow down the problem:

::: CODE :::
if (leftchannel>8 || leftchannel<0 || rightchannel>8 || rightchannel<0) Quit(NULL);

So, if the game bombs out with that after using the edit, that would mean that the values aren't in proper range; which would be interesting to pinpoint... if so. Maybe setting it to a pointer could help track exactly where it goes if it's still off the charts, and we could find a trail of significant clues from there.

P.S. What you're saying about the raycastor changing too fast is quite an interesting theory to think about. I'm actually starting to consider the possibility, somehow, that certain things are supposed to flow at a certain pace together for everything to work together smoothly in the exe, and that in some kind of insane boundary beyond these pace specifications (in both the external computer speed calculation variations and the internal program calculation variations)... you can actually throw things off to the point where it will screw up how accurately wolf3d runs in some ways. It sounds far fetched, and I don't think it has ever been proven to be an existing factor; though as computers and game engine modifications evolve to new levels... maybe this seemingly crazy concept will see a clearer light to us. Who knows.
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

Topics: 153
Posts: 2255
Location: Ontario
canada.gif

PostPosted: Thu Sep 01, 2005 1:08 pm
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hi Chris...

Turns out that it wasn't your stereo table mod that is causing the problem... although with the raycastor tutorial and it installed it increases the frequency of the error... Smile

The game itself will occassionally crash if you open many doors all at the same time (or close to) and move from area to area... What happens is that AreaConnect is playing with the areas that are connected and should a door close and it cuts you off from an area where another door is closing, your players "player->areanumber" can become trashed and thus the player is left hanging as the program locks... The music keeps playing (and the game is still running), but for some reason it doesn't reset the AreaConnect array... Thus the player can't move (even though the program is running fine) and it makes it seem as though the game has locked.

I'm testing currently the fix:

player->areanumber = (MAPSPOT(player->tilex,player->tiley,0) - AREATILE);

inserted into the "ControlMovement" function, in the "wl_agent.c" file, above the line:

if (gamestate.victoryflag) return; // watching the BJ actor

So far... the game hasn't crashed... but I'm still testing..
I'll keep you posted....

Greg
BrotherTank
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

Topics: 153
Posts: 2255
Location: Ontario
canada.gif

PostPosted: Sat Sep 03, 2005 7:23 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hey Chris...

Looks like problem solved. It was in the doors and pushwall routines... Here's the result:

There is a difference between the way these two lines of code function....

MAPSPOT(tilex,tiley,plane) = MAPSPOT(tilex,tiley,plane);

AND

*(mapseg[plane] + farmappylookup[tiley] + tilex) = MAPSPOT(tilex,tiley,plane);

OR (if you removed the farmappy lookup table)

*(mapseg[plane] + tiley * MAPSIZE + tilex) = MAPSPOT(tilex,tiley,plane);

The first one, while logically correct, was the culprit. Once I switched to the second or third lines shown above, the problem completely disappeared. Changing to these lines allows the ConnectArea routine to function 100% as it should. So when changing code, remember that the IDE will compile the code without error using the first example, but it creates a problem if used in the Door/Pushwall routines in wl_act1.c

Hope that helps...

Greg
BrotherTank
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

Topics: 153
Posts: 2255
Location: Ontario
canada.gif

PostPosted: Sat Sep 03, 2005 7:36 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Oh well... So much for that... There is still something that is causing the occassional lockup. Each of those things has reduced the frequency of the problem greatly, but it still exists....

Looks like this is going to be a fun one to find and remove. Probably best to start a new thread on this problem.

Greg
BrotherTank
TexZK
DieHard SS
DieHard SS


Joined: 07 Feb 2004
Last Visit: 17 Oct 2016

Topics: 19
Posts: 370
Location: Northern Italy
italy.gif

PostPosted: Sat Sep 03, 2005 10:05 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

BrotherTank wrote:

OR (if you removed the farmappy lookup table)

*(mapseg[plane] + tiley * MAPSIZE + tilex) = MAPSPOT(tilex,tiley,plane);


It's better you use "( tiley << 6 )" insetad of "tiley * MAPSIZE", because shifting is MUCH faster than multiplying!
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 16 Apr 2018

Topics: 55
Posts: 2128
Location: Canada
blank.gif

PostPosted: Sat Sep 03, 2005 9:23 pm
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

TexZK wrote:
It's better you use "( tiley << 6 )" insetad of "tiley * MAPSIZE", because shifting is MUCH faster than multiplying!

Uhhh, what if you want to change the mapsize universally to something that isn't a power of 2?
TexZK
DieHard SS
DieHard SS


Joined: 07 Feb 2004
Last Visit: 17 Oct 2016

Topics: 19
Posts: 370
Location: Northern Italy
italy.gif

PostPosted: Sun Sep 04, 2005 5:43 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I haven't seen TCs with maps different from 64*64 yet! However, if you do it, you have also to change some lines in the code!
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 16 Apr 2018

Topics: 55
Posts: 2128
Location: Canada
blank.gif

PostPosted: Mon Sep 05, 2005 1:29 pm
   Subject: Re: Strange Bug with Doors/Pushwalls
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I'm wondering Greg, this might be a shot in the dark, but did you remove any of the original quit messages? If so, maybe they could give us a clue as to where to look. If not, maybe using some debugging tests (showing certain variables on your status bar - like on your score, or quitting if something seems to go out of range) might help narrow down the problem. Those have helped me alot at atleast understanding how many things in the source code work. Another thing I find helpful sometimes is to display my near memory on the background so I can watch what's happening - with something like this (above the MLI cheat in WL_PLAY.C):

::: CODE :::
   if (viewsize<12)
   {
   int a,b,c,d,e,f;

   for (c=0;c<3;c++)
      for(b=0;b<320;b++)
      {
         e=b+320*c;
         for (a=0;a<64;a++)
         {
            d=a+64*c+(c>0)*8;
            if(b==150 && c==1) b=170;
            VWB_Plot(b,d,tilemap[e][a]);
         }
      }
   }

As a reference, all of the stuff you're seeing there is shown in order inside WOLF3D.MAP (until it loops back to 0 on the middle of the bottom line). To look at your far memory, you'd need to use a different array than tilemap though. I figured out a quite a few interesting things this way (aside from the areabyplayer thing, like how your spotvis destroys other memory blocks when you try to travel west/east off the map). Heh.

You're probably right about merging these posts into it's own thread, though either way, I'm not sure if much advice can/would be given. Hrmm... Think
OBrasilo
Can I Play Daddy
Can I Play Daddy


Joined: 15 Sep 2005
Last Visit: 27 Sep 2009

Topics: 5
Posts: 29
Location: Izu-Oshima Island, Japan.
brazil.gif

PostPosted: Mon Sep 19, 2005 9:46 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Sockman wrote:
2. A green bar appears at the bottom of the screen. Find C0.ASM, and press the delete key.

What are you saying here? If I remove C0.ASM, I can't even compile the whole thing. Very Happy Or does removing C0.ASM not aply to compiling with that alternate way of compiling I once found (the one which makes your WOLF3D.EXE file only 250 kB in size instead of 477 kB)?

_________________
Sh˘mon bakkari shite'ru to, b˘kon ga kuru zo.
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Tue Oct 11, 2005 4:01 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

OBrasilo wrote:
Sockman wrote:
2. A green bar appears at the bottom of the screen. Find C0.ASM, and press the delete key.

What are you saying here? If I remove C0.ASM, I can't even compile the whole thing. Very Happy Or does removing C0.ASM not aply to compiling with that alternate way of compiling I once found (the one which makes your WOLF3D.EXE file only 250 kB in size instead of 477 kB)?


WOLFHACK.C, C0.ASM, and WHACK.ASM (or however that last one is named) can all be deleted, since they are useless. You can over a thousand bytes of memory as well!
Haasboy
DieHard Officer
DieHard Officer


Joined: 23 Jul 2003
Last Visit: 14 Feb 2018

Topics: 58
Posts: 581
Location: South Africa, Johannesburg
southafrica.gif

PostPosted: Tue Oct 11, 2005 10:20 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Deathshead wrote:
OBrasilo wrote:
Sockman wrote:
2. A green bar appears at the bottom of the screen. Find C0.ASM, and press the delete key.

What are you saying here? If I remove C0.ASM, I can't even compile the whole thing. Very Happy Or does removing C0.ASM not aply to compiling with that alternate way of compiling I once found (the one which makes your WOLF3D.EXE file only 250 kB in size instead of 477 kB)?


WOLFHACK.C, C0.ASM, and WHACK.ASM (or however that last one is named) can all be deleted, since they are useless. You can over a thousand bytes of memory as well!

Why are telling us this, this has all be explained before!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

_________________
Haasboy Engine - Currently under construction (To be used with future mods - F.A.D.E.D. - Mansion X - Rising Evil Series)
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Wed Oct 12, 2005 1:37 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I know, some1 asked, i told. calm down.
Haasboy
DieHard Officer
DieHard Officer


Joined: 23 Jul 2003
Last Visit: 14 Feb 2018

Topics: 58
Posts: 581
Location: South Africa, Johannesburg
southafrica.gif

PostPosted: Wed Oct 12, 2005 9:08 pm
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Deathshead wrote:
I know, some1 asked, i told. calm down.
No worries I'm calm, I just think they should read whole topic before posting.

_________________
Haasboy Engine - Currently under construction (To be used with future mods - F.A.D.E.D. - Mansion X - Rising Evil Series)
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 20 Apr 2018

Topics: 46
Posts: 2307
Location: USA
usa.gif

PostPosted: Tue Mar 07, 2006 6:31 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I think I found another spot that hasn't been mentioned.

Go to ID_SD.H and remove:
*Edit: Removed. Ripped found this one on page 3.

You can also get rid of this in ID_SD.C:
::: CODE :::
static   word         sqMode,sqFadeStep;

For 4 more bytes.

ID_SD.C:
::: CODE :::
static   volatile SampledSound   huge *sbSamples;

ID_SD.H:
::: CODE :::
typedef   struct
      {
         SoundCommon   common;
         word      hertz;
         byte      bits,
                  reference,
                  data[1];
      } SampledSound;

4 more bytes

ID_SD.C, change:
::: CODE :::
static   byte         carriers[9] =  { 3, 4, 5,11,12,13,19,20,21},
                  modifiers[9] = { 0, 1, 2, 8, 9,10,16,17,18},
// This table maps percussive voice numbers to op cells
                  pcarriers[5] = {19,0xff,0xff,0xff,0xff},
                  pmodifiers[5] = {16,17,18,20,21};

To:
::: CODE :::
static   byte         carriers[9] =  { 3, 4, 5,11,12,13,19,20,21},
                  modifiers[9] = { 0, 1, 2, 8, 9,10,16,17,18};

Frees up 16 bytes.

Only 24 bytes without the one Ripper already found.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Jaapio
Can I Play Daddy
Can I Play Daddy


Joined: 26 Nov 2005
Last Visit: 11 Feb 2009

Topics: 4
Posts: 32

blank.gif

PostPosted: Wed Mar 08, 2006 2:55 am
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

In wl_game.c in function ScanInfoPlane there are some cases that use spawnstand with en_dog as the first parameter. But spawnstand does not contain a case for en_dog. Deleteting the cases will free up some memory too.
Greetz J.
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 10:29 ago.

Topics: 163
Posts: 8120
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Wed Mar 08, 2006 7:15 pm
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@Adam and Jaapio: Which type of memory will it free up? Near memory or far memory?
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 20 Apr 2018

Topics: 46
Posts: 2307
Location: USA
usa.gif

PostPosted: Wed Mar 08, 2006 8:54 pm
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

My guess is near, since they aren't declared as "far".

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
OBrasilo
Can I Play Daddy
Can I Play Daddy


Joined: 15 Sep 2005
Last Visit: 27 Sep 2009

Topics: 5
Posts: 29
Location: Izu-Oshima Island, Japan.
brazil.gif

PostPosted: Mon May 01, 2006 5:32 pm
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Edit: Nevermind, I downloaded that memboost.zip file and it solved all my problems. Wink
OBrasilo
Can I Play Daddy
Can I Play Daddy


Joined: 15 Sep 2005
Last Visit: 27 Sep 2009

Topics: 5
Posts: 29
Location: Izu-Oshima Island, Japan.
brazil.gif

PostPosted: Tue May 02, 2006 3:59 pm
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Chris wrote:
Zero X. Diamond wrote:
So, anybody got a source with all these memory fixes in it for download?

If this helps, I've been adding just about all the interesting memory/bug fixes I can find to memboost; just for fun.

http://www.canadianphilatelics.com/choksta/memboost.zip

Feel free to use it, and let me know if everything works ok. It should play exactly like the original wolf3d, even with all the fixes listed in the readme. I've been constantly updating it as I find new things to improve in the original source code, with alot of help from the topics/ideas you guys post in this thread and Code Crackers. Smile

Your memboost.zip is AMAZING!!!!
I jsut checked how many data bytes I have left, now that I finished installing the directional 3-D sprites, light shading, and textured ceilings and floors - I'm using your memboost.zip as basis for my new TC. And guess how many data byes I have left? 22876 bytes!!!! Shocked
And this is after I replaced your modified WL_SCALE.C with the one from the original Wolf3-D source code prior to installing the directional 3-D sprites, as otherwise, I had problems with it. It's simply amazing! Shocked
I thought I was already somewhat very near the APT line (heh, had bad experiences with the original Wolf3-D source code), but now I see I'm not. Very Happy

Thanks a lot! Wink

_________________
Sh˘mon bakkari shite'ru to, b˘kon ga kuru zo.
insurrectionman
DieHard Mutant
DieHard Mutant


Joined: 07 May 2005
Last Visit: 1:34 ago.

Topics: 87
Posts: 756
Location: Wisconsin
usa.gif

PostPosted: Tue May 02, 2006 5:22 pm
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

memboost?? where can i find this?

_________________
I'm back! I missed this community!
Youtube Channel: TreeSapThief

New Site: http://www.treesapthief.com
Twitter: @treesapthief
Dugtrio17
Code Master
Code Master


Joined: 11 Mar 2003
Last Visit: 03 Oct 2013

Topics: 49
Posts: 903
Location: Seattle
usa.gif

PostPosted: Tue May 02, 2006 5:44 pm
   Subject: Re: [Info] Freeing Up Memory - A Must Read!
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Psst, look one post up. Or just click here. Wink

_________________
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 4 of 5 Goto page Previous  1, 2, 3, 4, 5  Next
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts Sticky: [Info] Help for newbie coders! C++ Tutorial
Author: Dugtrio17
20 8521 Sun Jan 10, 2010 12:26 pm
Fragstein3D View latest post
No new posts [Info] Tricks - Dogs that shoot - Modifying Behaviour
Author: Guest
19 288 Sat Mar 20, 2004 7:31 am
Dugtrio17 View latest post
No new posts [Info] Alarm Sounding in game?? WSJ...??
Author: Guest
7 309 Tue Jun 17, 2003 10:04 pm
Reivax44 View latest post
No new posts [Info] Silent Gun? - Adding a Silencer
Author: Guest
4 194 Fri Apr 18, 2003 8:34 am
BrotherTank View latest post
No new posts [Info] Adding Locked Doors
Author: Guest
3 243 Thu Apr 17, 2003 6:30 am
Ripper View latest post
 
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


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group