Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2016-02-20 12:33:19

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 100/193

What type of graphic is this? How I can repoint it?

In my mission for add wild data for my hack in Gold and Silver, at the offset h29717 I've found with TLP this graphic part:

5o9jiq.png

these graphic tiles are about 300 (exadecimal) bytes, that will be enough for add my Kanto land wild data in the A bank. What type of graphic is this? It's used? How I can repoint it? It's safe overwrite it? What is the right offset of start and end?

Last edited by Halfshadow (2016-02-22 10:11:46)


The italian Pokémon Green creator.

Offline

#2 2016-02-20 22:50:20

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 102/193

Re: What type of graphic is this? How I can repoint it?

Was the graphic of the trades, overwrited for extend the Kanto wild data (and works) the graphic during a trade is ruined. And there is the same problem, the pointers are with the same problem of the wild data, have a "21" byte before the offset without the bank or maybe is the "21" byte the instruction for the bank, but tha data is in the "A" bank. Why this? Maybe is a way to indicate the "A" bank and maybe can be switched to another bank knowing the different mode of indicate the B bank for example?


The italian Pokémon Green creator.

Offline

#3 2016-02-20 23:52:16

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,237/3,501

Re: What type of graphic is this? How I can repoint it?

21 is the hexadecimal representation of the asm command "ld hl" so that is why you see 21 and then the pointer. It is loading register pair hl with the pointer to that data, and the bank is either specified somewhere else in the routine, or possibly not specified at all, since it wouldn't have to be specified if it is pointing to data in the same bank as the routine itself.

Offline

#4 2016-02-21 01:04:24

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 103/193

Re: What type of graphic is this? How I can repoint it?

And there is a way to specifing a different bank? Maybe in the Kanto land offset that have the same problem?


The italian Pokémon Green creator.

Offline

#5 2016-02-21 01:13:24

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,238/3,501

Re: What type of graphic is this? How I can repoint it?

I'd have to look at the routine and see, and since you're doing it in hex it would be much more annoying than if you were using the disassembly (but I know, I know, the disassembly isn't in your language, I understand that. I just mean that asm hacking in hex is more annoying, but still doable of course).

Offline

#6 2016-02-21 01:27:07

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 104/193

Re: What type of graphic is this? How I can repoint it?

Ok, thanks for now, however I've overwrited something, I don't know if was only graphic or also other instructions, I need of (H)1D5 free bytes for add the Kanto Water pokémon and the special Johto land (I've overwrited them for extend land Kanto data) if I could use the bytes starting from (H)29767 by repointing the trades graphic (between the 2 groups of tiles there are other bytes, maybe pointers or compressed graphic) will be fine. Or in alternative the Kanto land pokémons, the easiest way to repoint less stuff will be the best. XD

Last edited by Halfshadow (2016-02-21 01:44:30)


The italian Pokémon Green creator.

Offline

#7 2016-02-21 20:41:17

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 108/193

Re: What type of graphic is this? How I can repoint it?

Seems that will not possible move the wild data to another bank, then is possible repoint the trade graphic? Otherwise the infrared connection data? In Crystal is moved to another bank.


The italian Pokémon Green creator.

Offline

#8 2016-02-22 13:55:37

Miksy91
Member
Registered: 2010-10-16
Post 2,217/2,311

Re: What type of graphic is this? How I can repoint it?

After taking a quick look at those trading graphics, I found a piece of code that you should find interesting, and can actually modify it on your own to possibly make room for some more wild pokemon data.

Starting at offset 0A:5687 (= 0x29687), we've got the following code:

0A:5687
ld de, 5927
ld hl, 8620
ld bc, 0A06
call 0DFE
ld de, 5987
ld hl, 8680
ld bc, 0A0C
call 0DFE
ld de, 5787
ld hl, 8740
ld bc, 0A04
call 0DFE
....

0A:56BE
ld de, 57A7
ld hl, 8720
ld bc, 0A04
call 0DFE

I could have written the hex codes for each one of these instructions (= this is asm code and those are called instructions). You can for example see what the code looks like yourself by downloading this simple tool (http://www.romhacking.net/utilities/282/) that shows each byte as the corresponding asm instruction. Sometimes they're used as asm instructions (= when something is executed) but it also shows all kinds of data as asm instructions that is not treated that way in the game (for example, wild pokemon data). But in this case, it is useful for seeing what the bytes do as they're executed as code in the game.

Anyway, what this small, and simple piece of code here does is the following:

1. Loads register pair de with address of uncompressed graphics in rom
2. Loads register pair hl with address of place where the graphics are copied in ram (and actually Video RAM which is between addresses $8000 and $9FFF).
3. Loads register b with rom bank so that graphics are taken basically from address b:de (= b * 0x4000 + de - 0x4000), and register c with information, "how many bytes multiplied by 0x10" of graphics data are copied.
4. Finally, uses asm instruction call to call for a subroutine at 00:0DFE where we have a routine for doing this data copying so that c * 0x10 bytes are copied from address defined by b:de to hl.

And the same thing repeats for different values of de, hl, and c.

As an example, the first four instructions

ld de, 5927
ld hl, 8620
ld bc, 0A06
call 0DFE

copy 0x60 bytes of graphics data from rom address 0A:5927 to address $8620 in ram. If you check out with TLP what kind of graphics data we've got there, you can see the graphics of the ball (probably corresponding to pokeball). Now if you want to move this stuff to another rom bank, all you have to do (at minimum) is to change the value loaded to register pair bc so that b gets a different value while c stays the same. If you want to move this graphics data to the beginning of another rom bank, change "ld de, 5927" to "ld de, 4000" so that it points to start of the bank.

So instead of telling you to change a couple of bytes with a hex editor, you can do this stuff with asm editor on your own. If you need help, ask :)

Last edited by Miksy91 (2016-02-22 14:04:03)

Offline

#9 2016-02-22 21:53:44

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 109/193

Re: What type of graphic is this? How I can repoint it?

Very Thanks Miksy, I've learned something about ASM but there is another problem. The second uncompressed graphic part is enough for repoint only the surfing data. For the special Johto (That I have to move 'cause I've used it's original offset for extend Kanto land) land I need of other BD bytes, the first graphic part have only 80 bytes, between the 2 graphic there is something that seems compressed graphic and is the same data in both US and italian versions, the problem is that I don't see the pointer, that compressed graphic (if is that) will be enough for fix also the special land. Can I ask you also how repoint it?


The italian Pokémon Green creator.

Offline

#10 2016-02-22 22:05:11

Miksy91
Member
Registered: 2010-10-16
Post 2,218/2,311

Re: What type of graphic is this? How I can repoint it?

There is probably no compressed graphics at all - just asm code in between the graphics that of course, looks like a mess when checking it with TLP.
By modifying that routine, you should be able to make 0x60 bytes of free space starting at 0A:5787 and 0x120 bytes of space starting at 0A:5927. Take a look at the I code I provided again to find out how.
In case this is not enough, you need to do something else, or check if there is still some other graphics data stored next to all this other stuff that you can move around.

But check what that part of rom area looks like with that asm editor I linked you in my previous post and compare it to the graphics data TLP shows you. You should notice pretty easily, which parts of the data are reserved for graphics and what kind of code is located possibly in between and next to it.

Last edited by Miksy91 (2016-02-22 22:09:32)

Offline

#11 2016-02-22 23:02:55

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 110/193

Re: What type of graphic is this? How I can repoint it?

Ok, tomorrow I'll check. However also if will be ASM that data, can be repointed? I've copied all the data starting from 0x29687 up to the end fo the second graphic (120 bytes) and at the same offset but of the bank 13, there is a way to overwrite the original? Tomorrow I'll check, I hope yes, will be enough for repoint also the special calls. Thank you for now.


The italian Pokémon Green creator.

Offline

#12 2016-02-23 14:15:34

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 111/193

Re: What type of graphic is this? How I can repoint it?

I can't see nothing of interesting, maybe 'cause I'm not a very expert of ASM. The tool that I've used don't seem very different with the other uncompressed graphic, I think that could be compressed graphic 'cause also is in different offset the data is the same also in the italian version and viewing with TLP seems something of graphic, otherwise will be helpful if could be repointed, whatever it is, I need of repoint the swarms, That I've overwrited with the extended Kanto land.

Last edited by Halfshadow (2016-02-23 14:36:21)


The italian Pokémon Green creator.

Offline

#13 2016-02-23 17:23:27

Miksy91
Member
Registered: 2010-10-16
Post 2,219/2,311

Re: What type of graphic is this? How I can repoint it?

I can't check it out with this computer (I've got another one that has all kinds of hacking tools and different OS), but I can take a look at this again later to see if there is some compressed graphics data there but most likely not. The data you see there with TLP is both uncompressed graphics that you can move by changing those "ld bc, xxyy" instructions (where xx stands for rom bank and yy for amount of bytes to copy times 0x10 like I explained above), and asm code.

Also, I don't totally understand what you really want to do, and what you have already done, so it's difficult to help.

Offline

#14 2016-02-23 19:08:29

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 112/193

Re: What type of graphic is this? How I can repoint it?

I need of entire section of 0xBD bytes for restore the swarms data that I've overwrited with the Kanto land data, for now I've successfully added the water Kanto data over the second part of uncompressed graphic, thata were 0x120 bytes and the surfing data was of 0x118. But the first uncompressed data is of only 0x60 bytes and I need of a space of 0xBD 'cause the swarms have only a pointer and I can't split it.


The italian Pokémon Green creator.

Offline

#15 2016-02-23 20:28:54

Miksy91
Member
Registered: 2010-10-16
Post 2,220/2,311

Re: What type of graphic is this? How I can repoint it?

You could check if there is more graphics data you can move out of the way. Unless not, the asm code for loading the grahics data could be moved also very easily which could easily give you a few more bytes (maybe 10 - 20 ?) to work with. I haven't taken a look at the routine so I'm not sure how much could be easily moved out of the way.

Anyway, it would be good if you studied a little bit of asm hacking so you could possibly repoint parts of that code to another rom bank yourself if you need to. It's not hard at all if you're willing to learn :)

Offline

#16 2016-02-23 20:38:25

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 113/193

Re: What type of graphic is this? How I can repoint it?

Not is possible repoint the stuff between the 2 graphic parts? Will be enough. Ok, I'll study the ASM also 'cause I need of it for restore also the Safari Zone game and add the move tutor from Crystal, but from a simple tutorial. XD


The italian Pokémon Green creator.

Offline

#17 2016-02-24 18:06:42

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 114/193

Re: What type of graphic is this? How I can repoint it?

It's compressed graphic I think, 'cause if I overwrite it the graphic of the 2 game boy in the trades and the tube/cable that allow the ball to pass it's broken and different, 'cause I've overwrited with the uncompressed graphic, if I change a tile at once with TLP the damaged graphic change. However At the offset (H)2936A I've found something that maybe it's a routine with a pointer of data that could be repointed at the offset (H)28090. It's correct?

Last edited by Halfshadow (2016-02-24 19:02:55)


The italian Pokémon Green creator.

Offline

#18 2016-02-25 12:58:04

Miksy91
Member
Registered: 2010-10-16
Post 2,222/2,311

Re: What type of graphic is this? How I can repoint it?

Halfshadow wrote:

It's compressed graphic I think, 'cause if I overwrite it the graphic of the 2 game boy in the trades and the tube/cable that allow the ball to pass it's broken and different, 'cause I've overwrited with the uncompressed graphic, if I change a tile at once with TLP the damaged graphic change. However At the offset (H)2936A I've found something that maybe it's a routine with a pointer of data that could be repointed at the offset (H)28090. It's correct?

I would have to check this out - once again, using a computer where I don't have the rom files, asm editing tools or a hex editor either.
Anyway, it could be so that there is compressed graphics somewhere around there as well. But if you edit parts of the rom data with TLP that "looks like a mess", it's totally possible that that "graphic" is actually just asm code. And maybe more likely, asm code along with some uncompressed graphics next to it making it seem like you're actually editing pure graphics while you're not.

But I can check this out later if you like :)

Offline

#19 2016-02-25 19:24:20

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 115/193

Re: What type of graphic is this? How I can repoint it?

Yes, thank you.


The italian Pokémon Green creator.

Offline

#20 2016-02-26 13:35:28

Miksy91
Member
Registered: 2010-10-16
Post 2,223/2,311

Re: What type of graphic is this? How I can repoint it?

I have no idea where you came up with address 0x28090 since there is some code there which is probably not related to handling the trading graphics. I could be wrong though.
Anyway, at 0x2936A (or starting at 0x2935F actually) is a routine consisting of "two phases" and what it does depends on, whether you call 0A:535F or 0A:5364. Both these seem to be used for transfering graphics data inside Video RAM from place to another. If you call 0A:535F, 0x310 starting at $8000 are copied to $9000-930F or if you call 0A:5364, 0x310 bytes are copied starting at $8310 to the same ram area ($9000-930F). After this, something else happens and I don't know what and it's most likely not related to this problem either.

So basically, what we've got here doesn't seem to do anything with the graphics data stored in rom although we do load register b with value 0A  that matches the rom bank we're in. However, de is here set to 0x8000, or 0x8310 meaning we don't copy from rom to ram like in the routines above.

Offline

#21 2016-02-26 17:08:40

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 116/193

Re: What type of graphic is this? How I can repoint it?

Darn, ok, thank you. And now what can I do for find at least 0xBD bytes that can be repointed in another bank? Otherwise is possible force the game to load at least the swarms by another bank?


The italian Pokémon Green creator.

Offline

#22 2016-02-26 19:25:46

Miksy91
Member
Registered: 2010-10-16
Post 2,224/2,311

Re: What type of graphic is this? How I can repoint it?

The best thing I can think of would be either me checking what your rom file looks like right now and what to do with it (which I'm not interested in doing to tell you the truth), or you learning first how to do debugging and asm hacking so that you can possibly achieve doing this on your own.

Guess I could check your rom file quickly and see if I can do something about it without having to do any major changes (which could be complicated and take a lot of time).

Offline

#23 2016-02-26 20:00:23

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 117/193

Re: What type of graphic is this? How I can repoint it?

It's the italian version however, 'cause I'm doing it into the italian at the moment (I have a TXT file with all the edits for reply it into the US version too), however it's similar, the offsets are closer in both versions.

http://www.mediafire.com/download/2jp99 … i_beta.zip

Last edited by Halfshadow (2016-02-26 20:09:49)


The italian Pokémon Green creator.

Offline

#24 2016-02-26 23:37:16

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 118/193

Re: What type of graphic is this? How I can repoint it?

Sorry, it's better this SAVE file:

http://www.mediafire.com/download/2164h … i_beta.sav

The last was for another thing, mistaken, sorry.


The italian Pokémon Green creator.

Offline

#25 2016-02-27 00:45:28

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,248/3,501

Re: What type of graphic is this? How I can repoint it?

If it comes down to just not having room for the Swarm Data, I honestly feel like you could just remove that. I don't think anyone has saved a trainer's phone number to check for swarms in like 15 years lol.

Offline

Board footer

Powered by FluxBB