swtpc8212: fixed crash on exit if you adjust a dipswitch. Validation should mark switch 0 as invalid but doesn't.

This commit is contained in:
Robbbert 2022-04-27 19:50:12 +10:00
parent d80e72ce23
commit 1b3081129d

View File

@ -456,7 +456,7 @@ INPUT_PORTS_START(swtpc8212)
PORT_BIT(0x8000U, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("+ / CR") PORT_CHANGED_MEMBER(DEVICE_SELF, swtpc8212_device, keypad_changed, 0)
PORT_START("DIP_SWITCHES")
PORT_DIPNAME(0x1f, 0x19, "Baud Rate") PORT_DIPLOCATION("DIP:4,3,2,1,0")
PORT_DIPNAME(0x1f, 0x19, "Baud Rate") PORT_DIPLOCATION("DIP:5,4,3,2,1")
PORT_DIPSETTING(0x04, "110")
PORT_DIPSETTING(0x0a, "300")
PORT_DIPSETTING(0x0d, "600")
@ -467,13 +467,13 @@ INPUT_PORTS_START(swtpc8212)
PORT_DIPSETTING(0x19, "9600")
PORT_DIPSETTING(0x1c, "19200")
PORT_DIPSETTING(0x1f, "38400")
PORT_DIPNAME(0x20, 0x00, "Mode switch") PORT_DIPLOCATION("DIP:5")
PORT_DIPNAME(0x20, 0x00, "Mode switch") PORT_DIPLOCATION("DIP:6")
PORT_DIPSETTING(0x00, "Conversational")
PORT_DIPSETTING(0x20, "Page edit")
PORT_DIPNAME(0x40, 0x00, "No Parity") PORT_DIPLOCATION("DIP:6")
PORT_DIPNAME(0x40, 0x00, "No Parity") PORT_DIPLOCATION("DIP:7")
PORT_DIPSETTING(0x00, "No Parity")
PORT_DIPSETTING(0x40, "Parity")
PORT_DIPNAME(0x80, 0x00, "Parity Select") PORT_DIPLOCATION("DIP:7")
PORT_DIPNAME(0x80, 0x00, "Parity Select") PORT_DIPLOCATION("DIP:8")
PORT_DIPSETTING(0x00, "Odd or Mark")
PORT_DIPSETTING(0x80, "Even or Space")