@mitu
Yes, I will try changing the ROM file. I am using lr-stella2014 as the emulator.
EDIT: I figured it out. On the retroarch menu settings the controller was set to stella adaptor paddle controller. I set it to gamepad and it works now! I remember one day I was trying to use a pc mouse as a paddle, and I must have changed controller setting to paddle and kept it by accident. Sorry about that! Thank you!