I was reading about this the other day. If you reset the game at a certain point during a save them it'll let you bypass the 20 item limit, which means that you can now use the hexadecimal values of items along with the > 20 offset to overwrite stuff in memory that you shouldn't be able to reach.
After this, you just need to know how to write machine code in hexadecimal and you're good.