N.O.M.A.D. (Ocean Software)
I idly wondered the other day whether it would be possible to write a map editor for Ocean Software's N.O.M.A.D. On examination, the internal format looks reasonably straightforward, so I'll document what I've learned here. Actually writing the editor is left as an exercise for the interested reader.
Rooms
N.O.M.A.D. has 80 rooms, numbered 1-80. Room 1 is the start room; room 80 is Gross's lair.
The room layouts are stored in a table from 0A7A8h to 0BBA7h, with 64 bytes per room. Each room is stored as an 8x8 grid of tiles, with tile 0 being empty space and tiles 01h-8Bh forming elements of the room.
Tiles 6Fh-80h are used for static meanies (guns, magenta discs and missile launchers) and should be initialised from the Static Meanies table below.
Exits are held in a table from 0E918h to 0EA57h, with four bytes per room. These bytes give, in turn, the room's exits up, right, down and left. Zero indicates there is no exit in a particular direction.
Tiles
The tile designs are held between 0BBA8h and 0E7A2h.
Each tile consists of 72 bytes of bitmap, followed by 9 bytes of attributes. The bitmap is stored in raster form (ie, the first 3 bytes are the top line of the bitmap) rather than as UDGs.
Tiles 62h, 6Ah and 88h are animated. The second frames for these are at 0EB15h, 0EB6Fh and 0EACDh (tiles 97h, 98h and 96h). There is a further tile at 0EA7Ch (95h) which appears to be used for animating Cyrus's face (tile 84h) but I'm not clear when / if it's used.
Static Meanies
The table of initial meanie positions is from 0E7A6h to 0E913h. There are three bytes per meanie:
DB room DB position ; (0-64, y*8+x) DB tile ; Usually 6Fh-76h
The meanies are generated from this table at game start.
Killer Robots
The killer robots are described in a table at 0A714h. There are 10 entries, with five bytes per entry:
DB flag DB room DB x-coordinate ;in pixels DB y-coordinate ;in pixels DB direction ;Direction of movement
The flag is set to 1 if N.O.M.A.D. has been in a higher-numbered room than the one containing the robot.
Doors and Switches
There is a table of doors from 9A4Fh-9A6Ah, with four bytes per door:
DB room ;where the door is DB x-coordinate ;in pixels DB y-coordinate ;in pixels DB switch ;The identity of the switch controlling that ;particular door.
It is followed at 9A6Bh immediately by a table of switches, in the same format:
DB room ;where the switch is DB x-coordinate ;in pixels DB y-coordinate ;in pixels DB switch ;The identity of that switch
Doors are only refreshed when N.O.M.A.D. enters a room, so a switch should not be put in the same room as the door it controls.
Restart points
There are four restart points, in a table at 8791h with three bytes per entry:
DB room DB x-coordinate ;in pixels DB y-coordinate ;in pixels
If N.O.M.A.D. loses a life, it will be sent to the highest-numbered restart point whose room number is less than or equal to the room where it died.
Other Graphics
The bitmap for the right-hand side of the screen (score / lives display) is at 0F400h, with its attributes at 0FA00h.
The bitmaps for moving sprites (bullets, missiles, robots and N.O.M.A.D itself) are at 0FA80h; they are copied to a working buffer at 5EC0h when the game begins.
John Elliott 2020-09-07