start of rom server code