What is "Hard Coded"

General discussion of the Project Reality: BF2 modification.
Sneak Attack
Posts: 574
Joined: 2006-12-31 00:14

Post by Sneak Attack »

Jarek Mace wrote:There are dissasemblers like wdasm and other tools to reverse engineer code.
Have to know binary and asm as well as be uber patient and I have no idea if it would be useful to search for game functions if at all. Good for finding cdcheck subroutines tho, or used to be, I'm out of date now.
Oh I think it will also be highly illegal.

in other words you have to be a complete nerd and have no life and over use the word uber and pwnd and drink Bawls energy drink found at office max or w/e the fuck it is.

was 1942 have hard coded stuff aswell? because the FH mod/DC/EOD did a titi *** job on all those. if we could get grand mods out of hard coded 1942 the same should be doable with BF2
Image
Jarek Mace
Posts: 209
Joined: 2005-11-20 04:36

Post by Jarek Mace »

Sneak Attack wrote:in other words you have to be a complete nerd and have no life and over use the word uber and pwnd and drink Bawls energy drink found at office max or w/e the fuck it is.
Well sure, a half illiterate rednecked, balls only 25% engaged into man position, bud lite sipping, bum fuzz chinned type of geezer, would have a problem I would imagine mate, it's more than a moderately difficult thing to do, harder than tying shoe laces, watching football while counting spent cartridges and fondling sister mary lou while driving, without dad in the back of the truck seeing and getting jealous kinda thing.

or is that too stereotypical? ;)

There are some very talented people in this field, with far more than the little knowledge I have picked up, maybe one of them can answer better.
Rupert
Posts: 14
Joined: 2006-10-25 05:33

Post by Rupert »

Sneak Attack is right, disassembling the BF2 executable to that point would require pointless effort for a few minor changes, and the distributed form would be a violation of the EULA.
Top_Cat_AxJnAt
Posts: 3215
Joined: 2006-02-02 17:13

Post by Top_Cat_AxJnAt »

Is there no way to hack past this hardcoded stuff, i mean, there must be something thing stopping you from getting to the this code of changing it, so why cant you "hack" your way past this prevention?????


It might take a fews weeks or a month but i find it hard to imagine it just cant be done!
Teek
Posts: 3162
Joined: 2006-12-23 02:45

Post by Teek »

Top _Cat the great wrote:Is there no way to hack past this hardcoded stuff, i mean, there must be something thing stopping you from getting to the this code of changing it, so why cant you "hack" your way past this prevention?????


It might take a fews weeks or a month but i find it hard to imagine it just cant be done!
Think cold war Spy; now EA is CIA, and we are the USSR with out KGB.
Kapiche? :wink:

In order to make head way craking CIA codes we need a Defector. but the Defector will be found and killed before he can tell anyone his secret.
Image
Sandy_Beret
Posts: 754
Joined: 2006-09-13 02:14

Post by Sandy_Beret »

Top _Cat the great wrote:Is there no way to hack past this hardcoded stuff, i mean, there must be something thing stopping you from getting to the this code of changing it, so why cant you "hack" your way past this prevention?????


It might take a fews weeks or a month but i find it hard to imagine it just cant be done!
assembly language dissassemblers can do it
Interactive Disassembler being one example...

assembly language is about as low-level as you can get
while still being able to understand what's going on... it
is all about programming the actual registers on a chip...
very bloody complex - I studied it for a while...

it is very time consuming and when you use the software,
a part of your end-user agreements is usually that you won't try to reverse engineer or disassemble the code in any way. EA would crucify anyone who actually tried to improve the software...
______________________________________
edit --
a command line program that allows piping of output from other programs into Windows clipboard
; toclip.asm
;
; written on 10 June 1998 by Edward J. Beroset
; cleaned up and posted on Sat 08-25-2001
;
; This code may be assembled and linked using Borland's TASM:
; tasm /la /m2 toclip
; tlink /Tdc toclip
;
; It also works with Microsoft's MASM:
; ml /Fl toclip.asm
;
STDIN equ 00h ; handle of standard input device
STDOUT equ 01h ; handle of standard output device
STDERR equ 02h ; handle of standard error device

DOS_READ_HANDLE equ 03fh ; read from handle
DOS_WRITE_HANDLE equ 040h ; write to handle
DOS_ALLOC_MEM equ 048h ; allocate memory block
DOS_RESIZE_MEM equ 04ah ; resize memory block
DOS_TERMINATE equ 04ch ; terminate with error code

WIN_VERSION equ 01700h ; identify WinOldAp version
WIN_OPEN_CLIP equ 01701h ; open clipboard
WIN_EMPTY_CLIP equ 01702h ; empty clipboard
WIN_SET_CLIP equ 01703h ; set clipboard data
WIN_CLOSE_CLIP equ 01708h ; close clipboard

; clipboard formats:
CLIP_FMT_TXT equ 01h ; text format
CLIP_FMT_BMP equ 02h ; bitmap format
CLIP_FMT_TIFF equ 06h ; TIFF
CLIP_FMT_OEMTXT equ 07h ; OEM text


WININT macro function
mov ax,(function)
int 2fh
endm

DOSINT macro function, subfunction
IFB <subfunction>
mov ah,(function AND 0ffh)
ELSE
mov ax,(function SHL 8) OR (subfunction AND 0ffh)
ENDIF
int 21h ; invoke DOS function
endm

ERRMSG macro tag, message
LOCAL nextmsg
tag db nextmsg-$
db message
nextmsg = $
endm

.model small
.386
.stack 100h
.data
ERRMSG cantresize, <"ERROR: can't resize memory",0dh,0ah>
ERRMSG noclipboard,<"ERROR: no clipboard",0dh,0ah>
ERRMSG emptyclip, <"ERROR: cannot empty clipboard",0dh,0ah>
ERRMSG openclip, <"ERROR: cannot open clipboard",0dh,0ah>
ERRMSG allocerror, <"ERROR: can't allocate 64K buffer",0dh,0ah>
ERRMSG readerr, <"ERROR: can't read data from stdin",0dh, 0ah>
ERRMSG pasteerr, <"ERROR: can't paste data to clipboard",0dh,0ah>

.code
start proc
mov bx,ss ; stack segment
mov ax,ds ; - data segment
sub bx,ax ; = size of all but stack
add bx,10h ; add in stack size (in paragraphs)
DOSINT DOS_RESIZE_MEM ;
mov di,offset cantresize
jc error
WININT WIN_VERSION
cmp ax,WIN_VERSION
mov di,offset noclipboard
jz error ;

WININT WIN_OPEN_CLIP ; open clipboard
or ax,ax ; nonzero status means error
mov di,offset openclip
jz error ;

WININT WIN_EMPTY_CLIP ; empty clipboard
or ax,ax ; nonzero status means error
mov di,offset emptyclip
jz error ;

; allocate a big buffer
mov bx,1000h ; 1000h paragraphs = 64K
DOSINT DOS_ALLOC_MEM ;
mov di,offset allocerror
jc error ;


mov ds,ax ;
mov es,ax ;
; read from the input file
mov bx,STDIN ; stdin
mov cx,0ffffh ; read a whole bunch of data
; ds :d x ==> data buffer
xor dx,dx ;
DOSINT DOS_READ_HANDLE ;
mov di,offset readerr
jc error ;
xor si,si ;
mov cx,ax ; size

; paste the file buffer into the clipboard
; mov es:bx ==> data
xor bx,bx
; mov si:cx, size of data
mov dx,CLIP_FMT_TXT ; text data
WININT WIN_SET_CLIP ;
or ax,ax
mov di,offset pasteerr ;
jz error ;
WININT WIN_CLOSE_CLIP ; close clipboard
DOSINT DOS_TERMINATE,0 ; exit with error code = 0
error:
mov bx,@data ;
mov ds,bx ;
xor cx,cx ;
mov cl,byte ptr[di] ; fetch length
mov dx,di ; point to data
inc dx ; advance beyond length
mov bx,STDERR ; write to stderr
DOSINT DOS_WRITE_HANDLE ; write to handle
DOSINT DOS_TERMINATE,1 ; error exit
start endp
END start
personally - I would rather have my toenails removed with pliers than delve into 80x86 ASM (again) and that above is a quite a simple structure
Last edited by Sandy_Beret on 2007-04-03 08:09, edited 1 time in total.
"Be peaceful, be courteous, obey the law, respect everyone;
but if someone puts his hand on you, send him to the cemetery."


- Malcolm X
ImageImage
Ulys
Posts: 5
Joined: 2007-03-23 02:08

Post by Ulys »

Even if they could get the source files, they couldn't use them without being sue by EA. Intellectual property :)

And with the source files, they would have to produce a patch to add new stuff to the game. This patch would prevent you to play vBF2 or other mod (Is that a problem ? :p )
[This post was written in a language close to English. Please correct me, I'm trying to improve :) ]

- Pilot, get us to market!
- Market? We will be killed before I land the helicopter. This is madness!
- Madness? THIS IS MUTTRAH !
oS2007
Posts: 411
Joined: 2007-03-28 08:56

Post by oS2007 »

Rupert wrote:Sneak Attack is right, disassembling the BF2 executable to that point would require pointless effort for a few minor changes, and the distributed form would be a violation of the EULA.
While I don't know EVERYTHING that the hard-coding keeps modders from doing, I find Rupert's assertion to be far more realistic. EA might be big brother for now, but keep in mind that even Rome fell at some point. [punk]down with THE MAN![/punk]
Top_Cat_AxJnAt
Posts: 3215
Joined: 2006-02-02 17:13

Post by Top_Cat_AxJnAt »

SO what are you COders waiting for, you know what you got to do now, i say you just GET CRACKING!!!


Reverse Engineering TIS THE Future!!!!!!!!









p.s remember EA does not really give a sht, look at previous or possbily on-going server situation 1) - they would never actualy check the forums on this site 2) - if you keep it alittle hush hush they would and will never know.
oS2007
Posts: 411
Joined: 2007-03-28 08:56

Post by oS2007 »

Well, considered the modding community big enough to make mention of when BF2 was released, I think they would only hesitate for a short while before deciding to "make an example" of us.

Don't say such things. If just one of these mods gets spanked with piracy/hacking, then the whole community might find itself up scheisse's creek.
Top_Cat_AxJnAt
Posts: 3215
Joined: 2006-02-02 17:13

Post by Top_Cat_AxJnAt »

really.........hmm Wow, they actualy do that, probaly would just to be an ***, like spend millions on lawyers and all, bring heaven and earth down on this tiny community.
oS2007
Posts: 411
Joined: 2007-03-28 08:56

Post by oS2007 »

I dunno, that's just my thought. It's that f*** 'em all attitude (when "'em" happens to be a big company with money to blow on legal) that can put modders in general right out of a hobby. Anyone here with some experience?
Sandy_Beret
Posts: 754
Joined: 2006-09-13 02:14

Post by Sandy_Beret »

Ulys wrote:Even if they could get the source files, they couldn't use them without being sue by EA. Intellectual property :)

And with the source files, they would have to produce a patch to add new stuff to the game. This patch would prevent you to play vBF2 or other mod (Is that a problem ? :p )
you don't need the source files

that's why it's called reverse engineering...
how do you think people make so many cracks and patches for illegally licensed software ?
it's just about tech savvy, and source code isn't necessary... I am not sanctioning reverse engineering (legal save-my-*** disclaimer goes here) - just saying that you Do Not Need source code... got it ? it is just really, really complicated...

the code I put above has comments and such, the raw disassembled stuff is just
pure code...

most computer code spends 90% of it's time in 10% of the code - so after making a project, one can come back and optimise stuff with ASM - ASM runs faster and makes for smaller programs... however - it is vast amounts of work, so optimising compilers were invented... and in ADA95 (used a lot in real-time systems, .mil, etc.) compiled code is alleged to give ASM a run for it's money
Last edited by Sandy_Beret on 2007-04-03 09:13, edited 1 time in total.
"Be peaceful, be courteous, obey the law, respect everyone;
but if someone puts his hand on you, send him to the cemetery."


- Malcolm X
ImageImage
Gaz
Posts: 9032
Joined: 2004-09-23 10:19

Post by Gaz »

we will not be reverse engineering anything in the BF2 engine that we cannot mod.

Topcat, I suggest you read the rules regarding illegal comments on these boards. Discussion or incitement to crack software is a bannable offense...
'FORUM RULES' wrote:
Section 1: Posting Guidelines
...

iii. Illegal Subjects
Prohibited subjects include, but are not limited to: Warez/pirating, hacking, drugs, pornography, religion, and provoking racism. Incitement or 'encouragement' of these activities is also prohibited. If we see you posting threads promoting any of these topics you will be warned or banned.
Image
"By profession I am a soldier, and take pride in that fact. But I am prouder, infinitely prouder, to be a father". - Gen Douglas MacAurthur.
-Proud wearer of motorcycle helmets since 1998.
oS2007
Posts: 411
Joined: 2007-03-28 08:56

Post by oS2007 »

Amen. There's probably no one here who wants to jeopardize our community, or any of the others (PR, FH2, etc).
Top_Cat_AxJnAt
Posts: 3215
Joined: 2006-02-02 17:13

Post by Top_Cat_AxJnAt »

LOL< sht i knew i would make a **** up in one of my 2,490 posts and i am sorry for breaking forum rules.

Sorry and thank you for your leniency.









LOL
Last edited by Top_Cat_AxJnAt on 2007-04-03 12:08, edited 1 time in total.
oS2007
Posts: 411
Joined: 2007-03-28 08:56

Post by oS2007 »

Not that I can speak with any authority, but don't worry about it.

Some day, EA will shaft the wrong dev team and after a legal battle the BF franchise will belong to those who are passionate about the subject matter instead of the lucrative consumer base.
Ulys
Posts: 5
Joined: 2007-03-23 02:08

Post by Ulys »

Sandy_Beret wrote:you don't need the source files

that's why it's called reverse engineering...
how do you think people make so many cracks and patches for illegally licensed software ?
it's just about tech savvy, and source code isn't necessary... I am not sanctioning reverse engineering (legal save-my-*** disclaimer goes here) - just saying that you Do Not Need source code... got it ? it is just really, really complicated...

the code I put above has comments and such, the raw disassembled stuff is just
pure code...
:) I know what reverse engineering is, thank you. But you can't do anything in ASM, so you need to go one step further and get "sort of" source file from the ASM code. And it's still illegal because it's still intellectual property !
[This post was written in a language close to English. Please correct me, I'm trying to improve :) ]

- Pilot, get us to market!
- Market? We will be killed before I land the helicopter. This is madness!
- Madness? THIS IS MUTTRAH !
TayloR016
Posts: 383
Joined: 2007-03-11 13:55

Post by TayloR016 »

So if the stuff that is hard coded wasn't hard coded what type of things could you do ?
Long Bow
Posts: 1100
Joined: 2007-03-21 14:41

Post by Long Bow »

How soon people forget. The Devs were recently charged by the British government for breaking laws :roll: They don't want EA coming after them too :roll:










;-)
Post Reply

Return to “PR:BF2 General Discussion”