GTA: Modification Area
Would you like to react to this message? Create an account in a few clicks or log in to continue.
GTA: Modification Area

A website for the GTA modding scene

Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Big-game starts raising Schneider's profile
Sub-Memory Routines EmptySun Mar 04, 2012 2:28 am by lavivi

» [Help] cleo created lighting
Sub-Memory Routines EmptyThu Oct 14, 2010 1:03 am by findmy012

» Mission Question
Sub-Memory Routines EmptyThu Oct 14, 2010 1:02 am by findmy012

» [IV] Spoiler Script
Sub-Memory Routines EmptyThu Oct 14, 2010 1:02 am by findmy012

» Mission mod [help]
Sub-Memory Routines EmptySat Sep 18, 2010 5:50 pm by jayd00

» Bc7 Mod Help
Sub-Memory Routines EmptyFri Aug 20, 2010 11:19 am by pengpeng

» Found a bug
Sub-Memory Routines EmptyFri Dec 18, 2009 4:22 am by _CJ360_

» [IV] Novitec Rosso 599 GTB
Sub-Memory Routines EmptyTue Nov 17, 2009 4:22 pm by Kotton

» Hello/Guidance Request
Sub-Memory Routines EmptyMon Oct 12, 2009 6:45 am by Adler

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Affiliates
image

Image

Image

Image

Image

Image

Image

Image

Image

Image

image

Image

steve-m.com

Image


----- Русский -----

Если ваш сайт содержит большую коллекцию SCM/CLEO-скриптов (больше 16), напишите на мой e-mail, и я добавлю его в список. Приветствуются скрипты, которые не встречаются на других сайтах ... Спасибо. ))))


----- English -----

If your website has a big enough collection of SCM/CLEO scripts (more than 16) notify me by e-mail
, and I will add it to the list. The unique scripts are preferable ... Thank you. ))))
Log in

I forgot my password



November 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
252627282930 

Calendar Calendar


You are not connected. Please login or register

Sub-Memory Routines

2 posters

Go down  Message [Page 1 of 1]

1Sub-Memory Routines Empty Sub-Memory Routines Wed Mar 04, 2009 7:47 am

gtasbigfoot

gtasbigfoot
Admin

Description


I wanted to post a topic, giving examples on sub-memory routines.
There is many ways in San Andreas, what is the most common? Perhaps it's the via arrays sub-memory routine. Thus, we have three ways to handle the game memory. (For more information of the others, read this topic by Seemann). Wink
Well, now, this is for San Andreas v1.0 US, and may-be the German version. If you find something un-working, then consider changing your EXE version, original v1.0 US, would therefore be beneficial.


SA arrays routine


Using the SA arrays to get an access to any addresses in range of 0..FFFFFFFF. The array indexes can contain 32-bit integer values that gives us an access to ANY in-game address in ranges 0x00000000..0xFFFFFFFF. This way all game addresses are accessible, some of addresses still may not be rewritable, (because of AccessViolation Error), which Sanny will give.

Code:


// 0@ -address
// 2@ -new value
// 3@ -length (in bytes)
//--write specified number of bytes into memory

:MemoryWrite 
0085: 5@ = 0@
0@ /= 4
0@ *= 4          // memory address
0062: 5@ -= 0@    // offset (0, 1, 2, 3) 
:_GetInitValue      // if you specify mem offset in 5@, you're able to gosub here
gosub @MemoryRead // get initial value
3@ *= 8 // bytes -> bits
5@ *= 8
dec(3@)
for 6@ = 0 to 3@
  if
    08B6: test 2@ bit 6@
  then
    08BF: set 1@ bit 5@    // 1
  else
    08C5: clear 1@ bit 5@  // 0
  end
  inc(5@) // next memory bit
end   
008A: &0(0@,1i) = 1@  // write new value
return


//--write 32-bit value into memory-----------

:MemoryWrite32bit
0@ -= 0xA49960
0@ /= 4
008A: &0(0@,1i) = 1@ 
return

//--read 32-bit value from memory-----------

:MemoryRead
0@ -= 0xA49960
0@ /= 4
008B: 1@ = &0(0@,1i)
return



Examples



Here are some examples using that, code above:

This will remove the message "To stop Carl;(bla...bla)" when the player first
kicked someone out of his car.

Code:

0@ = 0xC0BC15 //  ADDRESS
2@ = 0x1      //  VALUE
3@ = 0x1      //  LENGTH (Byte)
gosub @MemoryWrite





Here are some helpful topics:

Seemann's San Andreas Memory Handling Topic
Changing hard-coded interface
Cheats

http://gtamodding.com

2Sub-Memory Routines Empty Re: Sub-Memory Routines Wed Mar 04, 2009 8:17 am

Alex



Nice post! BTW, you know the HUD color address, after 362041 is there any more?

3Sub-Memory Routines Empty Re: Sub-Memory Routines Wed Mar 04, 2009 8:22 am

gtasbigfoot

gtasbigfoot
Admin

Alexander wrote:Nice post! BTW, you know the HUD color address, after 362041 is there any more?

Code:

362041..49  - unknown

I guess you could try them if you wanna, I have seen no effect in anything, so it's unknown, AFAIK. Tounge 2
362037 is also unknown.

http://gtamodding.com

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum