EagleEye Posted June 4, 2012 Share Posted June 4, 2012 Could you post how the .bin file works in this thread (for reference purposes)? Link to comment Share on other sites More sharing options...
CCHyper Posted June 4, 2012 Share Posted June 4, 2012 My ears are burning... Link to comment Share on other sites More sharing options...
EagleEye Posted June 4, 2012 Share Posted June 4, 2012 Then you better go catch them! Link to comment Share on other sites More sharing options...
Revolutionary Posted June 4, 2012 Share Posted June 4, 2012 Then you better go catch them! Is that not at answer to "My nose/pen is running?" rather than My ears are burning... Surely you meant, "Put them out, and gives your code bam" which would make more senses --- Just to throw it out there, i believe the editor's need s bit of an overhaul first before we get ahead of our selves, especially since we would need a new editor anyways. It is only fair this isn't dumped on nyerguds, but instead is a community effort. I had taken on editing all the Stock Tiberian Sun maps and while it was rewarding it was horribly time consuming! If it becomes too big a task it isn't a hobby anymore and it isn't fun. From my own experience if a task becomes to big and demanding it can completely suck all enthusiasm you have out of a project and if i hadn't undertaken that extra project at that time i can guarantee that TS:BoB would not have been sitting in the Inactive Project section and i wouldn't have mucked up as bad as i had that year within the CnC community. -Revo Link to comment Share on other sites More sharing options...
EagleEye Posted June 4, 2012 Share Posted June 4, 2012 I was working on a map editor before, but I couldn't parse the .SHPs correctly because I'm an idiot. If someone could write some (MIT-licensed) code to convert a SHP into a List<int[,]> or List<int[][]>, then I could probably write the rest of the map editor. Everything else should be easy enough, but you need to be able to see the map in order to make sure you're loading it correctly. I'm thinking of making the map editor feel like the game, with a sidebar on the right side, clicking on the logo changes what side is selected (a side without a logo will display GDI's frame for showing the radar, with the side's name), and clicking the "Sidebar" button switches from units/buildings to ground to terrain, the middle of which will be used for the icon (with Solid/Water/Shore/Clear being the "names") and a mouseover will show the full ground in the radar. It's hard to explain, but if I get some time, I'll make a mockup of the UI. Link to comment Share on other sites More sharing options...
pichorra Posted June 4, 2012 Share Posted June 4, 2012 Oh... I see some interest in the project now. I remember that I've found the map loading engine using the string table in IDA pro and the buffer using cheat engine. I need to find where I stored my note files... [edit] Found it. it is totally a mess I wasn't sure at was I looking for, so i've looked at everything with 0x1000. 427c9a referenced 314d4f65 0049af90 - Readmap; Have INI stuff there. 0042E504 - Starts reading the INI. Somehow the map size is not in there. array- starts at 05b10034 in memory. things that access it. 004DC0EF - 89 10 - mov [eax],edx //unknown and extensive stuff 004682A1 - C6 44 02 E3 FF - mov byte ptr [edx+eax-1D],FF //pointer to map? 0046884C - 88 41 04 - mov [ecx+04],al 00468856 - 88 41 05 - mov [ecx+05],al 004268BF - 8A 71 04 - mov dh,[ecx+04] 00468864 - 8A 51 04 - mov dl,[ecx+04] 00468871 - 8A 51 05 - mov dl,[ecx+05] nothing seems to "change it". (by CheatEngine). /*.text:00419D7C push 1000h *.text:0041A117 push 1000h *.text:0041A29D push 1000h *.text:0041A326 push 1000h *.text:0041A3A3 push 1000h *.text:0041A426 push 1000h */ building related. /*.text:0041F487 sub_41EF48 or edi, 1000h .text:004230EB sub_422FF8 mov eax, 1000h .text:004280EE sub_427D74 cmp eax, 1000h .text:004281E2 sub_427D74 cmp edx, 1000h .text:00429B34 sub_429AA8 cmp eax, 1000h .text:004307DF sub_4307B8 mov edx, 1000h .text:00431EC1 sub_431C28 cmp eax, 1000h .text:0043200D cmp edx, 1000h .text:00433D17 sub_433B58 push 1000h // you hit my breakpoint after the briefing! .text:0045096C sub_450960 cmp eax, 1000h //some kind of Mouse position check. .text:004512CE sub_451120 or edi, 1000h .text:0045B2DC sub_45B254 cmp eax, 1000h .text:0045B446 sub_45B43C cmp eax, 1000h .text:0045B466 sub_45B43C cmp eax, 1000h .text:0045B47E sub_45B474 .text:0045B49E sub_45B474 .text:0045DE51 sub_45DE04 .text:0045DF24 sub_45DEAC //at main menu. .text:0045DFB3 sub_45DEAC //at main menu. .text:004681D9 sub_4681B0 .text:0046835D sub_4682D4 .text:004684BF sub_468484 .text:00468512 sub_468484 .text:00468573 sub_46853C .text:004685CA sub_46853C .text:0046862E sub_4685EC .text:00468696 sub_468654 .text:0046887C sub_468714 .text:004688A0 sub_468714 .text:00468A2D sub_4689F8 .text:00468A42 sub_4689F8 .text:00468B6A sub_4689F8 // after 00433D17. I can see it right after I can see the map .text:00468FE0 sub_468EA4 .text:0048F6A9 // overlay .text:004950F4 sub_4949B8 .text:00495EE0 sub_495EAC .text:0049809F sub_498098 .text:004A8060 .text:004AB53E sub_4AB524 .text:004AB548 sub_4AB524 .text:004B3469 .text:004B3B5A sub_4B3B54 .text:004B58C5 sub_4B58B4 .text:004B91F4 sub_4B909C .text:004BA66F sub_4BA48C .text:004BAC86 sub_4BAC68 //unit check. .text:004BB1EE sub_4BB0CC .text:004C628F sub_4C6260 .text:004DC922 start .text:004DD533 start .text:004E2DFD __ioalloc_ .data:004FBE9C .data:004FC044 .data:004FD0BF .data:004FD3E0 .data:004FE0F8 .data:004FE6F8 .data:004FF1E4 .data:004FFDDC .data:004FFDF0 .data:004FFE04 .data:004FFE18 .data:004FFE2C .data:004FFE40 .data:004FFE54 .data:004FFE7C .data:004FFE90 .data:004FFEB8 .data:004FFECC .data:004FFEE0 .data:004FFEF4 .data:005001C8 .data:00502A29 .data:00502A6F .data:00502AC3 .data:005047B8 .data:00504895 .data:00504B7F .data:00504ECF .data:00504EE7 .data:005054CF .data:00505703 .data:0050574F .data:00505757 .data:0050575B .data:0050589B .data:005058CB .data:005058E7 .data:005058F3 .data:00505A33 .data:00505A7B .data:00505A7F .data:00505A8B .data:00505BC7 .data:00505BCB .data:00505BDB .data:00505BDF .data:00505C0B .data:00505C0F .data:00505C17 .data:00505C23 .data:00505D5F .data:00505D63 .data:00505D73 .data:00505D77 .data:00505DA3 .data:00505DA7 .data:00505DAF .data:00505DBB .data:00505EFB .data:00505F47 .data:00506093 .data:005060DF .data:005060EB .data:00507267 .data:00507597 .data:00508C9B .data:00508E1B .data:00508E1F .data:005090E3 .data:005092B3 .data:0050957F .data:00509FB3 .data:0050A64D .data:0050ABDF .data:0050AE87 .data:0050AF53 .data:0050B53F .data:0050C573 .data:0051C753 .data:0051C973 .data:0051C9AF .data:0051CA2B .data:0051CD9B .data:0051D69B .data:0051DE1B .hp_text:005C4263 sub_5C4200 .hp_text:005C6503 sub_5C6500 .hp_data:006434D9 .hp_data:006434DB .hp_data:006434F9 .hp_data:006434FB .hp_data:00664033 map max: (cheat engine) 0046845C - 8B 70 1C - mov esi,[eax+1C] 004320F8 - 03 5E 1C - add ebx,[esi+1C] 00432188 - 8B 46 1C - mov eax,[esi+1C] 0043602E - 8B 43 1C - mov eax,[ebx+1C] 004976AB - 8B 46 1C - mov eax,[esi+1C] 0049473B - 8B 59 1C - mov ebx,[ecx+1C] 00495D85 - 8B 73 1C - mov esi,[ebx+1C] 00495DAA - 8B 4B 1C - mov ecx,[ebx+1C] 004682C6 - 89 48 1C - mov [eax+1C],ecx 004686D8 - 8B 53 1C - mov edx,[ebx+1C] 00468701 - 3B 4B 1C - cmp ecx,[ebx+1C] 004BA1F4 - 03 05 DCDD5300 - add eax,[0053DDDC] -- $00565B4C Access Violation $00565B4C $0060B901 $00674D5F $0040B5F2 $004128A8 $0040D808 427C9A: The instruction at 0x427c9a referenced memory at 0x22, the memory could not be read -> 00000022 (exc. code c0000005, tid 2996) x = Int32 y = Int32 427C9A: The instruction at 0x427c9a referenced memory at 0x22, the memory could not be read -> 00000022 (exc. code c0000005, tid 2996) I've got that one when i've expanded the view to bigger than 64*64 and took a try to load an 40kb BIN map. 0x427C9A is a "TiberiumClass" stuff. Hyper told me. So, it is a buffer overflow. There can be nothing in my notes. I was messing C&C95 arround to see if I could find something useful. Link to comment Share on other sites More sharing options...
CCHyper Posted June 5, 2012 Share Posted June 5, 2012 Eagle, i sent you a reply, just encase you did not receive it i will send it again Link to comment Share on other sites More sharing options...
EagleEye Posted June 6, 2012 Share Posted June 6, 2012 I got it. I haven't sent you a message yet because I haven't gotten far enough on the disassembler to need to ask you for help yet. I sort of want this to be a $20 alternative to IDA (the $519 dollar difference and the ability to output FASM compatible files making up for the comparatively severely limited functionality), but it's not likely seeing as, well, I'm been really depressed lately and that's the kind of thing that kills all the projects you work on. Edit: I'm sorry, ccso.com, but you don't get to put us-flag.gif next to a QR code. You have to pick a decade. Also, price gouging. I feel sorry for any hobbyist who's ever had to shell out any money for IDA. Especially since two people with different versions of IDA can't collaborate, and updating = $$$. Link to comment Share on other sites More sharing options...
Nyerguds Posted June 7, 2012 Share Posted June 7, 2012 holy crap a lot's been posted in here. By "disassembly", I meant "reassemblable disassembly". Something that you can turn into an .exe with an assembler. That can't be done. There's also the exe header and such to deal with, which isn't asm code. The closest you can get is a complete decompilation to C++ code, and I don't see me doing that any time soon, since I'm not a C programmer. Is there a public place i can get his IDA database id like to see which bytes or memory addresses are config to what in the game. I can read C# and understand what the code is doing somethimes, but cant write it worth a lick. I would like to look at the IDA and the documentation hyper has for C&C to give me a better understanding at disassembly and how the game works on the inside. You can ask. But hyper's db generally doesn't contain my 1.06 stuff afaik. Hey Nyer! Don't forget me! If you ever need to know how the .bin file works for SS I would be glad to explain sometime! :-) Cause, like you with C&C95 ; its been a hobby/challenge of mine for the past few years. Not that I see how this fits into the topic at hand, though... Well, explain away! I'd love to know. The only currently existing converter sucks balls. I sort of want this to be a $20 alternative to IDA Yeah... because we all got a legally bought IDA... :roll: Link to comment Share on other sites More sharing options...
swisha Posted June 27, 2012 Share Posted June 27, 2012 I would love larger TD maps. Link to comment Share on other sites More sharing options...
Nyerguds Posted July 3, 2012 Share Posted July 3, 2012 I was working on a map editor before, but I couldn't parse the .SHPs correctly because I'm an idiot. If someone could write some (MIT-licensed) code to convert a SHP into a List<int[,]> or List<int[][]>, then I could probably write the rest of the map editor. I'm fairly sure XCC Mixer contains that code. It's open source, so you should be able to find it in there somewhere. Link to comment Share on other sites More sharing options...
Commander Manuel Posted July 7, 2012 Share Posted July 7, 2012 My suggestion: use the maximum size CCMap has to offer, and make the most effort out of crafting it. I'd rather work with the restrictions set forth by the orginal rules.ini. Bigger maps means bigger problems for the address bank of the executable. Link to comment Share on other sites More sharing options...
CCHyper Posted July 25, 2014 Share Posted July 25, 2014 I'm going bump this topic, because I can! After comparing C&C95, SS and RA95, this is very much possible. There are two ways around the .BIN extension format. (C&C95 and SS) 1. Moving the data into a [MapPack] section like RA95, either raw binary or using RA95 Straw/Pipe compression (Lot of work involved). 2. Checking the BIN file for a array of 4096, if greater, handle as such. This would be the best way, there are many ways we can do this. Also, I have looked into extending /removing CCMaps limitations, and I ran into a lot of errors. The best route here would be to edit EDWIN to write BIN files, or to write a new editor. Link to comment Share on other sites More sharing options...
Tore Posted July 25, 2014 Share Posted July 25, 2014 How about XCC Editor? Talk to Olaf he might be able to modify it to support bigger maps. Link to comment Share on other sites More sharing options...
Nyerguds Posted July 25, 2014 Share Posted July 25, 2014 CCMap is a pretty annoying editor anyway; it can't even show the full 64x64 map. Link to comment Share on other sites More sharing options...
pichorra Posted July 25, 2014 Share Posted July 25, 2014 There seems to be more than one array tied with the map buffer, take a look in CellTrigger loading logic. There is also a lot of checks to ensure that stuff is inside the map. Link to comment Share on other sites More sharing options...
Kilkakon Posted July 26, 2014 Share Posted July 26, 2014 I'd support a better XCC all the way. I can't even load half the maps in my mod without it crashing the thing. Link to comment Share on other sites More sharing options...
Iran Posted July 26, 2014 Share Posted July 26, 2014 CCHyper: There is a macro or inlined function used in tons of places to get a row in the cells array based on the hard-coded max size. E.g. the cell arrays could be 4096x4096 and it would be byte CellArray[4096][4096] then to get the cell 3,3 say CellArray[3][3] it uses logic to translate it. Link to comment Share on other sites More sharing options...
CCHyper Posted July 26, 2014 Share Posted July 26, 2014 There seems to be more than one array tied with the map buffer, take a look in CellTrigger loading logic. There is also a lot of checks to ensure that stuff is inside the map. Im very aware of the system the game uses, but honestly, nothing looks like it is not possible. Can you give me an example of what you mean? I have no come across anything that would be a peoblem yet... CCHyper: There is a macro or inlined function used in tons of places to get a row in the cells array based on the hard-coded max size. E.g. the cell arrays could be 4096x4096 and it would be byte CellArray[4096][4096] then to get the cell 3,3 say CellArray[3][3] it uses logic to translate it. Link to comment Share on other sites More sharing options...
Chimas Posted July 26, 2014 Share Posted July 26, 2014 Can anyone give me a short answer: as a community, we have been making site updates, patches, units, theaters, collor palletes and now we want to make bigger maps, by which I'm excited with the idea. Since we are all users of XCC, why Olaf is not here more often: (1) lack of interest or (2) any unpleasantness event with other members? All the things we have created can supported by XCC. I said short so we don't derail the thread with comments (pls). Just asking to make sense, no offense. Link to comment Share on other sites More sharing options...
pichorra Posted July 26, 2014 Share Posted July 26, 2014 @Chismas: I've never seen Olaf Van der Spek in this fourms. perhaps we can just e-mail him, or try to expand XCC editor by our own. @CCHyper: If you say so, no problem then. Anyway, have Olaf fixed XCC Editor trigger/teamtypes bugs? Link to comment Share on other sites More sharing options...
Iran Posted July 27, 2014 Share Posted July 27, 2014 CCHyper: it's discussed in this topic: http://cnc-comm.com/community/index.php?topic=2704.0 Link to comment Share on other sites More sharing options...
Nyerguds Posted July 28, 2014 Share Posted July 28, 2014 Olaf, like a lot of people, just seems to have somewhat drifted away from the whole community. The high days of C&C are over, and that's simply a sad fact. Link to comment Share on other sites More sharing options...
InFeRnO Posted July 28, 2014 Share Posted July 28, 2014 So I have zero technical know how in regards to programming... I'm just a big C&C TD fan... that said.... ...the thought of bigger maps give me rock hard mahogany! THAT IS ALL Link to comment Share on other sites More sharing options...
weaveR Posted August 1, 2014 Share Posted August 1, 2014 Yeah can we have mega maps for c&c95 pls?? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now