You are not logged in.
I hacked the OAM of the Green Trainer just like in Green jap for my upcoming hack, but:
The monsters on the Title Screen are on the same side as the Trainer, how do I locate the SCX to move them if they are not OAM?
I tried to trace the code using BGB 1.4.1. In RAM the routine is Called from 0D:727C
0D:7298 controls the scrolling.
It loads a value into SCX.
I was able to locate the routine, but how do I find the value? I tried searching main.asm for this but can't locate it. Could somebody please give some advice, thanks. :)
Last edited by ShaneM (2013-05-02 04:31:46)
I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:
*Pokemon_Master
*Noizy
*lipun
*Spambots
Offline
Let me understand: the pokemon MOVES,but it stops behind the trainer?if so,try using an higher value.i believe that's the issue
Offline
@95girl
I think that you are right! It would probably need to be changed to $5A. The problem is, I can't locate where the SCX value for this is stored.
I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:
*Pokemon_Master
*Noizy
*lipun
*Spambots
Offline
Try checking red or blue disassembling project
Offline
I did. All I could find was the Title screen stuff, found at line 11232. Hopefully somebody on here knows where it is in the disassemble.
NOTE to everyone: My GREEN version is a hack of BLUE, so I can use the American disassembles.
Last edited by ShaneM (2013-05-02 19:33:56)
I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:
*Pokemon_Master
*Noizy
*lipun
*Spambots
Offline
Weird that scx value isn't around the titlescreen functions you see via edit.have you tried other options of the bgb debugger?
Offline
I tried to trace the code in my debugger while the pokemon are scrolling, to no avail.
I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:
*Pokemon_Master
*Noizy
*lipun
*Spambots
Offline
0D:727C = you said the routine was called from here. Will you be trying to convert this address somehow to get the hex address?
EDIT: IDEA!Check when the pokemon is still,take a screenshot at the values in the debugger.let the bulbasaur scroll.take a look at the debugger again and screenshot it.take a look and see which value(s) changed
Last edited by 95girl (2013-05-02 20:35:41)
Offline
In hex it's 0x3727C.
I have found the routine but not the SCX.
@95girl
That is a clever suggestion, but the routine is only Called while the Pokemon are scrolling, not still. :)
I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:
*Pokemon_Master
*Noizy
*lipun
*Spambots
Offline
Then,try while scrolling,but just very little movements AND BULBASAUR.don't change pokemon or you'll be confused.
Offline
What are you actually looking for? You already found the whole routine.
RB 07:
;; input:
;; d: 0x00 = PKMN fade-out; 0x01 fade-in
@7258:
ld a, d
ld bc, $7247 ;; fade-in table
ld d, $88 ;; SCX fade-in start value
ld e, $00 ;; PokéBall animation off
and a, a
jr nz, @726A
ld bc, $724F ;; fade-out table
ld d, $00 ;; SCX fade-out start value
ld e, $00 ;; PokéBall animation off
@726A:
ld a, [bc]
and a, a
ret z ;; 0x00 == tbl end
inc bc
push bc
ld b, a
and a, $0F
ld c, a
ld a, b
and a, $F0
swap a
ld b, a ;; loop c times, incrementing SCX by b pixels each time
@loop:
@7279:
ld h, d
ld l, $48
call @7292 ;; wait for line 0x48, then set SCX to d
ld h, $00
ld l, $88
call @7292 ;; wait for line 0x88, then set SCX to 0x00
ld a, d
add a, b
ld d, a ;; increment SCX value here
call @72C4 ;; PokéBall animation
dec c
jr nz, @7279 ;; goto @loop if c != 0x00
pop bc
jr @726A ;; rinse and repeat
;; Wait for SCY to equal l, then update SCX to h, then wait for
@7292:
ld a, [$FF00 + $44]
cp a, l
jr nz, @7292
ld a, h
ld [$FF00 + $43], a
@729A:
ld a, [$FF00 + $44]
cp a, h
jr z, @729A ;; ??? this is either wrong or will suppress some funky visual artifact the LCD shows when setting SCX to SCY
;; this should probably be cp a,l to make sure this routine actually cleared the line before continuing in the main code.
ret
;; PokéBall animation table
@72A0:
db 0x00 ;; animation off
db 0x71 ;; animation start
db 0x6F
db 0x6E
db 0x6D
db 0x6C
db 0x6D
db 0x6E
db 0x6F
db 0x71
db 0x74
db 0x00 ;; animation end
;; check for starter Pokémon
;; if true, start PokéBall animation
ld a, [$CD3D]
cp a, $B0 ;; Squirtle
jr z, @72BA
cp a, $B1 ;; Charmander
jr z, @72BA
cp a, $99 ;; Bulbasaur
ret nz
@72BA:
ld e, $01 ;; PokéBall start animation index
ld bc, $7244 ;; PokéBall animation delay table
ld d, $00 ;; SCX value
jp @726A
;; PokéBall animation routine
@72C4:
push de
push hl
xor a, a
ld d, a ;; e is animation index
ld hl, @72A0
add hl, de
ld a, [hl]
pop hl
pop de
and a, a
ret z ;; 0x00 is animation end
ld [$C328], a ;; OAM Y of PokéBall tile
inc e ;; index++
ret
So you will either need to copy the Japanese tables, or edit them by hand to not scroll as much. Notice the Japanese version doesn't have the PokéBall animation anyway.
cYa,
Tauwasser
Last edited by Tauwasser (2013-05-03 02:06:45)
Offline
@Tauwasser
You are a very helpful person. I found that in my disassemble using ctrl+f, it just wasn't labeled; did you just invent those labels?
To answer your question to what I am looking for: I have already found, and NOP'd out the Pokeball routine. The issue is the scroll X loc. which loads a value for how far the Pokemon are supposed to scroll, I found the routine using my debugger, I just can't find the number used for the SCX. Do you get what I mean?
Like for the Trainer to move to the left of the screen I changed the SCX to $30 in
ld de,605A changed to ld de,6030
So, similar to how I did the Trainer, I'm thinking there must be a value like that for the Title Screen Pokemon.
Last edited by ShaneM (2013-05-03 02:27:18)
I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:
*Pokemon_Master
*Noizy
*lipun
*Spambots
Offline
There isn't, because it's all relative scrolling. In-between when the routine finishes, the regular backup value (FFAE IIRC) is loaded, so the Pokémon will have to be at the right position then. You can change where on the screen the Pokémon picture will be loaded, so the whole thing will be offset by how many tiles you move the image. However, the scrolling will then most likely not actually scroll the whole image away before the gfx transition occurs.
Best to check the original Japanese version.
Also, those values you edited were not scrolling values, but absolute sprite positions. Scrolling only affects the BG, not OAM.
cYa,
Tauwasser
Offline
There isn't, because it's all relative scrolling. In-between when the routine finishes, the regular backup value (FFAE IIRC) is loaded, so the Pokémon will have to be at the right position then. You can change where on the screen the Pokémon picture will be loaded, so the whole thing will be offset by how many tiles you move the image. However, the scrolling will then most likely not actually scroll the whole image away before the gfx transition occurs.
Best to check the original Japanese version.
I checked the Japanese version, and compared it to the US version, this is what I found:
American
Japanese
The X Loc is greater by 04
I would like to try your idea of changing where the pokemon picture will be loaded. My disassemble is not well labeled around that area. Could you give me the area of where that routine for pictures is located, please?
I took a picture of where the X and Y locs start on both. Thanks.
P.S. If that doesn't work, I will have to try coping the coding for that from Green.
Also, EDIT1: I found the tiles to the Title Screen Pokemon stored at 0x79B24. If I could just find the thing that determines it. Maybe where its pointer is??? Because Mateo suggested something similar to what I'm looking for, 3 bytes before the pointer: http://hax.iimarck.us/topic/3167/
EDIT2: Is this the location of the pointer:
4399- Pic of Pokemon on Intro Screen
My source is: http://datacrystal.romhacking.net/wiki/ … map#Bank_0
Last edited by ShaneM (2013-05-03 16:36:29)
I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:
*Pokemon_Master
*Noizy
*lipun
*Spambots
Offline
Have a nice edit once you figured out where the value is :)
Offline
I found that the tiles for the pokemon on the title screen are located at ROM 0x79b24 to 0x79b8c.
00 07 0e 15 1c 23 2a 01 08 0f 16 1d 24 2b 02 09 10 17
1e 25 2c 03 0a 11 18 1f 26 2d 04 0b 12 19 20 27
2e 05 0c 13 1a 21 28 2f 06 0d 14 1b 22 29 30 00
07 0e 15 1c 23 2a 01 08 0f 16 1d 24 2b 03 0a 11
18 1f 26 2d 04 0b 12 19 20 27 2e 05 0c 13 1a 21
28 2f 00 07 0e 15 1c 23 2a 02 09 10 17 1e 25 2c
04 0b 12 19 20 27 2e
The other tile offset, where the pokemon's feet are, is at 0x79b4e-0x79b54:
06 0d 14 1b 22 29 30
If I could just find the darn pointer, like Mateos did in his example that I linked in my last post. His example is even in the same BG map. I figure it must be around there somewhere.
Last edited by ShaneM (2013-05-04 05:10:29)
I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:
*Pokemon_Master
*Noizy
*lipun
*Spambots
Offline
Type the offset of bulba pic and search it in hexadecimal.i believe you should find where the offset of that pic is called.
Offline
@95girl
Nice try. But it has nothing to do with that. The pokemon are determined by 0x4588 !
I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:
*Pokemon_Master
*Noizy
*lipun
*Spambots
Offline
I'm trying my best to help.you offered me a help which requires a lot of time.You've been kind,so much kind that I can't say "sorry,I don't know how to help" so I want to try at least.
Offline
@95girl
Thank you for the help and kind remarks. :) I will help you with the Italian version when I'm done with this SCX thing.
All I need to do is find the pointer to the offsets that I gave last night. And change the value for the BG map (where the pokemon starts, just like Mateo did with the'Green Version' thing that I linked to).
I will upload the ROM in a little while.
Last edited by ShaneM (2013-05-04 20:40:25)
I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:
*Pokemon_Master
*Noizy
*lipun
*Spambots
Offline
1E6E -Pointer to Pic pointer table?--- source is datacrystal.Hope i understand
Offline
There isn't, because it's all relative scrolling.
Not so.
In Red the monster pic is drawn at (5, 10). The tilemap starts at c3a0. Each step downward is 20 tiles, so we're 10*20 + 5 = 205 (0xcd) in, at c46d. Poking around a bit in bgb you come to
Func_4524: ; 4524 (1:4524)
ld [$cf91], a
ld [$d0b5], a
ld hl, $c46d ; where the pic gets put!!
call GetMonHeader
jp Func_1389
This directly controls the position of the pic. Note that it disappears from the screen before it's finished scrolling out.
Last edited by comet (2013-05-06 01:40:31)
Offline
Jesus fucking Christ man, I just about had it with you. How come you pop up in every thread I comment and try to be a smartass?
And you're only right half the time every other time, too.
Tauwasser wrote:There isn't, because it's all relative scrolling.
Not so.
Maybe you should learn how to read. The scrolling is relative to the screen, so the effect depends on the absolute position of the picture on the screen. And that's what I said.
But I guess there's nothing to do here any more since you gave away this 5 minute research answer instead of making OP go figure out his debugger and look for it...
cYa,
Tauwasser
Last edited by Tauwasser (2013-05-06 01:52:02)
Offline
@comet
Thanks, you are brilliant!
One problem, the X axis is fine, but where is the Y. I need to bring it down from 09 to 0a?
I guess that I will use your equation, and try, unless Y isn't defined that way.
Last edited by ShaneM (2013-05-06 02:34:27)
I'm back. I'll try not to get as frustrated with stupid questions. People on my naughty list:
*Pokemon_Master
*Noizy
*lipun
*Spambots
Offline