PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Discussion > ROM Hacking Discussion

ROM Hacking Discussion General ROM Hacking discussion.

User Tag List

Reply
 
Thread Tools Display Modes
Old 28th October 2013, 09:33 PM   #21
Andrea
Getting there...
 
Join Date: Oct 2013
Posts: 40
Andrea
Default

Quote:
Not true, OAM and Map transparency are controlled by the same area of ram. Change one, you change the other. This is the issue with fog.
WHATTT O_O NONONONO
For the map trasparency you use this wbto and change byte, ok! but for OAM you change attribute of OBJ for became a semi-trasparent rain or player or anything you want, there isn't the same byte ^^"
well, for semi-trasaprent rain it's very difficoult because you could change continue routine ^^"
Andrea is offline   Reply With Quote
Likes mewthree9000 liked this post
Sponsored Links
Old 28th October 2013, 09:41 PM   #22
karatekid552
What does this button do?.....
Ex-Staff
 
karatekid552's Avatar
 
Join Date: Feb 2013
Location: Stalker.......
Posts: 242
karatekid552 karatekid552
Default

Quote:
Originally Posted by Andrea View Post
WHATTT O_O NONONONO
For the map trasparency you use this wbto and change byte, ok! but for OAM you change attribute of OBJ for became a semi-trasparent rain or player or anything you want, there isn't the same byte ^^"
well, for semi-trasaprent rain it's very difficoult because you could change continue routine ^^"
I never said it was the same byte. Look at my post. I said same area of RAM. My code (and the transparency code you posted) only changes the word in that register, which affects how the transparency of OAM objects intersect with maps. This is the issue. When I reset this to the default, the issue occurs where the OAM fog becomes solid. Look man, I know what I'm talking about.

Edit: Proof, from GBATEK:

4000048h - WININ - Control of Inside of Window(s) (R/W)
Bit Expl.
0-3 Window 0 BG0-BG3 Enable Bits (0=No Display, 1=Display)
4 Window 0 OBJ Enable Bit (0=No Display, 1=Display)
5 Window 0 Color Special Effect (0=Disable, 1=Enable)
6-7 Not used
8-11 Window 1 BG0-BG3 Enable Bits (0=No Display, 1=Display)
12 Window 1 OBJ Enable Bit (0=No Display, 1=Display)
13 Window 1 Color Special Effect (0=Disable, 1=Enable)
14-15 Not used

4000050h - BLDCNT - Color Special Effects Selection (R/W)
Bit Expl.
0 BG0 1st Target Pixel (Background 0)
1 BG1 1st Target Pixel (Background 1)
2 BG2 1st Target Pixel (Background 2)
3 BG3 1st Target Pixel (Background 3)
4 OBJ 1st Target Pixel (Top-most OBJ pixel)
5 BD 1st Target Pixel (Backdrop)
6-7 Color Special Effect (0-3, see below)
0 = None (Special effects disabled)
1 = Alpha Blending (1st+2nd Target mixed)
2 = Brightness Increase (1st Target becomes whiter)
3 = Brightness Decrease (1st Target becomes blacker)
8 BG0 2nd Target Pixel (Background 0)
9 BG1 2nd Target Pixel (Background 1)
10 BG2 2nd Target Pixel (Background 2)
11 BG3 2nd Target Pixel (Background 3)
12 OBJ 2nd Target Pixel (Top-most OBJ pixel)
13 BD 2nd Target Pixel (Backdrop)
14-15 Not used

4000052h - BLDALPHA - Alpha Blending Coefficients (W)
Used for Color Special Effects Mode 1, and for Semi-Transparent OBJs.
Bit Expl.
0-4 EVA Coefficient (1st Target) (0..16 = 0/16..16/16, 17..31=16/16)
5-7 Not used
8-12 EVB Coefficient (2nd Target) (0..16 = 0/16..16/16, 17..31=16/16)
13-15 Not used

My code, which was hooked right into the msgbox command.
Code:
.text 
.align 2 
.thumb 
.thumb_func 
.global semitransparent_text_boxes_prt_1 
 
 
main: 
    push {r0-r1} 
    ldr r0, number4000048 
    ldr r1, number1F3F 
    strh r1, [r0] 
    ldr r0, number4000050 
    ldr r1, number060F3F41 
    str r1, [r0] 
    pop {r0-r1} 
    ldr r2, .return0x6A181 
    bx r2 
     
.align 2 
number4000048:    .word    0x4000048 
number1F3F:    .word    0x00001F3F 
number4000050:    .word    0x4000050 
number060F3F41:    .word    0x060F3F41 
.return0x6A181:    .word    0x0806A181     
     
/*writebytetooffset 0x3F 0x4000048 
writebytetooffset 0x1F 0x4000049 
 
 
writebytetooffset 0x41 0x4000050 
writebytetooffset 0x3F 0x4000051 
writebytetooffset 0xF 0x4000052 
writebytetooffset 0xA 0x4000053*/
Code which was hooked into the end command.
Code:
.text 
.align 2 
.thumb 
.thumb_func 
.global semitransparent_text_boxes_prt_2_reset 
 
 
main: 
    push {r0-r1} 
    ldr r0, number4000048 
    ldr r1, number1F1F 
    strh r1, [r0] 
    ldr r0, number4000050 
    ldr r1, number00101E40 
    str r1, [r0] 
    pop {r0-r1} 
    ldr r1, .return0x69ED9 
    bx r1 
     
.align 2 
number4000048:    .word    0x4000048 
number1F1F:    .word    0x00001F3F 
number4000050:    .word    0x4000050 
number00101E40:    .word    0x00101E40 
.return0x69ED9:    .word    0x08069ED9     
     
/*writebytetooffset 0x3F 0x4000048 
writebytetooffset 0x1F 0x4000049 
 
 
writebytetooffset 0x41 0x4000050 
writebytetooffset 0x3F 0x4000051 
writebytetooffset 0xF 0x4000052 
writebytetooffset 0xA 0x4000053*/
There is more code for the other commands, but all that changes is the return address.

Last edited by karatekid552; 28th October 2013 at 09:57 PM.
karatekid552 is offline   Reply With Quote
Likes mewthree9000 liked this post
Old 28th October 2013, 11:01 PM   #23
droomph
握りモンスター
Ex-StaffPHO VIP
 
droomph's Avatar
 
Join Date: Apr 2012
Location: maybe.
Age: 20
Posts: 439
droomph
Default

while everyone's getting the transparency part clear, I'll just throw this in. *eep*

Code:
' --AXVE--
writebytetooffset 0x0 0x202F090 ' menu middle border color
writebytetooffset 0x0 0x202F091 ' "
writebytetooffset 0x0 0x202F098 ' menu inner border color
writebytetooffset 0x0 0x202F099 ' "
writebytetooffset 0x0 0x202F0A4 ' menu bg color
writebytetooffset 0x0 0x202F0A5 ' "
writebytetooffset 0xFF 0x202F0AA ' text color
writebytetooffset 0xFF 0x202F0AB ' "
writebytetooffset 0x0 0x202F0B8 ' text shadow color
writebytetooffset 0x0 0x202F0B9 ' "
writebytetooffset 0x0 0x202F0BE ' middle border color
writebytetooffset 0x0 0x202F0BF ' "
writebytetooffset 0x0 0x202F0C0 ' bg color
writebytetooffset 0x0 0x202F0C1 ' "
writebytetooffset 0x0 0x202F0C2 ' outer border color
writebytetooffset 0x0 0x202F0C3 ' "
writebytetooffset 0x0 0x202F0C4 ' side inside border color
writebytetooffset 0x0 0x202F0C5 ' "
writebytetooffset 0x0 0x202F0C6 ' text block bg color
writebytetooffset 0x0 0x202F0C7 ' "
just so you know, it's in script format because I copied it off some stuff I wrote.
__________________

Last edited by droomph; 28th October 2013 at 11:04 PM.
droomph is offline   Reply With Quote
Likes mewthree9000 liked this post
Old 29th October 2013, 06:12 AM   #24
Andrea
Getting there...
 
Join Date: Oct 2013
Posts: 40
Andrea
Default

Ahhh this xD, sorry before I don't understand what are you mean :C
Andrea is offline   Reply With Quote
Likes karatekid552 liked this post
Old 1st November 2013, 04:52 AM   #25
droomph
握りモンスター
Ex-StaffPHO VIP
 
droomph's Avatar
 
Join Date: Apr 2012
Location: maybe.
Age: 20
Posts: 439
droomph
Default

New offsets for Emerald, everyone!

Code:
Text box palette in ROM: 0x8.DDD728
RAM palette loader: 0x2.37CF8
RAM palette: 0x5.1E0 (last row in background palettes)
If you go on VBA or NO$GBA shareware (whichever one you feel like) you can test out the different colors. Each color is 5 bytes long, giving a 32-shade depth; rgb(1,1,1) is 0x0421 (big endian for RAM); there is one extra byte on top, probably has to do with alpha (most likely not, but ? why not). (I'm pretty sure you guys know this or can figure this out pretty quickly but just in case you don't feel like it I've provided the information.)

For actually implementing this into a script (ASM or otherwise), it should be the same as Ruby and FireRed; simply substitute the 0x0s in the WRAM offsets in the original script with the palette (0x2.37CF4). I assume this because the I/O offsets are GBA graphics registers rather than game-specific. Of course, I don't have a lot of expertise in this area so if I'm wrong please do correct me.

edit: nope there's still more
__________________

Last edited by droomph; 1st November 2013 at 05:16 AM.
droomph is offline   Reply With Quote
Likes mewthree9000 liked this post
Old 1st November 2013, 12:11 PM   #26
karatekid552
What does this button do?.....
Ex-Staff
 
karatekid552's Avatar
 
Join Date: Feb 2013
Location: Stalker.......
Posts: 242
karatekid552 karatekid552
Default

Quote:
Originally Posted by droomph View Post
New offsets for Emerald, everyone!

Code:
Text box palette in ROM: 0x8.DDD728
RAM palette loader: 0x2.37CF8
RAM palette: 0x5.1E0 (last row in background palettes)
If you go on VBA or NO$GBA shareware (whichever one you feel like) you can test out the different colors. Each color is 5 bytes long, giving a 32-shade depth; rgb(1,1,1) is 0x0421 (big endian for RAM); there is one extra byte on top, probably has to do with alpha (most likely not, but ? why not). (I'm pretty sure you guys know this or can figure this out pretty quickly but just in case you don't feel like it I've provided the information.)

For actually implementing this into a script (ASM or otherwise), it should be the same as Ruby and FireRed; simply substitute the 0x0s in the WRAM offsets in the original script with the palette (0x2.37CF4). I assume this because the I/O offsets are GBA graphics registers rather than game-specific. Of course, I don't have a lot of expertise in this area so if I'm wrong please do correct me.

edit: nope there's still more
A guy on PC actually wrote a routine which sets which color will remain solid during the transparency. It is on their transparent textbox thread.
karatekid552 is offline   Reply With Quote
Old 8th January 2014, 06:34 AM   #27
Kakarot1212
/member.php?u=433319
 
Kakarot1212's Avatar
 
Join Date: Dec 2013
Location: Philippines
Age: 20
Posts: 90
Kakarot1212
Default

Ep!c has already done it. Check his tut on PC again.
Kakarot1212 is offline   Reply With Quote
Reply

Tags
textboxes, transparent

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:53 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts