The Legend Of Zelda: Twilight Princess [RZDE01]

Started by Zxcman5, December 27, 2008, 09:47:35 PM

Previous topic - Next topic

mugwhump

#75
Do you mean the addresses of the gecko registers won't be the same? Cuz that would make things tough... How would I pass the values in the gecko registers into ASM if I don't know their specific address? D:
EDIT: But the technical codetype document says
QuoteNote that grN are stored before the gecko/code handler. That mean they should always be accessible at a static address : 0x80001804. [0x80001804]=gr0, [0x80001808]=gr1,...,[0x80001840]=grF. That way you can access them directly, when inserting an asm routine for example.

Or do you mean I can't rely on the value in the gecko registers not changing? So I should find some other outside address to store the health? I don't have a usbgecko though, so I dunno how I'd find one...

Romaap

I'm not sure, but if I remember correctly the address of the Gecko registers has changed between the older Gecko and newer.
But if you just use the Gecko register operations, you could create the same code you just made.

mugwhump

#77
How do I use the register operations for subtraction though? I know I could use addition if I made one value a two's complement, but I can't find any operation to let me do that. Is there some way I can combine these bitwise operations to get subtraction?
0 : add (+)
1 : mul (*)
2 : or (|)
3 : and (&)
4 : xor (^)
5 : slw (<<)
6 : srw (>>)
7 : rol (rotate left)
8 : asr (arithmetic shift right)
A : fadds (single float add)
B : fmuls (single float mul)

edit: could I use gr1 xor FFFF to get the same thing as NOTgr1?


:'(
Damn, I tested it out and it says 'Exception (DSI) occurred!' then dumps a bunch of code before I even see the title screen :(
The same thing happened when I tried it with the ASM removed.

It works with other people's codes... just not mine. :(

EDIT:
I think the problem is that I can't compare the values in the gecko registers when I haven't assigned anything to them yet.
I need some way to assign a value to the gecko register only ONCE when the game starts, and not every frame. How I do dat?

simalexander

The Time Modifier code by Hawkeye2777 doesn't work and my Zelda version is v1. So if someone can tell me why it doesn't work that would be great thanks.
http://www.matt123337.netne.net/
Wii Hacks, Mods, and More!

hawkeye2777

Quote from: simalexander on November 23, 2009, 02:01:39 AM
The Time Modifier code by Hawkeye2777 doesn't work and my Zelda version is v1. So if someone can tell me why it doesn't work that would be great thanks.

Can't help with the little bit of info you gave. Did you follow the instructions given in the code note? What other codes do you have activated? Have you tried using that code by itself?
Currently "retired" from hacking codes.

simalexander

#80
Yes I did. I did press 1 + D pad. I used it with the following codes:

Link is Invincible [hawkeye2777]
C20BF2DC 00000002
38000002 901A056E
60000000 00000000

No Notification The First Time You Collect A Rupee [brkirch]
04147194 48000010

Infinite All Bombs [James0x57]
04038328 38600087

Always Have Full Wallet [James0x57]
0420D680 B0A40004

Infinite Slingshot Seeds [James0x57]
04211D8C 38000032

Infinite Arrows [James0x57]
00492A14 00000087

Infinite Lantern Oil [James0x57]
02492930 00005640

Infinite Breath Underwater [James0x57]
0249871A 00000258

No I didn't try using it alone. I will try it alone though. One more thing do I have press and hold 1 and d pad or not?

Post Merge: November 23, 2009, 11:16:04 PM

I did try alone but still no luck. If someone could tell me why it's not working that would be great thanks.
http://www.matt123337.netne.net/
Wii Hacks, Mods, and More!

hawkeye2777

Hmm, not sure what the problem is. And yes, you do have to press and hold 1+dpad. The lighting of the map should change instantly, however the day/night versions of towns, etc. won't take effect until you re-enter the area (if I remember correctly).

Always Start of Night ("press start" screen's color) [James0x57]
0249295C 00004387

Always Mid-Night [James0x57]
0249295C 00004248

Always Early Morning [James0x57]
0249295C 000042C8

Always Mid-day [James0x57]
0249295C 00004316


Do any of these codes work for you?
Currently "retired" from hacking codes.

simalexander

#82
Its All right now I found the working codes.
Quote from: hawkeye2777 on November 23, 2009, 11:50:11 PM
Hmm, not sure what the problem is. And yes, you do have to press and hold 1+dpad. The lighting of the map should change instantly, however the day/night versions of towns, etc. won't take effect until you re-enter the area (if I remember correctly).

Always Start of Night ("press start" screen's color) [James0x57]
0249295C 00004387

Always Mid-Night [James0x57]
0249295C 00004248

Always Early Morning [James0x57]
0249295C 000042C8

Always Mid-day [James0x57]
0249295C 00004316


Do any of these codes work for you?

Problem solved
http://www.matt123337.netne.net/
Wii Hacks, Mods, and More!

mugwhump

#83
OK, here's my hackjob attempt at using counters to initialize the gecko register to 0, lol

The first 3 lines are the new stuff. What I'm trying to do is set the counter to FFFF on the first execution so that grE will be set to 0, and then the counter will be reset to 0. Thus grE won't be set to 0 every frame, but only once every 65535 frames lol. So there's a 1 in 65535 chance of this not working. [spoiler]Actually probably a 100% chance since I have no idea what I'm doing with the counters, halp plz D:[/spoiler]

A80FFFF8 0000FFFF if counter =FFFF, starts at FFFF, reset counter to 0 when true
8000000E 00000000 grE=0
E2000001 00000000 1 endif, ba, po=0
A449292A EF000000 if grE>HEALTH (HA+ba/po)
82110001 0049292A gr1=newhealth (16 bits @ba+49292A)
8411000E 0049292A set health to grE(old health) (write 16bit to HA+ba)
C2000000 00000004 grE -= gr1 (grE=damage) Assembly code 1
3C008000 8020183C
3C408000 80621808
7C830850 9080183C
60000000 00000000
8610000E 0000000X grE *= X (multiplied damage)
A649292A EF000000 if grE<HEALTH, so health doesn't become negative *how do I do less than or equal to? This way sucks*
C2000000 00000004 health -= grE Assembly code 2
3C008000 8020183C
3C408049 8062292A
7C811850 9082292A
60000000 00000000
E2000002 00000000 3 endifs, ba, po=0
8211000E 0049292A grE = health (grE=16 bits at ba+HA)

edit: aaaargh that code's retarded, exception error

I wonder if this line's giving me problems?
A449292A EF000000 if grE>HEALTH (HA+ba/po)
According to the codetype doc, this is supposed to compare grE to the value at an address(The F should mean we're using an address), but maybe the codetype doc is wrong. Maybe it's comparing grE to grF, which is unassigned, thus the error

EDIT 2: yeah, I think it's that line, though it's got nothing to do with grF being unassigned. None of my codes using the A4 codetype work... dunno what I'm doing wrong

Also, neither of my ASM codes do anything. I wonder if it's related to the gecko registers? Maybe I'm reading the wrong bits.
edit 50000: it's probably because I'm not allowed to use registers 1-4 in zelda. They don't crash the game (since I'm storing addresses in them?), but they're not working, either.


EclipseSin

#85
Ok since theirs like 5 twilight princess support threads that I've seen in the search, I just decided on this one instead of making a new one since it's a question about an existing code. I was wondering if someone could tell me exactly what each RGB handles.

I have been using
Hero's Clothes Color Modifier [hawkeye2777]
48000000 80497FE4
DE000000 80008180
140032A8 RRRRGGGG
120032AC 0000BBBB
140032B0 RRRRGGGG
120032B4 0000BBBB
E0000000 80008000


The question is, which on this line, 140032A8 RRRRGGGG, what does the first RR change and what does the second RR change? Or does Zelda use a 16-bit color code?  Is the first RR the undergarment/sleeves (the white parts, such as his tights), or the actual green part of the tunic? The reason I'm asking is I'm trying to make the tunic a custom color without it looking over saturated.

So I tried modifying the following to increase the brightness and change color. As you'll notice, this code does not touch the blue channel.

Darker Hero's Clothes [hawkeye2777]
48000000 80497FE4
DE000000 80008180
120032A8 0002FFF0
120032B0 0002FFF0
E0000000 80008000


After changing these slightly to make the clothes a little brighter he looks over saturated. Like theirs no detail to his tunic.


Like I want to change the hue only, not the luminence ect. Can someone find me the default values and maybe elaborate on what each RR GG and BB does? Cause I'd assume it's using RGB color. If it's html type color codes (like FFFFFF is white), I should be ok with default values. I dont have a USB Gecko so I've been kinda rebooting constantly and changing out gct's. Little time consuming... (I imagine you can make realtime changes with gecko for testing colors?)

hawkeye2777

Hero's Clothes Color Modifier
[hawkeye2777]

48000000 80497FE4
DE000000 80008180
140032A8 RRRRGGGG
120032AC 0000BBBB
140032B0 RRRRGGGG
120032B4 0000BBBB
E0000000 80008000

RGB Values:
0000-00FF (0 to 255)
FF00-FFFF (-256 to -1)
The first block is the Torso (lines 3 and 4), and the second block is the Legs (lines 5 and 6).


Did you not read the note? It says which lines are for which.

As far as for your other question, I don't think I can answer that. The code itself is buggy (I had problems with it, e.g. not all values work). The best results I got were the example codes I listed with the above code.

Also, the Darker Hero's Clothes (if I remember correctly) only changed Link's clothes to look like they do when they are wet.
Currently "retired" from hacking codes.

EclipseSin

#87
Indeed I did read the note. However, I thought maybe for example, in 140032A8 RRRRGGGG , the first rr would be torso tunic, and the second RR would be undergarment torso. That's what I'm asking because I have never seen this type of color coding, just the normal RRGGBB, not RRRRGGGGBBBB. I don't understand the -256 to -1. Would that not be black regardless? Or is it some kind of alpha?


joe_263


mugwhump

Yeah, but I'm stuck because of the A4 thing. If I can't get A4 codetypes to work the code is impossible...

However, I don't need ASM anymore, cuz some helpful dude told me I could get the same thing as NOT by using XOR FFFFFFFF, so that helps.

I'm getting a usb gecko for christmas, so that should make things easier.  O0