>>1
2k of RAM is not so big a limitation when you can run code directly from ROM. NES supports 32k of program ROM without a mapper, and several hundreds of program ROM with a mapper (depending on which one you use, of course).
I haven't looked at the technical details of the raycaster, but it seems to "render" to 8x8 pixel chunks, which means it just has to change a tile reference for each tile in the screen.
The game screen seems to be 256x144 pixels, which is 32x18 tiles. If I'm remembering how a raycaster works properly, it just has to do raycasting calculations for each 8 pixel column, then load the correct tile references into the tilemap. It can probably get away with doing this in the middle of the frame as well.