src/mess/audio/intv.c
| r12848 | r12849 | |
| 1 | | #include "emu.h" |
| 2 | | #include "video/stic.h" |
| 3 | | #include "includes/intv.h" |
| 4 | | #include "sound/ay8910.h" |
| 5 | | |
| 6 | | /* The Intellivision has a AY-3-8914, which is the same |
| 7 | | * as the AY-3-8910, _except_ the registers are remapped as follows! |
| 8 | | * |
| 9 | | * also, the CP1610 can directly address the registers, |
| 10 | | * instead of needing a control and data port |
| 11 | | */ |
| 12 | | |
| 13 | | static const int mapping8914to8910[16] = { 0, 2, 4, 11, 1, 3, 5, 12, 7, 6, 13, 8, 9, 10, 14, 15 }; |
| 14 | | |
| 15 | | READ16_DEVICE_HANDLER( AY8914_directread_port_0_lsb_r ) |
| 16 | | { |
| 17 | | UINT16 rv; |
| 18 | | ay8910_address_w(device, 0, mapping8914to8910[offset & 0xff]); |
| 19 | | rv = (UINT16)ay8910_r(device, 0); |
| 20 | | return rv; |
| 21 | | } |
| 22 | | |
| 23 | | WRITE16_DEVICE_HANDLER( AY8914_directwrite_port_0_lsb_w ) |
| 24 | | { |
| 25 | | ay8910_address_w(device, 0, mapping8914to8910[offset & 0xff]); |
| 26 | | ay8910_data_w(device, 0, data & 0xff); |
| 27 | | } |