This might help you out a bit: http://eonclash.com/ViewProduct.php?ProductID=29

Its a very simple side scroller implemented with SDL using FPC. It loads the "map.txt" file and displays it on the screen. You can scroll left and right across the map easily enough.

To add a background you would need to modify game.pas and in GameFrame add the background draw before the map.Display function is called. Of course you would also have to add the player sprite and etc...

Hope it helps.