You could probably use a combination of mode7 and size scaling and angling of sprites to do raycasting. Someone did a Wolfenstein port for DIV1 using this method, back when it was popular, but unfortunately, the code and game has been lost to the sands of time. The basic process is to draw a map in 2D and have "rays" shoot out from your player object. Anything that falls in front of that object, depending on the distance and angle within the rays, would be drawn in a specific size. If I remember the Game Maker raycasting engine correctly, solid sprites that were already "textured" were used and drawn in this manner.
Come to think of it, I've got the old DIV1 cart racing game source code if that would be helpful, although it doesn't use raycasting, but does use size scaling depending on distance. I have all of the example games that came with that package (40mb download) and just uploaded them to my DC Fenix page at
http://atari.vg-network.com. There's also the source code and files for Nazca Dreams, which used a lot of mode7 tricks, on the page as well...