Any way to change X/Y to L/R shoulder button for GB/GBA games?

X/Y button is useless in GBA games, I have an idea to map X/Y button to L/R button.
Anyone knows how to work around? Thanks.