Glitch City Laboratories Forums

Lab δ: Tech => Emulation & ROM Hacking => Topic started by: Parzival on August 16, 2019, 01:56:45 pm

Title: Pokemon ROM Hacks - WTW On Demand
Post by: Parzival on August 16, 2019, 01:56:45 pm
Finally figured out why my attempts to add WTW on demand to Yellow weren't working and fixed it, so here it is:

Walk Through Walls On Demand!

Hold SELECT to enable WTW. Simple as that.

These shouldn't change anything data-wise (so no glitch Pokemon/items should behave differently) but timing-wise things may have changed, so these may be incompatible with other hacks that hijack VBlank.
Included are IPS patches for Red, Blue, and Yellow, all US versions (for now :D ). These should ONLY be applied to "known-good" ROMs (eventually i'll make some utility or something to apply multiple VBlank hacks to one ROM with timing measurements and such automatically taken into account, but that's probably quite a ways away) so make sure you check DAT-o-Matic (https://datomatic.no-intro.org/) and match your ROMs to the listed "good" dumps before applying.

(Patches are attached to the post, if you're still looking for them...)

If anyone has any info on any international equivalent of the RAM address used (CD38), i'll see if I can make a similar patch for said language. Also, request patch ideas if you have them, maybe I can pull them off (a better RAM Corruption On Demand set is in the works at the moment, so it may be a bit.)
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Sherkel on August 17, 2019, 04:41:11 pm
Nifty! I'm not sure what I would use this for yet, but it seems like it took quite a bit of problem solving.
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Parzival on August 17, 2019, 08:32:08 pm
Nifty! I'm not sure what I would use this for yet, but it seems like it took quite a bit of problem solving.
Especially in Yellow, yeah. Slotting code between RST vectors in ~8 byte chunks is a bit of a pain...
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Evie (retired from head adminship) on August 18, 2019, 12:27:40 am
Nice hack! ^^ Useful if you can't use cheats.
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Evie (retired from head adminship) on August 18, 2019, 07:57:23 am
If anyone has any info on any international equivalent of the RAM address used (CD38), i'll see if I can make a similar patch for said language. Also, request patch ideas if you have them, maybe I can pull them off (a better RAM Corruption On Demand set is in the works at the moment, so it may be a bit.)

In addition to CD38 (as 'non-00 is wtw' address) being the same regardless of Red/Green/Blue/Yellow, it is the same internationally (JP, EN, FR, DE, IT, ES).
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Parzival on August 18, 2019, 03:05:13 pm
If anyone has any info on any international equivalent of the RAM address used (CD38), i'll see if I can make a similar patch for said language. Also, request patch ideas if you have them, maybe I can pull them off (a better RAM Corruption On Demand set is in the works at the moment, so it may be a bit.)

In addition to CD38 (as 'non-00 is wtw' address) being the same regardless of Red/Green/Blue/Yellow, it is the same internationally (JP, EN, FR, DE, IT, ES).
Sweet, i'll churn some out for those soon.
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Parzival on August 20, 2019, 09:19:34 am
The Japanese ROMs are quite a bit different from the rest, but these are the main points as relevant to what i'm doing:
1. There's no free space AT ALL in Bank 0 except between RST vectors (lovely)
2. RST 38 junps to F080 or some such??? Why?????
3. All other versions have their VBlank handler at around 2024 or somewhere in the 1000-1FFF range. Japanese versions have it in the 0A00-0B00 range.
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: metalmario32 on August 24, 2019, 05:02:40 pm
Confused as to how you would go about doing something like this.
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Parzival on August 25, 2019, 12:19:49 am
Confused as to how you would go about doing something like this.
Step 1: Write routine. (Check if SELECT isn't held (using game's registers, not hard registers.) If SELECT isn't held, check if CD38 is FD. If not, do nothing. If FD, write 00 to CD38. If SELECT is held, write FD to CD38. In all cases, don't RET, JP to 0043. This'll make sense later.)

Step 2: Find enough empty space in ROM Bank 0 to hold routine and paste it in (0000 to 3FFF range, usually at the end of the bank, to the tune of 3FBA or so. Japanese R/G/B and all Yellow ROMs require you JR over RST vectors at the beginning of the ROM, running bits of code in between... ugh.)

Step 3: Replace JP instruction at 0040 with a JP to new routine, then immediately after your pointer, insert the old JP command.

Step 4: Test by attempting boot. If you see normal things on screen, your code didn't immediately f**k everything up.

Step 5: Get in game, hold SELECT, and try to WTW. On SELECT down (give or take a frame or SIX) walls should be no obstacle, and after SELECT is let up, after another frame or 6, walls should be impenetrable again.

Step 6: Repeat for, like, 20 more ROMs.
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: metalmario32 on August 25, 2019, 07:06:40 am
Ah. This'll be useful for hacks that I plan to do in the future.
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Parzival on August 25, 2019, 05:39:01 pm
unpopular opinion: steamroll the POPs in the end of the VBlank handler, use a JP to go elsewhere, then re-push, then after, pop twice and use your own RET.
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Parzival on August 28, 2019, 10:39:14 am
Can someone post the US SYMs for the first 2 gens please? I'd rather not build from source atm...
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Sherkel on August 29, 2019, 06:12:46 pm
Can someone post the US SYMs for the first 2 gens please? I'd rather not build from source atm...
Still nobody? That's a bit surprising. May as well drop them off here since I'm popping in. Sorry for the wait.
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Parzival on August 29, 2019, 08:33:43 pm
Can someone post the US SYMs for the first 2 gens please? I'd rather not build from source atm...
Still nobody? That's a bit surprising. May as well drop them off here since I'm popping in. Sorry for the wait.
Thanks, i've got a few ideas rolling around in my head and needed SYMs, is all... i didn't mind the wait.
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Parzival on October 20, 2019, 08:26:13 pm
OH.
OH GOD.

so uh... some unforeseen consequenses that may or may not be in base game.

Video soon.

(i know i'm a month late on the IPS drop but everything's been hell recently so just be patient please)
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Parzival on October 20, 2019, 09:19:10 pm
Speaking of IPS drops...

Each one is to be applied to the known-good No-Intro dump.
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Sherkel on October 26, 2019, 04:32:38 am
So besides the added crypto-anarchy, what are these patches meant to do differently? (I tried the Yellow (U) one by the way and it didn't seem to work at all, but I was applying it to a ROM built from source instead of hunting down a known dump, so that could have been it.)
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Parzival on October 26, 2019, 11:07:27 am
So besides the added crypto-anarchy, what are these patches meant to do differently? (I tried the Yellow (U) one by the way and it didn't seem to work at all, but I was applying it to a ROM built from source instead of hunting down a known dump, so that could have been it.)
Hold SELECT for WTW.
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Sherkel on October 26, 2019, 08:05:56 pm
The ones you just posted, I mean, not the ones in the OP. :P
Title: Re: Pokemon ROM Hacks - WTW On Demand
Post by: Parzival on October 27, 2019, 07:18:12 pm
The ones you just posted, I mean, not the ones in the OP. :P
yeh.

...wait, did i already upload them?