A main controller sends a “rewrite mode” command to an engine controller. Receiving the command, the engine controller 12 sends a “roger” status. This switches the mode from a print mode to a rewrite mode. In the rewrite mode, the engine controller 12 serves as a master and the main controller 11 serves as a slave, a communication which is necessary for rewriting of firmware takes place between the two, and the firmware is rewritten.