Shandalar
Information on various files and routines used by Shandalar.
Updates
- If you add cards with ids over 1500 it might start crashing, I know at least one table that needs remapping to the next memory region.
- The file has currently 10000 card spaces.
- The first card starts at virtual address 0x991000.
- The card count is at virtual address 0xA40C7F.
- This says how many cards from the last one won't be given (ex. Dummies, Tokens, Special FX cards, etc.) or used in the events.
0057EB75 2D 87240000 SUB EAX,2487
- All the special cards have to be added at the back.
- Once you add a normal playable card you need to modify the above value ex. 1 card added
0057EB75 2D 87240000 SUB EAX,2486
The extra space is non executable and can be used for variables only (there are some tables which depend on the number of cards which I haven't remapped to the new memory region yet, still it doesn't crash yet!) New cards should most likely be added via a dll, however the functions addresses can and most likely are different between Magic.exe and Shandalar.exe. If the new cards are written with yasm this could be easily fixable via remapping once macro and not touching the card logic ex.
%define Phase [0xFFFFF] %define TapCard 0xFF00FF cmp Phase, Upkeep push CardID call TapCard
to
%define Phase [0xAAAAA] %define TapCard 0xAA00AA cmp Phase, Upkeep push CardID call TapCard
Files formats explained
Retrieved from "http://www.slightlymagic.net/wiki/Shandalar"
