Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2014-08-10 19:56:48

frz hax
Member
Registered: 2014-08-06
Post 4/43

Pokegear broken

I have this problem where the time on the pokegear doesnt change and is fixed at a certain time. I don't know what has caused this as I didn't change anything to do with the pokegear it kind of just stopped working one day( I swear goldmap changes parts of my ROM without telling me, good thing I have Johto map now). I saw a post about making it always day and it said changing a the byte 02 to 00 but in my ROM it's 02 just like in a clean gold version.

It's not an emulator problem because the time works fine in a clean gold version and in dark energy(the only other ROMS I have).

So the clock seems to be disabled which is bad because I have pokemon that only appear during the day/night and all pokemon should be obtainable in my hack.

Thank You for your help!

P.S. I read somewhere that you can only have trigger events on maps that already have triggers because of a 'trigger table' that defines which maps can have triggers or not. Is this true because I'm thinking of adding triggers to a lot of maps. (If you can add more maps by repointing the table then that's fine)

Offline

#2 2014-08-11 06:51:05

Miksy91
Member
Registered: 2010-10-16
Post 2,126/2,306

Re: Pokegear broken

frz hax wrote:

P.S. I read somewhere that you can only have trigger events on maps that already have triggers because of a 'trigger table' that defines which maps can have triggers or not. Is this true because I'm thinking of adding triggers to a lot of maps. (If you can add more maps by repointing the table then that's fine)

You can indeed include more maps to the "trigger table".
Actually, it's just a table in rom which tells the ram addresses, where trigger number for certain maps is stored. You can easily include more maps there if you like but each one will take one byte of ram (you'll have > 0x40 bytes of those at the end of WRAM - DEC0-DEFF).

frz hax wrote:

I have this problem where the time on the pokegear doesnt change and is fixed at a certain time. I don't know what has caused this as I didn't change anything to do with the pokegear it kind of just stopped working one day( I swear goldmap changes parts of my ROM without telling me, good thing I have Johto map now). I saw a post about making it always day and it said changing a the byte 02 to 00 but in my ROM it's 02 just like in a clean gold version.

It's not an emulator problem because the time works fine in a clean gold version and in dark energy(the only other ROMS I have).

So the clock seems to be disabled which is bad because I have pokemon that only appear during the day/night and all pokemon should be obtainable in my hack.

Thank You for your help!

No idea which could have caused it to not function properly but indeed, something in the rom has changed to make it not change time each second/minute etc.
There are plenty of ways trying to figure out what's causing it. The easiest one would be checking your backups and seeing where the bug appears at the first time and creating an ips patch between that and the latest backup before it. Then, use an ips patch viewer utility (you can download one in romhacking.net) to see what the patch file does and find the bug that way.

Unless you have a backup like that (you should keep lots of backups from now on at least), you could try debugging, or copy pasting parts of the original rom data with the data of your hack which you haven't changed such as rom banks with game's coding behind them (this is mostly before offset 0x100000 or so I believe). Now in the case you have accidentally written something there, the changes turn back into what they originally were.

Last edited by Miksy91 (2014-08-11 06:51:25)

Offline

#3 2014-08-12 18:02:33

frz hax
Member
Registered: 2014-08-06
Post 5/43

Re: Pokegear broken

Ok, the good news is I know what the problem is because of a recent post on another pokemon website( I don't know if I can give names on this).

It is because I expanded my ROM to 4mb because i thought I would need more space to put in scripts and stuff. They say doing this causes the real time clock to stop working.

Now I know that there is plenty of space in the 2mb ROM so I want to know if there is a way to make the ROM smaller (unexpand?), back to its original size so the clock will work again.

Thank You for your help!

Offline

#4 2014-08-13 06:52:07

Miksy91
Member
Registered: 2010-10-16
Post 2,127/2,306

Re: Pokegear broken

frz hax wrote:

Ok, the good news is I know what the problem is because of a recent post on another pokemon website( I don't know if I can give names on this).

It is because I expanded my ROM to 4mb because i thought I would need more space to put in scripts and stuff. They say doing this causes the real time clock to stop working.

Now I know that there is plenty of space in the 2mb ROM so I want to know if there is a way to make the ROM smaller (unexpand?), back to its original size so the clock will work again.

Thank You for your help!

I believe only thing you'll have to do is to modify the rom header.
http://gbdev.gg8.se/wiki/articles/The_Cartridge_Header

(See byte 0x148)

In case the rom size (as computer shows it) is 4MB instead of 2MB, just copy paste the first 2MB to make a new file and rename that a .gbc file to have all the data of that rom file there. Translhextion or some other hex editor may be able to just remove the last 2MB of space of the file without having to do the job like this at all though.

Last edited by Miksy91 (2014-08-13 06:53:54)

Offline

#5 2014-08-14 10:48:04

frz hax
Member
Registered: 2014-08-06
Post 6/43

Re: Pokegear broken

I love you so much Miksy91! <3

The clock works now after changing bytes 0x147 and 0x148 to what they were before. The ROM is still 4mb as the computer shows it but I dont know if the extra space is now faulty or still usable. I don't need it anyway, I'm just happy that it can be night time again! :D

Offline

#6 2014-08-14 12:43:59

Miksy91
Member
Registered: 2010-10-16
Post 2,128/2,306

Re: Pokegear broken

frz hax wrote:

I love you so much Miksy91! <3

The clock works now after changing bytes 0x147 and 0x148 to what they were before. The ROM is still 4mb as the computer shows it but I dont know if the extra space is now faulty or still usable. I don't need it anyway, I'm just happy that it can be night time again! :D

I don't think you'll have to worry about the remaining 2MB of space too much. It's not usable but it surely shouldn't hurt any way either (expect for all your backups taking twice the space).

Offline

Board footer

Powered by FluxBB