trunk/src/mame/drivers/atari_s1.c
r18332 | r18333 | |
79 | 79 | static INPUT_PORTS_START( atari_s1 ) |
80 | 80 | // need to fix these, the manual has a lot of mistakes |
81 | 81 | PORT_START("INP00") |
82 | | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test") PORT_CODE(KEYCODE_0) |
| 82 | PORT_DIPNAME( 0x80, 0x80, "2000" ) |
| 83 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 84 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
83 | 85 | PORT_START("INP01") |
84 | | PORT_DIPNAME( 0x80, 0x80, "Spelling Award" ) |
| 86 | PORT_DIPNAME( 0x80, 0x80, "Spelling Award" ) // actually = coins |
85 | 87 | PORT_DIPSETTING( 0x80, "Extra Ball" ) |
86 | 88 | PORT_DIPSETTING( 0x00, "20,000 points" ) |
87 | 89 | PORT_START("INP02") |
88 | | PORT_DIPNAME( 0x80, 0x80, "Last Ball double bonus" ) |
| 90 | PORT_DIPNAME( 0x80, 0x80, "Last Ball double bonus" ) // actually = match |
89 | 91 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
90 | 92 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
91 | 93 | PORT_START("INP03") |
92 | 94 | // This switch together with INP4C thru 4F, sets the scores at which a replay is awarded |
93 | | PORT_DIPNAME( 0x80, 0x80, "Replay score" ) |
| 95 | PORT_DIPNAME( 0x80, 0x80, "Replay score" ) // actually = number of balls |
94 | 96 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
95 | 97 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
96 | 98 | // These 2 dips control max number of credits (both off = 8; then 12, 15, both on=20) |
r18332 | r18333 | |
295 | 297 | |
296 | 298 | TIMER_DEVICE_CALLBACK_MEMBER( atari_s1_state::nmi ) |
297 | 299 | { |
| 300 | static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0, 0, 0, 0, 0, 0 }; |
298 | 301 | m_bit6++; |
299 | 302 | m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); |
300 | 303 | |
301 | | static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0, 0, 0, 0, 0, 0 }; |
302 | 304 | m_out_offs++; |
303 | 305 | m_out_offs &= 0x1f; |
304 | | output_set_digit_value(m_out_offs << 1, patterns[m_p_ram[m_out_offs]>>4]); |
305 | | output_set_digit_value((m_out_offs << 1)+1, patterns[m_p_ram[m_out_offs]&15]); |
| 306 | if ((m_out_offs & 3) == 3) |
| 307 | { |
| 308 | char wordnum[8]; |
| 309 | sprintf(wordnum,"text%d",m_out_offs>>2); |
| 310 | output_set_value(wordnum, !(m_p_ram[m_out_offs]==8)); |
| 311 | } |
| 312 | else |
| 313 | { |
| 314 | output_set_digit_value(m_out_offs << 1, patterns[m_p_ram[m_out_offs]>>4]); |
| 315 | output_set_digit_value((m_out_offs << 1)+1, patterns[m_p_ram[m_out_offs]&15]); |
| 316 | } |
306 | 317 | } |
307 | 318 | |
308 | 319 | static MACHINE_CONFIG_START( atari_s1, atari_s1_state ) |