You are right, not the Konami code, it’s 9 lives + stage select. I tried it too, but after this the achievements are not counted after it for some reason.
RetroAchievements is a service with community-made achievements for retro games. Many emulators supports it. You can login and play as usual to earn them. There is also a hardcode mode when loading states and other emulator advantages are disabled, so you have to beat it as it was on the original hardware.