So what you did was made it so it accepted .bmp's, then you made a good bmp (just one), then you ran the game and it wouldn't work?
If so, the problem is quite simple. You need to change every .pbm that cavestory uses into a .bmp for it to work, (every npc sheet, every tile set sheet, every...