trunk/src/devices/cpu/am29000/am29ops.h
| r250093 | r250094 | |
| 956 | 956 | |
| 957 | 957 | if (!FREEZE_MODE) |
| 958 | 958 | { |
| 959 | | m_chc = ((m_exec_ir << 8) & 0xff) | |
| 960 | | CHC_LS | |
| 961 | | RA << CHC_TR_SHIFT | |
| 962 | | CHC_CV; |
| 963 | | |
| 959 | m_chc = ((m_exec_ir << 8) & 0xff) | CHC_LS | RA << CHC_TR_SHIFT | CHC_CV; |
| 964 | 960 | m_cha = addr; |
| 965 | 961 | m_chd = r; |
| 966 | 962 | |
| 967 | | if (!(m_cfg & CFG_DW) && (m_exec_ir & INST_SB_BIT)) |
| 968 | | SET_ALU_BP(addr & 3); |
| 963 | if (!(m_cfg & CFG_DW) && INST_SB_BIT) |
| 964 | { |
| 965 | SET_ALU_BP(addr); |
| 966 | } |
| 969 | 967 | } |
| 970 | 968 | |
| 971 | 969 | m_r[RA] = r; |
| 972 | 970 | |
| 973 | 971 | if (m_cfg & CFG_DW) |
| 972 | { |
| 974 | 973 | logerror("DW ON A STORE"); |
| 974 | } |
| 975 | 975 | } |
| 976 | 976 | |
| 977 | 977 | void am29000_cpu_device::LOADL() |
| r250093 | r250094 | |
| 987 | 987 | void am29000_cpu_device::LOADM() |
| 988 | 988 | { |
| 989 | 989 | UINT32 addr = INST_M_BIT ? I8: GET_RB_VAL; |
| 990 | | UINT32 r; |
| 991 | 990 | |
| 992 | 991 | if (INST_UA_BIT) |
| 992 | { |
| 993 | 993 | fatalerror("Am29000: UA bit set on LOAD\n"); |
| 994 | } |
| 994 | 995 | |
| 996 | UINT32 r; |
| 995 | 997 | if (INST_CE_BIT) |
| 996 | 998 | { |
| 997 | 999 | logerror("Am29000: Attempting a co-processor LOAD!\n"); |
| r250093 | r250094 | |
| 1019 | 1021 | { |
| 1020 | 1022 | // TODO |
| 1021 | 1023 | m_chc &= (CHC_CR_MASK << CHC_CR_SHIFT); |
| 1022 | | m_chc |= ((m_exec_ir << 8) & 0xff) | |
| 1023 | | RA << CHC_TR_SHIFT | |
| 1024 | | CHC_CV; |
| 1025 | | |
| 1024 | m_chc |= ((m_exec_ir << 8) & 0xff) | RA << CHC_TR_SHIFT | CHC_CV; |
| 1026 | 1025 | m_cha = addr; |
| 1027 | 1026 | m_chd = r; // ????? |
| 1028 | 1027 | |
| 1029 | | if (!(m_cfg & CFG_DW) && (m_exec_ir & INST_SB_BIT)) |
| 1030 | | SET_ALU_BP(addr & 3); |
| 1028 | if (!(m_cfg & CFG_DW) && INST_SB_BIT) |
| 1029 | { |
| 1030 | SET_ALU_BP(addr); |
| 1031 | } |
| 1031 | 1032 | } |
| 1032 | 1033 | |
| 1033 | 1034 | r = RA; |
| 1034 | 1035 | |
| 1036 | for (INT32 cnt = 0; cnt <= GET_CHC_CR; ++cnt) |
| 1035 | 1037 | { |
| 1036 | | int cnt; |
| 1037 | | for (cnt = 0; cnt <= GET_CHC_CR; ++cnt) |
| 1038 | | { |
| 1039 | | m_r[r] = m_data->read_dword(addr); |
| 1038 | m_r[r] = m_data->read_dword(addr); |
| 1040 | 1039 | |
| 1041 | 1040 | // SET_CHC_CR(cnt - 1); |
| 1042 | | addr += 4; |
| 1041 | addr += 4; |
| 1043 | 1042 | |
| 1044 | | if (++r == 256) |
| 1045 | | r = 128; |
| 1043 | if (++r == 256) |
| 1044 | { |
| 1045 | r = 128; |
| 1046 | 1046 | } |
| 1047 | 1047 | } |
| 1048 | 1048 | } |
| r250093 | r250094 | |
| 1050 | 1050 | void am29000_cpu_device::STORE() |
| 1051 | 1051 | { |
| 1052 | 1052 | UINT32 addr = INST_M_BIT ? I8: GET_RB_VAL; |
| 1053 | | // UINT32 r; |
| 1054 | 1053 | |
| 1055 | 1054 | if (INST_UA_BIT) |
| 1055 | { |
| 1056 | 1056 | fatalerror("Am29000: UA bit set on LOAD\n"); |
| 1057 | } |
| 1057 | 1058 | |
| 1058 | 1059 | if (INST_CE_BIT) |
| 1059 | 1060 | { |
| 1060 | 1061 | logerror("Am29000: Attempting a co-processor LOAD!\n"); |
| 1061 | | // r = 0; |
| 1062 | 1062 | } |
| 1063 | 1063 | else |
| 1064 | 1064 | { |
| r250093 | r250094 | |
| 1073 | 1073 | SIGNAL_EXCEPTION(EXCEPTION_PROTECTION_VIOLATION); |
| 1074 | 1074 | return; |
| 1075 | 1075 | } |
| 1076 | | |
| 1077 | 1076 | } |
| 1078 | 1077 | } |
| 1079 | 1078 | |
| r250093 | r250094 | |
| 1081 | 1080 | |
| 1082 | 1081 | if (!FREEZE_MODE) |
| 1083 | 1082 | { |
| 1084 | | m_chc = ((m_exec_ir << 8) & 0xff) | |
| 1085 | | RA << CHC_TR_SHIFT | |
| 1086 | | CHC_CV; |
| 1087 | | |
| 1083 | m_chc = ((m_exec_ir << 8) & 0xff) | RA << CHC_TR_SHIFT | CHC_CV; |
| 1088 | 1084 | m_cha = addr; |
| 1089 | 1085 | |
| 1090 | | if (!(m_cfg & CFG_DW) && (m_exec_ir & INST_SB_BIT)) |
| 1091 | | SET_ALU_BP(addr & 3); |
| 1086 | if (!(m_cfg & CFG_DW) && INST_SB_BIT) |
| 1087 | { |
| 1088 | SET_ALU_BP(addr); |
| 1089 | } |
| 1092 | 1090 | } |
| 1093 | 1091 | |
| 1094 | 1092 | if (m_cfg & CFG_DW) |
| 1093 | { |
| 1095 | 1094 | logerror("DW ON A STORE"); |
| 1095 | } |
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | 1098 | void am29000_cpu_device::STOREL() |
| r250093 | r250094 | |
| 1103 | 1103 | void am29000_cpu_device::STOREM() |
| 1104 | 1104 | { |
| 1105 | 1105 | UINT32 addr = INST_M_BIT ? I8: GET_RB_VAL; |
| 1106 | | UINT32 r; |
| 1107 | 1106 | |
| 1108 | 1107 | if (INST_UA_BIT) |
| 1108 | { |
| 1109 | 1109 | fatalerror("Am29000: UA bit set on LOAD\n"); |
| 1110 | } |
| 1110 | 1111 | |
| 1112 | UINT32 r; |
| 1111 | 1113 | if (INST_CE_BIT) |
| 1112 | 1114 | { |
| 1113 | 1115 | logerror("Am29000: Attempting a co-processor LOAD!\n"); |
| r250093 | r250094 | |
| 1126 | 1128 | SIGNAL_EXCEPTION(EXCEPTION_PROTECTION_VIOLATION); |
| 1127 | 1129 | return; |
| 1128 | 1130 | } |
| 1129 | | |
| 1130 | 1131 | } |
| 1131 | 1132 | } |
| 1132 | 1133 | |
| r250093 | r250094 | |
| 1134 | 1135 | { |
| 1135 | 1136 | // TODO |
| 1136 | 1137 | m_chc &= (CHC_CR_MASK << CHC_CR_SHIFT); |
| 1137 | | m_chc |= ((m_exec_ir << 8) & 0xff) | |
| 1138 | | RA << CHC_TR_SHIFT | |
| 1139 | | CHC_CV; |
| 1140 | | |
| 1138 | m_chc |= ((m_exec_ir << 8) & 0xff) | RA << CHC_TR_SHIFT | CHC_CV; |
| 1141 | 1139 | m_cha = addr; |
| 1142 | 1140 | |
| 1143 | | if (!(m_cfg & CFG_DW) && (m_exec_ir & INST_SB_BIT)) |
| 1144 | | SET_ALU_BP(addr & 3); |
| 1141 | if (!(m_cfg & CFG_DW) && INST_SB_BIT) |
| 1142 | { |
| 1143 | SET_ALU_BP(addr); |
| 1144 | } |
| 1145 | 1145 | } |
| 1146 | 1146 | |
| 1147 | 1147 | r = RA; |
| 1148 | 1148 | |
| 1149 | for (INT32 cnt = 0; cnt <= GET_CHC_CR; ++cnt) |
| 1149 | 1150 | { |
| 1150 | | int cnt; |
| 1151 | | for (cnt = 0; cnt <= GET_CHC_CR; ++cnt) |
| 1152 | | { |
| 1153 | | m_data->write_dword(addr, m_r[r]); |
| 1151 | m_data->write_dword(addr, m_r[r]); |
| 1154 | 1152 | |
| 1155 | | // SET_CHC_CR(cnt - 1); |
| 1156 | | addr += 4; |
| 1153 | addr += 4; |
| 1157 | 1154 | |
| 1158 | | if (++r == 256) |
| 1159 | | r = 128; |
| 1155 | if (++r == 256) |
| 1156 | { |
| 1157 | r = 128; |
| 1160 | 1158 | } |
| 1161 | 1159 | } |
| 1162 | 1160 | } |
trunk/src/devices/cpu/avr8/avr8dasm.c
| r250093 | r250094 | |
| 592 | 592 | switch(op & 0x0007) |
| 593 | 593 | { |
| 594 | 594 | case 0x0000: |
| 595 | | output += sprintf( output, "BRLO %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 595 | output += sprintf( output, "BRLO %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 596 | 596 | break; |
| 597 | 597 | case 0x0001: |
| 598 | | output += sprintf( output, "BREQ %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 598 | output += sprintf( output, "BREQ %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 599 | 599 | break; |
| 600 | 600 | case 0x0002: |
| 601 | | output += sprintf( output, "BRMI %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 601 | output += sprintf( output, "BRMI %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 602 | 602 | break; |
| 603 | 603 | case 0x0003: |
| 604 | | output += sprintf( output, "BRVS %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 604 | output += sprintf( output, "BRVS %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 605 | 605 | break; |
| 606 | 606 | case 0x0004: |
| 607 | | output += sprintf( output, "BRLT %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 607 | output += sprintf( output, "BRLT %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 608 | 608 | break; |
| 609 | 609 | case 0x0005: |
| 610 | | output += sprintf( output, "BRHS %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 610 | output += sprintf( output, "BRHS %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 611 | 611 | break; |
| 612 | 612 | case 0x0006: |
| 613 | | output += sprintf( output, "BRTS %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 613 | output += sprintf( output, "BRTS %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 614 | 614 | break; |
| 615 | 615 | case 0x0007: |
| 616 | | output += sprintf( output, "BRIE %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 616 | output += sprintf( output, "BRIE %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 617 | 617 | break; |
| 618 | 618 | } |
| 619 | 619 | break; |
| r250093 | r250094 | |
| 621 | 621 | switch(op & 0x0007) |
| 622 | 622 | { |
| 623 | 623 | case 0x0000: |
| 624 | | output += sprintf( output, "BRSH %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 624 | output += sprintf( output, "BRSH %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 625 | 625 | break; |
| 626 | 626 | case 0x0001: |
| 627 | | output += sprintf( output, "BRNE %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 627 | output += sprintf( output, "BRNE %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 628 | 628 | break; |
| 629 | 629 | case 0x0002: |
| 630 | | output += sprintf( output, "BRPL %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 630 | output += sprintf( output, "BRPL %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 631 | 631 | break; |
| 632 | 632 | case 0x0003: |
| 633 | | output += sprintf( output, "BRVC %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 633 | output += sprintf( output, "BRVC %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 634 | 634 | break; |
| 635 | 635 | case 0x0004: |
| 636 | | output += sprintf( output, "BRGE %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 636 | output += sprintf( output, "BRGE %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 637 | 637 | break; |
| 638 | 638 | case 0x0005: |
| 639 | | output += sprintf( output, "BRHC %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 639 | output += sprintf( output, "BRHC %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 640 | 640 | break; |
| 641 | 641 | case 0x0006: |
| 642 | | output += sprintf( output, "BRTC %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 642 | output += sprintf( output, "BRTC %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 643 | 643 | break; |
| 644 | 644 | case 0x0007: |
| 645 | | output += sprintf( output, "BRID %08x", (((op & 0x0200) ? ((KCONST7(op) & 0x007f) | 0xff80) : KCONST7(op)) << 1) ); |
| 645 | output += sprintf( output, "BRID %08x", (((op & 0x0200) ? (KCONST7(op) | 0xff80) : KCONST7(op)) << 1) ); |
| 646 | 646 | break; |
| 647 | 647 | } |
| 648 | 648 | break; |
trunk/src/mame/machine/namcoio.c
| r250093 | r250094 | |
| 285 | 285 | |
| 286 | 286 | //popmessage("%x %x %x %x %x %x %x %x",IORAM_READ(8),IORAM_READ(9),IORAM_READ(10),IORAM_READ(11),IORAM_READ(12),IORAM_READ(13),IORAM_READ(14),IORAM_READ(15)); |
| 287 | 287 | |
| 288 | | m_out_0_cb((offs_t)0, IORAM_READ(9) & 0x0f); // output to pins 13-16 (motos, pacnpal, gaplus) |
| 289 | | m_out_1_cb((offs_t)0, IORAM_READ(10) & 0x0f); // output to pins 17-20 (gaplus) |
| 288 | m_out_0_cb((offs_t)0, IORAM_READ(9)); // output to pins 13-16 (motos, pacnpal, gaplus) |
| 289 | m_out_1_cb((offs_t)0, IORAM_READ(10)); // output to pins 17-20 (gaplus) |
| 290 | 290 | break; |
| 291 | 291 | |
| 292 | 292 | case 2: // initialize coinage settings |
| r250093 | r250094 | |
| 388 | 388 | |
| 389 | 389 | //popmessage("%x %x %x %x %x %x %x %x",IORAM_READ(8),IORAM_READ(9),IORAM_READ(10),IORAM_READ(11),IORAM_READ(12),IORAM_READ(13),IORAM_READ(14),IORAM_READ(15)); |
| 390 | 390 | |
| 391 | | m_out_0_cb((offs_t)0, IORAM_READ(9) & 0x0f); // output to pins 13-16 (toypop) |
| 392 | | m_out_1_cb((offs_t)0, IORAM_READ(10) & 0x0f); // output to pins 17-20 (toypop) |
| 391 | m_out_0_cb((offs_t)0, IORAM_READ(9)); // output to pins 13-16 (toypop) |
| 392 | m_out_1_cb((offs_t)0, IORAM_READ(10)); // output to pins 17-20 (toypop) |
| 393 | 393 | break; |
| 394 | 394 | |
| 395 | 395 | case 2: // initialize coinage settings |
trunk/src/mame/video/fuukifg3.c
| r250093 | r250094 | |
| 54 | 54 | { |
| 55 | 55 | UINT16 code = (m_vram[_N_][tile_index] & 0xffff0000) >> 16; |
| 56 | 56 | UINT16 attr = (m_vram[_N_][tile_index] & 0x0000ffff); |
| 57 | | SET_TILE_INFO_MEMBER(1 + _N_, code, (attr & 0x3f) >> 4, TILE_FLIPYX((attr >> 6) & 3)); |
| 57 | SET_TILE_INFO_MEMBER(1 + _N_, code, (attr & 0x3f) >> 4, TILE_FLIPYX(attr >> 6)); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_0){ get_tile_info8bpp(tileinfo, tile_index, 0); } |
| r250093 | r250094 | |
| 64 | 64 | { |
| 65 | 65 | UINT16 code = (m_vram[_N_][tile_index] & 0xffff0000) >> 16; |
| 66 | 66 | UINT16 attr = (m_vram[_N_][tile_index] & 0x0000ffff); |
| 67 | | SET_TILE_INFO_MEMBER(1 + _N_, code, attr & 0x3f, TILE_FLIPYX((attr >> 6) & 3)); |
| 67 | SET_TILE_INFO_MEMBER(1 + _N_, code, attr & 0x3f, TILE_FLIPYX(attr >> 6)); |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_2){ get_tile_info4bpp(tileinfo, tile_index, 2); } |
trunk/src/mame/video/mcr.c
| r250093 | r250094 | |
| 57 | 57 | int data = videoram[tile_index * 2] | (videoram[tile_index * 2 + 1] << 8); |
| 58 | 58 | int code = data & 0x1ff; |
| 59 | 59 | int color = (data >> 11) & 3; |
| 60 | | SET_TILE_INFO_MEMBER(0, code, color, TILE_FLIPYX((data >> 9) & 3)); |
| 60 | SET_TILE_INFO_MEMBER(0, code, color, TILE_FLIPYX(data >> 9)); |
| 61 | 61 | |
| 62 | 62 | /* sprite color base comes from the top 2 bits */ |
| 63 | 63 | tileinfo.category = (data >> 14) & 3; |
| r250093 | r250094 | |
| 83 | 83 | int data = videoram[tile_index * 2] | (videoram[tile_index * 2 + 1] << 8); |
| 84 | 84 | int code = data & 0x3ff; |
| 85 | 85 | int color = (data >> 12) & 3; |
| 86 | | SET_TILE_INFO_MEMBER(0, code, color, TILE_FLIPYX((data >> 10) & 3)); |
| 86 | SET_TILE_INFO_MEMBER(0, code, color, TILE_FLIPYX(data >> 10)); |
| 87 | 87 | |
| 88 | 88 | /* sprite color base might come from the top 2 bits */ |
| 89 | 89 | tileinfo.category = (data >> 14) & 3; |
trunk/src/mame/video/mcr68.c
| r250093 | r250094 | |
| 26 | 26 | int data = LOW_BYTE(videoram[tile_index * 2]) | (LOW_BYTE(videoram[tile_index * 2 + 1]) << 8); |
| 27 | 27 | int code = (data & 0x3ff) | ((data >> 4) & 0xc00); |
| 28 | 28 | int color = (~data >> 12) & 3; |
| 29 | | SET_TILE_INFO_MEMBER(0, code, color, TILE_FLIPYX((data >> 10) & 3)); |
| 29 | SET_TILE_INFO_MEMBER(0, code, color, TILE_FLIPYX(data >> 10)); |
| 30 | 30 | if (m_gfxdecode->gfx(0)->elements() < 0x1000) |
| 31 | 31 | tileinfo.category = (data >> 15) & 1; |
| 32 | 32 | } |
| r250093 | r250094 | |
| 37 | 37 | UINT16 *videoram = m_videoram; |
| 38 | 38 | int data = videoram[tile_index]; |
| 39 | 39 | int color = (data >> 13) & 7; |
| 40 | | SET_TILE_INFO_MEMBER(0, data & 0x3ff, color, TILE_FLIPYX((data >> 11) & 3)); |
| 40 | SET_TILE_INFO_MEMBER(0, data & 0x3ff, color, TILE_FLIPYX(data >> 11)); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | |
| r250093 | r250094 | |
| 46 | 46 | UINT16 *videoram = m_videoram; |
| 47 | 47 | int data = videoram[tile_index]; |
| 48 | 48 | int color = (data >> 13) & 7; |
| 49 | | SET_TILE_INFO_MEMBER(2, data & 0x3ff, color, TILE_FLIPYX((data >> 11) & 3)); |
| 49 | SET_TILE_INFO_MEMBER(2, data & 0x3ff, color, TILE_FLIPYX(data >> 11)); |
| 50 | 50 | tileinfo.category = (color != 0); |
| 51 | 51 | } |
| 52 | 52 | |