Does anybody knows how to code/port games to 3ds?

I saw few projects like portal and Doki Doki literature club getting ported to 3ds does anybody know how is it done and what language 3ds uses for games?