I'm sure this won't be of any use to the OP, but perhaps others reading might be interested...
I dug out an old random map generator of mine:
It generates maps that look something like this:
You can probably get a fair idea of how it works already, just from that:
First, the map is divided into a 4x4 grid, and a room is randomly placed inside each cell (using binary space partitioning would have created more varied maps).
Next, the remaining space is completely filled with a maze of corridors, using the depth-first search algorithm here: https://en.wikipedia.org/wiki/Maze_generation_algorithm
A doorway is then added to connect each room to a corridor (it would be better if some rooms had more than one entrance).
Corridors that only lead to a dead-end are then detected and removed (using a very crude method that should not be copied - this could be done much more efficiently just by detecting the dead-end and then tracing the corridor back to a junction).
Finally, the map is drawn, using a fairly standard auto-tiling method.
Anyway, I hope someone finds that helpful...