trunk/src/mame/drivers/namcos12.c
| r29503 | r29504 | |
| 1498 | 1498 | |
| 1499 | 1499 | static ADDRESS_MAP_START( s12h8iomap, AS_IO, 16, namcos12_state ) |
| 1500 | 1500 | AM_RANGE(h8_device::PORT_7, h8_device::PORT_7) AM_READ_PORT("DSW") |
| 1501 | | AM_RANGE(h8_device::PORT_8, h8_device::PORT_8) AM_READ(s12_mcu_p8_r ) AM_WRITENOP |
| 1502 | | AM_RANGE(h8_device::PORT_A, h8_device::PORT_A) AM_READWRITE(s12_mcu_pa_r, s12_mcu_pa_w ) |
| 1503 | | AM_RANGE(h8_device::PORT_B, h8_device::PORT_B) AM_READWRITE(s12_mcu_portB_r, s12_mcu_portB_w ) |
| 1501 | AM_RANGE(h8_device::PORT_8, h8_device::PORT_8) AM_READ(s12_mcu_p8_r) AM_WRITENOP |
| 1502 | AM_RANGE(h8_device::PORT_A, h8_device::PORT_A) AM_READWRITE(s12_mcu_pa_r, s12_mcu_pa_w) |
| 1503 | AM_RANGE(h8_device::PORT_B, h8_device::PORT_B) AM_READWRITE(s12_mcu_portB_r, s12_mcu_portB_w) |
| 1504 | 1504 | AM_RANGE(h8_device::ADC_0, h8_device::ADC_0) AM_NOP |
| 1505 | 1505 | AM_RANGE(h8_device::ADC_1, h8_device::ADC_1) AM_NOP |
| 1506 | 1506 | AM_RANGE(h8_device::ADC_2, h8_device::ADC_2) AM_NOP |
| r29503 | r29504 | |
| 1508 | 1508 | ADDRESS_MAP_END |
| 1509 | 1509 | |
| 1510 | 1510 | |
| 1511 | | /* Golgo 13 lightgun inputs |
| 1512 | | * |
| 1513 | | * Note: The H8/3002's ADC is 10 bits wide, but |
| 1514 | | * it expects the 10-bit value to be left-justified |
| 1515 | | * within the 16-bit word. |
| 1516 | | */ |
| 1511 | // Golgo 13 lightgun inputs |
| 1517 | 1512 | |
| 1518 | 1513 | READ16_MEMBER(namcos12_state::s12_mcu_gun_h_r) |
| 1519 | 1514 | { |
| 1520 | | return ioport("LIGHT0_X")->read() << 2; |
| 1515 | return ioport("LIGHT0_X")->read(); |
| 1521 | 1516 | } |
| 1522 | 1517 | |
| 1523 | 1518 | READ16_MEMBER(namcos12_state::s12_mcu_gun_v_r) |
| 1524 | 1519 | { |
| 1525 | | return ioport("LIGHT0_Y")->read() << 2; |
| 1520 | return ioport("LIGHT0_Y")->read(); |
| 1526 | 1521 | } |
| 1527 | 1522 | |
| 1528 | 1523 | static ADDRESS_MAP_START( golgo13_h8iomap, AS_IO, 16, namcos12_state ) |
| 1529 | | AM_RANGE(h8_device::ADC_1, h8_device::ADC_1) AM_READ(s12_mcu_gun_h_r ) |
| 1530 | | AM_RANGE(h8_device::ADC_2, h8_device::ADC_2) AM_READ(s12_mcu_gun_v_r ) |
| 1524 | AM_RANGE(h8_device::ADC_1, h8_device::ADC_1) AM_READ(s12_mcu_gun_h_r) |
| 1525 | AM_RANGE(h8_device::ADC_2, h8_device::ADC_2) AM_READ(s12_mcu_gun_v_r) |
| 1531 | 1526 | |
| 1532 | 1527 | AM_IMPORT_FROM( s12h8iomap ) |
| 1533 | 1528 | ADDRESS_MAP_END |