Sega Master System / Mark III / Game Gear
You need to open 5 doors throughout the game in order to get the good ending. To make them open:
This last one is the tricky one, as you'll have to plan how to drop enemies onto others below to keep the digging count low. Filling in a hole does not decrease the "holes dug" counter.
If you meet all these conditions, then you'll go to the end of Stage 5, fight all the bosses again, and finally get the good ending. Based on research by Chris Covell
See the main page for Berlin no Kabe - The BerlinWall (ベルリンの壁 － THE BERLINWALL)