It is currently 26 Apr 2024, 04:05
   
Text Size

Manalink C/ASM Dll

Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

Manalink C/ASM Dll

Postby Snacko » 13 Mar 2009, 17:59

The zip contains a makefile that will build the dll. All you need is gcc compiler and yasm.
Currently the dll body is build with yasm and this allows for a jumptable which will be at static address (much like the asm dll before).
Cards and functions can be coded with with either c or asm. You can mix and match them anyway you want like calling asm functions from c or the other way around.
The ManalinkEc.asm is basically a dummy for the actual functions and could be auto generated via python/perl/anything else by scanning the cards filenames (would need to have something to identify the correct order in the filename) or a config file.
http://www.mediafire.com/download.php?ygngmlwjz2d

edit v2 redownload if you have the older package
Last edited by Snacko on 15 Mar 2009, 16:59, edited 4 times in total.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Manalink C/ASM Dll

Postby jatill » 13 Mar 2009, 18:50

Snacko wrote:The zip contains a makefile that will build the dll. All you need is gcc compiler and yasm.
Currently the dll body is build with yasm and this allows for a jumptable which will be at static address (much like the asm dll before).
Cards and functions can be coded with with either c or asm. You can mix and match them anyway you want like calling asm functions from c or the other way around.
The ManalinkEc.asm is basically a dummy for the actual functions and could be auto generated via python/perl/anything else by scanning the cards filenames (would need to have something to identify the correct order in the filename) or a config file.
http://www.mediafire.com/download.php?03mzmjwznmv
This sounds exciting. Except when I try to extract the file I get a zip error. Anyone else able to do this successfully?
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Manalink C/ASM Dll

Postby Snacko » 13 Mar 2009, 18:58

I tried downloading it and extracting and it works just fine even in the windows buildin zip decompressor.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Manalink C/ASM Dll

Postby LoneFox » 13 Mar 2009, 20:29

Thanks! Looks like you saved me from wasting whole weekend trying to get the compilation working in Windows.
But we do have a problem with the archive:
Code: Select all
tmp (lonefox): unzip /mnt/big/download/MagicCDll.zip
   Archive:  /mnt/big/download/MagicCDll.zip
   skipping: cards/ancestors_chosen.c  unsupported compression method 14
   skipping: cards/bottle_gnomes.c   unsupported compression method 14
   skipping: cards/gorilla_titan.c   unsupported compression method 14
   skipping: cards/kami_of_the_crescent_moon.c  unsupported compression method 14
   skipping: cards/priest_of_gix.c   unsupported compression method 14
   skipping: functions/count_graveyard.c  unsupported compression method 14
   skipping: functions/do_something.asm  unsupported compression method 14
   skipping: Makefile                unsupported compression method 14
   skipping: manalink.h              unsupported compression method 14
   skipping: manalink.lds            unsupported compression method 14
   skipping: ManalinkEc.asm          unsupported compression method 14
   creating: cards/
 extracting: cards/asm_card.asm
   creating: functions/
 extracting: ManalinkEc.def
and winrar can't extract it either.
Is this yet another case of "Micro$oft $tuff" being incompatible with rest of the world?
Last edited by LoneFox on 13 Mar 2009, 20:35, edited 1 time in total.
LoneFox
Programmer
 
Posts: 71
Joined: 08 Mar 2009, 13:43
Has thanked: 0 time
Been thanked: 7 times

Re: Manalink C/ASM Dll

Postby Snacko » 13 Mar 2009, 20:32

used 7zip so it's not Microsoft fault in here will recompress
tested with unzip under linux so it should be all fine now
Last edited by Snacko on 14 Mar 2009, 19:39, edited 1 time in total.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Manalink C/ASM Dll

Postby jatill » 13 Mar 2009, 22:08

Download works now. So... what now? How do I run this thing? A short readme would be super helpful.
Thanks in advance.
Got any wishlist cards I can make for you guys to repay your awesomeness? :)
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Manalink C/ASM Dll

Postby Snacko » 14 Mar 2009, 10:23

If you have make / gcc / yasm in your path just type make and it'll do everything for you.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Manalink C/ASM Dll

Postby jatill » 14 Mar 2009, 12:59

Ok, I can run the make, and the .o file gets generated for my new card. How do extract the source and link it up with a card in sky editor?
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Manalink C/ASM Dll

Postby Snacko » 14 Mar 2009, 13:15

It's basically the same as the asm dll posted earlier.
You should get a dll currently named ManalinkEc.dll it loads at the same address as the asm dll as it should supersede that one (the cards coded for the old one can be easily plugged in into this dll)
You need to edit ManalinkEc.asm, for testing purposes you can edit ManalinkEc.def and Makefile and replace all the references to ManalinkEc.dll to ManalinkEh.dll and the dll will be loaded like the asm one. Probably you should wait for Harry to release his cards so they can be plugged into this dll at the same addresses or just add some dummy jumps (like jmp near _asm_card as it's a do nothing function) for the addresses he used for now
section .text

;card functions
extern _card_ancestors_chosen
extern _card_bottle_gnomes
extern _card_gorilla_titan
extern _card_kami_of_the_crescent_moon
extern _card_priest_of_gix
extern _asm_card
; you add your card function name here like the above examples

global _DllEntry
_DllEntry:
mov eax, 1
ret

global _CodeSectionEx
; All card code pointers will be jumps here, card after card
_CodeSectionEx: ; CodePointer
jmp near _card_ancestors_chosen ; 02001006
jmp near _card_bottle_gnomes ; 0200100B
jmp near _card_gorilla_titan ; 02001010
jmp near _card_kami_of_the_crescent_moon ; 02001015
jmp near _card_priest_of_gix ; 0200101A
jmp near _asm_card ; 0200101F
;add a jmp like the examples above each jump is 5 bytes long so just add up to the last one
nop
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Manalink C/ASM Dll

Postby HarryPitfall » 14 Mar 2009, 14:51

ManalinkEh.dll is using this address, $02000000, and is already released with some cards. (and for now, I'm the only one that have the .asm source for recompile and add cards). so, my advice, is use $03000000 as your base address now...
There is already 2 dll's plugged into the game, how about use it MORE before add another one? It's appear that people already found nice ways to insert compiled C code into current ManalinkEx.dll.
Is already a chaos, people is releasing code over other people code, some cards aren't working as expected, bugged or wrong cost... my take is... release LESS new cards, fix MORE old cards... If you look my last release, I just complete a cycle already coded, fix some cards, and release only 3 new cards at all (Gauntlet of Power, Mulldrifter and Obelisk of Alara, all on manalinkeh.dll)
I hate to be the one that push a break (and I did it before, on old forum), but someone must do it before the things goes out of control...
And no, I'm not jealous about the new ways that people find to code, I really LOVE these things, more information, more ways to find solutions of some problems...
HarryPitfall
AI Programmer
 
Posts: 175
Joined: 31 May 2008, 00:14
Has thanked: 1 time
Been thanked: 3 times

Re: Manalink C/ASM Dll

Postby Snacko » 14 Mar 2009, 14:53

If you read what I wrote, you would know that the old asm and the new C dll can be merged together. That means there is no reason to maintain both of them.
Are you so scared to release your code ? That's the only reason I can find. How can people use the asm dll if you don't release your cards, you're basically saying "you can't have this, it's my playground, go away". I have yet to see a single source release from you, I sense an opensourcephobia.
Plus you can recode the old cards in here so we know which are fixed and have a plain text C / asm of them. It's also a good practise, because if people code the way you can check if the cards are coded properly it's a win win situation.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Manalink C/ASM Dll

Postby HarryPitfall » 14 Mar 2009, 15:44

Not scared, but I notice that people code with lots of bugs... most of the coders isn't interested to make the cards working well with AI, sleight of mind and other effects... just want to make more and more cards...
I'll released my pack of assembler, and drop from project, no more coding for me... since I never receive good feedback for anything I do, isn't necessary my help anymore...
HarryPitfall
AI Programmer
 
Posts: 175
Joined: 31 May 2008, 00:14
Has thanked: 1 time
Been thanked: 3 times

Re: Manalink C/ASM Dll

Postby Bog Wraith » 14 Mar 2009, 15:51

Harry, your over reacting again!

You get positive feed back and posts from me and plenty of the people here!

No one appreciates what you have done more then me. You know that as I have said it in many posts , including the one that i thank Snacko for his involvement.

If that doesn't show you how much we all appreciate your work and effort, then nothing will!

Learn not to take everything as a personal knock on you and try to meet , in this case Snacko half way.

If you can't be happy with that and can't do that, no one can stop you from leaving the project and that is too bad for everyone!
'Twas in the bogs of Cannelbrae
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
User avatar
Bog Wraith
Global Mod 1 (Ret)
 
Posts: 1108
Joined: 28 May 2008, 22:40
Location: Shandalar
Has thanked: 425 times
Been thanked: 153 times

Re: Manalink C/ASM Dll

Postby HarryPitfall » 14 Mar 2009, 16:05

Yes, I didn't like the way that things is running. I'm oficially release the assembler source, and dropping... (see on another thread). I'm sure that someone will say that code is baaaaaaaad, very baaaaaaaaaaad, but is almost bug free (except for engine related things).
Don't get me wrong, I like the game, the project, and I learned a lot about code and about projects... But I see no point to continue... but don't worry, there is lots of experts here that I'll fix anything if needed!
HarryPitfall
AI Programmer
 
Posts: 175
Joined: 31 May 2008, 00:14
Has thanked: 1 time
Been thanked: 3 times

Re: Manalink C/ASM Dll

Postby Huggybaby » 14 Mar 2009, 17:17

Nobody likes the way things are running. We're trying to improve them. The solution is a bit of organization and cooperation, that's all. Ideas for improvement are what we need. If you like the project then help us make it better.

I have proposed that one person be in charge of testing all new code, and it could be you if you want the job. If you really want to fix things then you should talk to the moderators to see what can be done, not get frustrated because your ideas were overlooked. If you want to see changes, then people skills are more important than coding skills, just like in real life.

I'm sure that someone will say that code is baaaaaaaad, very baaaaaaaaaaad,
I don't know why you imagine some unpleasant future scenario. If your code COULD be improved, you should enjoy learning.

release LESS new cards, fix MORE old cards
OF COURSE! Now, let's make that happen!
User avatar
Huggybaby
Administrator
 
Posts: 3207
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 701 times
Been thanked: 594 times

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 37 guests


Who is online

In total there are 37 users online :: 0 registered, 0 hidden and 37 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 37 guests

Login Form