This is simply adding a line describing your device. The joystick description line is:
device joy0 at isa? port "IO_GAME"This says we have a device called ``joy0'' on the isa bus using io-port ``IO_GAME'' (IO_GAME is a macro defined in /usr/src/sys/i386/isa/isa.h).
A slightly more complicated entry is for the ``ix'' driver:
device ix0 at isa? port 0x300 net irq 10 iomem 0xd0000 iosiz 32768 vector ixintrThis says that we have a device called `ix0' on the ISA bus. It uses io-port 0x300. It's interrupt will be masked with other devices in the network class. It uses interrupt 10. It uses 32k of shared memory at physical address 0xd0000. It also defines it's interrupt handler to be ``ixintr()''