Previous 15994 Revisions Next

r15957 Saturday 18th August, 2012 at 18:49:34 UTC by Sandro Ronco
hr16: documented LEDs port. (nw)
[src/mess/drivers]alesis.c

src/mess/drivers/alesis.c
r15956r15957
2525   virtual void machine_reset();
2626
2727   DECLARE_DRIVER_INIT(hr16);
28   DECLARE_WRITE8_MEMBER( led_w );
2829   DECLARE_WRITE8_MEMBER( kb_matrix_w );
2930   DECLARE_READ8_MEMBER( kb_r );
3031
r15956r15957
5657   return data;
5758}
5859
60WRITE8_MEMBER( alesis_state::led_w )
61{
62   output_set_value("patt_led",  data & 0x01 ? 1 : 0);
63   output_set_value("song_led",  data & 0x01 ? 0 : 1);
64   output_set_value("play_led",  data & 0x02 ? 0 : 1);
65   output_set_value("record_led",data & 0x04 ? 0 : 1);
66   output_set_value("voice_led", data & 0x08 ? 0 : 1);
67   output_set_value("tune_led",  data & 0x10 ? 0 : 1);
68   output_set_value("mix_led",   data & 0x20 ? 0 : 1);
69   output_set_value("tempo_led", data & 0x40 ? 0 : 1);
70   output_set_value("midi_led",  data & 0x80 ? 0 : 1);
71}
5972
6073static ADDRESS_MAP_START(hr16_mem, AS_PROGRAM, 8, alesis_state)
6174   ADDRESS_MAP_UNMAP_HIGH
r15956r15957
6780   AM_RANGE(0x0000, 0x0000) AM_READ(kb_r)
6881   AM_RANGE(0x0006, 0x0006) AM_DEVREADWRITE("hd44780", hd44780_device, control_read, control_write)
6982   AM_RANGE(0x0007, 0x0007) AM_DEVREADWRITE("hd44780", hd44780_device, data_read, data_write)
83   AM_RANGE(0x0004, 0x0004) AM_WRITE(led_w)
7084   AM_RANGE(0x0008, 0x0008) AM_WRITE(kb_matrix_w)
7185   AM_RANGE(0x8000, 0xffff) AM_RAM      /* 32Kx8 SRAM */
7286ADDRESS_MAP_END

Previous 15994 Revisions Next


© 1998-2018 The MESS Team