Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2015-05-27 04:28:53

Shichirobei
Member
Registered: 2015-05-27
Post 1/13

Mini OW Icons for RED

Hi, im happy to be in this community. Lots of good comments about this place :).

Im doing my very first pokemon red hack rom and i want to add the Mini OW Icons like Miaze do in their hackrom:

Hackrom bbcode test

I think there's an asm script or something, but i don't know how to.

Please, help me with that :(.

Thanks for advance!.

Shi

Offline

#2 2015-05-27 18:47:25

Danny-E 33
Administrator
Registered: 2012-06-09
Post 871/1,034

Re: Mini OW Icons for RED

For starters, if you aren't already, you should using the disassembly for a modification like this.

All you have to do is rewrite the asm routine that determines which graphics need to get loaded based on the pokemon in your party, and the routines that load/animate those graphics.
Doing this in hex editing would be 100x harder than using the disassembly.


Red Hack: Pokémon Prototype

Total number of registered users: 8000+
Total number of active users: ~12

Offline

#3 2015-05-27 19:37:38

Shichirobei
Member
Registered: 2015-05-27
Post 2/13

Re: Mini OW Icons for RED

Danny-E 33 wrote:

For starters, if you aren't already, you should using the disassembly for a modification like this.

All you have to do is rewrite the asm routine that determines which graphics need to get loaded based on the pokemon in your party, and the routines that load/animate those graphics.
Doing this in hex editing would be 100x harder than using the disassembly.

Hi Danny! :D. Nice to meet you!.

Well, im working all on the disassembly one, even there i can't do it without help. If you or someone can help me with that, more specific ill really apreciate.

I mean, if you can give me an example, or the files wich i must deal with, i think then i can afford and work it.

"engine/mon_party_sprites.asm" maybe?... anyway, i need help in all points of view xD.

Thanks for your comment!.

Last edited by Shichirobei (2015-05-27 21:31:30)

Offline

#4 2015-05-27 21:41:46

Danny-E 33
Administrator
Registered: 2012-06-09
Post 872/1,034

Re: Mini OW Icons for RED

There are "infinite" solutions to this problem, but I will briefly describe how I did it.

In engine/menu/party_menu.asm, there is a call to LoadMonPartySpriteGfxWithLCDDisabled, and there is a call to WriteMonPartySpriteOAMByPartyIndex. These are the functions that are now useless if you want each pokemon to have its own, asymmetric sprite.

I changed these calls to call two new functions that I wrote from from scratch to handle it correctly, named LoadPartyMonSprites and PlacePartyMonSprite, respectively.

This also requires you to edit AnimatePartyMon in engine/mon_party_sprites.asm, which you should be able to see why by reading the comments in that routine.


Red Hack: Pokémon Prototype

Total number of registered users: 8000+
Total number of active users: ~12

Offline

#5 2015-05-29 06:48:48

Shichirobei
Member
Registered: 2015-05-27
Post 5/13

Re: Mini OW Icons for RED

Finally i got the routine, but in the process:

Im trying to compile the pokered but i got this error...

$ make red
rgbasm -h -o red/audio.o red/audio.asm
rgbasm -h -o red/main.o red/main.asm
rgbasm -h -o red/text.o red/text.asm
rgbasm -h -o red/wram.o red/wram.asm
rgblink -n pokered.sym -o pokered.gbc red/audio.o red/main.o red/text.o red/wram.o
: Unknown symbol 'Func_71882'
Makefile:91: fallo en las instrucciones para el objetivo 'pokered.gbc'
make: *** [pokered.gbc] Error 1


Any help?.

Last edited by Shichirobei (2015-05-29 09:12:42)

Offline

#6 2015-05-29 10:11:43

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 267/434
Website

Re: Mini OW Icons for RED

You referenced Func_71882 from somewhere in the code, but that function doesn't exist.

Offline

#7 2015-05-29 10:41:59

comet
Member
Registered: 2012-04-09
Post 580/679

Re: Mini OW Icons for RED

Alternatively, it hasn't been exported. (Change "Func_71882:" to "Func_71882::" in engine/mon_party_sprites.asm.)

Last edited by comet (2015-05-29 10:42:22)

Offline

#8 2015-05-29 13:38:45

Shichirobei
Member
Registered: 2015-05-27
Post 6/13

Re: Mini OW Icons for RED

comet wrote:

Alternatively, it hasn't been exported. (Change "Func_71882:" to "Func_71882::" in engine/mon_party_sprites.asm.)

Hi!. I saw the file and there is one item called 71882 and just appear to be comments only:

WriteMonPartySpriteOAMBySpecies: ; 71882 (1c:5882)
; Write OAM blocks for the party sprite of the species in
; [wMonPartySpriteSpecies].
xor a
ld [hPartyMonIndex], a
ld a, [wMonPartySpriteSpecies]
call GetPartyMonSpriteID
ld [wcd5b], a
jr WriteMonPartySpriteOAM

Apparently, the Func_71882 was changed for:

+WriteMonPartySpriteOAMBySpecies: ; 71882 (1c:5882)
+; Write OAM blocks for the party sprite of the species in
+; [wMonPartySpriteSpecies].

But, i don't know why the compile is asking for it.
If you change a Func_ why the system is reading it yet?.
Can be in other file or something?.

I don't know where the function is located :S.

Last edited by Shichirobei (2015-05-29 14:52:53)

Offline

#9 2015-05-29 15:09:20

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 268/434
Website

Re: Mini OW Icons for RED

If you want to call the function at 0x71882 you'll have to use "call/callba/jp WriteMonPartySpriteOAMBySpecies" instead of "call/callba/jp Func_71882". The problem is not inside the function, but from somewhere else where you are referencing it. Pokered is just complaining that it can't find Func_71882 anywhere because it no longer exists.

Also, as comet said, if you want to call WriteMonPartySpriteOAMBySpecies from a different file you'll have to add a second colon to export the function.

Last edited by Crystal_ (2015-05-29 15:17:02)

Offline

#10 2015-05-29 15:18:38

Danny-E 33
Administrator
Registered: 2012-06-09
Post 873/1,034

Re: Mini OW Icons for RED

Crystal_ is right. Whoever's code you are copying is a little outdated and doesn't match the labels in the up-do-date version of pokered you are using.

Also, you copy/pasted from a commit, that is why there is a + at the beginning of some lines. You need to delete those.


Red Hack: Pokémon Prototype

Total number of registered users: 8000+
Total number of active users: ~12

Offline

#11 2015-05-29 15:32:33

Shichirobei
Member
Registered: 2015-05-27
Post 7/13

Re: Mini OW Icons for RED

Danny-E 33 wrote:

Crystal_ is right. Whoever's code you are copying is a little outdated and doesn't match the labels in the up-do-date version of pokered you are using.

Also, you copy/pasted from a commit, that is why there is a + at the beginning of some lines. You need to delete those.

Danny, im using your github to make this work from pokered-prototype.

I know, that lines i copy from the comments history to find the problem with this one.

If you can help me telling me what files or lines i must use to get this work on my hackrom, i wanna really apreciate.

I have edited this files at them moment:

engine/mon_party_sprites.asm
engine/menu/party_menu.asm

Added the sprites to gfx/ too.

Last edited by Shichirobei (2015-05-29 15:36:41)

Offline

#12 2015-05-29 15:50:52

Danny-E 33
Administrator
Registered: 2012-06-09
Post 874/1,034

Re: Mini OW Icons for RED

These are the commits you need to look at:
1 2 3 4 5

But some of the changes you see happened when main.asm was 115000+ lines long and before certain labels got renamed, and some changes are things I undid later so you have to be really careful what you copy.

This is why I recommend solving the problem yourself. Copying the right stuff is a mess (and you learn a lot less from copying, too).


Red Hack: Pokémon Prototype

Total number of registered users: 8000+
Total number of active users: ~12

Offline

#13 2015-05-29 15:59:42

Shichirobei
Member
Registered: 2015-05-27
Post 8/13

Re: Mini OW Icons for RED

Danny-E 33 wrote:

These are the commits you need to look at:
1 2 3 4

But some of the changes you see happened when main.asm was 115000+ lines long and before certain labels got renamed, and some changes are things I undid later so you have to be really careful what you copy.

This is why I recommend solving the problem yourself. Copying the right stuff is a mess (and you learn a lot less from copying, too).

Danny, i just can say THANKYOU!!!!.

I wanna see how i can figure out with this, but make sure i will get this work.

Thanks again!.

Shi

Offline

#14 2015-05-29 16:04:58

Danny-E 33
Administrator
Registered: 2012-06-09
Post 875/1,034

Re: Mini OW Icons for RED

You're probably better off directly using my engine/mon_party_sprites.asm, engine/mon_party_sprites2.asm, and engine/menu/party_menu.asm.
Then just make sure you include things correctly at the bottom of main.asm.


Red Hack: Pokémon Prototype

Total number of registered users: 8000+
Total number of active users: ~12

Offline

#15 2015-05-29 16:24:19

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 269/434
Website

Re: Mini OW Icons for RED

Wouldn't he be good to go just looking at https://github.com/dannye/pokered-proto … it/c62d071 and https://github.com/dannye/pokered-proto … it/bb22063 (just the LoadNicknameMonSprite related changes)?

Last edited by Crystal_ (2015-05-29 16:25:55)

Offline

#16 2015-05-29 16:41:43

Shichirobei
Member
Registered: 2015-05-27
Post 9/13

Re: Mini OW Icons for RED

Danny-E 33 wrote:

You're probably better off directly using my engine/mon_party_sprites.asm, engine/mon_party_sprites2.asm, and engine/menu/party_menu.asm.
Then just make sure you include things correctly at the bottom of main.asm.

I don't know how can i include in the main.asl correctly, i need create a new BANK's?.

And Crystal_ is helping me too, thanks both!.

I just copy this ones in my main.asm?

SECTION "bank32",ROMX,BANK[$32]

PartyMonSprites:  INCBIN "gfx/party_mon_sprites.2bpp",$0,$4000


SECTION "bank33",ROMX,BANK[$33]

INCBIN "gfx/party_mon_sprites.2bpp",$4000,$1b00

INCLUDE "engine/mon_party_sprites2.asm"

Last edited by Shichirobei (2015-05-29 18:09:31)

Offline

#17 2015-05-29 18:11:44

Danny-E 33
Administrator
Registered: 2012-06-09
Post 876/1,034

Re: Mini OW Icons for RED

Crystal_: No, there are bug fixes mixed in the other commits.

Shichirobei: Yes.


Red Hack: Pokémon Prototype

Total number of registered users: 8000+
Total number of active users: ~12

Offline

#18 2015-05-29 18:15:22

Shichirobei
Member
Registered: 2015-05-27
Post 10/13

Re: Mini OW Icons for RED

Danny-E 33 wrote:

Crystal_: No, there are bug fixes mixed in the other commits.

Shichirobei: Yes.

Ok, its weird, cos if im not wrong, i used those files you comment previously and i got this error in the compile process:

: Unknown symbol 'Func_71882'

I wanna check this one again in that case.

Offline

#19 2015-06-02 05:21:12

Shichirobei
Member
Registered: 2015-05-27
Post 12/13

Re: Mini OW Icons for RED

We made it!.

Crystal figured out how to apply this ones in my hackrom and we got it!.

Thanks Crystal and thanks a lot for everyone in this forum who helped me out.

Here's the new tile for the intro and some screens with the minis in:

FluxBB bbcode test    FluxBB bbcode test

FluxBB bbcode test     FluxBB bbcode test

Again, THANK YOU!.

All will be posted on the credits when the hackrom is finished.

Shi

Last edited by Shichirobei (2015-06-02 05:23:11)

Offline

#20 2015-06-02 18:03:17

Danny-E 33
Administrator
Registered: 2012-06-09
Post 877/1,034

Re: Mini OW Icons for RED

Is this the commit you are talking about? That is terrible.


Red Hack: Pokémon Prototype

Total number of registered users: 8000+
Total number of active users: ~12

Offline

#21 2015-06-02 18:11:57

Shichirobei
Member
Registered: 2015-05-27
Post 13/13

Re: Mini OW Icons for RED

Danny-E 33 wrote:

Is this the commit you are talking about? That is terrible.

No, it isn't the current commit for my hackrom. The repository belongs to Crystal_ right now who is helping me with it.

This is the current commit: https://github.com/xCrystal/pokered-ember

Last edited by Shichirobei (2015-06-02 18:33:33)

Offline

#22 2015-10-17 05:03:34

Konsty
Member
Registered: 2014-05-24
Post 13/15

Re: Mini OW Icons for RED

Danny-E 33 wrote:

You're probably better off directly using my engine/mon_party_sprites.asm, engine/mon_party_sprites2.asm, and engine/menu/party_menu.asm.
Then just make sure you include things correctly at the bottom of main.asm.


I tried just adding the files to my own and adding that last line of text to main.asm
I excepted errors of course lol.  "I wish I understood these errors outputs. xD"

rgblink.exe: Unknown symbol 'wEvolutionData'
Makefile:91: recipe for target 'pokered.gbc' failed

Offline

#23 2015-10-17 14:41:19

Danny-E 33
Administrator
Registered: 2012-06-09
Post 915/1,034

Re: Mini OW Icons for RED

You have to add that label to wram.asm


Red Hack: Pokémon Prototype

Total number of registered users: 8000+
Total number of active users: ~12

Offline

#24 2015-10-18 02:41:47

Konsty
Member
Registered: 2014-05-24
Post 14/15

Re: Mini OW Icons for RED

Danny-E 33 wrote:

You have to add that label to wram.asm


Unknown symbol 'PlacePartyMonSprite'

Is there no way to get a more detailed debug log ?

Offline

#25 2015-10-18 04:04:12

Danny-E 33
Administrator
Registered: 2012-06-09
Post 916/1,034

Re: Mini OW Icons for RED

That means you did not include mon_party_sprites2.asm correctly.


Red Hack: Pokémon Prototype

Total number of registered users: 8000+
Total number of active users: ~12

Offline

Board footer

Powered by FluxBB