• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Development: The 4th gen class split in 3rd gen

48
Posts
15
Years
  • Seen Mar 26, 2013
CLICK HERE TO GET THE 'FINAL' PATCHES FOR THE PHYS/SPEC/STATUS SPLIT FOR FIRERED AND EMERALD
Please note that it doesn't actually change any moves, you need to manually set the first unknown byte of every single move to physical, special or status. The patch only implements the split.


The japanese so far have done quite a few things we haven't, even in the field of hacking. Take a look around the Super Mario World hacking community and you'll see a few japanese hackers getting the jump on even the biggest hackers in the english community. When it comes to Pokemon, this doesn't change; they have implemented the class split that came with 4th gen into the 3rd gen games.

For anyone a little confused, I'll elaborate; The class split, known to the japanese as the DPSS (Diamond Pearl Skill Split) system, is the system that allows the game to decide if a move is physical or special based on the move itself, not it's type. Fire moves in 3rd gen have always been special, but with the coming of 4th gen, we had moves such as Flare Blitz that was physical, not special. Even older moves got this treatment; Hyper Beam was now special, with it's replacement for the physical side becoming Giga Impact. Blaze Kick and Leaf Blade, moves introduced in 3rd gen, were now physical as they should be.

Some say this implementation came a generation or two too late. A few esteemed hackers have went about and fixed this. And now I come to you with the code that will change a third generation game's mechanics to use the DPSS system.

From what I know, the move data itself must be changed in order to take full advantage of this system. The new mechanics use the second byte in the padding data at the end of a move entry. A Special Pound for example, would be formatted like so:

Code:
00 28 00 64 23 00 00 00 33 00 01 00

Note the 01 near the end, normally this is 00. In the move data, zero (00) is physical, and non-zero (01 and higher) is special.

As for the mechanics themselves, I'm not too sure on how they work myself, sadly. I hate to look like a fake, but really, the most I did was reverse engineering, adjustment and lots of cross comparing. However, I can assure you, I've tested it many times under many different circumstances, I can attest that it does indeed work as it's supposed to.

Before I start providing any patches, I will post some diff tables laying out the changes in bytes and byte sequences between an unmodified ROM and a ROM with the patch applied. These diffs are made using Fire Red ROMs.

Code:
00014E28 |             6E          | 00014E28 |             64          |
------------------------------------------------------------------------
00014F10 |             6E          | 00014F10 |             64          |
------------------------------------------------------------------------
0001DF38 |                      78 | 0001DF38 |                      7A |
------------------------------------------------------------------------
0001E0C0 | 08                      | 0001E0C0 | 00                      |
------------------------------------------------------------------------
0001F6C0 |          78             | 0001F6C0 |          7A             |
------------------------------------------------------------------------
0001F908 | 08                      | 0001F908 | 00                      |
------------------------------------------------------------------------
0001F988 |             08          | 0001F988 |             00          |
------------------------------------------------------------------------
0003ECE8 |                   57    | 0003ECE8 |                   5F    |
0003ECF0 | 4E    45    E0 B4 8B B0 | 0003ECF0 | 56    4D    44 46 F0 B4 |
0003ECF8 | 06 1C 01 91 02 92 13 98 | 0003ECF8 | 8B B0 06 1C 01 91 02 92 |
0003ED00 |    99    9A    9C 1B 04 | 0003ED00 |    98    99    9A 17 9C |
0003ED08 |    0C 03 93 00 04 03 0C | 0003ED08 |    04 1B 0C 03 93 00 04 |
0003ED10 | 09 06 0F 0E 12 06    0E | 0003ED10 | 03 0C 09 06 0F 0E    06 |
0003ED18 | 04 92 24 06    0E 00 25 | 0003ED18 | 12 0E 04 92    06 24 0E |
0003ED20 |    2B 0D D1 04 4A 05 49 | 0003ED20 |    25 00 2B 09 D1 0D 4A |
0003ED28 | 02 9B 58 00 C0 18 80 00 | 0003ED28 | 0D 49 02 9B 58 00 C0 18 |
0003ED30 | 40 18    78 10 80 05 E0 | 0003ED30 | 80 00    18 40 78 10 80 |
0003ED38 | 20 40 02 02 04 0C 25 08 | 0003ED38 | 01 E0 08 48 03 80 08 49 |
0003ED40 | 06 48 03 80 00 2F 0D D1 | 0003ED40 | 02 9A 50 00 80 18 80 00 |
0003ED48 | 05 49 02 9F 78 00 C0 19 | 0003ED48 | 40 18 82 7A 93 46 00 2F |
0003ED50 | 80 00 40 18 80 78 81 46 | 0003ED50 | 08 D1 80 78 81 46 0A E0 |
0003ED58 | 09 E0                   | 0003ED58 | 00 00                   |
------------------------------------------------------------------------
0003EE30 |                   6E    | 0003EE30 |                   64    |
------------------------------------------------------------------------
0003EE68 | 6E                      | 0003EE68 | 64                      |
------------------------------------------------------------------------
0003EE98 |                   6E    | 0003EE98 |                   64    |
------------------------------------------------------------------------
0003EED0 |                   6E    | 0003EED0 |                   64    |
------------------------------------------------------------------------
0003EF00 |                   49    | 0003EF00 |                   59    |
------------------------------------------------------------------------
0003F000 |                04 00 0C | 0003F000 |                00 80 46 |
0003F008 | 80 46                   | 0003F008 | 7F 00                   |
------------------------------------------------------------------------
0003F038 |             07          | 0003F038 |             08          |
0003F040 |                   02    | 0003F040 |                   03    |
0003F048 | 43 46 5B 08 98 46 09 98 | 0003F048 | 81 4C 23 88 5B 08 23 80 |
0003F050 | 04 78 37 2C 06 D1 96 20 | 0003F050 | 09 98 04 78 37 2C 06 D1 |
0003F058 | 78 43 64 21 A4 F1 DC FF | 0003F058 | 96 20 78 43 64 21 A4 F1 |
0003F060 | 00 04 07 0C 39 2C 14 D1 | 0003F060 | DB FF 00 04 07 0C 39 2C |
0003F068 | 00 20    90 0E 20 00 21 | 0003F068 | 14 D1    20 00 90 0E 20 |
0003F070 | 3A 22 00 23 DA F7 50 FF | 0003F070 | 00 21 3A 22 00 23 DA F7 |
0003F078 | 00 06    28 09 D0 96 20 | 0003F078 | 50 FF    06 00 28 09 D0 |
0003F080 | 41 46    43 08 1C 64 21 | 0003F080 | 96 20    46 41 43 08 1C |
0003F088 | A4 F1 C6 FF 00 04    0C | 0003F088 | 64 21 A4 F1 C6 FF    04 |
0003F090 | 80 46 09 9A 10 78 3A 28 | 0003F090 | 00 0C 80 46 09 9A 10 78 |
0003F098 | 14 D1 00 20    90 0E 20 | 0003F098 | 3A 28 14 D1    20 00 90 |
0003F0A0 | 00 21 39 22 00 23 DA F7 | 0003F0A0 | 0E 20 00 21 39 22 00 23 |
0003F0A8 | 37 FF 00 06    28 09 D0 | 0003F0A8 | DA F7 37 FF    06 00 28 |
0003F0B0 | 96 20 43 46    43 18 1C | 0003F0B0 | 09 D0 96 20    46 43 43 |
0003F0B8 | 64 21 A4 F1 AD FF 00 04 | 0003F0B8 | 18 1C 64 21 A4 F1 AD FF |
0003F0C0 |    0C 80 46 09 99 08 78 | 0003F0C0 |    04 00 0C 80 46 09 99 |
0003F0C8 | 3E 28 09 D1 F0 6C 00 28 | 0003F0C8 | 08 78 3E 28 09 D1 F0 6C |
0003F0D0 | 06 D0 96 20 78 43 64 21 | 0003F0D0 | 00 28 06 D0 96 20 78 43 |
0003F0D8 | A4 F1 9E FF 00 04 07 0C | 0003F0D8 | 64 21 A4 F1 9E FF 00 04 |
0003F0E0 | 0A 9A 10 78 3F 28 0C D1 | 0003F0E0 | 07 0C 0A 9A 10 78 3F 28 |
0003F0E8 | 01 9B D8 6C 00 28 08 D0 | 0003F0E8 | 0C D1 01 9B D8 6C 00 28 |
0003F0F0 | 96 20 05 99 48 43 64 21 | 0003F0F0 | 08 D0 96 20 05 99 48 43 |
0003F0F8 | A4 F1 8E FF 00 04    0C | 0003F0F8 | 64 21 A4 F1 8E FF    04 |
0003F100 | 05 90 4A 46 0D 2A 0E D1 | 0003F100 | 00 0C 05 90 4A 46 0D 2A |
0003F108 | 00 20    90 0E 20 00 21 | 0003F108 | 0E D1    20 00 90 0E 20 |
0003F110 |    22 FD 23 DA F7 00 FF | 0003F110 |    21 00 22 FD 23 DA F7 |
0003F118 |    06    28 03 D0 4C 49 | 0003F118 |    FF    06 00 28 03 D0 |
0003F120 | 08 88 40 08 08 80 4B 46 | 0003F120 | 4B 49 08 88 40 08 08 80 |
0003F128 | 0A 2B 0E D1 00 20    90 | 0003F128 | 4B 46 0A 2B 0E D1    20 |
0003F130 | 0E 20 00 21    22 FE 23 | 0003F130 | 00 90 0E 20    21 00 22 |
0003F138 | DA F7 EE FE 00 06    28 | 0003F138 | FE 23 DA F7 EE FE    06 |
0003F140 | 03 D0 43 49 08 88 40 08 | 0003F140 | 00 28 03 D0 42 49 08 88 |
0003F148 | 08 80 48 46 0C 28 14 D1 | 0003F148 | 40 08 08 80 48 46 0C 28 |
0003F150 | 09 99 08 78 41 28 10 D1 | 0003F150 | 14 D1 09 99 08 78 41 28 |
0003F158 | B0 8D 03 21 A5 F1 56 FA | 0003F158 | 10 D1 B0 8D 03 21 A5 F1 |
0003F160 | 31 8D 00 04    0C 81 42 | 0003F160 | 56 FA 31 8D    04 00 0C |
0003F168 | 07 D8 39 4C 21 88 96 20 | 0003F168 | 81 42 07 D8 38 4C 21 88 |
0003F170 | 48 43 64 21 A4 F1 50 FF | 0003F170 | 96 20 48 43 64 21 A4 F1 |
0003F178 | 20 80 4A 46 0A 2A 14 D1 | 0003F178 | 50 FF 20 80 4A 46 0A 2A |
0003F180 | 09 9B 18 78 42 28 10 D1 | 0003F180 | 14 D1 09 9B 18 78 42 28 |
0003F188 | B0 8D 03 21 A5 F1 3E FA | 0003F188 | 10 D1 B0 8D 03 21 A5 F1 |
0003F190 | 31 8D 00 04    0C 81 42 | 0003F190 | 3E FA 31 8D    04 00 0C |
0003F198 | 07 D8 2D 4C 21 88 96 20 | 0003F198 | 81 42 07 D8 2C 4C 21 88 |
0003F1A0 | 48 43 64 21 A4 F1 38 FF | 0003F1A0 | 96 20 48 43 64 21 A4 F1 |
0003F1A8 | 20 80 48 46 0B 28 14 D1 | 0003F1A8 | 38 FF 20 80 48 46 0B 28 |
0003F1B0 | 09 99 08 78 43 28 10 D1 | 0003F1B0 | 14 D1 09 99 08 78 43 28 |
0003F1B8 | B0 8D 03 21 A5 F1 26 FA | 0003F1B8 | 10 D1 B0 8D 03 21 A5 F1 |
0003F1C0 | 31 8D 00 04    0C 81 42 | 0003F1C0 | 26 FA 31 8D    04 00 0C |
0003F1C8 | 07 D8 21 4C 21 88 96 20 | 0003F1C8 | 81 42 07 D8 20 4C 21 88 |
0003F1D0 | 48 43 64 21 A4 F1 20 FF | 0003F1D0 | 96 20 48 43 64 21 A4 F1 |
0003F1D8 |    80 4A 46 06 2A 14 D1 | 0003F1D8 |    FF 20 80 4A 46 06 2A |
0003F1E0 | 09 9B 18 78 44 28 10 D1 | 0003F1E0 | 14 D1 09 9B 18 78 44 28 |
0003F1E8 | B0 8D 03 21 A5 F1 0E FA | 0003F1E8 | 10 D1 B0 8D 03 21 A5 F1 |
0003F1F0 | 31 8D 00 04    0C 81 42 | 0003F1F0 | 0E FA 31 8D    04 00 0C |
0003F1F8 | 07 D8 15 4C 21 88 96 20 | 0003F1F8 | 81 42 07 D8 14 4C 21 88 |
0003F200 | 48 43 64 21 A4 F1 08 FF | 0003F200 | 96 20 48 43 64 21 A4 F1 |
0003F208 | 20 80 12 4A 12 48 01 88 | 0003F208 | 08 FF 20 80 11 4A 12 48 |
0003F210 | 48 00 40 18 80 00    18 | 0003F210 | 01 88 48 00 40 18    00 |
0003F218 | 00 78 07 28 02 D1 05 98 | 0003F218 | 80 18 00 78 07 28 02 D1 |
0003F220 | 40 08 05 90 49 46 08 29 | 0003F220 | 05 98 40 08 05 90 59 46 |
0003F228 |    D9 AE E0 0B 48 01 78 | 0003F228 |    29 00 D9 AD E0 0B 48 |
0003F230 | 04 1C 02 29 18 D1 19 20 | 0003F230 | 01 78 04 1C 02 29 17 D1 |
0003F238 | 30 56 06 28 12 DD 08 4A | 0003F238 | 19 20 30 56 06 28 11 DD |
0003F240 | 15 E0 00 00             | 0003F240 | 07 4A 14 E0             |
------------------------------------------------------------------------
0003F388 |       4F    09          | 0003F388 |       5F    03          |
0003F390 |       48    09          | 0003F390 |       58    00          |
0003F398 | 00 E1                   | 0003F398 | 94 E0                   |
------------------------------------------------------------------------
0003F4F0 |       11    01 20 08 40 | 0003F4F0 |       14    00 2C 3D D0 |
0003F4F8 | 14 1C 00 28 16 D0 4B 46 | 0003F4F8 | 4E 46 60 20 20 40 00 28 |
0003F500 |    2B 09 D0 0B 2B    D0 | 0003F500 |    D0 0A 2E 32 D0    2E |
0003F508 | 10 E0 00 00             | 0003F508 | 33 D0 33 E0             |
------------------------------------------------------------------------
0003F518 | E8 0F 28 18 45 10 05 E0 | 0003F518 | 18 20 20 40 00 28 14 D0 |
0003F520 | 28 01 40 1B 0A 21 A4 F1 | 0003F520 | 58 46 01 28 11 D1 0E 4A |
0003F528 | 77 FD 05 1C 21 88 9F 20 | 0003F528 | 0E 48 01 78 58 20 48 43 |
0003F530 | 08 40 00 28 06 D0 09 48 | 0003F530 | 83 18 18 78 05 28 02 D0 |
0003F538 | 00 88 4C    02    E8 0F | 0003F538 | 58 78 05    05    0A 20 |
0003F540 | 28 18 45 10 21 88 60 20 | 0003F540 | 68 43 0F 21 89 F1 42 F9 |
0003F548 | 08 40 00 28 12 D0 4E 46 | 0003F548 | 05 1C 07 48 00 88 4C 28 |
0003F550 | 0A 2E 05 D0 0B 2E    D0 | 0003F550 | 0F D0 07 2C 0E D8    2E |
0003F558 | 0C E0 00 00 4A 3D 02 02 | 0003F558 | 0B D0 0B 2E 06 D0 09 E0 |
0003F560 | 28 01 40 1B 0A 21 A4 F1 | 0003F560 | 65 3B 02 02 CC 3C 02 02 |
0003F568 | 57 FD 05 1C 02 E0 E8 0F | 0003F568 | AA 3C 02 02 68 08 2D 18 |
0003F570 | 28 18 45 10             | 0003F570 | 00 E0 68 08             |
------------------------------------------------------------------------
0003F590 |                   A4    | 0003F590 |                   89    |
0003F598 | 3F FD                   | 0003F598 | 19 F9                   |
0003F5A0 | 38                      | 0003F5A0 | 78                      |
0003F5A8 | F0 BC 02    08 47 00 00 | 0003F5A8 | B3 46 F0    02 BC 08 47 |

The unmodified ROM is on the left. The patched ROM is on the right. Unchanged bytes not listed; only bytes that are different between the two versions are displayed. Note, this does not include any changes to the move structure.

For more clarification, here is the DPSS system in the japanese ROMs, the original data I copied from in other words. Again, using Fire Red.

Code:
00014648 |             6E          | 00014648 |             64          |
------------------------------------------------------------------------
00014730 |             6E          | 00014730 |             64          |
------------------------------------------------------------------------
0001D748 |                      78 | 0001D748 |                      7A |
------------------------------------------------------------------------
0001D8D0 | 08                      | 0001D8D0 | 00                      |
------------------------------------------------------------------------
0001EED0 |          78             | 0001EED0 |          7A             |
------------------------------------------------------------------------
0001F118 | 08                      | 0001F118 | 00                      |
------------------------------------------------------------------------
0001F198 |             08          | 0001F198 |             00          |
------------------------------------------------------------------------
0003E458 |       57    4E    45    | 0003E458 |       5F    56    4D    |
0003E460 | E0 B4 8B B0 06 1C 01 91 | 0003E460 | 44 46 F0 B4 8B B0 06 1C |
0003E468 | 02 92 13 98    99    9A | 0003E468 | 01 91 02 92    98    99 |
0003E470 |    9C 1B 04    0C 03 93 | 0003E470 |    9A 17 9C    04 1B 0C |
0003E478 | 00 04 03 0C 09 06 0F 0E | 0003E478 | 03 93 00 04 03 0C 09 06 |
0003E480 | 12 06    0E 04 92 24 06 | 0003E480 | 0F 0E    06 12 0E 04 92 |
0003E488 |    0E 00 25    2B 0D D1 | 0003E488 |    06 24 0E    25 00 2B |
0003E490 | 04 4A 05 49 02 9B 58 00 | 0003E490 | 09 D1 0D 4A 0D 49 02 9B |
0003E498 | C0 18 80 00 40 18    78 | 0003E498 | 58 00 C0 18 80 00    18 |
0003E4A0 | 10 80 05 E0 80 3F 02 02 | 0003E4A0 | 40 78 10 80 01 E0 08 48 |
0003E4A8 | 0C D6 20 08 06 48 03 80 | 0003E4A8 | 03 80 08 49 02 9A 50 00 |
0003E4B0 | 00 2F 0D D1 05 49 02 9F | 0003E4B0 | 80 18 80 00 40 18 82 7A |
0003E4B8 | 78 00 C0 19 80 00 40 18 | 0003E4B8 | 93 46 00 2F 08 D1 80 78 |
0003E4C0 | 80 78 81 46 09 E0       | 0003E4C0 | 81 46 0A E0 00 00       |
------------------------------------------------------------------------
0003E5A0 |       6E                | 0003E5A0 |       64                |
------------------------------------------------------------------------
0003E5D0 |             6E          | 0003E5D0 |             64          |
------------------------------------------------------------------------
0003E608 |       6E                | 0003E608 |       64                |
------------------------------------------------------------------------
0003E640 |       6E                | 0003E640 |       64                |
------------------------------------------------------------------------
0003E670 |       49    08          | 0003E670 |       59    00          |
------------------------------------------------------------------------
0003E770 |    04 00 0C 80 46       | 0003E770 |    00 80 46 7F 00       |
------------------------------------------------------------------------
0003E7A8 | 07                      | 0003E7A8 | 08                      |
0003E7B0 |       02    43 46 5B 08 | 0003E7B0 |       03    81 4C 23 88 |
0003E7B8 | 98 46 09 98 04 78 37 2C | 0003E7B8 | 5B 08 23 80 09 98 04 78 |
0003E7C0 | 06 D1 96 20 78 43 64 21 | 0003E7C0 | 37 2C 06 D1 96 20 78 43 |
0003E7C8 | 89 F1 B6 FB 00 04 07 0C | 0003E7C8 | 64 21 89 F1 B5 FB 00 04 |
0003E7D0 | 39 2C 14 D1 00 20    90 | 0003E7D0 | 07 0C 39 2C 14 D1    20 |
0003E7D8 | 0E 20 00 21 3A 22 00 23 | 0003E7D8 | 00 90 0E 20 00 21 3A 22 |
0003E7E0 | DA F7 A2 FF 00 06    28 | 0003E7E0 | 00 23 DA F7 A1 FF    06 |
0003E7E8 | 09 D0 96 20 41 46    43 | 0003E7E8 | 00 28 09 D0 96 20    46 |
0003E7F0 | 08 1C 64 21 89 F1 A0 FB | 0003E7F0 | 41 43 08 1C 64 21 89 F1 |
0003E7F8 | 00 04    0C 80 46 09 9A | 0003E7F8 | 9F FB    04 00 0C 80 46 |
0003E800 | 10 78 3A 28 14 D1 00 20 | 0003E800 | 09 9A 10 78 3A 28 14 D1 |
0003E808 |    90 0E 20 00 21 39 22 | 0003E808 |    20 00 90 0E 20 00 21 |
0003E810 | 00 23 DA F7 89 FF 00 06 | 0003E810 | 39 22 00 23 DA F7 88 FF |
0003E818 |    28 09 D0 96 20 43 46 | 0003E818 |    06 00 28 09 D0 96 20 |
0003E820 |    43 18 1C 64 21 89 F1 | 0003E820 |    46 43 43 18 1C 64 21 |
0003E828 | 87 FB 00 04    0C 80 46 | 0003E828 | 89 F1 86 FB    04 00 0C |
0003E830 | 09 99 08 78 3E 28 09 D1 | 0003E830 | 80 46 09 99 08 78 3E 28 |
0003E838 | F0 6C 00 28 06 D0 96 20 | 0003E838 | 09 D1 F0 6C 00 28 06 D0 |
0003E840 | 78 43 64 21 89 F1 78 FB | 0003E840 | 96 20 78 43 64 21 89 F1 |
0003E848 | 00 04 07 0C 0A 9A 10 78 | 0003E848 | 77 FB 00 04 07 0C 0A 9A |
0003E850 | 3F 28 0C D1 01 9B D8 6C | 0003E850 | 10 78 3F 28 0C D1 01 9B |
0003E858 | 00 28 08 D0 96 20 05 99 | 0003E858 | D8 6C 00 28 08 D0 96 20 |
0003E860 | 48 43 64 21 89 F1 68 FB | 0003E860 | 05 99 48 43 64 21 89 F1 |
0003E868 | 00 04    0C 05 90 4A 46 | 0003E868 | 67 FB    04 00 0C 05 90 |
0003E870 | 0D 2A 0E D1 00 20    90 | 0003E870 | 4A 46 0D 2A 0E D1    20 |
0003E878 | 0E 20 00 21    22 FD 23 | 0003E878 | 00 90 0E 20    21 00 22 |
0003E880 | DA F7 52 FF 00 06    28 | 0003E880 | FD 23 DA F7 51 FF    06 |
0003E888 | 03 D0 4C 49 08 88 40 08 | 0003E888 | 00 28 03 D0 4B 49 08 88 |
0003E890 | 08 80 4B 46 0A 2B 0E D1 | 0003E890 | 40 08 08 80 4B 46 0A 2B |
0003E898 | 00 20    90 0E 20 00 21 | 0003E898 | 0E D1    20 00 90 0E 20 |
0003E8A0 |    22 FE 23 DA F7 40 FF | 0003E8A0 |    21 00 22 FE 23 DA F7 |
0003E8A8 | 00 06    28 03 D0 43 49 | 0003E8A8 | 3F FF    06 00 28 03 D0 |
0003E8B0 | 08 88 40 08 08 80 48 46 | 0003E8B0 | 42 49 08 88 40 08 08 80 |
0003E8B8 | 0C 28 14 D1 09 99 08 78 | 0003E8B8 | 48 46 0C 28 14 D1 09 99 |
0003E8C0 | 41 28 10 D1 B0 8D 03 21 | 0003E8C0 | 08 78 41 28 10 D1 B0 8D |
0003E8C8 | 89 F1 30 FE 31 8D 00 04 | 0003E8C8 | 03 21 89 F1 2F FE 31 8D |
0003E8D0 |    0C 81 42 07 D8 39 4C | 0003E8D0 |    04 00 0C 81 42 07 D8 |
0003E8D8 | 21 88 96 20 48 43 64 21 | 0003E8D8 | 38 4C 21 88 96 20 48 43 |
0003E8E0 | 89 F1 2A FB 20 80 4A 46 | 0003E8E0 | 64 21 89 F1 29 FB 20 80 |
0003E8E8 | 0A 2A 14 D1 09 9B 18 78 | 0003E8E8 | 4A 46 0A 2A 14 D1 09 9B |
0003E8F0 | 42 28 10 D1 B0 8D 03 21 | 0003E8F0 | 18 78 42 28 10 D1 B0 8D |
0003E8F8 | 89 F1 18 FE 31 8D 00 04 | 0003E8F8 | 03 21 89 F1 17 FE 31 8D |
0003E900 |    0C 81 42 07 D8 2D 4C | 0003E900 |    04 00 0C 81 42 07 D8 |
0003E908 | 21 88 96 20 48 43 64 21 | 0003E908 | 2C 4C 21 88 96 20 48 43 |
0003E910 | 89 F1 12 FB 20 80 48 46 | 0003E910 | 64 21 89 F1 11 FB 20 80 |
0003E918 | 0B 28 14 D1 09 99 08 78 | 0003E918 | 48 46 0B 28 14 D1 09 99 |
0003E920 | 43 28 10 D1 B0 8D 03 21 | 0003E920 | 08 78 43 28 10 D1 B0 8D |
0003E928 | 89 F1 00 FE 31 8D 00 04 | 0003E928 | 03 21 89 F1 FF FD 31 8D |
0003E930 |    0C 81 42 07 D8 21 4C | 0003E930 |    04 00 0C 81 42 07 D8 |
0003E938 | 21 88 96 20 48 43 64 21 | 0003E938 | 20 4C 21 88 96 20 48 43 |
0003E940 | 89 F1 FA FA 20 80 4A 46 | 0003E940 | 64 21 89 F1 F9 FA 20 80 |
0003E948 | 06 2A 14 D1 09 9B 18 78 | 0003E948 | 4A 46 06 2A 14 D1 09 9B |
0003E950 | 44 28 10 D1 B0 8D 03 21 | 0003E950 | 18 78 44 28 10 D1 B0 8D |
0003E958 | 89 F1 E8 FD 31 8D 00 04 | 0003E958 | 03 21 89 F1 E7 FD 31 8D |
0003E960 |    0C 81 42 07 D8 15 4C | 0003E960 |    04 00 0C 81 42 07 D8 |
0003E968 | 21 88 96 20 48 43 64 21 | 0003E968 | 14 4C 21 88 96 20 48 43 |
0003E970 | 89 F1 E2 FA 20 80 12 4A | 0003E970 | 64 21 89 F1 E1 FA 20 80 |
0003E978 | 12 48 01 88 48 00 40 18 | 0003E978 | 11 4A 12 48 01 88 48 00 |
0003E980 | 80 00    18 00 78 07 28 | 0003E980 | 40 18    00 80 18 00 78 |
0003E988 | 02 D1 05 98 40 08 05 90 | 0003E988 | 07 28 02 D1 05 98 40 08 |
0003E990 | 49 46 08 29    D9 AE E0 | 0003E990 | 05 90 59 46    29 00 D9 |
0003E998 | 0B 48 01 78 04 1C 02 29 | 0003E998 | AD E0 0B 48 01 78 04 1C |
0003E9A0 | 18 D1 19 20 30 56 06 28 | 0003E9A0 | 02 29 17 D1 19 20 30 56 |
0003E9A8 | 12 DD 08 4A 15 E0 00 00 | 0003E9A8 | 06 28 11 DD 07 4A 14 E0 |
------------------------------------------------------------------------
0003EAF0 |                   4F    | 0003EAF0 |                   5F    |
0003EAF8 | 09                48    | 0003EAF8 | 03                58    |
0003EB00 | 09          00 E1       | 0003EB00 | 00          94 E0       |
------------------------------------------------------------------------
0003EC58 |                   11    | 0003EC58 |                   14    |
0003EC60 | 01 20 08 40 14 1C 00 28 | 0003EC60 | 00 2C 3D D0 4E 46 60 20 |
0003EC68 | 16 D0 4B 46    2B 09 D0 | 0003EC68 | 20 40 00 28    D0 0A 2E |
0003EC70 | 0B 2B    D0 10 E0 00 00 | 0003EC70 | 32 D0    2E 33 D0 33 E0 |
------------------------------------------------------------------------
0003EC80 |             E8 0F 28 18 | 0003EC80 |             18 20 20 40 |
0003EC88 | 45 10 05 E0 28 01 40 1B | 0003EC88 | 00 28 14 D0 58 46 01 28 |
0003EC90 | 0A 21 89 F1 51 F9 05 1C | 0003EC90 | 11 D1 0E 4A 0E 48 01 78 |
0003EC98 | 21 88 9F 20 08 40 00 28 | 0003EC98 | 58 20 48 43 83 18 18 78 |
0003ECA0 | 06 D0 09 48 00 88 4C    | 0003ECA0 | 05 28 02 D0 58 78 05    |
0003ECA8 | 02    E8 0F 28 18 45 10 | 0003ECA8 | 05    0A 20 68 43 0F 21 |
0003ECB0 | 21 88 60 20 08 40 00 28 | 0003ECB0 | 89 F1 42 F9 05 1C 07 48 |
0003ECB8 | 12 D0 4E 46 0A 2E 05 D0 | 0003ECB8 | 00 88 4C 28 0F D0 07 2C |
0003ECC0 | 0B 2E    D0 0C E0 00 00 | 0003ECC0 | 0E D8    2E 0B D0 0B 2E |
0003ECC8 | AA 3C 02 02 28 01 40 1B | 0003ECC8 | 06 D0 09 E0 65 3B 02 02 |
0003ECD0 | 0A 21 89 F1 31 F9 05 1C | 0003ECD0 | CC 3C 02 02 AA 3C 02 02 |
0003ECD8 | 02 E0 E8 0F 28 18 45 10 | 0003ECD8 | 68 08 2D 18 00 E0 68 08 |
------------------------------------------------------------------------
0003ED08 |             38          | 0003ED08 |             78          |
0003ED10 |             F0 BC 02    | 0003ED10 |             B3 46 F0    |
0003ED18 | 08 47 00 00             | 0003ED18 | 02 BC 08 47             |

There are quite a few changes, adjustments I made based on diffing an english ROM with a japanese one. But it should help in research.

http://srpgp.supersanctuary.net/Fire Red DPSS.ips

This is the patch. You patch it on top of an english Fire Red ROM. Note that this contains no modifications to the move data; you should do that yourself.

However, I should note, there is one strange and arbitrary bug with my version; Electric and Fire type moves will very suddenly restart the entire game. No danger is involved as far as I know, it just goes straight to the game initialization after the move is passed. This bug is not present in the japanese versions of the DPSS system and is the only imperfection between the code I modified and the code originating from the japanese ROMs. If anyone can fix this bug, I would highly appreciate it if you could post the needed changes to fix this. I believe this change could very well benefit the hacking community on whole and help keep hacking to the Advance generation of games, where research and development has come very far. It would also make a lot of new and still in development hacks a lot more interesting when it comes to battling.

Also, apologies for the awkward formatting in the diff tables, it was meant to be viewed in monospace but I can't really recall how you do that in vBulletin.
 
Last edited by a moderator:
3
Posts
13
Years
  • Seen Nov 17, 2010
This looks awesome! I would really like to help but I have only a little experience using a hex editor. Let me know if there's still anything I can do to help. Best of luck!
 

colcolstyles

Yours truly
1,588
Posts
15
Years
Huh, that's funny. I was just looking into this a couple weeks ago in Emerald. My hypothesis was that whenever the battle engine needed to figure out whether to use a pokémon's physical or special stat, it used the Type of the attack. I quickly figured out that types 0x00 (normal) through 0x08 (steel) were physical, 0x09 was "???", and the rest were special. Though I never finished the project I found that at '0x069a5a', there is the following code (more or less: I made up labels for better readability and left out a few unnecessary commands):

Code:
cmp r1, #0x8
blt physical
b continue

...

continue:
cmp r1, #0x9
bne special
... @ else, type == "???"

I assume that there are multiple instances of the following code. Again, I hypothesized that this check would need to be performed at least twice: once for the attacking pokémon's physical/special Attack stat and then again for the defending pokémon's physical/special Defense stat. But then there are variables such as whether Light Screen/Reflect is up. The above code is all that I've found so far but if I ever get the time, I'll look into it more in-depth.

Anyway, can you explain what some of those changed bytes do? Just showing us the changes in raw data between two ROMs is kinda boring. What, exactly, was changed?
 
48
Posts
15
Years
  • Seen Mar 26, 2013
As stated, I'm truthfully unaware of what exactly was going on in the changed mechanics; I was hoping someone much more familiar with ASM could look into it and tell me myself. I got it to work through sheer ingenuity and a bit of trial and error.

However, having viewed the ASM code many times through a disassembler (to adjust the changed code to the English version's standards) I can give you a few basic ideas on what exactly was changed.

0x03E7A8: An additional line of code was added, it makes quite different comparisons compared to the original. Around 7-10 lines in, the original code is there, just shifted down. When the changed data stops, the last line had overwritten a 0000 string.

0x03E458: The lines changed here remove the first and last registries to edit, if I remember correctly anyways. r10 and r4 or something? I can't remember the exact numbers off the top of my head. It compounds the code, then there's further changes which take advantage of the free space.

0x014648: The seemingly random byte changes are all for a specific register...I think. It alters mainly ldr commands.

0x03EC80: Contains some complicated code I noticed wasn't in the original...this might be the block that needs adjusting to fix the glitch I mentioned as I never really touched it porting it over, but I can't tell for sure, this block just downright fries my brain.

I need to take ASM lessons, but since I figured this might be an important step forward for the hacking community, I didn't want to wait until I understood the code and could fix it myself before presenting it. There will always be someone better then me and I figure that if someone else could come forward, apply these changes and look at them in depth, then maybe it could be improved upon or even better, used for other things.
 
3
Posts
13
Years
  • Seen Nov 17, 2010
I did notice that some of the code seemed to be shifted in the edited version. We really need someone who understands this stuff to explain exactly what's going on.
 
48
Posts
15
Years
  • Seen Mar 26, 2013
So after a bit more tinkering I ended up fixing it myself. Turns out the pointers I adjusted weren't all that well adjusted (lol)

http://srpgp.supersanctuary.net/frdpss.zip

The IPS file contains the patch, patch it onto a clean Fire Red ROM to activate the classification split. In order to utilize it, you must edit the move data manually using a hex editor (until some tool comes out that can support this)

00 28 00 64 23 00 00 00 33 00 00 00

This is a sample data using Pound's structure. Edit the byte in bold! 00 if the move is physical, 01 if the move is special. Basically you change the second to last byte in each move block. This is very simple, I'm sure if someone's paying attention, they can design one of their tools to support this feature. It has absolutely no bearing on an original ROM and does not effect it's performance, making it backwards compatible.

The patch itself does not change the moves for you, that's your own problem. Provided mechanics and such haven't been moved around, you might be able to patch this onto just about any Fire Red ROM without massive ASM changes. (Make backups first though, don't hold me responsible!) I haven't checked yet, but this patch might be compatible with other third generation ROMs too, but don't quote me on that. Experiment! I'm sure that even if the patch itself isn't compatible, the mechanics in each third gen ROM should generally be the same, so it's very possible to port this system into, say, Emerald or even Ruby.

The text file contains the diffs between a clean and a modified ROM. The hex on the left is the original, the hex on the right is the modified. Use this to tell what, in hex, was changed. It's not highly specific of course, it's a basic diff comparison. But with enough engineering, you can use this to port the system over into other ROMs much more easily, or even tweak it a bit! It's up to you. It's there for research.

This patch is a flawless port, unlike my previous one. I can't tell you exactly how it works, as I merely ported it over through sheer engineering alone, without any sort of knowledge of ASM. With a disassembler and proper debugging tools, you should be able to figure it out on your own what's going on though if you're experienced enough. However, having gotten here through trial and error, I can tell you that I have thoroughly tested it and it should work 100% bug free, compared to the previous version.

I'm presenting this IPS patch here not just for research, but maybe in the hopes that this will improve current and future hacks in progress and make them so much more interesting and fun. With a small bit of work, you can port all the move classifications from 4th gen into 3rd gen and still have a completely different Fire Red game. Blaze Kick will finally be physical! The possibilities though are endless. Please put this to good use.
 

TheDarkShark

Metal Headed Hacker
56
Posts
13
Years
I think I'll work out a patch that contains the data for every move and provide it here. But where is the move-table? I don't know, but I can do some researches (I won't need to, if someonetells me)
 
48
Posts
15
Years
  • Seen Mar 26, 2013
But where is the move-table? I don't know, but I can do some researches (I won't need to, if someonetells me)

It begins at 0x250C10, where Pound starts. After that, every move is twelve bytes long; you change the 11th byte for the physical/special split.
 
48
Posts
15
Years
  • Seen Mar 26, 2013
After a little research I've expanded on James' findings

A lot of this is explained here. The DPSS system makes use of what that page calls the second padding byte. While it says it should be set to 00, in reality, they're never actually used, so it's totally safe to set them to anything you want, they'll just never have a bearing on the actual game on a clean ROM.
 

Ivee

Ask me about Trailblazer :3
66
Posts
14
Years
  • Seen May 22, 2019
Hello.

I'm a friend of Windslash's (actually, I pointed this thread out to him). The earlier patch he posted with all the special moves was flawed, so he fixed it and asked me to post the patch. I personally tested out a move (Gust, which is one that was never special typed in gen 3 and older). I gave it to Squirtle, gave it max special attack and gave Bulbasaur minimum special defense. Then tested it again leaving Squirtle's SA and Bulbasaur's special defense was maxed. Bulbasaur was 1-hit KO'd first and the next time Gust did a little less than half damage.

Anyway, here's the patch, please give credit to Windslash and not me. And keep testing moves so we can be sure he doesn't need to do anymore work!
 

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
Hello.

I'm a friend of Windslash's (actually, I pointed this thread out to him). The earlier patch he posted with all the special moves was flawed, so he fixed it and asked me to post the patch. I personally tested out a move (Gust, which is one that was never special typed in gen 3 and older). I gave it to Squirtle, gave it max special attack and gave Bulbasaur minimum special defense. Then tested it again leaving Squirtle's SA and Bulbasaur's special defense was maxed. Bulbasaur was 1-hit KO'd first and the next time Gust did a little less than half damage.

Anyway, here's the patch, please give credit to Windslash and not me. And keep testing moves so we can be sure he doesn't need to do anymore work!
I see what he did, but did he set the status effect moves to 2 as well?
 
48
Posts
15
Years
  • Seen Mar 26, 2013
I see what he did, but did he set the status effect moves to 2 as well?

The mechanics don't differentiate between "special" and "status." This is because status moves normally do not cause damage anyways, and those that do cause damage based on a fixed formula that does not rely on attack or defense stats.

I suppose if you were to make a status screen hack to show the class of moves, it would be relevant, but until then, there's no reason to set any moves to anything other then 0 or 1. (It would treat any number higher then 1 as 1 anyways)
 

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
The mechanics don't differentiate between "special" and "status." This is because status moves normally do not cause damage anyways, and those that do cause damage based on a fixed formula that does not rely on attack or defense stats.

I suppose if you were to make a status screen hack to show the class of moves, it would be relevant, but until then, there's no reason to set any moves to anything other then 0 or 1. (It would treat any number higher then 1 as 1 anyways)
Ohh. I was confused, because, as said in your first post:
In the move data, 00 is physical, 01 is special and 02 is status.
 

Jonny Buuz

La di da di do di da di dum...
56
Posts
18
Years
If we were to apply these patches, would we first patch firered with james' patch and then with windslash's? Or would simply patching with windslash's suffice?

absolutely brilliant work by the way, i've been looking into this for a long time... looks like i can stop tinkering now.
 
48
Posts
15
Years
  • Seen Mar 26, 2013
If we were to apply these patches, would we first patch firered with james' patch and then with windslash's? Or would simply patching with windslash's suffice?

I believe windslash's patch won't work without mine, as all it does is change the move classifications. It doesn't alter the mechanics to use them, but that's my assuption, I dunno if he included my patch in his.
 

Rockxero

Music Remixist
8
Posts
13
Years
Hello, does anyone know where to find the move table in an Emerald ROM, or have a pre-patched Emerald ROM with the Physical/Special split?
 
Back
Top