Enter the Japanese syllables "Ro ~Tsu Ku Sa Mu" as your name during the game. This is hiragana and loosely translates to "Sam Rock". By entering this name, it will change to katagana and read "Rokkusamu" (again, in Japanese syllables).
At the title screen, press Left, Left, Right, Right, Up, Down, Up, Down, Select, B. The background color will change, confirming the entering of this cheat, which stops all random encounters. Non-random encounters will still occur, and thus you should be especially careful because you could end up underleveled as a result.