trunk/src/mame/machine/deco104.c
| r24580 | r24581 | |
| 1086 | 1086 | |
| 1087 | 1087 | |
| 1088 | 1088 | |
| 1089 | | |
| 1090 | | /**********************************************************************************/ |
| 1091 | | |
| 1092 | | |
| 1093 | | /**********************************************************************************/ |
| 1094 | | |
| 1095 | | |
| 1096 | | /**********************************************************************************/ |
| 1097 | | |
| 1098 | | static UINT16 deco16_prot_ram[0x800]; |
| 1099 | | |
| 1100 | | READ16_HANDLER( deco16_104_pktgaldx_prot_r ) |
| 1101 | | { |
| 1102 | | const UINT16* prot_ram=deco16_prot_ram; |
| 1103 | | switch (offset * 2) |
| 1104 | | { |
| 1105 | | case 0x5b2: return space.machine().root_device().ioport("SYSTEM")->read(); |
| 1106 | | case 0x44c: return space.machine().root_device().ioport("DSW")->read(); |
| 1107 | | case 0x042: return space.machine().root_device().ioport("INPUTS")->read(); |
| 1108 | | |
| 1109 | | case 0x510: return DECO_PORT(0); |
| 1110 | | case 0x51a: return DECO_PORT(2); |
| 1111 | | } |
| 1112 | | |
| 1113 | | logerror("Protection PC %06x: warning - read unmapped memory address %04x\n", space.device().safe_pc(), offset<<1); |
| 1114 | | |
| 1115 | | return 0; |
| 1116 | | } |
| 1117 | | |
| 1118 | | WRITE16_HANDLER( deco16_104_pktgaldx_prot_w ) |
| 1119 | | { |
| 1120 | | COMBINE_DATA(&deco16_prot_ram[offset]); |
| 1121 | | // logerror("Protection PC %06x: warning - write unmapped memory address %04x %04x\n",space.device().safe_pc(),offset<<1,data); |
| 1122 | | |
| 1123 | | } |
| 1124 | | |
| 1125 | | /**********************************************************************************/ |
| 1126 | | |
| 1127 | | |
trunk/src/mame/includes/pktgaldx.h
| r24580 | r24581 | |
| 51 | 51 | UINT32 screen_update_pktgaldx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 52 | 52 | UINT32 screen_update_pktgaldb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 53 | 53 | |
| 54 | | READ16_MEMBER( pktgaldx_protection_region_0_104_r ); |
| 55 | | WRITE16_MEMBER( pktgaldx_protection_region_0_104_w ); |
| 54 | READ16_MEMBER( pktgaldx_protection_region_f_104_r ); |
| 55 | WRITE16_MEMBER( pktgaldx_protection_region_f_104_w ); |
| 56 | 56 | }; |
trunk/src/mame/drivers/pktgaldx.c
| r24580 | r24581 | |
| 67 | 67 | |
| 68 | 68 | /**********************************************************************************/ |
| 69 | 69 | |
| 70 | READ16_MEMBER( pktgaldx_state::pktgaldx_protection_region_f_104_r ) |
| 71 | { |
| 72 | int real_address = 0 + (offset *2); |
| 73 | UINT8 cs = 0; |
| 74 | UINT16 data = m_deco104->read_data( real_address&0x7fff, mem_mask, cs ); |
| 75 | return data; |
| 76 | } |
| 77 | |
| 78 | WRITE16_MEMBER( pktgaldx_state::pktgaldx_protection_region_f_104_w ) |
| 79 | { |
| 80 | int real_address = 0 + (offset *2); |
| 81 | UINT8 cs = 0; |
| 82 | m_deco104->write_data( space, real_address&0x7fff, data, mem_mask, cs ); |
| 83 | } |
| 84 | |
| 85 | |
| 70 | 86 | static ADDRESS_MAP_START( pktgaldx_map, AS_PROGRAM, 16, pktgaldx_state ) |
| 71 | 87 | AM_RANGE(0x000000, 0x07ffff) AM_ROM |
| 72 | 88 | |
| r24580 | r24581 | |
| 85 | 101 | |
| 86 | 102 | AM_RANGE(0x161800, 0x16180f) AM_DEVWRITE("tilegen1", deco16ic_device, pf_control_w) |
| 87 | 103 | AM_RANGE(0x164800, 0x164801) AM_WRITE(pktgaldx_oki_bank_w) |
| 88 | | AM_RANGE(0x167800, 0x167fff) AM_READWRITE_LEGACY(deco16_104_pktgaldx_prot_r,deco16_104_pktgaldx_prot_w) AM_SHARE("prot16ram") |
| 104 | |
| 105 | // AM_RANGE(0x166000, 0x1667ff) AM_READWRITE(pktgaldx_protection_region_c_104_r,pktgaldx_protection_region_c_104_w) /* Protection device - chip select / config bank for it.. */ |
| 106 | AM_RANGE(0x167800, 0x167fff) AM_READWRITE(pktgaldx_protection_region_f_104_r,pktgaldx_protection_region_f_104_w) AM_SHARE("prot16ram") /* Protection device */ |
| 107 | |
| 89 | 108 | AM_RANGE(0x170000, 0x17ffff) AM_RAM |
| 90 | 109 | ADDRESS_MAP_END |
| 91 | 110 | |
| r24580 | r24581 | |
| 334 | 353 | decospr_device::set_gfx_region(*device, 2); |
| 335 | 354 | |
| 336 | 355 | MCFG_DECO104_ADD("ioprot104") |
| 356 | MCFG_DECO146_SET_INTERFACE_SCRAMBLE(8,9, 4,5,6,7 ,1,0,3,2) // hopefully this is correct, nothing else uses this arrangement! |
| 337 | 357 | |
| 338 | 358 | /* sound hardware */ |
| 339 | 359 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |