in the main garmin folder backup your gmapbmap.img file. rename whatever new basemap you want to use to that name, and locate in the same directory. i've been advised to keep the map file to around 50mb to work with available 520 memory. more info here: http://garmin.openstreetmap.nl/
google open street maps for garmin 520 and you'll find youtube videos on how to do it
I succeeded yesterday to display a raster map on my Edge 520.
I read that it is possible to do that with GIMP and Google Earth (https://support.garmin.com/fr-FR/?faq=cVuMqGHWaM7wTFWMkPNLN9) but i did it another way.
With MOBAC (Mobile Atlas Creator) I was able generate a "Garmin Custom Map" KMZ file from various mapping sources (including USGS, IGN,...). https://mobac.sourceforge.io/
The KMZ file was then dropped in the CustomMap folder of my Edge.
At the next startup, my raster map was displayed on top of my vector OSM map.
It seems that the zoom level can hide or display this new layer, and the scrolling can be a little bit slow depending of the size of the map. But it works