Page 1 of 1

Breaking 2k cards limit

PostPosted: 19 May 2009, 10:08
by Snacko
So far I've only fixed drawcardlib.dll, but this so far allows you to load magic.exe without crashing and start a game (there are limits / memory overrides for sure that needs to be fixed).
You can drop it in and see if it doesn't crash on normal play
http://www.mediafire.com/?mjiwyjzmamw

What has been done:
drawcardlib.dll
* unpacked the dll
* fixed arrays from static to dynamic via malloc
* enlarged some stack based arrays
* fixed relocations table

Still at least magic.exe(runs at least) and deck.exe(crashes) need to be fixed to ensure that the whole thing works properly.

Re: Breaking 2k cards limit

PostPosted: 19 May 2009, 12:14
by jatill
I'll make sure to start playing with this version. I'm so glad you're attempting to tackle this issue, Snacko. I don't even know what half those steps mean! :)

Re: Breaking 2k cards limit

PostPosted: 19 May 2009, 12:35
by jatill
No idea if this is related to your change, but....

I played Goblin Matron and got this error, though it did not crash the game.

Re: Breaking 2k cards limit

PostPosted: 19 May 2009, 13:46
by Snacko
Do you have 2k+ cards in you cards.dat ? If yes then there might be some memory regions that are overwritten(haven't fixed a single thing in magic.exe) and other strange bugs due to array overflows, otherwise <2k cards there shouldn't be any errors.

Re: Breaking 2k cards limit

PostPosted: 19 May 2009, 14:44
by jatill
Snacko wrote:Do you have 2k+ cards in you cards.dat ? If yes then there might be some memory regions that are overwritten(haven't fixed a single thing in magic.exe) and other strange bugs due to array overflows, otherwise <2k cards there shouldn't be any errors.
No, I don't. Can you include the cards.dat I sent you in your download link, so people can get the oversize dat file and test with that?

Re: Breaking 2k cards limit

PostPosted: 19 May 2009, 15:17
by Snacko
With 2k+ and without fixing magic.exe there are lots of bugs / might be some random crashes sometimes.
First I would like to know if it does work properly with under 2k.

The error looks like eax / ecx should be swapped around. Maybe someone broke the card while editing some other one. Did it work before ?

Re: Breaking 2k cards limit

PostPosted: 20 May 2009, 02:38
by Tower_Mazer
Snacko wrote:* fixed arrays from static to dynamic via malloc
Is this like making some things hardcoded not hardcoded anymore? Also I've heard you can get memory leaks using dynamic arrays that will cause random errors. This is probably based on the dimension size of the array and the memory location the pointers are targeting? Pretty good knowledge to be able to do what you did. Glad you are still around helping :D .

Re: Breaking 2k cards limit

PostPosted: 20 May 2009, 05:48
by stassy
jatill> I got the same windows error with different memory space for Arcbound Worker (posted a report in the bug thread some time ago), so it might be just a card only bug

Re: Breaking 2k cards limit

PostPosted: 20 May 2009, 11:07
by Bog Wraith
Yes, I too have occasionally seen this bug during games as well for a while now, though I can't say what update(s) it first showed itself.

Thanks Snacko for your involvement with this most important step forward for further development of ManaLink! 8)

Re: Breaking 2k cards limit

PostPosted: 20 May 2009, 11:44
by stassy
Well I got this kind of error with the introduction of Affinity type deck so around 27th of feb