I'm not sure if this is the correct way of doing it but I'll teach how I personally rip. And the answer is simple, I just take screenshots and combine them in GIMP(an image editor I use). But it's not a simple screenshot, it's a screenshot made with special programs that help you rip, for instance, with SNES you can use vsnes to view each layer separately, sprites borders and that sort of stuff, with GBA you can use VBA, a emulator with tools similiar to vsnes. It doesn't show the whole map at the same time, so what I do is take different screenshots at different parts of the town and then combine them with the image editor. You can also disable sprites and other stuff to show only the map. If you can extract the map file and you can open it(like a Tiled(an map editor, it's common in some indie games) map), you can take screenshots of it instead of taking screenshots of the game. There's also another way that Barack Obama teach me, you can see his explanation here
https://www.spriters-resource.com/snes/yoshiisland/. There's also a possibility the whole map is just a png file, in that case, just extract the game files. And a final, and specific way i've never needed to use is to grab the game's tileset, recreate the whole map using Tiled, and then save as a png file. This very specific, but maybe it will be useful someday. And that's all the methods I know. I personally would recommend Barack Obama's method for games that have a editor(like Mario World with Lunar Magic), for games without a map editor I would recommend my first method, which I always use. Not sure if it's the correct way, but it works.