Yes, 0 1 8 5 Quit emulator should quit. Curious why it’s not working for you. Do any of the buttons Quit the emulator other than 8? Maybe the mapping is wrong.

What buttons on your layout do you want for your commands?
Speed settings&Warp mode
Machine settings&Joystick settings&Swap joystick ports
Snapshot&Quickload snapshot.vsf
Snapshot&Quicksave snapshot.vsf
Quit emulator

ie, P1-8 Quit Emulator

Also, are you having any issues with your joystick behaving weird? Looks like your joysticks are double mapped to the u/d/l/r directions. I’d be curious to see your joypad config file too. Anyway, get back to me on your button mappings and I’ll give you a test file to try.