List of known glitches in Dragon Quest.
NES version glitches
Infinite Gold chest
The original NES game uses an array of length 8 to store the locations of the chests the Hero has opened. When the ninth chest is opened, the game will glitch and not know how to deal with the chest because the array is now full. This allows the chest to be re-opened for the content inside.
The main usage of this glitch is to buy a magic key from Rimuldar and then go to the Mountain Cave to open 2+ chests and then suicide away. The Hero will end up in the Throne room but by default, the original 3 chests will be placed into the array taking up 5 slots in the game's registry. Now head downstairs and open the treasury room and open the chests inside. By the 4th one, the game will glitch and the Hero will be able to repeatedly reopen this chest for infinite gold.