Remember me

Lost Password?

Register now!


Who's Online
30 user(s) are online (19 user(s) are browsing Forums)

Members: 4
Guests: 26

nbache, ddni, abalaban, Nuder_Try, more...

Support us!


Report message:*

Re: DevilutionX - Diablo 1

Subject: Re: DevilutionX - Diablo 1
by kas1e on 2019/2/16 12:21:38

Not about RLE, but just before you meet with some strange random crashes on running of some port or somewhere in the gameplay:

Many games/code use stack for some things (trivial but need to be said), and usually size of default stack size on amigaos4 is too low for. And results of low stack size are crashes on some parts which should't crashes.

So, to avoid setting all the time stack size in the shell, or in the icon, there is some variable called "stack cookie", which you set in the code (i usually put it right before main(){} ), and i usually set 1000000 (1 megabyte) for any game port to avoid any possible problems , and then doens't matter if user run it from shell, or from icon: stack cookie which set in code will always have priority, and 1megabyte of stack size can cover all the needs of almost all the ports i meet with. If i remember right the only time when i set 2megabyte of stack size was Odyssey. So, to set stack cookie there is code:

#ifdef __amigaos4__
static const char__attribute__((used)) stackcookie "$STACK: 1000000";

main() {....}

It is the same necessary as to deal with pathes and endianes. Most of time you will forget about it as about something trivial, and then users will start reporting that everything crashes there or there. So stack cookie are must all the time if you do not want to have problems :) Some time of course you will be lucky, and port will have no problems with stack (and that low one which is default on amigaos4 will be enough), but other times you will be out of luck

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project