Previous 15994 Revisions Next

r12692 Sunday 21st August, 2011 at 14:34:51 UTC by Robbbert
WSWAN - fixed some mistakes from earlier.
[src/mess/machine]wswan.c

src/mess/machine/wswan.c
r12691r12692
307307   UINT8 value = m_ws_portram[offset];
308308
309309   if ( offset != 2 )
310   //logerror( "PC=%X: port read %02X\n", cpu_get_pc( &space->device() ), offset );
310      logerror( "PC=%X: port read %02X\n", cpu_get_pc( machine().device("maincpu") ), offset );
311311   switch( offset )
312312   {
313313      case 0x02:      /* Current line */
r12691r12692
852852                   Bit 0-3 - Master volume
853853                   Bit 4-7 - Unknown
854854                */
855         wswan_sound_port_w( mem->machine().device("custom"), offset, data );
855         wswan_sound_port_w( machine().device("custom"), offset, data );
856856         break;
857857      case 0xa0:   /* Hardware type - this is probably read only
858858                   Bit 0   - Enable cartridge slot and/or disable bios
r12691r12692
862862         if ( ( data & 0x01 ) && !m_bios_disabled )
863863         {
864864            m_bios_disabled = 1;
865            memory_set_bankptr( mem->machine(), "bank15", m_ROMMap[ ( ( ( m_ws_portram[0xc0] & 0x0F ) << 4 ) | 15 ) & ( m_ROMBanks - 1 ) ] );
865            memory_set_bankptr( machine(), "bank15", m_ROMMap[ ( ( ( m_ws_portram[0xc0] & 0x0F ) << 4 ) | 15 ) & ( m_ROMBanks - 1 ) ] );
866866         }
867867         break;
868868      case 0xa2:   /* Timer control
r12691r12692
971971         switch( data )
972972         {
973973         case 0x10:   /* Read Y cursors: Y1 - Y2 - Y3 - Y4 */
974            data = data | input_port_read(mem->machine(), "CURSY");
974            data = data | input_port_read(machine(), "CURSY");
975975            break;
976976         case 0x20:   /* Read X cursors: X1 - X2 - X3 - X4 */
977            data = data | input_port_read(mem->machine(), "CURSX");
977            data = data | input_port_read(machine(), "CURSX");
978978            break;
979979         case 0x40:   /* Read buttons: START - A - B */
980            data = data | input_port_read(mem->machine(), "BUTTONS");
980            data = data | input_port_read(machine(), "BUTTONS");
981981            break;
982982         }
983983         break;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team