Check here https://rosettacode.org/wiki/Maze_generation it is not exactly what you are looking for though. At the link there are many various maze generators. "How to Build a Maze," Byte magazine, Dec. 1981 by David Matuszek described a maze generator using 0-15 for the cells of the maze, using -1 for frontier cells, and some other number eg. 100 for the wall cells. Nibble magazine Feb 1984 by David Krathwohl "Speed Maze" contained a maze generator using the aforementioned article as a template. Maybe not much help, but maybe you can find articles written by one of them for TI-99/4A.