BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup

Join the forum, it's quick and easy

BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup
BullyWiiHacks
Would you like to react to this message? Create an account in a few clicks or log in to continue.
BullyWiiHacks

Gaming, Modding & Programming

Important reminders:

- Click *HERE* for advanced forum search or check out the text field below on the front page for Google before posting
- NO support via private message (use the forum)
- Write meaningful topic titles
Site Translation
Latest topics
» Animal Crossing Wii: An Issue With Seth's "Grass Can't Be Trampled" Gecko code
Direct RAM Writes EmptyToday at 3:35 pm by SnB@BWH

» [Code Request] Final Fantasy Fables: Chocobo's Dungeon (R7FEGD)
Direct RAM Writes Empty11/19/2024, 4:04 pm by ShashooPooka

» Lego Stars Wars: The Complete Saga [RLGE64]
Direct RAM Writes Empty11/12/2024, 3:19 am by SnB@BWH

» JMaster Duel Bot: A Yu-Gi-Oh! Master Duel Bot and Trainer for Steam
Direct RAM Writes Empty11/10/2024, 5:26 am by Bully@WiiPlaza

» Error Injecting Drool Links Saliva Mod Menu
Direct RAM Writes Empty11/10/2024, 5:24 am by Bully@WiiPlaza

» USB Gecko problems with some games
Direct RAM Writes Empty10/16/2024, 1:59 pm by Reclaimer Shawn

» Metal Gear Solid V The Phantom Pain X Flashpoint Batman Gameplay unedited [Seth@WiiPlaza]
Direct RAM Writes Empty9/23/2024, 12:48 pm by Seth@WiiPlaza

» Dropped Out of College to Pursue Web Dev and Life Pursuits in General
Direct RAM Writes Empty8/9/2024, 7:09 am by SnB@BWH

» ASM <> Gecko Code Converter
Direct RAM Writes Empty7/29/2024, 11:15 am by Mac11ngAround

» German With a Jackhammer
Direct RAM Writes Empty7/28/2024, 3:42 pm by SnB@BWH

Search
 
 

Display results as :
 


Rechercher Advanced Search

November 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
252627282930 

Calendar Calendar

Country Statistics
Free counters!

You are not connected. Please login or register

Direct RAM Writes

Go down  Message [Page 1 of 1]

1Direct RAM Writes Empty Direct RAM Writes 6/29/2013, 9:01 am

Bully@WiiPlaza

Bully@WiiPlaza
 
 

Purpose:

Writing a value to the RAM at a specific address.

Be it 8 digits (32 bit), 4 digits (16 bit) or 2 digits (8 bit). There's no codetype for writing 1 digit called nibble (4 bit).

Since 16 bit and 8 bit writes do not use the whole 8 digits specified for the value, there's room for the possibility of doing serial writes similar to this.

Templates:


32 bit:

TTYYYYYY XXXXXXXX

TT = Codetype:

Base address & address less than 0x81000000 or 0x91000000 04
Base address & address greater than 0x80FFFFFF or 0x90FFFFFF14
Pointer & address less than 0x81000000 or 0x91000000 05
Pointer & address greater than 0x80FFFFFF or 0x90FFFFFF15

YYYYYY
= Address to write to
XXXXXXXX = Value to write

16 bit:

TTYYYYYY ZZZZXXXX

TT = Codetype:

Base address & address less than 0x81000000 or 0x91000000 02
Base address & address greater than 0x80FFFFFF or 0x90FFFFFF12
Pointer & address less than 0x81000000 or 0x91000000 03
Pointer & address greater than 0x80FFFFFF or 0x90FFFFFF13

YYYYYY
= Address to write to
XXXX = Value to write
ZZZZ = Additional writes to perform

8 bit:

TTYYYYYY ZZZZ00XX

TT = Codetype:

Base address & address less than 0x81000000 or 0x91000000 00
Base address & address greater than 0x80FFFFFF or 0x90FFFFFF01
Pointer & address less than 0x81000000 or 0x91000000 10
Pointer & address greater than 0x80FFFFFF or 0x90FFFFFF11

YYYYYY
= Address to write to
XXXX = Value to write
ZZZZ = Additional writes to perform

Example #1:

We want to write to address 81456780 using value 00000001. The maximum we ever need is 000000FF.

Since our value can either be 16 bit, 32 bit or 8 bit we can decide which one we'll use. Depending on how the game's value type is defined you may know what it is. Wink

-> We'll take 8 bit because there's never need to write more than 2 digits.

01456780 00000001


In general:
Using less bit writes is better if you happen to affect other stuff unknowingly.

Example #2:

We're using a pointer with offset 5F0 and want to write to the RAM the value 03FF exactly 5 times in a row.

Obviously, we need 16 bit this time (4 digits!). Using pointer adds 0x10 to the codetype. The offset is calculated by subtracting the pointer value from the starting address. We're doing a serial write (4 additional ones).

120005F0 000403FF

Note:

Addresses on which 32 bit writes are performed should be divisible by 4. Respectively 16 bit by 2 und 8 bit by 1 (which is always possible).

Failing to get it right will only make you look stupid since
they still end up working properly.

Why?
The codehandler implicitly decreases the address until it's finally divisible and performs the write at the new address.

The following codes therefore do the same thing:

047FED0 12345678
047FED1 12345678
047FED2 12345678
047FED3 12345678

Doing a bad bit write has no purpose besides trying to steal credit.
-> Don't even try, you have been warned. Wink

Example #3:

We're writing value 3F812345 to address 801A9F03.


Really that easy?

041A9F03 3F812345

Since the bit write is wrong it'll be changed to

041A9F00 3F812345

implicitly and does NOT act like expected / wanted. The string write codetype would be the way to go since it does allow these cases.

Alternatively, you can take one 8 bit write with 3F, a 16 bit write using 8000 and finally another 8 bit write using 00.

001A9F03 0000003F
021A9F04 00008123
001A9F06 00000045

Quite inconvenient but you'll almost never really need this case.


_________________
Direct RAM Writes YBjg74I

Back to top  Message [Page 1 of 1]

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