trunk/src/mess/machine/kb_msnat.c
| r20476 | r20477 | |
| 226 | 226 | ROM_END |
| 227 | 227 | |
| 228 | 228 | |
| 229 | | pc_kbd_microsoft_natural_device::pc_kbd_microsoft_natural_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 230 | | device_t(mconfig, PC_KBD_MICROSOFT_NATURAL, "Microsoft Natural Keyboard", tag, owner, clock ), |
| 231 | | device_pc_kbd_interface(mconfig, *this), |
| 232 | | m_cpu(*this, "ms_natrl_cpu") |
| 229 | pc_kbd_microsoft_natural_device::pc_kbd_microsoft_natural_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 230 | : device_t(mconfig, PC_KBD_MICROSOFT_NATURAL, "Microsoft Natural Keyboard", tag, owner, clock ) |
| 231 | , device_pc_kbd_interface(mconfig, *this) |
| 232 | , m_cpu(*this, "ms_natrl_cpu") |
| 233 | , m_p2_0(*this, "P2.0") |
| 234 | , m_p2_1(*this, "P2.1") |
| 235 | , m_p2_2(*this, "P2.2") |
| 236 | , m_p2_3(*this, "P2.3") |
| 237 | , m_p2_4(*this, "P2.4") |
| 238 | , m_p2_5(*this, "P2.5") |
| 239 | , m_p2_6(*this, "P2.6") |
| 240 | , m_p2_7(*this, "P2.7") |
| 241 | , m_p1_0(*this, "P1.0") |
| 242 | , m_p1_1(*this, "P1.1") |
| 243 | , m_p1_2(*this, "P1.2") |
| 244 | , m_p1_3(*this, "P1.3") |
| 245 | , m_p1_4(*this, "P1.4") |
| 246 | , m_p1_5(*this, "P1.5") |
| 247 | , m_p1_6(*this, "P1.6") |
| 248 | , m_p1_7(*this, "P1.7") |
| 233 | 249 | { |
| 234 | 250 | m_shortname = "ms_natural"; |
| 235 | 251 | } |
| r20476 | r20477 | |
| 305 | 321 | |
| 306 | 322 | if ( ! ( m_p2 & 0x01 ) ) |
| 307 | 323 | { |
| 308 | | data &= ioport( "P2.0" )->read(); |
| 324 | data &= m_p2_0->read(); |
| 309 | 325 | } |
| 310 | 326 | |
| 311 | 327 | if ( ! ( m_p2 & 0x02 ) ) |
| 312 | 328 | { |
| 313 | | data &= ioport( "P2.1" )->read(); |
| 329 | data &= m_p2_1->read(); |
| 314 | 330 | } |
| 315 | 331 | |
| 316 | 332 | if ( ! ( m_p2 & 0x04 ) ) |
| 317 | 333 | { |
| 318 | | data &= ioport( "P2.2" )->read(); |
| 334 | data &= m_p2_2->read(); |
| 319 | 335 | } |
| 320 | 336 | |
| 321 | 337 | if ( ! ( m_p2 & 0x08 ) ) |
| 322 | 338 | { |
| 323 | | data &= ioport( "P2.3" )->read(); |
| 339 | data &= m_p2_3->read(); |
| 324 | 340 | } |
| 325 | 341 | |
| 326 | 342 | if ( ! ( m_p2 & 0x10 ) ) |
| 327 | 343 | { |
| 328 | | data &= ioport( "P2.4" )->read(); |
| 344 | data &= m_p2_4->read(); |
| 329 | 345 | } |
| 330 | 346 | |
| 331 | 347 | if ( ! ( m_p2 & 0x20 ) ) |
| 332 | 348 | { |
| 333 | | data &= ioport( "P2.5" )->read(); |
| 349 | data &= m_p2_5->read(); |
| 334 | 350 | } |
| 335 | 351 | |
| 336 | 352 | if ( ! ( m_p2 & 0x40 ) ) |
| 337 | 353 | { |
| 338 | | data &= ioport( "P2.6" )->read(); |
| 354 | data &= m_p2_6->read(); |
| 339 | 355 | } |
| 340 | 356 | |
| 341 | 357 | if ( ! ( m_p2 & 0x80 ) ) |
| 342 | 358 | { |
| 343 | | data &= ioport( "P2.7" )->read(); |
| 359 | data &= m_p2_7->read(); |
| 344 | 360 | } |
| 345 | 361 | |
| 346 | 362 | if ( ! ( m_p1 & 0x01 ) ) |
| 347 | 363 | { |
| 348 | | data &= ioport( "P1.0" )->read(); |
| 364 | data &= m_p1_0->read(); |
| 349 | 365 | } |
| 350 | 366 | |
| 351 | 367 | if ( ! ( m_p1 & 0x02 ) ) |
| 352 | 368 | { |
| 353 | | data &= ioport( "P1.1" )->read(); |
| 369 | data &= m_p1_1->read(); |
| 354 | 370 | } |
| 355 | 371 | |
| 356 | 372 | if ( ! ( m_p1 & 0x04 ) ) |
| 357 | 373 | { |
| 358 | | data &= ioport( "P1.2" )->read(); |
| 374 | data &= m_p1_2->read(); |
| 359 | 375 | } |
| 360 | 376 | |
| 361 | 377 | if ( ! ( m_p1 & 0x08 ) ) |
| 362 | 378 | { |
| 363 | | data &= ioport( "P1.3" )->read(); |
| 379 | data &= m_p1_3->read(); |
| 364 | 380 | } |
| 365 | 381 | |
| 366 | 382 | if ( ! ( m_p1 & 0x10 ) ) |
| 367 | 383 | { |
| 368 | | data &= ioport( "P1.4" )->read(); |
| 384 | data &= m_p1_4->read(); |
| 369 | 385 | } |
| 370 | 386 | |
| 371 | 387 | if ( ! ( m_p1 & 0x20 ) ) |
| 372 | 388 | { |
| 373 | | data &= ioport( "P1.5" )->read(); |
| 389 | data &= m_p1_5->read(); |
| 374 | 390 | } |
| 375 | 391 | |
| 376 | 392 | if ( ! ( m_p1 & 0x40 ) ) |
| 377 | 393 | { |
| 378 | | data &= ioport( "P1.6" )->read(); |
| 394 | data &= m_p1_6->read(); |
| 379 | 395 | } |
| 380 | 396 | |
| 381 | 397 | if ( ! ( m_p1 & 0x80 ) ) |
| 382 | 398 | { |
| 383 | | data &= ioport( "P1.7" )->read(); |
| 399 | data &= m_p1_7->read(); |
| 384 | 400 | } |
| 385 | 401 | |
| 386 | 402 | return data; |