Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#51 2011-08-13 12:55:58

Tauwasser
Member
Registered: 2010-10-16
Post 157/452

Re: [G/S] Useful Offsets Thread

Most of the data is saved in only a few huge tables.
You would have to repoint a lot of data to actually get it to work everywhere, but besides that, it's quite possible.
You can start with the main trainer table and work your way back from there to the other tables. After that, there are only a few more pointer tables for images etc.

cYa,

Tauwasser

Offline

#52 2011-08-13 19:25:54

Cheesewig
Member
Registered: 2011-08-06
Post 3/53

Re: [G/S] Useful Offsets Thread

Okay then. Is there a way to insert new overworld sprites?


My name is Aochider I was called. Dr. PET was loved an esteemed by us all!
Team Cheesemon | Cheesewig's Domain Forum |

Offline

#53 2011-08-13 19:51:21

Ben
Member
From: South Korea
Registered: 2010-10-16
Post 120/161

Re: [G/S] Useful Offsets Thread

itd be easier just to edit one that you wouldnt use in TLP

Offline

#54 2011-08-13 20:06:00

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

Re: [G/S] Useful Offsets Thread

There is also one completely unused sprite you could edit and use, it looks like the player, except not carrying a backpack. I have successfully used this one many times without any ill effects.

Offline

#55 2011-08-13 21:31:06

Cheesewig
Member
Registered: 2011-08-06
Post 4/53

Re: [G/S] Useful Offsets Thread

Where is it located?


My name is Aochider I was called. Dr. PET was loved an esteemed by us all!
Team Cheesemon | Cheesewig's Domain Forum |

Offline

#56 2011-08-13 22:19:40

Ben
Member
From: South Korea
Registered: 2010-10-16
Post 122/161

Re: [G/S] Useful Offsets Thread

0xC60C0

Offline

#57 2011-08-14 09:32:29

Cheesewig
Member
Registered: 2011-08-06
Post 5/53

Re: [G/S] Useful Offsets Thread

Thanks. When I have edited it what overworld number is it?

eg. 1: Player, 2: Player on bike, 3: Kid on GB.


My name is Aochider I was called. Dr. PET was loved an esteemed by us all!
Team Cheesemon | Cheesewig's Domain Forum |

Offline

#58 2011-08-14 16:37:35

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

Re: [G/S] Useful Offsets Thread

pkmngsspriteimages.png

Offline

#59 2011-08-17 02:15:29

goodman
Member
Registered: 2011-07-18
Post 12/14

Re: [G/S] Useful Offsets Thread

Hello, I got 2 questions and some extra useful information.

These are the Spritesheets in Crystal: (I used the ones from Gold as base)

144B8 - 144EB 2Byte pointer to spritesheets
144EC - 14502 Pallet Town
14503 - 14519 Viridian City
1451A - 14530 Pewter City
14531 - 14547 Cinnabar Island
14548 - 1455E Cerulean City
1455F - 14575 Saffron City
14576 - 1458C Celadon City
1458D - 145A3 Lavander Town
145A4 - 145BA Vermillion City
145BB - 145D1 Fuchsia City
145D2 - 145E8 Pokemon League
145E9 - 145FF New Bark Town
14600 - 14616 Cherrygrove City
14617 - 1462D Mt. Silver
1462E - 14644 Violet City
14645 - 1465B Ecruteak City
1465C - 14672 Azalea Town
14673 - 14689 Goldenrod City
1468A - 146A0 Cianwood City
146A1 - 146B7 Olivine City
146B8 - 146CE Lake of Rage
146CF - 146E5 Mahogany Town
146E6 - 146FC Blackthorn City
146FD - 14713 Caves
14714 - 1472A S.S. Aqua + Etc.
1472B - 14735 Special

Now there's 2 things I don't quite understand:

1.- In spritesheets what does "special" means?
2.- Why in Crystal, there's always around 12 extra bytes before the actual spritesheet? For example, if you go to 144EC, the first 12 bytes (63 5F 5C 55 11 1B 37 58 47 50 52 33) are anything but the sprites. I don't know what they do. I tried deleting them to see what happens and nothing happens. Even if I replace those bytes for 00s the sprites in New bark still load. This happens for every map in Crystal besides "special". Sometimes there's small twists but most of the time are those exact bytes.

Offline

#60 2011-08-17 08:09:26

Tauwasser
Member
Registered: 2010-10-16
Post 161/452

Re: [G/S] Useful Offsets Thread

What do you think the "extra" bytes are? They are sprite numbers for sprites that never got used. The developers have possibly sub-grouped the different sprite types (0x00 thru 0x03) even further for their own purposes. So when they did not specifically set up any sprites for some sub-group, the first item in their list was written while compiling the game. For instance, 0x63 is a Suicune standing sprites, the first of the three type 0x03 sprites that were added for the legendary dogs.

As for "Special": It's just a map bank association for map bank 0x13, which does not contain outdoor maps (maps with permission bytes 0x01 or 0x02) at all.

cYa,

Tauwasser

Last edited by Tauwasser (2011-08-17 08:14:55)

Offline

#61 2011-08-18 21:34:01

Cheesewig
Member
Registered: 2011-08-06
Post 14/53

Re: [G/S] Useful Offsets Thread

I am determined to insert more trainer groups so how would I repoint the the trainer table frst of all?


My name is Aochider I was called. Dr. PET was loved an esteemed by us all!
Team Cheesemon | Cheesewig's Domain Forum |

Offline

#62 2011-08-19 00:51:50

Tauwasser
Member
Registered: 2010-10-16
Post 165/452

Re: [G/S] Useful Offsets Thread

You would look for a spot where your new table fits, then copy the current data and extend it. Then you would find all code that accesses the table and rewrite it to use the new data. Depending on where you put the new data, you would need to utilize a (already defined) call to a sub-function reading bytes from another ROM bank. It sounds so much more complicated than it really is, so I suggest you give it a go. Debug your way to the table, show us some of your work and we can help you more with the parts of the process that you did not quite get yet.

cYa,

Tauwasser

Offline

#63 2011-08-19 10:01:37

Cheesewig
Member
Registered: 2011-08-06
Post 15/53

Re: [G/S] Useful Offsets Thread

I have so far been converting the 2 byte pointers into offsets and seeing what's there.
But what does the trainer data mean and where does it end?


My name is Aochider I was called. Dr. PET was loved an esteemed by us all!
Team Cheesemon | Cheesewig's Domain Forum |

Offline

#64 2011-08-19 17:40:21

270/703

Re: [G/S] Useful Offsets Thread

Cheesewig wrote:

I have so far been converting the 2 byte pointers into offsets and seeing what's there.
But what does the trainer data mean and where does it end?

If you mean the data at 0x399C2, it is explained here.

#65 2011-08-19 18:18:48

Cheesewig
Member
Registered: 2011-08-06
Post 16/53

Re: [G/S] Useful Offsets Thread

Yeah but I mean When I converted the pointer C259 into an offset, I got ox19C2 but that isn't right... Is it?


My name is Aochider I was called. Dr. PET was loved an esteemed by us all!
Team Cheesemon | Cheesewig's Domain Forum |

Offline

#66 2011-08-19 18:24:18

271/703

Re: [G/S] Useful Offsets Thread

No, it’s not. You stopped early.

First you swap the bytes to make a big‐endian number: $59C2

It points within this bank. So you subtract $4000 (which you did), then add it to the start of the bank ($38000) to get $399C2.

#67 2011-08-19 18:55:19

Cheesewig
Member
Registered: 2011-08-06
Post 17/53

Re: [G/S] Useful Offsets Thread

Oh... I get it now! Just one thing though: Say the trainer data was at $40000 how would I find the pointer?


My name is Aochider I was called. Dr. PET was loved an esteemed by us all!
Team Cheesemon | Cheesewig's Domain Forum |

Offline

#68 2011-08-19 19:14:18

Miksy91
Member
Registered: 2010-10-16
Post 492/2,339

Re: [G/S] Useful Offsets Thread

Cheesewig wrote:

Oh... I get it now! Just one thing though: Say the trainer data was at $40000 how would I find the pointer?

Offset - [Start of the bank] = 0x40000 - 0x40000 = 0x0
0x0 + 0x4000 = 0x4000 --> 00 40

*Pointers actually point in ram, not rom data.
However, the data in rom address $40000 is loaded in ram offset $4000 when you point to it.

Last edited by Miksy91 (2011-08-19 19:21:27)

Offline

#69 2011-08-19 19:17:20

Cheesewig
Member
Registered: 2011-08-06
Post 18/53

Re: [G/S] Useful Offsets Thread

So, how do I find out the start of the bank?

So far: I have given Oak his own Trainer Data.


My name is Aochider I was called. Dr. PET was loved an esteemed by us all!
Team Cheesemon | Cheesewig's Domain Forum |

Offline

#70 2011-08-19 19:21:43

Cheesewig
Member
Registered: 2011-08-06
Post 19/53

Re: [G/S] Useful Offsets Thread

What do I have to change to make the repointed trainer table work?


My name is Aochider I was called. Dr. PET was loved an esteemed by us all!
Team Cheesemon | Cheesewig's Domain Forum |

Offline

#71 2011-08-19 19:52:27

Cheesewig
Member
Registered: 2011-08-06
Post 20/53

Re: [G/S] Useful Offsets Thread

Cheesewig wrote:

What do I have to change to make the repointed trainer table work?

I mean the offsets where I need to put the new pointers.


My name is Aochider I was called. Dr. PET was loved an esteemed by us all!
Team Cheesemon | Cheesewig's Domain Forum |

Offline

#72 2011-08-20 10:12:37

Cheesewig
Member
Registered: 2011-08-06
Post 24/53

Re: [G/S] Useful Offsets Thread

How do I change the text when you have beaten a trainer?


My name is Aochider I was called. Dr. PET was loved an esteemed by us all!
Team Cheesemon | Cheesewig's Domain Forum |

Offline

#73 2011-08-20 11:07:01

Sawakita
Administrator
Registered: 2010-10-16
Post 188/365

Re: [G/S] Useful Offsets Thread

Cheesewig wrote:
Cheesewig wrote:

What do I have to change to make the repointed trainer table work?

I mean the offsets where I need to put the new pointers.

To find the pointers you'll have to reverse some routines, probably. A "debugger + hex editor" is a handy method I like to use.

Cheesewig wrote:

How do I change the text when you have beaten a trainer?

If I'm not wrong, the text when you have beaten a trainer is set by scripts, not by general trainer data structures.

Offline

#74 2011-08-20 11:24:52

Cheesewig
Member
Registered: 2011-08-06
Post 25/53

Re: [G/S] Useful Offsets Thread

Sawakita wrote:

If I'm not wrong, the text when you have beaten a trainer is set by scripts, not by general trainer data structures.

I know but how do I change it  through a script.


My name is Aochider I was called. Dr. PET was loved an esteemed by us all!
Team Cheesemon | Cheesewig's Domain Forum |

Offline

#75 2011-08-20 11:30:07

Sawakita
Administrator
Registered: 2010-10-16
Post 189/365

Re: [G/S] Useful Offsets Thread

Have you ever read this doc?

Offline

Board footer

Powered by FluxBB