Hold Select and Reset the console. The game title will change from it's normal Japanese characters ("Youkai Douchuuki", which means "Demon Travel Journal") to some more ("Youen Douchuuki", which means "Erotic Travel Journal").
Press and hold Up, A & B on the 2nd controller and press Reset. If done right, the test mode should appear.
There are 6 possible endings in this game. Finish the last stage with the following Pious Points and you'll get one of six endings. In addition, press A during the credits to see the princess dancing again. Bear in mind that you can only increase your Piousness in temples before the last level and killing enemies or picking money in the last level reduces your Pious Score.