src/mame/drivers/taitotz.c
| r15704 | r15705 | |
| 79 | 79 | #include "video/polynew.h" |
| 80 | 80 | |
| 81 | 81 | /* |
| 82 | | Interesting mem areas |
| 82 | Interesting mem areas |
| 83 | 83 | |
| 84 | | 0x40080400...0x400807fc: PPC Interrupt handler table for TLCS900 interrupts (called from 0x4002ea80) |
| 84 | 0x40080400...0x400807fc: PPC Interrupt handler table for TLCS900 interrupts (called from 0x4002ea80) |
| 85 | 85 | 0x40080440 (0x10): 0x4003b274 (0xfc06f7 on TLCS sets 0x1000) |
| 86 | 86 | 0x400804c0 (0x30): 0x4003f1e4 (INT1 handler on TLCS sets 0x3010) (comms, could be IEEE1394) |
| 87 | 87 | 0x40080500 (0x40): 0x4002ed94 (debug/trace) |
| 88 | 88 | 0x40080504 (0x41): 0x4002ede4 (debug/break) |
| 89 | | 0x40080540 (0x50): 0x4003c21c 0x5001: sets 0x00000001 in 0x40049c58 |
| 90 | | 0x40080740 (0xd0): 0x4002ecc0 (INT3 handler on TLCS sets 0xd000) (VBlank?) |
| 89 | 0x40080540 (0x50): 0x4003c21c 0x5001: sets 0x00000001 in 0x40049c58 |
| 90 | 0x40080740 (0xd0): 0x4002ecc0 (INT3 handler on TLCS sets 0xd000) (VBlank?) |
| 91 | 91 | 0x400807c0 (0xf0): 0x4002eae4 (0xfc0a44 on TLCS sets 0xf001) |
| 92 | | |
| 92 | |
| 93 | 93 | PPC -> TLCS Commands: |
| 94 | | 0x1000: 0x4003a9e0() HDD Reset |
| 95 | | 0x1001: 0x4003aa14() HDD Init. Writes HDD status and error to io_shared[0x1a00]. |
| 96 | | 0x1010: 0x4003aaf4(), 0x4003ab8c() HDD Read Sector |
| 97 | | 0x1020: 0x4003ac1c() HDD Write Sector |
| 98 | | 0x4000: ? Related to sound loading? |
| 99 | | 0x4001: 0x400429b0() MBox related |
| 100 | | 0x4002: ? Loads a byte from MBox ram. Address in io_shared[0x1c04] |
| 101 | | 0x4003: ? Writes a byte into MBox ram. Address in io_shared[0x1c04], data in io_shared[0x1c06]. |
| 102 | | 0x4004: 0x40042bc4(), 0x40042c50() Play music/sound? Params in io_shared[0x1c08...0x1c12] |
| 103 | | 0x5000: 0x4003bc68() Reset RTC? |
| 104 | | 0x5010: 0x4003bb68() Read RTC |
| 105 | | 0x5020: 0x4003bbec() Write RTC |
| 106 | | 0x6000: ? Backup RAM Read. Address in io_shared[0x1d00]. |
| 107 | | 0x6010: ? Backup RAM Write. Address in io_shared[0x1d00]. |
| 108 | | 0x7000: 0x4003d1c4() |
| 109 | | 0x7001: 0x4003d28c() |
| 110 | | 0x7002: 0x4003d4ac() |
| 111 | | 0x7003: 0x4003d508() |
| 112 | | 0x7004: 0x4003d554() |
| 113 | | 0x7005: 0x4003d168() |
| 114 | | 0x8000: ? Used by vibration (force feedback?) on pwrshovl |
| 115 | | 0xa000: ? Used by vibration (force feedback?) on pwrshovl |
| 116 | | 0xf000: 0x4002f328() TLCS_Init |
| 117 | | 0xf010: 0x4002f074() Enables TLCS watchdog timer |
| 118 | | 0xf011: 0x4002f0a8() Disables TLCS watchdog |
| 119 | | 0xf020: ? |
| 120 | | 0xf055: 0x4002f0dc() Enables TLCS watchdog and infloops the TLCS |
| 121 | | 0xf0ff: ? TLCS soft reset? |
| 94 | 0x1000: 0x4003a9e0() HDD Reset |
| 95 | 0x1001: 0x4003aa14() HDD Init. Writes HDD status and error to io_shared[0x1a00]. |
| 96 | 0x1010: 0x4003aaf4(), 0x4003ab8c() HDD Read Sector |
| 97 | 0x1020: 0x4003ac1c() HDD Write Sector |
| 98 | 0x4000: ? Related to sound loading? |
| 99 | 0x4001: 0x400429b0() MBox related |
| 100 | 0x4002: ? Loads a byte from MBox ram. Address in io_shared[0x1c04] |
| 101 | 0x4003: ? Writes a byte into MBox ram. Address in io_shared[0x1c04], data in io_shared[0x1c06]. |
| 102 | 0x4004: 0x40042bc4(), 0x40042c50() Play music/sound? Params in io_shared[0x1c08...0x1c12] |
| 103 | 0x5000: 0x4003bc68() Reset RTC? |
| 104 | 0x5010: 0x4003bb68() Read RTC |
| 105 | 0x5020: 0x4003bbec() Write RTC |
| 106 | 0x6000: ? Backup RAM Read. Address in io_shared[0x1d00]. |
| 107 | 0x6010: ? Backup RAM Write. Address in io_shared[0x1d00]. |
| 108 | 0x7000: 0x4003d1c4() |
| 109 | 0x7001: 0x4003d28c() |
| 110 | 0x7002: 0x4003d4ac() |
| 111 | 0x7003: 0x4003d508() |
| 112 | 0x7004: 0x4003d554() |
| 113 | 0x7005: 0x4003d168() |
| 114 | 0x8000: ? Used by vibration (force feedback?) on pwrshovl |
| 115 | 0xa000: ? Used by vibration (force feedback?) on pwrshovl |
| 116 | 0xf000: 0x4002f328() TLCS_Init |
| 117 | 0xf010: 0x4002f074() Enables TLCS watchdog timer |
| 118 | 0xf011: 0x4002f0a8() Disables TLCS watchdog |
| 119 | 0xf020: ? |
| 120 | 0xf055: 0x4002f0dc() Enables TLCS watchdog and infloops the TLCS |
| 121 | 0xf0ff: ? TLCS soft reset? |
| 122 | 122 | |
| 123 | | TLCS -> PPC Commands: |
| 124 | | 0x10xx: 0xfc06f7() HDD Command ack? |
| 125 | | 0x40094ec8: |
| 126 | | 0x00: IDLE |
| 127 | | 0x10: READ |
| 128 | | 0x11: READ SECTOR |
| 129 | | 0x12: READ ALL |
| 130 | | 0x20: WRITE |
| 131 | | 0x21: WRITE SECTOR |
| 132 | | 0x22: WRITE ALL |
| 133 | | 0x30: VENDER |
| 134 | | 0xff: ERROR |
| 135 | | 0x??: UNKNOWN |
| 136 | | 0x3010: 0xfc071c() int1 handler Comm IRQ, IEEE1394 |
| 137 | | 0x40xx: ? Debug |
| 138 | | 0x41xx: ? Debug |
| 139 | | 0x5001: ? RTC? |
| 140 | | 0xd000: 0xfc06b4() int3 handler VBlank? Runs a counter on the PPC side |
| 141 | | 0xf001: 0xfc0a44() PPC sync? |
| 123 | TLCS -> PPC Commands: |
| 124 | 0x10xx: 0xfc06f7() HDD Command ack? |
| 125 | 0x40094ec8: |
| 126 | 0x00: IDLE |
| 127 | 0x10: READ |
| 128 | 0x11: READ SECTOR |
| 129 | 0x12: READ ALL |
| 130 | 0x20: WRITE |
| 131 | 0x21: WRITE SECTOR |
| 132 | 0x22: WRITE ALL |
| 133 | 0x30: VENDER |
| 134 | 0xff: ERROR |
| 135 | 0x??: UNKNOWN |
| 136 | 0x3010: 0xfc071c() int1 handler Comm IRQ, IEEE1394 |
| 137 | 0x40xx: ? Debug |
| 138 | 0x41xx: ? Debug |
| 139 | 0x5001: ? RTC? |
| 140 | 0xd000: 0xfc06b4() int3 handler VBlank? Runs a counter on the PPC side |
| 141 | 0xf001: 0xfc0a44() PPC sync? |
| 142 | 142 | |
| 143 | 143 | |
| 144 | | BG2 intro packet writes: |
| 144 | BG2 intro packet writes: |
| 145 | 145 | |
| 146 | | construction? |
| 147 | | 0x4012f390() |
| 148 | | -> 0x401304f0() scene graph parser? |
| 149 | | -> 0x40130d60() |
| 150 | | -> 0x401aff48() R3 = dest, R4 = source, R5 = length |
| 146 | construction? |
| 147 | 0x4012f390() |
| 148 | -> 0x401304f0() scene graph parser? |
| 149 | -> 0x40130d60() |
| 150 | -> 0x401aff48() R3 = dest, R4 = source, R5 = length |
| 151 | 151 | |
| 152 | | 0x40174674() |
| 153 | | 0x401ba294() |
| 154 | | R3 = 0x000007d0, R4 = 0x40707bac, R5 = 0x00000398 |
| 152 | 0x40174674() |
| 153 | 0x401ba294() |
| 154 | R3 = 0x000007d0, R4 = 0x40707bac, R5 = 0x00000398 |
| 155 | 155 | |
| 156 | | f1 00 00 63 0c 00 00 7f 0c 00 00 00 08 00 00 00 |
| 157 | | 00 40 01 3e 00 00 81 00 00 00 7f 00 00 7f 00 00 |
| 158 | | 00 40 3e 3e 00 00 7f 00 00 00 7f 00 00 7f 00 00 |
| 159 | | 00 40 3e 00 00 00 7f 00 00 00 81 00 00 7f 00 00 |
| 160 | | 00 40 01 00 00 00 81 00 00 00 81 00 00 7f 00 00 |
| 161 | | f1 00 00 69 00 00 7f 00 0c 7f 00 00 0d 00 00 7f |
| 162 | | 00 40 00 3f 00 00 e0 40 00 00 00 00 00 7f 7f 00 |
| 163 | | 00 40 00 00 00 00 e0 40 00 00 00 00 00 7f 81 00 |
| 164 | | 00 40 1f 00 00 00 1f c0 00 00 00 00 00 7f 81 00 |
| 165 | | 00 40 1f 3f 00 00 1f c0 00 00 00 00 00 7f 7f 00 |
| 166 | | ... |
| 156 | f1 00 00 63 0c 00 00 7f 0c 00 00 00 08 00 00 00 |
| 157 | 00 40 01 3e 00 00 81 00 00 00 7f 00 00 7f 00 00 |
| 158 | 00 40 3e 3e 00 00 7f 00 00 00 7f 00 00 7f 00 00 |
| 159 | 00 40 3e 00 00 00 7f 00 00 00 81 00 00 7f 00 00 |
| 160 | 00 40 01 00 00 00 81 00 00 00 81 00 00 7f 00 00 |
| 161 | f1 00 00 69 00 00 7f 00 0c 7f 00 00 0d 00 00 7f |
| 162 | 00 40 00 3f 00 00 e0 40 00 00 00 00 00 7f 7f 00 |
| 163 | 00 40 00 00 00 00 e0 40 00 00 00 00 00 7f 81 00 |
| 164 | 00 40 1f 00 00 00 1f c0 00 00 00 00 00 7f 81 00 |
| 165 | 00 40 1f 3f 00 00 1f c0 00 00 00 00 00 7f 7f 00 |
| 166 | ... |
| 167 | 167 | |
| 168 | | R3 = 0x00000b68, R4 = 0x40707e58, R5 = 0x00001000 |
| 168 | R3 = 0x00000b68, R4 = 0x40707e58, R5 = 0x00001000 |
| 169 | 169 | |
| 170 | | e1 00 00 73 00 81 00 00 04 00 00 00 0c 00 00 00 |
| 171 | | 00 40 06 00 00 94 fd d1 00 d2 82 ce 00 2e 03 ef |
| 172 | | 00 40 06 00 00 99 fd d1 00 c0 82 ce 00 df 00 40 |
| 173 | | 00 40 06 02 00 91 fd d1 00 ef 88 9e 00 c7 fc 40 |
| 174 | | 00 40 06 1f 00 88 fd d1 00 00 b8 60 00 26 03 ef |
| 175 | | e0 00 00 73 00 81 00 00 04 00 00 00 0c 00 00 00 |
| 176 | | 00 40 06 1f 00 8b fd d1 00 00 b8 60 00 d0 fc 40 |
| 177 | | 00 40 06 1f 00 88 fd d1 00 00 b8 60 00 26 03 ef |
| 178 | | 00 40 06 02 00 91 fd d1 00 ef 88 9e 00 c7 fc 40 |
| 179 | | ... |
| 170 | e1 00 00 73 00 81 00 00 04 00 00 00 0c 00 00 00 |
| 171 | 00 40 06 00 00 94 fd d1 00 d2 82 ce 00 2e 03 ef |
| 172 | 00 40 06 00 00 99 fd d1 00 c0 82 ce 00 df 00 40 |
| 173 | 00 40 06 02 00 91 fd d1 00 ef 88 9e 00 c7 fc 40 |
| 174 | 00 40 06 1f 00 88 fd d1 00 00 b8 60 00 26 03 ef |
| 175 | e0 00 00 73 00 81 00 00 04 00 00 00 0c 00 00 00 |
| 176 | 00 40 06 1f 00 8b fd d1 00 00 b8 60 00 d0 fc 40 |
| 177 | 00 40 06 1f 00 88 fd d1 00 00 b8 60 00 26 03 ef |
| 178 | 00 40 06 02 00 91 fd d1 00 ef 88 9e 00 c7 fc 40 |
| 179 | ... |
| 180 | 180 | |
| 181 | | R3 = 0x00001b68, R4 = 0x40707e58, R5 = 0x00000d19 |
| 182 | | R3 = 0x00075770, R4 = 0x40443e2c, R5 = 0x00000014 |
| 183 | | R3 = 0x00075784, R4 = 0x40443e7c, R5 = 0x00000014 |
| 184 | | R3 = 0x00075798, R4 = 0x40443ecc, R5 = 0x00000014 |
| 185 | | R3 = 0x000757ac, R4 = 0x40443f1c, R5 = 0x00000014 |
| 186 | | R3 = 0x000757c0, R4 = 0x40443e6c, R5 = 0x00000014 |
| 181 | R3 = 0x00001b68, R4 = 0x40707e58, R5 = 0x00000d19 |
| 182 | R3 = 0x00075770, R4 = 0x40443e2c, R5 = 0x00000014 |
| 183 | R3 = 0x00075784, R4 = 0x40443e7c, R5 = 0x00000014 |
| 184 | R3 = 0x00075798, R4 = 0x40443ecc, R5 = 0x00000014 |
| 185 | R3 = 0x000757ac, R4 = 0x40443f1c, R5 = 0x00000014 |
| 186 | R3 = 0x000757c0, R4 = 0x40443e6c, R5 = 0x00000014 |
| 187 | 187 | |
| 188 | | R3 = 0x00062ca0, R4 = 0x409cfa70, R5 = 0x000001e0 |
| 189 | | R3 = 0x00008ca0, R4 = 0x409f8f70, R5 = 0x000002c5 |
| 190 | | R3 = 0x00002ba4, R4 = 0x40fffaf0, R5 = 0x00000028 |
| 191 | | R3 = 0x0001f4a0, R4 = 0x40a06350, R5 = 0x00000340 |
| 192 | | R3 = 0x00002bcc, R4 = 0x40fffaf0, R5 = 0x00000028 |
| 188 | R3 = 0x00062ca0, R4 = 0x409cfa70, R5 = 0x000001e0 |
| 189 | R3 = 0x00008ca0, R4 = 0x409f8f70, R5 = 0x000002c5 |
| 190 | R3 = 0x00002ba4, R4 = 0x40fffaf0, R5 = 0x00000028 |
| 191 | R3 = 0x0001f4a0, R4 = 0x40a06350, R5 = 0x00000340 |
| 192 | R3 = 0x00002bcc, R4 = 0x40fffaf0, R5 = 0x00000028 |
| 193 | 193 | |
| 194 | | R3 = 0x00000190, R4 = 0x40fff8f8, R5 = 0x00000014 |
| 194 | R3 = 0x00000190, R4 = 0x40fff8f8, R5 = 0x00000014 |
| 195 | 195 | |
| 196 | | 0x40188514() |
| 197 | | R3 = 0x0000d818, R4 = 0x40ffcce0, R5 = 0x00000bc0 |
| 196 | 0x40188514() |
| 197 | R3 = 0x0000d818, R4 = 0x40ffcce0, R5 = 0x00000bc0 |
| 198 | 198 | |
| 199 | | 00 00 00 dd 00 00 00 00 00 00 00 00 00 00 00 00 |
| 200 | | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
| 201 | | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
| 202 | | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
| 203 | | ... |
| 199 | 00 00 00 dd 00 00 00 00 00 00 00 00 00 00 00 00 |
| 200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
| 201 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
| 202 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
| 203 | ... |
| 204 | 204 | |
| 205 | | R3 = 0x0001494c, R4 = 0x40ffcce0, R5 = 0x00000bc0 |
| 205 | R3 = 0x0001494c, R4 = 0x40ffcce0, R5 = 0x00000bc0 |
| 206 | 206 | |
| 207 | | 0x40116c28(): Draws 2D images |
| 208 | | R3 = 0x009e0c7a, R4 = 0x40a7c3bc, R5 = 0x0000007c |
| 207 | 0x40116c28(): Draws 2D images |
| 208 | R3 = 0x009e0c7a, R4 = 0x40a7c3bc, R5 = 0x0000007c |
| 209 | 209 | |
| 210 | | 0x40116a80(): Clears 2D images? |
| 211 | | R3 = 0x009f6308, R4 = 0x40a9a784, R5 = 0x000000f0 |
| 210 | 0x40116a80(): Clears 2D images? |
| 211 | R3 = 0x009f6308, R4 = 0x40a9a784, R5 = 0x000000f0 |
| 212 | 212 | |
| 213 | 213 | |
| 214 | 214 | |
| 215 | | -> 0x40116430(): R3 = dest (|= 0x30800000), R4 = source, R5 = num words |
| 216 | | -> 0x401162ac() WriteVideoMem: R3 = source, R4 = dest, R5 = num words |
| 217 | | -> 0x401064b0() Write video data using FIFO: R3 = source, R4 = dest, R5 = num words (must be divisible by 8) |
| 218 | | -> 0x40106668() Write video data using write port: R3 = source, R4 = dest, R5 = num words |
| 215 | -> 0x40116430(): R3 = dest (|= 0x30800000), R4 = source, R5 = num words |
| 216 | -> 0x401162ac() WriteVideoMem: R3 = source, R4 = dest, R5 = num words |
| 217 | -> 0x401064b0() Write video data using FIFO: R3 = source, R4 = dest, R5 = num words (must be divisible by 8) |
| 218 | -> 0x40106668() Write video data using write port: R3 = source, R4 = dest, R5 = num words |
| 219 | 219 | |
| 220 | 220 | |
| 221 | 221 | |
| 222 | | 0x40106788(): FIFO Packet write: R3 = source, R4 = select between cmd 0 and 1, R5 = num words (must be divisible by 8) |
| 222 | 0x40106788(): FIFO Packet write: R3 = source, R4 = select between cmd 0 and 1, R5 = num words (must be divisible by 8) |
| 223 | 223 | |
| 224 | 224 | |
| 225 | 225 | |
| 226 | | BG2: 4x4 Matrices at 0x40223218 |
| 227 | | word 0: ?? (0x62e6c, 0xf20a0, ...) anded by 0x1fffff on read, or'd by 0xff800000, or'd by 0x400000 if no matrix, store -> [0x00] |
| 228 | | word 1: ?? (usually zero) |
| 229 | | word 2: float (often 1.0) multiplied by 31.0f, converted to (int), anded by 0x1f, or by 0x80 if word 1 == 1, store -> [0x08] |
| 230 | | word 3: float if (exponent < 1, mult by 0.5), store -> [0x04] |
| 231 | | word 4: usually 0x00000001 if 0, matrix not stored |
| 232 | | 16x float: 4x4 matrix |
| 233 | | matrix[0][0] -> store [0x10] |
| 234 | | matrix[1][0] -> store [0x14] |
| 235 | | matrix[2][0] -> store [0x18] |
| 236 | | matrix[3][0] -> store [0x1c] |
| 237 | | ... |
| 238 | | word 0: Pointer to another matrix |
| 239 | | word 1: Pointer to another matrix |
| 226 | BG2: 4x4 Matrices at 0x40223218 |
| 227 | word 0: ?? (0x62e6c, 0xf20a0, ...) anded by 0x1fffff on read, or'd by 0xff800000, or'd by 0x400000 if no matrix, store -> [0x00] |
| 228 | word 1: ?? (usually zero) |
| 229 | word 2: float (often 1.0) multiplied by 31.0f, converted to (int), anded by 0x1f, or by 0x80 if word 1 == 1, store -> [0x08] |
| 230 | word 3: float if (exponent < 1, mult by 0.5), store -> [0x04] |
| 231 | word 4: usually 0x00000001 if 0, matrix not stored |
| 232 | 16x float: 4x4 matrix |
| 233 | matrix[0][0] -> store [0x10] |
| 234 | matrix[1][0] -> store [0x14] |
| 235 | matrix[2][0] -> store [0x18] |
| 236 | matrix[3][0] -> store [0x1c] |
| 237 | ... |
| 238 | word 0: Pointer to another matrix |
| 239 | word 1: Pointer to another matrix |
| 240 | 240 | |
| 241 | | 0x401afffc(): Write |
| 241 | 0x401afffc(): Write |
| 242 | 242 | |
| 243 | | 0x40118af0(): |
| 244 | | -> 0x401195e0(): Read (Transposes matrix, only columns 0-2 stored + 4 extra command words) |
| 243 | 0x40118af0(): |
| 244 | -> 0x401195e0(): Read (Transposes matrix, only columns 0-2 stored + 4 extra command words) |
| 245 | 245 | |
| 246 | | -> 0x40118080: Read, store to [0x40362314+], never read |
| 246 | -> 0x40118080: Read, store to [0x40362314+], never read |
| 247 | 247 | |
| 248 | 248 | |
| 249 | | Display list top?: 0x403408c0 (pointer to at 0x4020b80c) |
| 250 | | bottom?: 0x403608e4 (pointer to at 0x4020b81c) |
| 249 | Display list top?: 0x403408c0 (pointer to at 0x4020b80c) |
| 250 | bottom?: 0x403608e4 (pointer to at 0x4020b81c) |
| 251 | 251 | |
| 252 | | 0x40123fcc(): |
| 253 | | -> 0x401186c8(): Display list parser? |
| 252 | 0x40123fcc(): |
| 253 | -> 0x401186c8(): Display list parser? |
| 254 | 254 | |
| 255 | | 0x40117fb4(): Insert command to disp list. R3 = command word |
| 255 | 0x40117fb4(): Insert command to disp list. R3 = command word |
| 256 | 256 | |
| 257 | | Display list format |
| 258 | | ------------------- |
| 259 | | 0xffff0010: ? |
| 257 | Display list format |
| 258 | ------------------- |
| 259 | 0xffff0010: ? |
| 260 | 260 | |
| 261 | | 0xffff0011: Draw Polygon Object |
| 262 | | 0 = Polygon data address (21 bits) in screen RAM (in dwords). If 0x400000 set, no matrix. |
| 263 | | 1 = Object scale (float), if <1.0f multiply scale by 2.0f |
| 264 | | 2 = 0x80 = object alpha enable, 0x1f = object alpha (0x1f = opaque) |
| 265 | | 3 = ? |
| 266 | | 4...15 = 4x3 matrix |
| 261 | 0xffff0011: Draw Polygon Object |
| 262 | 0 = Polygon data address (21 bits) in screen RAM (in dwords). If 0x400000 set, no matrix. |
| 263 | 1 = Object scale (float), if <1.0f multiply scale by 2.0f |
| 264 | 2 = 0x80 = object alpha enable, 0x1f = object alpha (0x1f = opaque) |
| 265 | 3 = ? |
| 266 | 4...15 = 4x3 matrix |
| 267 | 267 | |
| 268 | | 0xffff0020: ? (no parameters) |
| 269 | | |
| 270 | | 0xffff0021: Draw Pretransformed Polygon (used for drawing the background images) |
| 271 | | 0 = address? (if 0x400 set, 24 words) |
| 272 | | 1 = Texture number (* 0x4000 to address the texture) |
| 273 | | 2 = ? |
| 274 | | 3 = ? (usually 0) |
| 275 | | |
| 276 | | Vertex data: 4x or 5x 4 words |
| 277 | | 0 = XY coordinates. X = high 16 bits, Y = low 16 bits |
| 278 | | 1 = Z value? |
| 279 | | 2 = UV coordinates. U = high 16 bits, V = low 16 bits (possibly shifted left by 4?) |
| 280 | | 3 = ? (usually 0) |
| 281 | | |
| 282 | | 0xffff0022: ? (1 word) |
| 283 | | 0 = ? (Set to 0x00000001 before drawing the background. Z-buffer read disable?) |
| 284 | | |
| 285 | | 0xffff0030: ? (2 + n words) FIFO write? |
| 286 | | 0 = ? |
| 287 | | 1 = num of words |
| 288 | | n words = ? |
| 289 | | |
| 290 | | 0xffff0080: Display List Call? |
| 291 | | |
| 292 | | 0xffff00ff: End of List? |
| 268 | 0xffff0020: ? (no parameters) |
| 293 | 269 | |
| 294 | | Polygon data format |
| 295 | | ------------------- |
| 270 | 0xffff0021: Draw Pretransformed Polygon (used for drawing the background images) |
| 271 | 0 = address? (if 0x400 set, 24 words) |
| 272 | 1 = Texture number (* 0x4000 to address the texture) |
| 273 | 2 = ? |
| 274 | 3 = ? (usually 0) |
| 296 | 275 | |
| 297 | | Word 0: |
| 298 | | ---x---- -------- -------- -------- 1: this is the last polygon of the model |
| 299 | | -------x -------- -------- -------- 0: triangle, 1: quad |
| 300 | | -------- -------- -----xxx xxxxxxxx Texture number (* 0x4000 to address the texture) |
| 276 | Vertex data: 4x or 5x 4 words |
| 277 | 0 = XY coordinates. X = high 16 bits, Y = low 16 bits |
| 278 | 1 = Z value? |
| 279 | 2 = UV coordinates. U = high 16 bits, V = low 16 bits (possibly shifted left by 4?) |
| 280 | 3 = ? (usually 0) |
| 301 | 281 | |
| 302 | | Word 1: |
| 303 | | ? |
| 282 | 0xffff0022: ? (1 word) |
| 283 | 0 = ? (Set to 0x00000001 before drawing the background. Z-buffer read disable?) |
| 304 | 284 | |
| 305 | | Word 2: |
| 306 | | ? |
| 285 | 0xffff0030: ? (2 + n words) FIFO write? |
| 286 | 0 = ? |
| 287 | 1 = num of words |
| 288 | n words = ? |
| 307 | 289 | |
| 308 | | Word 3: |
| 309 | | ? |
| 290 | 0xffff0080: Display List Call? |
| 310 | 291 | |
| 311 | | Vertex data: 3x (triangle) or 4x (quad) 4 words |
| 312 | | Word 0: |
| 313 | | -------- -------- -------- xxxxxxxx Texture V coordinate (0..63 with max 4x repeat) |
| 314 | | -------- -------- xxxxxxxx -------- Texture U coordinate (0..63 with max 4x repeat) |
| 315 | | -------- xxxxxxxx -------- -------- Usually 0x40. HUD elements set 0xff. Self-illumination? |
| 292 | 0xffff00ff: End of List? |
| 316 | 293 | |
| 317 | | Word 1: |
| 318 | | -------- -------- xxxxxxxx xxxxxxxx Vertex X coordinate (signed 8.8 fixed point) |
| 319 | | -------- xxxxxxxx -------- -------- Normal X (signed 1.7 fixed point) |
| 294 | Polygon data format |
| 295 | ------------------- |
| 320 | 296 | |
| 321 | | Word 2: |
| 322 | | -------- -------- xxxxxxxx xxxxxxxx Vertex Y coordinate (signed 8.8 fixed point) |
| 323 | | -------- xxxxxxxx -------- -------- Normal Y (signed 1.7 fixed point) |
| 297 | Word 0: |
| 298 | ---x---- -------- -------- -------- 1: this is the last polygon of the model |
| 299 | -------x -------- -------- -------- 0: triangle, 1: quad |
| 300 | -------- -------- -----xxx xxxxxxxx Texture number (* 0x4000 to address the texture) |
| 324 | 301 | |
| 325 | | Word 3: |
| 326 | | -------- -------- xxxxxxxx xxxxxxxx Vertex Z coordinate (signed 8.8 fixed point) |
| 327 | | -------- xxxxxxxx -------- -------- Normal Z (signed 1.7 fixed point) |
| 302 | Word 1: |
| 303 | ? |
| 328 | 304 | |
| 329 | | 3D registers |
| 330 | | ------------ |
| 305 | Word 2: |
| 306 | ? |
| 331 | 307 | |
| 332 | | 0x00000100: xxxxxxxx xxxxxxxx -------- -------- Viewport Y? |
| 333 | | -------- -------- xxxxxxxx xxxxxxxx Viewport X? |
| 308 | Word 3: |
| 309 | ? |
| 334 | 310 | |
| 335 | | 0x00000101: xxxxxxxx xxxxxxxx -------- -------- Viewport center X? (usually 255 or 240) |
| 336 | | -------- -------- xxxxxxxx xxxxxxxx Viewport center Y? (usually 200 or 191) |
| 311 | Vertex data: 3x (triangle) or 4x (quad) 4 words |
| 312 | Word 0: |
| 313 | -------- -------- -------- xxxxxxxx Texture V coordinate (0..63 with max 4x repeat) |
| 314 | -------- -------- xxxxxxxx -------- Texture U coordinate (0..63 with max 4x repeat) |
| 315 | -------- xxxxxxxx -------- -------- Usually 0x40. HUD elements set 0xff. Self-illumination? |
| 337 | 316 | |
| 338 | | 0x00000102: xxxxxxxx xxxxxxxx -------- -------- ? (usually 0x100) |
| 339 | | -------- -------- xxxxxxxx xxxxxxxx ? (usually 0x100 or 0xc0) |
| 317 | Word 1: |
| 318 | -------- -------- xxxxxxxx xxxxxxxx Vertex X coordinate (signed 8.8 fixed point) |
| 319 | -------- xxxxxxxx -------- -------- Normal X (signed 1.7 fixed point) |
| 340 | 320 | |
| 341 | | 0x00000103: |
| 321 | Word 2: |
| 322 | -------- -------- xxxxxxxx xxxxxxxx Vertex Y coordinate (signed 8.8 fixed point) |
| 323 | -------- xxxxxxxx -------- -------- Normal Y (signed 1.7 fixed point) |
| 342 | 324 | |
| 343 | | 0x00000104: |
| 325 | Word 3: |
| 326 | -------- -------- xxxxxxxx xxxxxxxx Vertex Z coordinate (signed 8.8 fixed point) |
| 327 | -------- xxxxxxxx -------- -------- Normal Z (signed 1.7 fixed point) |
| 344 | 328 | |
| 345 | | 0x10000100: |
| 329 | 3D registers |
| 330 | ------------ |
| 346 | 331 | |
| 347 | | 0x10000101: |
| 332 | 0x00000100: xxxxxxxx xxxxxxxx -------- -------- Viewport Y? |
| 333 | -------- -------- xxxxxxxx xxxxxxxx Viewport X? |
| 348 | 334 | |
| 349 | | 0x10000102: xxxxxxxx xxxxxxxx -------- -------- Diffuse light color (ARGB1555) |
| 350 | | -------- -------- xxxxxxxx xxxxxxxx Ambient light color (ARGB1555) |
| 351 | | |
| 352 | | 0x10000103: |
| 335 | 0x00000101: xxxxxxxx xxxxxxxx -------- -------- Viewport center X? (usually 255 or 240) |
| 336 | -------- -------- xxxxxxxx xxxxxxxx Viewport center Y? (usually 200 or 191) |
| 353 | 337 | |
| 354 | | 0x10000104: |
| 355 | | |
| 356 | | 0x10000105: |
| 338 | 0x00000102: xxxxxxxx xxxxxxxx -------- -------- ? (usually 0x100) |
| 339 | -------- -------- xxxxxxxx xxxxxxxx ? (usually 0x100 or 0xc0) |
| 340 | |
| 341 | 0x00000103: |
| 342 | |
| 343 | 0x00000104: |
| 344 | |
| 345 | 0x10000100: |
| 346 | |
| 347 | 0x10000101: |
| 348 | |
| 349 | 0x10000102: xxxxxxxx xxxxxxxx -------- -------- Diffuse light color (ARGB1555) |
| 350 | -------- -------- xxxxxxxx xxxxxxxx Ambient light color (ARGB1555) |
| 351 | |
| 352 | 0x10000103: |
| 353 | |
| 354 | 0x10000104: |
| 355 | |
| 356 | 0x10000105: |
| 357 | 357 | */ |
| 358 | 358 | |
| 359 | 359 | #define LOG_PPC_TO_TLCS_COMMANDS 1 |
| r15704 | r15705 | |
| 418 | 418 | POLY_NY = 4, |
| 419 | 419 | POLY_NZ = 5, |
| 420 | 420 | }; |
| 421 | | |
| 421 | |
| 422 | 422 | //static const float ZBUFFER_MAX = 10000000000.0f; |
| 423 | 423 | |
| 424 | 424 | bitmap_rgb32 *m_fb; |
| r15704 | r15705 | |
| 443 | 443 | int m_specular_r; |
| 444 | 444 | int m_specular_g; |
| 445 | 445 | int m_specular_b; |
| 446 | | |
| 446 | |
| 447 | 447 | float m_vp_center_x; |
| 448 | 448 | float m_vp_center_y; |
| 449 | 449 | float m_vp_focus; |
| r15704 | r15705 | |
| 509 | 509 | |
| 510 | 510 | UINT8 m_rtcdata[8]; |
| 511 | 511 | |
| 512 | | |
| 513 | 512 | |
| 513 | |
| 514 | 514 | UINT32 m_reg105; |
| 515 | 515 | UINT32 m_displist_addr; |
| 516 | 516 | int m_count; |
| r15704 | r15705 | |
| 522 | 522 | static void taitotz_exit(running_machine &machine) |
| 523 | 523 | { |
| 524 | 524 | /* |
| 525 | | taitotz_state *state = machine.driver_data<taitotz_state>(); |
| 525 | taitotz_state *state = machine.driver_data<taitotz_state>(); |
| 526 | 526 | |
| 527 | | FILE *file; |
| 528 | | int i; |
| 527 | FILE *file; |
| 528 | int i; |
| 529 | 529 | |
| 530 | | file = fopen("screen_ram.bin","wb"); |
| 531 | | for (i=0; i < 0x200000; i++) |
| 532 | | { |
| 533 | | fputc((UINT8)(state->m_screen_ram[i] >> 24), file); |
| 534 | | fputc((UINT8)(state->m_screen_ram[i] >> 16), file); |
| 535 | | fputc((UINT8)(state->m_screen_ram[i] >> 8), file); |
| 536 | | fputc((UINT8)(state->m_screen_ram[i] >> 0), file); |
| 537 | | } |
| 538 | | fclose(file); |
| 530 | file = fopen("screen_ram.bin","wb"); |
| 531 | for (i=0; i < 0x200000; i++) |
| 532 | { |
| 533 | fputc((UINT8)(state->m_screen_ram[i] >> 24), file); |
| 534 | fputc((UINT8)(state->m_screen_ram[i] >> 16), file); |
| 535 | fputc((UINT8)(state->m_screen_ram[i] >> 8), file); |
| 536 | fputc((UINT8)(state->m_screen_ram[i] >> 0), file); |
| 537 | } |
| 538 | fclose(file); |
| 539 | 539 | |
| 540 | | file = fopen("frame_ram.bin","wb"); |
| 541 | | for (i=0; i < 0x80000; i++) |
| 542 | | { |
| 543 | | fputc((UINT8)(state->m_frame_ram[i] >> 24), file); |
| 544 | | fputc((UINT8)(state->m_frame_ram[i] >> 16), file); |
| 545 | | fputc((UINT8)(state->m_frame_ram[i] >> 8), file); |
| 546 | | fputc((UINT8)(state->m_frame_ram[i] >> 0), file); |
| 547 | | } |
| 548 | | fclose(file); |
| 540 | file = fopen("frame_ram.bin","wb"); |
| 541 | for (i=0; i < 0x80000; i++) |
| 542 | { |
| 543 | fputc((UINT8)(state->m_frame_ram[i] >> 24), file); |
| 544 | fputc((UINT8)(state->m_frame_ram[i] >> 16), file); |
| 545 | fputc((UINT8)(state->m_frame_ram[i] >> 8), file); |
| 546 | fputc((UINT8)(state->m_frame_ram[i] >> 0), file); |
| 547 | } |
| 548 | fclose(file); |
| 549 | 549 | |
| 550 | | file = fopen("texture_ram.bin","wb"); |
| 551 | | for (i=0; i < 0x800000; i++) |
| 552 | | { |
| 553 | | fputc((UINT8)(state->m_texture_ram[i] >> 24), file); |
| 554 | | fputc((UINT8)(state->m_texture_ram[i] >> 16), file); |
| 555 | | fputc((UINT8)(state->m_texture_ram[i] >> 8), file); |
| 556 | | fputc((UINT8)(state->m_texture_ram[i] >> 0), file); |
| 557 | | } |
| 558 | | fclose(file); |
| 559 | | */ |
| 550 | file = fopen("texture_ram.bin","wb"); |
| 551 | for (i=0; i < 0x800000; i++) |
| 552 | { |
| 553 | fputc((UINT8)(state->m_texture_ram[i] >> 24), file); |
| 554 | fputc((UINT8)(state->m_texture_ram[i] >> 16), file); |
| 555 | fputc((UINT8)(state->m_texture_ram[i] >> 8), file); |
| 556 | fputc((UINT8)(state->m_texture_ram[i] >> 0), file); |
| 557 | } |
| 558 | fclose(file); |
| 559 | */ |
| 560 | 560 | } |
| 561 | 561 | |
| 562 | 562 | static VIDEO_START( taitotz ) |
| r15704 | r15705 | |
| 596 | 596 | UINT32 i; |
| 597 | 597 | float x2, y; |
| 598 | 598 | const float threehalfs = 1.5f; |
| 599 | | |
| 599 | |
| 600 | 600 | x2 = number * 0.5f; |
| 601 | 601 | y = number; |
| 602 | 602 | i = *(UINT32*)&y; |
| 603 | 603 | i = 0x5f3759df - ( i >> 1 ); |
| 604 | 604 | y = *(float*)&i; |
| 605 | | y = y * ( threehalfs - ( x2 * y * y ) ); |
| 605 | y = y * ( threehalfs - ( x2 * y * y ) ); |
| 606 | 606 | return y; |
| 607 | 607 | } |
| 608 | 608 | |
| r15704 | r15705 | |
| 789 | 789 | g = ((g * a) >> 5) + ((sg * (31 - a)) >> 5); |
| 790 | 790 | b = ((b * a) >> 5) + ((sb * (31 - a)) >> 5); |
| 791 | 791 | } |
| 792 | | |
| 793 | 792 | |
| 793 | |
| 794 | 794 | // write to framebuffer |
| 795 | 795 | fb[x] = 0xff000000 | (r << 16) | (g << 8) | b; |
| 796 | 796 | } |
| r15704 | r15705 | |
| 920 | 920 | { |
| 921 | 921 | // texture coordinates |
| 922 | 922 | UINT8 tu = (src[index] >> 8) & 0xff; |
| 923 | | UINT8 tv = (src[index] >> 0) & 0xff; |
| 923 | UINT8 tv = (src[index] >> 0) & 0xff; |
| 924 | 924 | v[i].p[POLY_U] = (float)(tu); |
| 925 | 925 | v[i].p[POLY_V] = (float)(tv); |
| 926 | 926 | |
| r15704 | r15705 | |
| 931 | 931 | float px = ((float)(x) / 256.0f) * scale; |
| 932 | 932 | float py = ((float)(y) / 256.0f) * scale; |
| 933 | 933 | float pz = ((float)(z) / 256.0f) * scale; |
| 934 | | |
| 934 | |
| 935 | 935 | // normals |
| 936 | 936 | INT8 inx = (src[index + 1] >> 16) & 0xff; |
| 937 | 937 | INT8 iny = (src[index + 2] >> 16) & 0xff; |
| r15704 | r15705 | |
| 1100 | 1100 | m_matrix[1][1]= *(float*)&w[9]; |
| 1101 | 1101 | m_matrix[2][1]= *(float*)&w[10]; |
| 1102 | 1102 | m_matrix[3][1]= *(float*)&w[11]; |
| 1103 | | |
| 1103 | |
| 1104 | 1104 | m_matrix[0][2]= *(float*)&w[12]; |
| 1105 | 1105 | m_matrix[1][2]= *(float*)&w[13]; |
| 1106 | 1106 | m_matrix[2][2]= *(float*)&w[14]; |
| r15704 | r15705 | |
| 1161 | 1161 | UINT16 y = (w[4] >> 0) & 0xffff; |
| 1162 | 1162 | UINT16 tu = (w[6] >> 20) & 0xfff; |
| 1163 | 1163 | UINT16 tv = (w[6] >> 4) & 0xfff; |
| 1164 | | // UINT16 z = (w[5] & 0xffff); |
| 1164 | // UINT16 z = (w[5] & 0xffff); |
| 1165 | 1165 | |
| 1166 | 1166 | v[j].x = x; |
| 1167 | 1167 | v[j].y = y; // batlgear needs -50 modifier here (why?) |
| r15704 | r15705 | |
| 1279 | 1279 | bitmap.fill(0x000000, cliprect); |
| 1280 | 1280 | state->m_renderer->set_fb(&bitmap); |
| 1281 | 1281 | state->m_renderer->render_displaylist(screen.machine(), cliprect); |
| 1282 | | |
| 1283 | 1282 | |
| 1283 | |
| 1284 | 1284 | UINT16 *screen_src = (UINT16*)&state->m_screen_ram[state->m_scr_base]; |
| 1285 | 1285 | |
| 1286 | 1286 | for (int j=0; j < 384; j++) |
| r15704 | r15705 | |
| 1329 | 1329 | } |
| 1330 | 1330 | |
| 1331 | 1331 | /* |
| 1332 | | Video chip memory map |
| 1332 | Video chip memory map |
| 1333 | 1333 | |
| 1334 | | 0x800000...0x9fffff Screen RAM |
| 1335 | | 0x980000...7fff Char RAM |
| 1336 | | 0x9c0000...fffff Tile RAM? |
| 1334 | 0x800000...0x9fffff Screen RAM |
| 1335 | 0x980000...7fff Char RAM |
| 1336 | 0x9c0000...fffff Tile RAM? |
| 1337 | 1337 | |
| 1338 | | 0x1000000...0x17fffff Texture RAM |
| 1338 | 0x1000000...0x17fffff Texture RAM |
| 1339 | 1339 | |
| 1340 | | 0x1800000...0x187ffff Frame RAM |
| 1340 | 0x1800000...0x187ffff Frame RAM |
| 1341 | 1341 | |
| 1342 | 1342 | |
| 1343 | | landhigh puts fullscreen images into 0x9c0000 |
| 1344 | | batlgr2 into 0x9e0000 |
| 1343 | landhigh puts fullscreen images into 0x9c0000 |
| 1344 | batlgr2 into 0x9e0000 |
| 1345 | 1345 | */ |
| 1346 | 1346 | |
| 1347 | 1347 | static UINT32 video_mem_r(taitotz_state *state, UINT32 address) |
| r15704 | r15705 | |
| 1407 | 1407 | |
| 1408 | 1408 | if (reg != 0x20000008) |
| 1409 | 1409 | logerror("video_reg_r: reg: %08X\n", reg); |
| 1410 | | |
| 1410 | |
| 1411 | 1411 | if (subreg < 0x10) |
| 1412 | 1412 | { |
| 1413 | 1413 | return state->m_video_unk_reg[subreg]; |
| r15704 | r15705 | |
| 1500 | 1500 | { |
| 1501 | 1501 | UINT64 r = 0; |
| 1502 | 1502 | UINT32 reg = offset * 8; |
| 1503 | | |
| 1503 | |
| 1504 | 1504 | if (ACCESSING_BITS_0_31) |
| 1505 | 1505 | { |
| 1506 | 1506 | reg += 4; |
| r15704 | r15705 | |
| 1600 | 1600 | } |
| 1601 | 1601 | case 0x3: |
| 1602 | 1602 | { |
| 1603 | | // video_chip_w: port 0x08: 30000001 gets spammed a lot |
| 1603 | // video_chip_w: port 0x08: 30000001 gets spammed a lot |
| 1604 | 1604 | break; |
| 1605 | 1605 | } |
| 1606 | 1606 | default: |
| r15704 | r15705 | |
| 1666 | 1666 | else if (command == 0x1) |
| 1667 | 1667 | { |
| 1668 | 1668 | // FIFO command/packet write |
| 1669 | | |
| 1669 | |
| 1670 | 1670 | if (ACCESSING_BITS_32_63) |
| 1671 | 1671 | { |
| 1672 | 1672 | if (m_video_fifo_ptr >= 8) |
| r15704 | r15705 | |
| 1734 | 1734 | READ64_MEMBER(taitotz_state::ppc_common_r) |
| 1735 | 1735 | { |
| 1736 | 1736 | UINT64 res = 0; |
| 1737 | | |
| 1737 | |
| 1738 | 1738 | if (ACCESSING_BITS_0_15) |
| 1739 | 1739 | { |
| 1740 | 1740 | res |= m_io_share_ram[(offset * 2) + 1]; |
| r15704 | r15705 | |
| 1801 | 1801 | m_io_share_ram[0x1c1a/2] |
| 1802 | 1802 | ); |
| 1803 | 1803 | } |
| 1804 | | |
| 1804 | |
| 1805 | 1805 | /* |
| 1806 | | if (m_io_share_ram[0xfff] == 0x1010) |
| 1807 | | { |
| 1808 | | printf(" %04X %04X %04X %04X\n", m_io_share_ram[0x1a02/2], m_io_share_ram[0x1a04/2], m_io_share_ram[0x1a06/2], m_io_share_ram[0x1a08/2]); |
| 1809 | | } |
| 1810 | | */ |
| 1811 | | |
| 1806 | if (m_io_share_ram[0xfff] == 0x1010) |
| 1807 | { |
| 1808 | printf(" %04X %04X %04X %04X\n", m_io_share_ram[0x1a02/2], m_io_share_ram[0x1a04/2], m_io_share_ram[0x1a06/2], m_io_share_ram[0x1a08/2]); |
| 1809 | } |
| 1810 | */ |
| 1811 | |
| 1812 | 1812 | #endif |
| 1813 | 1813 | |
| 1814 | 1814 | |
| r15704 | r15705 | |
| 1935 | 1935 | if (m_io_share_ram[0xfff] == 0 && m_io_share_ram[0xffe] == 0x1012) |
| 1936 | 1936 | { |
| 1937 | 1937 | //device_spin_until_trigger(machine().device("iocpu"), TLCS_PPC_COMM_TRIGGER); |
| 1938 | | device_yield(machine().device("iocpu")); |
| 1938 | device_yield(machine().device("iocpu")); |
| 1939 | 1939 | machine().scheduler().trigger(PPC_TLCS_COMM_TRIGGER); |
| 1940 | 1940 | } |
| 1941 | 1941 | } |
| r15704 | r15705 | |
| 2048 | 2048 | { |
| 2049 | 2049 | //static UINT16 ide_reg_latch; |
| 2050 | 2050 | int reg = offset >> 1; |
| 2051 | | |
| 2051 | |
| 2052 | 2052 | if (reg != 6) |
| 2053 | 2053 | fatalerror("tlcs_ide1_r: %02X\n", offset); |
| 2054 | 2054 | |
| r15704 | r15705 | |
| 2116 | 2116 | { |
| 2117 | 2117 | case 0x7: |
| 2118 | 2118 | //if (data != 0xff && data != 0xfa && data != 0xfe) |
| 2119 | | // printf("tlcs900_port_write %02X, %02X\n", offset, data); |
| 2119 | // printf("tlcs900_port_write %02X, %02X\n", offset, data); |
| 2120 | 2120 | break; |
| 2121 | 2121 | |
| 2122 | 2122 | case 0x8: |
| r15704 | r15705 | |
| 2128 | 2128 | |
| 2129 | 2129 | case 0x9: |
| 2130 | 2130 | //if (data != 0x00) |
| 2131 | | // printf("tlcs900_port_write %02X, %02X\n", offset, data); |
| 2131 | // printf("tlcs900_port_write %02X, %02X\n", offset, data); |
| 2132 | 2132 | break; |
| 2133 | 2133 | |
| 2134 | 2134 | case 0xb: |
| r15704 | r15705 | |
| 2142 | 2142 | |
| 2143 | 2143 | // TLCS900 interrupt vectors |
| 2144 | 2144 | // 0xfc0150: Reset |
| 2145 | | // 0xfc0120: SWI1-7 - |
| 2146 | | // 0xfc0120: NMI - |
| 2147 | | // 0xfc0120: INTWD - |
| 2148 | | // 0xfc0122: INT0 PPC communication |
| 2149 | | // 0xfc0137: INT1 IEEE1394? |
| 2150 | | // 0xfc013c: INT2 IDE |
| 2151 | | // 0xfc0141: INT3 VBlank? Drives a counter on PPC side |
| 2152 | | // 0xfc0146: INT4 - |
| 2153 | | // 0xfc0147: INT5 - |
| 2154 | | // 0xfc0148: INT6 - |
| 2155 | | // 0xfc0149: INT7 - |
| 2156 | | // 0xfc014a: INT8 Sound chip interrupt? |
| 2157 | | // 0xfc0120: INTAD - |
| 2158 | | // 0xfc0120: INTTR8-A - |
| 2159 | | // 0xfc0120: INTT0 - |
| 2160 | | // 0xfc0467: INTT1 A/D Conversion |
| 2161 | | // 0xfc0120: INTT2-7 - |
| 2162 | | // 0xfc0120: INTTC0-3 - |
| 2163 | | // 0xfc0d1d: INTRX0 Serial 0 receive |
| 2164 | | // 0xfc0ca5: INTTX0 Serial 0 transmit |
| 2165 | | // 0xfc0d55: INTRX1 Serial 1 receive |
| 2166 | | // 0xfc0ce1: INTTX1 Serial 1 transmit |
| 2145 | // 0xfc0120: SWI1-7 - |
| 2146 | // 0xfc0120: NMI - |
| 2147 | // 0xfc0120: INTWD - |
| 2148 | // 0xfc0122: INT0 PPC communication |
| 2149 | // 0xfc0137: INT1 IEEE1394? |
| 2150 | // 0xfc013c: INT2 IDE |
| 2151 | // 0xfc0141: INT3 VBlank? Drives a counter on PPC side |
| 2152 | // 0xfc0146: INT4 - |
| 2153 | // 0xfc0147: INT5 - |
| 2154 | // 0xfc0148: INT6 - |
| 2155 | // 0xfc0149: INT7 - |
| 2156 | // 0xfc014a: INT8 Sound chip interrupt? |
| 2157 | // 0xfc0120: INTAD - |
| 2158 | // 0xfc0120: INTTR8-A - |
| 2159 | // 0xfc0120: INTT0 - |
| 2160 | // 0xfc0467: INTT1 A/D Conversion |
| 2161 | // 0xfc0120: INTT2-7 - |
| 2162 | // 0xfc0120: INTTC0-3 - |
| 2163 | // 0xfc0d1d: INTRX0 Serial 0 receive |
| 2164 | // 0xfc0ca5: INTTX0 Serial 0 transmit |
| 2165 | // 0xfc0d55: INTRX1 Serial 1 receive |
| 2166 | // 0xfc0ce1: INTTX1 Serial 1 transmit |
| 2167 | 2167 | |
| 2168 | 2168 | static ADDRESS_MAP_START( tlcs900h_mem, AS_PROGRAM, 8, taitotz_state) |
| 2169 | 2169 | AM_RANGE(0x010000, 0x02ffff) AM_RAM // Work RAM |
| r15704 | r15705 | |
| 2233 | 2233 | PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_BUTTON7 ) // View 5 |
| 2234 | 2234 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_BUTTON8 ) // View 6 |
| 2235 | 2235 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_BUTTON3 ) // View 1 |
| 2236 | | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON4 ) // View 2 |
| 2236 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON4 ) // View 2 |
| 2237 | 2237 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON1 ) // Select 1 |
| 2238 | 2238 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_BUTTON2 ) // Select 2 |
| 2239 | 2239 | INPUT_PORTS_END |
| r15704 | r15705 | |
| 2510 | 2510 | { |
| 2511 | 2511 | UINT32 *rom = (UINT32*)machine.root_device().memregion("user1")->base(); |
| 2512 | 2512 | rom[(0x2c87c^4)/4] = 0x38600000; // skip sound load timeout... |
| 2513 | | // rom[(0x2c620^4)/4] = 0x48000014; // ID check skip (not needed with correct serial number) |
| 2513 | // rom[(0x2c620^4)/4] = 0x48000014; // ID check skip (not needed with correct serial number) |
| 2514 | 2514 | } |
| 2515 | 2515 | |
| 2516 | 2516 | // Init for BIOS 1.11a |
| r15704 | r15705 | |
| 2561 | 2561 | taitotz_state *state = machine.driver_data<taitotz_state>(); |
| 2562 | 2562 | |
| 2563 | 2563 | init_taitotz_152(machine); |
| 2564 | | |
| 2564 | |
| 2565 | 2565 | state->m_hdd_serial_number = BATLGR2_HDD_SERIAL; |
| 2566 | | |
| 2566 | |
| 2567 | 2567 | state->m_scr_base = 0x1e0000; |
| 2568 | 2568 | |
| 2569 | 2569 | state->m_displist_addr = 0x3608e4; |
| r15704 | r15705 | |
| 2574 | 2574 | taitotz_state *state = machine.driver_data<taitotz_state>(); |
| 2575 | 2575 | |
| 2576 | 2576 | init_taitotz_152(machine); |
| 2577 | | |
| 2577 | |
| 2578 | 2578 | state->m_hdd_serial_number = BATLGR2A_HDD_SERIAL; |
| 2579 | | |
| 2579 | |
| 2580 | 2580 | state->m_scr_base = 0x1e0000; |
| 2581 | 2581 | |
| 2582 | 2582 | state->m_displist_addr = 0x3608e4; |
| r15704 | r15705 | |
| 2587 | 2587 | taitotz_state *state = machine.driver_data<taitotz_state>(); |
| 2588 | 2588 | |
| 2589 | 2589 | init_taitotz_111a(machine); |
| 2590 | | |
| 2590 | |
| 2591 | 2591 | // unknown, not used by BIOS 1.11a |
| 2592 | 2592 | state->m_hdd_serial_number = NULL; |
| 2593 | | |
| 2593 | |
| 2594 | 2594 | state->m_scr_base = 0x1c0000; |
| 2595 | 2595 | |
| 2596 | 2596 | state->m_displist_addr = 0x4a989c; |
src/mame/drivers/cobra.c
| r15704 | r15705 | |
| 2 | 2 | */ |
| 3 | 3 | |
| 4 | 4 | /* |
| 5 | | check_color_buffer(): 0, 0 |
| 6 | | gfxfifo_exec: ram write 00100: 00000800 |
| 7 | | gfxfifo_exec: ram write 00104: 00000000 |
| 8 | | gfxfifo_exec: ram write 00108: 00000080 |
| 9 | | gfxfifo_exec: ram write 0010C: 00000080 |
| 10 | | gfxfifo_exec: ram write 00110: 20200000 |
| 11 | | gfxfifo_exec: ram write 00120: 08800800 |
| 12 | | gfxfifo_exec: ram write 00124: 00081018 |
| 13 | | gfxfifo_exec: ram write 00128: 08080808 |
| 14 | | gfxfifo_exec: ram write 80100: 00800000 |
| 15 | | gfxfifo_exec: ram write 80104: 00800000 |
| 16 | | gfxfifo_exec: ram write 80110: 00800000 |
| 17 | | gfxfifo_exec: ram write 800A8: 00000000 |
| 18 | | gfxfifo_exec: ram write 80108: 00000000 |
| 5 | check_color_buffer(): 0, 0 |
| 6 | gfxfifo_exec: ram write 00100: 00000800 |
| 7 | gfxfifo_exec: ram write 00104: 00000000 |
| 8 | gfxfifo_exec: ram write 00108: 00000080 |
| 9 | gfxfifo_exec: ram write 0010C: 00000080 |
| 10 | gfxfifo_exec: ram write 00110: 20200000 |
| 11 | gfxfifo_exec: ram write 00120: 08800800 |
| 12 | gfxfifo_exec: ram write 00124: 00081018 |
| 13 | gfxfifo_exec: ram write 00128: 08080808 |
| 14 | gfxfifo_exec: ram write 80100: 00800000 |
| 15 | gfxfifo_exec: ram write 80104: 00800000 |
| 16 | gfxfifo_exec: ram write 80110: 00800000 |
| 17 | gfxfifo_exec: ram write 800A8: 00000000 |
| 18 | gfxfifo_exec: ram write 80108: 00000000 |
| 19 | 19 | |
| 20 | | check_color_buffer(): 0, 1 |
| 21 | | gfxfifo_exec: ram write 00120: 08800800 |
| 22 | | gfxfifo_exec: ram write 00124: 00081018 |
| 23 | | gfxfifo_exec: ram write 00128: 08080808 |
| 24 | | gfxfifo_exec: ram write 80100: 00200000 |
| 25 | | gfxfifo_exec: ram write 80104: 00200000 |
| 26 | | gfxfifo_exec: ram write 80110: 00200000 |
| 27 | | gfxfifo_exec: ram write 800A8: 00000000 |
| 20 | check_color_buffer(): 0, 1 |
| 21 | gfxfifo_exec: ram write 00120: 08800800 |
| 22 | gfxfifo_exec: ram write 00124: 00081018 |
| 23 | gfxfifo_exec: ram write 00128: 08080808 |
| 24 | gfxfifo_exec: ram write 80100: 00200000 |
| 25 | gfxfifo_exec: ram write 80104: 00200000 |
| 26 | gfxfifo_exec: ram write 80110: 00200000 |
| 27 | gfxfifo_exec: ram write 800A8: 00000000 |
| 28 | 28 | |
| 29 | | check_overlay_buffer(): |
| 30 | | gfxfifo_exec: ram write 00120: 08800800 |
| 31 | | gfxfifo_exec: ram write 00124: 00081018 |
| 32 | | gfxfifo_exec: ram write 00128: 08080808 |
| 33 | | gfxfifo_exec: ram write 80100: 000E0000 |
| 34 | | gfxfifo_exec: ram write 80104: 000E0000 |
| 35 | | gfxfifo_exec: ram write 80110: 000E0000 |
| 36 | | gfxfifo_exec: ram write 800A8: 00000000 |
| 29 | check_overlay_buffer(): |
| 30 | gfxfifo_exec: ram write 00120: 08800800 |
| 31 | gfxfifo_exec: ram write 00124: 00081018 |
| 32 | gfxfifo_exec: ram write 00128: 08080808 |
| 33 | gfxfifo_exec: ram write 80100: 000E0000 |
| 34 | gfxfifo_exec: ram write 80104: 000E0000 |
| 35 | gfxfifo_exec: ram write 80110: 000E0000 |
| 36 | gfxfifo_exec: ram write 800A8: 00000000 |
| 37 | 37 | |
| 38 | | check_z_buffer(): |
| 39 | | gfxfifo_exec: ram write 00120: 08000800 |
| 40 | | gfxfifo_exec: ram write 00124: 00000010 |
| 41 | | gfxfifo_exec: ram write 00128: 00001010 |
| 42 | | gfxfifo_exec: ram write 80100: 00000000 |
| 43 | | gfxfifo_exec: ram write 80104: 00000800 |
| 44 | | gfxfifo_exec: ram write 80110: 00000800 |
| 45 | | gfxfifo_exec: ram write 800A8: 80000000 |
| 38 | check_z_buffer(): |
| 39 | gfxfifo_exec: ram write 00120: 08000800 |
| 40 | gfxfifo_exec: ram write 00124: 00000010 |
| 41 | gfxfifo_exec: ram write 00128: 00001010 |
| 42 | gfxfifo_exec: ram write 80100: 00000000 |
| 43 | gfxfifo_exec: ram write 80104: 00000800 |
| 44 | gfxfifo_exec: ram write 80110: 00000800 |
| 45 | gfxfifo_exec: ram write 800A8: 80000000 |
| 46 | 46 | |
| 47 | | check_stencil_buffer(): |
| 48 | | gfxfifo_exec: ram write 00120: 08000800 |
| 49 | | gfxfifo_exec: ram write 00124: 00000010 |
| 50 | | gfxfifo_exec: ram write 00128: 00001010 |
| 51 | | gfxfifo_exec: ram write 80100: 00000000 |
| 52 | | gfxfifo_exec: ram write 80104: 00000200 |
| 53 | | gfxfifo_exec: ram write 80110: 00000200 |
| 54 | | gfxfifo_exec: ram write 800A8: 80000000 |
| 47 | check_stencil_buffer(): |
| 48 | gfxfifo_exec: ram write 00120: 08000800 |
| 49 | gfxfifo_exec: ram write 00124: 00000010 |
| 50 | gfxfifo_exec: ram write 00128: 00001010 |
| 51 | gfxfifo_exec: ram write 80100: 00000000 |
| 52 | gfxfifo_exec: ram write 80104: 00000200 |
| 53 | gfxfifo_exec: ram write 80110: 00000200 |
| 54 | gfxfifo_exec: ram write 800A8: 80000000 |
| 55 | 55 | */ |
| 56 | 56 | |
| 57 | 57 | |
| r15704 | r15705 | |
| 203 | 203 | int m_comram_page; |
| 204 | 204 | |
| 205 | 205 | bitmap_rgb32 *m_framebuffer; |
| 206 | | |
| 206 | |
| 207 | 207 | int m_main_debug_state; |
| 208 | 208 | int m_main_debug_state_wc; |
| 209 | 209 | int m_sub_debug_state; |
| r15704 | r15705 | |
| 290 | 290 | { |
| 291 | 291 | int x = x1; |
| 292 | 292 | for (int i=0; i < abs(dx); i++) |
| 293 | | { |
| 293 | { |
| 294 | 294 | int y = y1 + (dy * (float)(x - x1) / (float)(dx)); |
| 295 | 295 | |
| 296 | 296 | UINT32 *fb = &m_fb->pix32(y); |
| r15704 | r15705 | |
| 656 | 656 | |
| 657 | 657 | |
| 658 | 658 | /* |
| 659 | | if (fifo_is_empty(S2MFIFO)) |
| 660 | | { |
| 661 | | device_spin_until_time(machine().device("subcpu"), attotime::from_usec(80)); |
| 662 | | } |
| 663 | | */ |
| 659 | if (fifo_is_empty(S2MFIFO)) |
| 660 | { |
| 661 | device_spin_until_time(machine().device("subcpu"), attotime::from_usec(80)); |
| 662 | } |
| 663 | */ |
| 664 | 664 | } |
| 665 | 665 | if (ACCESSING_BITS_32_39) |
| 666 | 666 | { |
| r15704 | r15705 | |
| 900 | 900 | |
| 901 | 901 | if (m_m2sfifo->is_empty()) |
| 902 | 902 | { |
| 903 | | // cputag_set_input_line(space.machine(), "subcpu", INPUT_LINE_IRQ0, CLEAR_LINE); |
| 903 | // cputag_set_input_line(space.machine(), "subcpu", INPUT_LINE_IRQ0, CLEAR_LINE); |
| 904 | 904 | |
| 905 | 905 | // this is a hack... |
| 906 | 906 | // MAME has a small interrupt latency, which prevents the IRQ bit from being cleared in |
| r15704 | r15705 | |
| 911 | 911 | r |= (value & 0xff) << 24; |
| 912 | 912 | |
| 913 | 913 | /* |
| 914 | | if (fifo_is_empty(M2SFIFO)) |
| 915 | | { |
| 916 | | device_spin_until_time(machine().device("maincpu"), attotime::from_usec(80)); |
| 917 | | } |
| 918 | | */ |
| 914 | if (fifo_is_empty(M2SFIFO)) |
| 915 | { |
| 916 | device_spin_until_time(machine().device("maincpu"), attotime::from_usec(80)); |
| 917 | } |
| 918 | */ |
| 919 | 919 | } |
| 920 | 920 | if (ACCESSING_BITS_16_23) |
| 921 | 921 | { |
| r15704 | r15705 | |
| 986 | 986 | |
| 987 | 987 | if (!s2mfifo_unk_flag) |
| 988 | 988 | { |
| 989 | | // cputag_set_input_line(space.machine(), "subcpu", INPUT_LINE_IRQ1, ASSERT_LINE); |
| 989 | // cputag_set_input_line(space.machine(), "subcpu", INPUT_LINE_IRQ1, ASSERT_LINE); |
| 990 | 990 | |
| 991 | 991 | // this is a hack... |
| 992 | 992 | // MAME has a small interrupt latency, which prevents the IRQ bit from being set in |
| r15704 | r15705 | |
| 995 | 995 | } |
| 996 | 996 | else |
| 997 | 997 | { |
| 998 | | // cputag_set_input_line(space.machine(), "subcpu", INPUT_LINE_IRQ1, CLEAR_LINE); |
| 998 | // cputag_set_input_line(space.machine(), "subcpu", INPUT_LINE_IRQ1, CLEAR_LINE); |
| 999 | 999 | |
| 1000 | 1000 | // this is a hack... |
| 1001 | 1001 | // MAME has a small interrupt latency, which prevents the IRQ bit from being cleared in |
| r15704 | r15705 | |
| 1195 | 1195 | AM_RANGE(0x7e000000, 0x7e000003) AM_MIRROR(0x80000000) AM_WRITE(sub_debug_w) |
| 1196 | 1196 | AM_RANGE(0x7e180000, 0x7e180003) AM_MIRROR(0x80000000) AM_READWRITE(sub_unk1_r, sub_unk1_w) |
| 1197 | 1197 | AM_RANGE(0x7e200000, 0x7e200003) AM_MIRROR(0x80000000) AM_READWRITE(sub_config_r, sub_config_w) |
| 1198 | | // AM_RANGE(0x7e240000, 0x7e27ffff) AM_MIRROR(0x80000000) AM_RAM // PSAC (ROZ) in Racing Jam. |
| 1199 | | // AM_RANGE(0x7e280000, 0x7e28ffff) AM_MIRROR(0x80000000) AM_RAM // LANC |
| 1200 | | // AM_RANGE(0x7e300000, 0x7e30ffff) AM_MIRROR(0x80000000) AM_RAM // LANC |
| 1198 | // AM_RANGE(0x7e240000, 0x7e27ffff) AM_MIRROR(0x80000000) AM_RAM // PSAC (ROZ) in Racing Jam. |
| 1199 | // AM_RANGE(0x7e280000, 0x7e28ffff) AM_MIRROR(0x80000000) AM_RAM // LANC |
| 1200 | // AM_RANGE(0x7e300000, 0x7e30ffff) AM_MIRROR(0x80000000) AM_RAM // LANC |
| 1201 | 1201 | AM_RANGE(0x7e380000, 0x7e380003) AM_MIRROR(0x80000000) AM_READWRITE(sub_mainbd_r, sub_mainbd_w) |
| 1202 | 1202 | AM_RANGE(0x7ff80000, 0x7fffffff) AM_MIRROR(0x80000000) AM_ROM AM_REGION("user2", 0) /* Boot ROM */ |
| 1203 | 1203 | ADDRESS_MAP_END |
| r15704 | r15705 | |
| 1391 | 1391 | case 0xa8: |
| 1392 | 1392 | case 0xac: |
| 1393 | 1393 | { |
| 1394 | | // 0xA80114CC prm_flashcolor() |
| 1394 | // 0xA80114CC prm_flashcolor() |
| 1395 | 1395 | // 0xA80118CC |
| 1396 | 1396 | // 0xA80108FF |
| 1397 | 1397 | |
| 1398 | | // 0xA80108FF prm_flashmisc() |
| 1398 | // 0xA80108FF prm_flashmisc() |
| 1399 | 1399 | // 0xA80110FF |
| 1400 | 1400 | // 0xA8011CE0 |
| 1401 | 1401 | |
| 1402 | | // 0xA401BCC0 texenvmode() |
| 1402 | // 0xA401BCC0 texenvmode() |
| 1403 | 1403 | |
| 1404 | | // 0xA4019CC0 mode_fog() |
| 1404 | // 0xA4019CC0 mode_fog() |
| 1405 | 1405 | |
| 1406 | | // 0xA40018C0 mode_stipple() |
| 1406 | // 0xA40018C0 mode_stipple() |
| 1407 | 1407 | // 0xA400D080 |
| 1408 | 1408 | |
| 1409 | | // 0xA40138E0 mode_viewclip() |
| 1409 | // 0xA40138E0 mode_viewclip() |
| 1410 | 1410 | |
| 1411 | | // 0xA4011410 mode_scissor() |
| 1411 | // 0xA4011410 mode_scissor() |
| 1412 | 1412 | |
| 1413 | | // 0xA40198A0 mode_alphatest() |
| 1413 | // 0xA40198A0 mode_alphatest() |
| 1414 | 1414 | |
| 1415 | | // 0xA8002010 mode_depthtest() |
| 1415 | // 0xA8002010 mode_depthtest() |
| 1416 | 1416 | |
| 1417 | | // 0xA800507C mode_blend() |
| 1417 | // 0xA800507C mode_blend() |
| 1418 | 1418 | |
| 1419 | | // 0xA8001CFE mode_stenciltest() |
| 1419 | // 0xA8001CFE mode_stenciltest() |
| 1420 | 1420 | |
| 1421 | | // 0xA8002010 mode_stencilmod() |
| 1421 | // 0xA8002010 mode_stencilmod() |
| 1422 | 1422 | // 0xA80054E0 |
| 1423 | 1423 | // 0xA8001CFE |
| 1424 | 1424 | |
| 1425 | | // 0xA80118CC mode_colormask() |
| 1425 | // 0xA80118CC mode_colormask() |
| 1426 | 1426 | // 0xA80114CC |
| 1427 | 1427 | |
| 1428 | 1428 | // 0xAxxxxxxx is different form in mbuslib_regwrite() |
| r15704 | r15705 | |
| 1461 | 1461 | { |
| 1462 | 1462 | // E0C00004 18C003C0 - 32 params |
| 1463 | 1463 | // E0C00004 18F803C1 - 48 params |
| 1464 | | // E0C00003 18C003C0 - 24 params prm_triangle() |
| 1465 | | // E0C00008 18C003C0 - 64 params prm_trianglestrip() |
| 1466 | | // E0C00001 58C003C1 - 10 params prm_trianglefan() (start vertex?) |
| 1467 | | // E0800004 18C003C0 - 32 params prm_trianglefan() |
| 1468 | | // E3000002 58C003C1 - 20 params prm_line() |
| 1469 | | // E3000008 58C003C1 - 80 params prm_lines() |
| 1470 | | // E3000005 58C003C1 - 50 params prm_linestrip() |
| 1471 | | // E2000001 18C003C0 - 8 params prm_point() |
| 1472 | | // E2000008 18C003C0 - 64 params prm_points() |
| 1464 | // E0C00003 18C003C0 - 24 params prm_triangle() |
| 1465 | // E0C00008 18C003C0 - 64 params prm_trianglestrip() |
| 1466 | // E0C00001 58C003C1 - 10 params prm_trianglefan() (start vertex?) |
| 1467 | // E0800004 18C003C0 - 32 params prm_trianglefan() |
| 1468 | // E3000002 58C003C1 - 20 params prm_line() |
| 1469 | // E3000008 58C003C1 - 80 params prm_lines() |
| 1470 | // E3000005 58C003C1 - 50 params prm_linestrip() |
| 1471 | // E2000001 18C003C0 - 8 params prm_point() |
| 1472 | // E2000008 18C003C0 - 64 params prm_points() |
| 1473 | 1473 | // E0C00003 38C003C1 - 30 params |
| 1474 | 1474 | // E0C00008 38C003C1 - 80 params |
| 1475 | 1475 | // E0C00001 78C003C0 - 10 params |
| 1476 | 1476 | // E0800004 38C003C1 - 40 params |
| 1477 | | // E3000002 78C003C0 - 20 params prm_line() |
| 1477 | // E3000002 78C003C0 - 20 params prm_line() |
| 1478 | 1478 | // E3400002 58C003C1 - 20 params |
| 1479 | 1479 | // E0C00003 18F803C1 - 36 params |
| 1480 | 1480 | // E0C00001 58F803C0 - 12 params |
| r15704 | r15705 | |
| 1536 | 1536 | return; |
| 1537 | 1537 | } |
| 1538 | 1538 | |
| 1539 | | |
| 1540 | 1539 | |
| 1540 | |
| 1541 | 1541 | // make sure the FIFO has fresh data at top... |
| 1542 | 1542 | fifo_out->flush(); |
| 1543 | 1543 | |
| r15704 | r15705 | |
| 1598 | 1598 | } |
| 1599 | 1599 | } |
| 1600 | 1600 | /* |
| 1601 | | else if (w1 == 0xe0c00003 && w2 == 0x18c003c0) |
| 1602 | | { |
| 1603 | | // Triangle poly packet? |
| 1604 | | vertex_t vert[3]; |
| 1601 | else if (w1 == 0xe0c00003 && w2 == 0x18c003c0) |
| 1602 | { |
| 1603 | // Triangle poly packet? |
| 1604 | vertex_t vert[3]; |
| 1605 | 1605 | |
| 1606 | | for (i=0; i < 3; i++) |
| 1607 | | { |
| 1608 | | UINT64 in = 0; |
| 1609 | | fifo_in->pop(NULL, &in); |
| 1606 | for (i=0; i < 3; i++) |
| 1607 | { |
| 1608 | UINT64 in = 0; |
| 1609 | fifo_in->pop(NULL, &in); |
| 1610 | 1610 | |
| 1611 | | fifo_in->pop(NULL, &in); |
| 1611 | fifo_in->pop(NULL, &in); |
| 1612 | 1612 | |
| 1613 | | vert[i].x = (u2f((UINT32)(in)) / 8.0f) + 256.0f; |
| 1613 | vert[i].x = (u2f((UINT32)(in)) / 8.0f) + 256.0f; |
| 1614 | 1614 | |
| 1615 | | fifo_in->pop(NULL, &in); |
| 1615 | fifo_in->pop(NULL, &in); |
| 1616 | 1616 | |
| 1617 | | vert[i].y = (u2f((UINT32)(in)) / 8.0f) + 192.0f; |
| 1617 | vert[i].y = (u2f((UINT32)(in)) / 8.0f) + 192.0f; |
| 1618 | 1618 | |
| 1619 | | fifo_in->pop(NULL, &in); |
| 1619 | fifo_in->pop(NULL, &in); |
| 1620 | 1620 | |
| 1621 | | fifo_in->pop(NULL, &in); |
| 1622 | | fifo_in->pop(NULL, &in); |
| 1623 | | fifo_in->pop(NULL, &in); |
| 1624 | | fifo_in->pop(NULL, &in); |
| 1625 | | } |
| 1621 | fifo_in->pop(NULL, &in); |
| 1622 | fifo_in->pop(NULL, &in); |
| 1623 | fifo_in->pop(NULL, &in); |
| 1624 | fifo_in->pop(NULL, &in); |
| 1625 | } |
| 1626 | 1626 | |
| 1627 | | render_delegate rd = render_delegate(FUNC(cobra_renderer::render_texture_scan), this); |
| 1628 | | render_triangle(visarea, rd, 6, vert[0], vert[1], vert[2]); |
| 1629 | | } |
| 1630 | | */ |
| 1627 | render_delegate rd = render_delegate(FUNC(cobra_renderer::render_texture_scan), this); |
| 1628 | render_triangle(visarea, rd, 6, vert[0], vert[1], vert[2]); |
| 1629 | } |
| 1630 | */ |
| 1631 | 1631 | else |
| 1632 | 1632 | { |
| 1633 | 1633 | printf("gfxfifo_exec: unhandled %08X %08X\n", w1, w2); |
| r15704 | r15705 | |
| 1673 | 1673 | fifo_in->pop(NULL, ¶m); |
| 1674 | 1674 | |
| 1675 | 1675 | /* |
| 1676 | | if (c == 0) |
| 1676 | if (c == 0) |
| 1677 | 1677 | printf(" "); |
| 1678 | 1678 | printf("%08X ", (UINT32)(param)); |
| 1679 | 1679 | |
| r15704 | r15705 | |
| 2058 | 2058 | if (value == 0xc0) |
| 2059 | 2059 | { |
| 2060 | 2060 | m_gfxfifo_in->pop(&space.device(), &in1); |
| 2061 | | m_gfxfifo_in->pop(&space.device(), &in2); |
| 2061 | m_gfxfifo_in->pop(&space.device(), &in2); |
| 2062 | 2062 | m_gfx_unknown_v1 = (UINT32)(in1 >> 32); // FIFO number is read back from this same register |
| 2063 | 2063 | |
| 2064 | 2064 | m_gfxfifo_out->push(&space.device(), in1 & 0xffffffff); |
| r15704 | r15705 | |
| 2379 | 2379 | rom[0x62094 / 4] = 0x60000000; // skip hardcheck()... |
| 2380 | 2380 | rom[0x62ddc / 4] = 0x60000000; // skip lanc_hardcheck() |
| 2381 | 2381 | |
| 2382 | | |
| 2382 | |
| 2383 | 2383 | // calculate the checksum of the patched rom... |
| 2384 | 2384 | UINT32 sum = 0; |
| 2385 | 2385 | for (int i=0; i < 0x20000/4; i++) |
src/mame/drivers/aces1.c
| r15704 | r15705 | |
| 45 | 45 | { |
| 46 | 46 | return 0x00; |
| 47 | 47 | } |
| 48 | | |
| 48 | |
| 49 | 49 | DECLARE_READ8_MEMBER( aces1_unk_port00_r ) |
| 50 | 50 | { |
| 51 | 51 | return 0x00; |
| r15704 | r15705 | |
| 111 | 111 | |
| 112 | 112 | DECLARE_WRITE8_MEMBER(ppi8255_ic25_intf_write_a) |
| 113 | 113 | { |
| 114 | | // printf("extender lamps %02x\n", data); |
| 114 | // printf("extender lamps %02x\n", data); |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | DECLARE_WRITE8_MEMBER(ppi8255_ic25_intf_write_b) |
| 118 | 118 | { |
| 119 | | // printf("meters, extender select %02x\n", data); |
| 119 | // printf("meters, extender select %02x\n", data); |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | DECLARE_WRITE8_MEMBER(ppi8255_ic25_intf_write_c) |
| 123 | 123 | { |
| 124 | | // printf("reels, extender strobe %02x\n", data); |
| 124 | // printf("reels, extender strobe %02x\n", data); |
| 125 | 125 | } |
| 126 | | |
| 126 | |
| 127 | 127 | DECLARE_READ8_MEMBER( ppi8255_ic37_intf_read_a ) |
| 128 | 128 | { |
| 129 | 129 | return 0xff; |
| r15704 | r15705 | |
| 154 | 154 | static TIMER_CALLBACK( m_aces1_irq_timer_callback ) |
| 155 | 155 | { |
| 156 | 156 | aces1_state *state = machine.driver_data<aces1_state>(); |
| 157 | | // printf("irq\n"); |
| 157 | // printf("irq\n"); |
| 158 | 158 | device_set_input_line(state->m_maincpu, INPUT_LINE_IRQ0, HOLD_LINE); |
| 159 | 159 | state->aces1_reset_irq_timer(); |
| 160 | 160 | } |
| r15704 | r15705 | |
| 162 | 162 | static TIMER_CALLBACK( m_aces1_nmi_timer_callback ) |
| 163 | 163 | { |
| 164 | 164 | aces1_state *state = machine.driver_data<aces1_state>(); |
| 165 | | // printf("nmi\n"); |
| 165 | // printf("nmi\n"); |
| 166 | 166 | device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE); |
| 167 | 167 | state->aces1_reset_nmi_timer(); |
| 168 | 168 | } |
| r15704 | r15705 | |
| 315 | 315 | MCFG_I8255A_ADD( "ppi8255_ic24", ppi8255_ic24_intf ) |
| 316 | 316 | MCFG_I8255A_ADD( "ppi8255_ic25", ppi8255_ic25_intf ) |
| 317 | 317 | MCFG_I8255A_ADD( "ppi8255_ic37", ppi8255_ic37_intf ) |
| 318 | | |
| 318 | |
| 319 | 319 | MCFG_MACHINE_START( aces1 ) |
| 320 | 320 | MCFG_MACHINE_RESET( aces1 ) |
| 321 | 321 | MCFG_DEFAULT_LAYOUT(layout_aces1) |
| r15704 | r15705 | |
| 403 | 403 | |
| 404 | 404 | /* |
| 405 | 405 | ROM_START( ac1taklva ) // set 2, just a merged rom of the above, probably for another emulator |
| 406 | | ROM_REGION( 0x8000, "maincpu", 0 ) |
| 407 | | ROM_LOAD( "430tl.bin", 0x0000, 0x8000, CRC(2fabb08f) SHA1(b737930e428f9258ab22394229c2b5039edf8f97) ) |
| 406 | ROM_REGION( 0x8000, "maincpu", 0 ) |
| 407 | ROM_LOAD( "430tl.bin", 0x0000, 0x8000, CRC(2fabb08f) SHA1(b737930e428f9258ab22394229c2b5039edf8f97) ) |
| 408 | 408 | ROM_END |
| 409 | 409 | |
| 410 | 410 | ROM_START( ac1cshtw ) // Cash Towers, same ROM as above, original machine apparently plays the same, reskinned machine? |
| 411 | | ROM_REGION( 0x8000, "maincpu", 0 ) |
| 412 | | ROM_LOAD( "ctp1.bin", 0x0000, 0x8000, CRC(2fabb08f) SHA1(b737930e428f9258ab22394229c2b5039edf8f97) ) |
| 411 | ROM_REGION( 0x8000, "maincpu", 0 ) |
| 412 | ROM_LOAD( "ctp1.bin", 0x0000, 0x8000, CRC(2fabb08f) SHA1(b737930e428f9258ab22394229c2b5039edf8f97) ) |
| 413 | 413 | ROM_END |
| 414 | 414 | */ |
| 415 | 415 | |
| r15704 | r15705 | |
| 731 | 731 | GAME( 199?, ac1primt ,0 ,aces1 ,aces1 ,aces1 ,ROT0 ,"Ace", "Primetime (Ace) (ACESYS1) (set 1)",GAME_IS_SKELETON_MECHANICAL ) |
| 732 | 732 | GAME( 199?, ac1primta ,ac1primt ,aces1 ,aces1 ,aces1 ,ROT0 ,"Ace", "Primetime (Ace) (ACESYS1) (set 2)",GAME_IS_SKELETON_MECHANICAL ) // same but different rom size? |
| 733 | 733 | GAME( 199?, ac1taklv ,0 ,aces1 ,aces1 ,aces1 ,ROT0 ,"Ace", "Take It Or Leave It (Ace) (ACESYS1) (set 1)",GAME_IS_SKELETON_MECHANICAL ) |
| 734 | | //GAME( 199?, ac1taklva ,ac1taklv ,aces1 ,aces1 ,aces1 ,ROT0 ,"Ace", "Take It Or Leave It (Ace) (ACESYS1) (set 2)",GAME_IS_SKELETON_MECHANICAL ) // just a merged rom of the above, probably for another emulator |
| 735 | | //GAME( 199?, ac1cshtw ,0 ,aces1 ,aces1 ,aces1 ,ROT0 ,"Ace", "Cash Towers (Ace) (ACESYS1)",GAME_IS_SKELETON_MECHANICAL ) // same ROM as above, original machine apparently plays the same, reskinned machine? |
| 734 | //GAME( 199?, ac1taklva ,ac1taklv ,aces1 ,aces1 ,aces1 ,ROT0 ,"Ace", "Take It Or Leave It (Ace) (ACESYS1) (set 2)",GAME_IS_SKELETON_MECHANICAL ) // just a merged rom of the above, probably for another emulator |
| 735 | //GAME( 199?, ac1cshtw ,0 ,aces1 ,aces1 ,aces1 ,ROT0 ,"Ace", "Cash Towers (Ace) (ACESYS1)",GAME_IS_SKELETON_MECHANICAL ) // same ROM as above, original machine apparently plays the same, reskinned machine? |
| 736 | 736 | GAME( 199?, ac1bbclb ,0 ,aces1 ,aces1 ,aces1 ,ROT0 ,"Ace", "Big Break Club (Ace) (ACESYS1) (set 1)",GAME_IS_SKELETON_MECHANICAL ) |
| 737 | 737 | GAME( 199?, ac1bbclba ,ac1bbclb ,aces1 ,aces1 ,aces1 ,ROT0 ,"Ace", "Big Break Club (Ace) (ACESYS1) (set 2)",GAME_IS_SKELETON_MECHANICAL ) |
| 738 | 738 | GAME( 199?, ac1clbsv ,0 ,aces1 ,aces1 ,aces1 ,ROT0 ,"Ace", "Club Sovereign (Ace) (ACESYS1)",GAME_IS_SKELETON_MECHANICAL ) |
src/mame/drivers/mpu5.c
| r15704 | r15705 | |
| 1057 | 1057 | ROM_LOAD16_BYTE( "bbtr02.p2", 0x000001, 0x080000, CRC(1fc52d87) SHA1(12147409de0420323c998c58eec3c3c3d326063e) ) |
| 1058 | 1058 | ROM_LOAD16_BYTE( "bbtr02.p3", 0x100000, 0x080000, CRC(6c2e9086) SHA1(856ed523b09356dd25249ad93d2433c7565fac7c) ) // == bbro10.p3 |
| 1059 | 1059 | ROM_LOAD16_BYTE( "bbtr02.p4", 0x100001, 0x080000, CRC(a0f9ff38) SHA1(e9f38c546e6a194e9c72ab5089bdf9b9c6e0c5e8) ) // == bbro10.p4 |
| 1060 | | |
| 1060 | |
| 1061 | 1061 | ROM_REGION( 0x100000, "altrevs", 0 ) /* Alternate revision Prg ROMs, to be sorted into clones */ |
| 1062 | 1062 | ROM_LOAD16_BYTE( "bbtr02ad.p1", 0x000000, 0x080000, CRC(27a37ec6) SHA1(5122603bc3c9ce4cd2627bc5229dd8becefcaadf) ) |
| 1063 | 1063 | ROM_LOAD16_BYTE( "bbtr02b.p1", 0x000000, 0x080000, CRC(6d173df4) SHA1(8fe471472b2fb01ec4d2ce7ea2984328a43d59fb) ) |
| r15704 | r15705 | |
| 1442 | 1442 | ROM_LOAD16_BYTE( "carn04.p2", 0x000001, 0x080000, CRC(99aa52e2) SHA1(3b41d928b519001497e1dae17bde5fdc71f971a7) ) |
| 1443 | 1443 | ROM_LOAD16_BYTE( "carn04.p3", 0x100000, 0x080000, CRC(b4e632d4) SHA1(4bc3d04aa1884d50c5052b9e8b0069a243d3875b) ) // == 03 |
| 1444 | 1444 | ROM_LOAD16_BYTE( "carn04.p4", 0x100001, 0x080000, CRC(691b53e5) SHA1(580f9ea8cc2ca5cb80da8aecd7d7a6b3ce5e158c) ) // == 03 |
| 1445 | | |
| 1445 | |
| 1446 | 1446 | ROM_REGION( 0x100000, "altrevs", 0 ) /* Alternate revision Prg ROMs, to be sorted into clones */ |
| 1447 | 1447 | ROM_LOAD16_BYTE( "carn04ad.p1", 0x000000, 0x080000, CRC(aa4a14e5) SHA1(250941c658dce7077a0b5a65be464ff6307aabdf) ) |
| 1448 | 1448 | ROM_LOAD16_BYTE( "carn04b.p1", 0x000000, 0x080000, CRC(c9ced662) SHA1(2a0da3e37ad6d6d9c2401182c368256102c23800) ) |
| r15704 | r15705 | |
| 1665 | 1665 | ROM_LOAD16_BYTE( "cotr02.p2", 0x000001, 0x080000, CRC(69cdb5b3) SHA1(399f8c6049de30aded5766514a40cedea043df3a) ) |
| 1666 | 1666 | ROM_LOAD16_BYTE( "cotr02.p3", 0x100000, 0x080000, CRC(2fc0ed76) SHA1(6548767bc1c0d6135de3a60a0f6ce48098f7d137) ) // == 06 |
| 1667 | 1667 | ROM_LOAD16_BYTE( "cotr02.p4", 0x100001, 0x080000, CRC(fb5c5c16) SHA1(7c6346bb93933bd4b5a0cf73ba4eeb74d2b47812) ) // == 06 |
| 1668 | | |
| 1668 | |
| 1669 | 1669 | ROM_REGION( 0x100000, "altrevs", 0 ) /* Alternate revision Prg ROMs, to be sorted into clones */ |
| 1670 | 1670 | ROM_LOAD16_BYTE( "cotr02d.p1", 0x000000, 0x080000, CRC(0a08db68) SHA1(dc31265d659acb53e1ce2b823501387c7d629ffe) ) |
| 1671 | 1671 | ROM_LOAD16_BYTE( "cotr02dy.p1", 0x000000, 0x080000, CRC(abcf7e6f) SHA1(cab844c757dd4ed4bed44fe371a3ffa9b54a42b3) ) |
| r15704 | r15705 | |
| 1896 | 1896 | ROM_LOAD16_BYTE( "drct07.p2", 0x000001, 0x080000, CRC(4ce428df) SHA1(1144bc21269af10e7094b1bd2271fc6ee63a8d25) ) |
| 1897 | 1897 | ROM_LOAD16_BYTE( "drct07.p3", 0x100000, 0x080000, CRC(5054ec32) SHA1(2f4134456f502583ce93af4ccc55eb89dbfe48ca) ) // == 06 |
| 1898 | 1898 | ROM_LOAD16_BYTE( "drct07.p4", 0x100001, 0x080000, CRC(0483d31f) SHA1(81a299f05cfd6d1446d44509da86c3a70fb00ba0) ) // == 06 |
| 1899 | | |
| 1899 | |
| 1900 | 1900 | ROM_REGION( 0x100000, "altrevs", 0 ) /* Alternate revision Prg ROMs, to be sorted into clones */ |
| 1901 | 1901 | ROM_LOAD16_BYTE( "drct07d.p1", 0x000000, 0x080000, CRC(c467ca89) SHA1(06f13448860ca7360dd48e29fc780554bc42ab8b) ) |
| 1902 | 1902 | ROM_LOAD16_BYTE( "drct07dz.p1", 0x000000, 0x080000, CRC(907d9e63) SHA1(a1a8f74e79043cecb42cfd28c14cef98d54b4785) ) |
| r15704 | r15705 | |
| 2434 | 2434 | ROM_LOAD16_BYTE( "g1tr02.p2", 0x000001, 0x080000, CRC(7d3118e9) SHA1(a4ccf46d15125c67e6e17b117bc3a880b46b47e7) ) |
| 2435 | 2435 | ROM_LOAD16_BYTE( "g1tr02.p3", 0x100000, 0x080000, CRC(befbf489) SHA1(d198c27bafaddfd9c2c522be84b2a7aae52f712a) ) // == 03 |
| 2436 | 2436 | ROM_LOAD16_BYTE( "g1tr02.p4", 0x100001, 0x080000, CRC(50e63933) SHA1(501caf831c11d603079807f3fd0570f0991a5f9c) ) // == 03 |
| 2437 | | |
| 2437 | |
| 2438 | 2438 | ROM_REGION( 0x100000, "altrevs", 0 ) /* Alternate revision Prg ROMs, to be sorted into clones */ |
| 2439 | 2439 | ROM_LOAD16_BYTE( "g1tr02dy.p1", 0x000000, 0x080000, CRC(e9c967ea) SHA1(1a2806e5b95e11aa5a80d7e434ebb40eba057aac) ) |
| 2440 | 2440 | ROM_LOAD16_BYTE( "g1tr02k.p1", 0x000000, 0x080000, CRC(d892e461) SHA1(72185d4c8e6670a0ec87f3807d4c465b1ea2ea89) ) |
| r15704 | r15705 | |
| 2447 | 2447 | ROM_LOAD16_BYTE( "gotr01.p2", 0x000001, 0x080000, CRC(000f6663) SHA1(f79f52c5d4af6cf576db9c529b868b34cd203026) ) |
| 2448 | 2448 | ROM_LOAD16_BYTE( "gotr01.p3", 0x100000, 0x080000, CRC(befbf489) SHA1(d198c27bafaddfd9c2c522be84b2a7aae52f712a) ) // == 03 |
| 2449 | 2449 | ROM_LOAD16_BYTE( "gotr01.p4", 0x100001, 0x080000, CRC(50e63933) SHA1(501caf831c11d603079807f3fd0570f0991a5f9c) ) // == 03 |
| 2450 | | |
| 2451 | | ROM_REGION( 0x100000, "altrevs", 0 ) /* Alternate revision Prg ROMs, to be sorted into clones */ |
| 2450 | |
| 2451 | ROM_REGION( 0x100000, "altrevs", 0 ) /* Alternate revision Prg ROMs, to be sorted into clones */ |
| 2452 | 2452 | ROM_LOAD16_BYTE( "gotr01d.p1", 0x000000, 0x080000, CRC(171a5db8) SHA1(4b10705efafcc456c2a26f9a80bbb9f7c67cea9b) ) |
| 2453 | 2453 | ROM_LOAD16_BYTE( "gotr01dy.p1", 0x000000, 0x080000, CRC(715102e2) SHA1(af067bb2a80793391cb350e15f7f364f9ed3ee22) ) |
| 2454 | 2454 | ROM_LOAD16_BYTE( "gotr01k.p1", 0x000000, 0x080000, CRC(c57930cb) SHA1(3d24482169dc207b5d8ff9819fff8661df19bc79) ) |
| r15704 | r15705 | |
| 5971 | 5971 | |
| 5972 | 5972 | ROM_REGION( 0x100000, "altrevs", 0 ) /* Alternate revision Prg ROMs, to be sorted into clones */ |
| 5973 | 5973 | ROM_LOAD16_BYTE( "ms__sjs2.2_1", 0x000000, 0x080000, CRC(312c2501) SHA1(95e16c5013ea8e246c04b828af6f6b3ca82d18e0) ) |
| 5974 | | // ROM_LOAD16_BYTE( "ms__sjs2.2_2", 0x000000, 0x080000, CRC(31187bc2) SHA1(d352d67feddbf670dbbaff224b19701ce1231fd9) ) |
| 5975 | | // ROM_LOAD16_BYTE( "ms__sjs2.2_3", 0x000000, 0x080000, CRC(8c44ed26) SHA1(35b29f7e4d9c1c73dd9d4891decc131443fc21c5) ) |
| 5976 | | // ROM_LOAD16_BYTE( "ms__sjs2.2_4", 0x000000, 0x080000, CRC(eb3b0f16) SHA1(4664110800c2f5005ffe8d8c1cf5b588dd994347) ) |
| 5974 | // ROM_LOAD16_BYTE( "ms__sjs2.2_2", 0x000000, 0x080000, CRC(31187bc2) SHA1(d352d67feddbf670dbbaff224b19701ce1231fd9) ) |
| 5975 | // ROM_LOAD16_BYTE( "ms__sjs2.2_3", 0x000000, 0x080000, CRC(8c44ed26) SHA1(35b29f7e4d9c1c73dd9d4891decc131443fc21c5) ) |
| 5976 | // ROM_LOAD16_BYTE( "ms__sjs2.2_4", 0x000000, 0x080000, CRC(eb3b0f16) SHA1(4664110800c2f5005ffe8d8c1cf5b588dd994347) ) |
| 5977 | 5977 | ROM_END |
| 5978 | 5978 | |
| 5979 | 5979 | |
src/emu/machine/netlist.h
| r15704 | r15705 | |
| 6 | 6 | |
| 7 | 7 | **************************************************************************** |
| 8 | 8 | |
| 9 | | Couriersud reserves the right to license the code under a less restrictive |
| 10 | | license going forward. |
| 9 | Couriersud reserves the right to license the code under a less restrictive |
| 10 | license going forward. |
| 11 | 11 | |
| 12 | | Copyright Nicola Salmoria and the MAME team |
| 13 | | All rights reserved. |
| 12 | Copyright Nicola Salmoria and the MAME team |
| 13 | All rights reserved. |
| 14 | 14 | |
| 15 | | Redistribution and use of this code or any derivative works are permitted |
| 16 | | provided that the following conditions are met: |
| 15 | Redistribution and use of this code or any derivative works are permitted |
| 16 | provided that the following conditions are met: |
| 17 | 17 | |
| 18 | | * Redistributions may not be sold, nor may they be used in a commercial |
| 19 | | product or activity. |
| 18 | * Redistributions may not be sold, nor may they be used in a commercial |
| 19 | product or activity. |
| 20 | 20 | |
| 21 | | * Redistributions that are modified from the original source must include the |
| 22 | | complete source code, including the source code for all components used by a |
| 23 | | binary built from the modified sources. However, as a special exception, the |
| 24 | | source code distributed need not include anything that is normally distributed |
| 25 | | (in either source or binary form) with the major components (compiler, kernel, |
| 26 | | and so on) of the operating system on which the executable runs, unless that |
| 27 | | component itself accompanies the executable. |
| 21 | * Redistributions that are modified from the original source must include the |
| 22 | complete source code, including the source code for all components used by a |
| 23 | binary built from the modified sources. However, as a special exception, the |
| 24 | source code distributed need not include anything that is normally distributed |
| 25 | (in either source or binary form) with the major components (compiler, kernel, |
| 26 | and so on) of the operating system on which the executable runs, unless that |
| 27 | component itself accompanies the executable. |
| 28 | 28 | |
| 29 | | * Redistributions must reproduce the above copyright notice, this list of |
| 30 | | conditions and the following disclaimer in the documentation and/or other |
| 31 | | materials provided with the distribution. |
| 29 | * Redistributions must reproduce the above copyright notice, this list of |
| 30 | conditions and the following disclaimer in the documentation and/or other |
| 31 | materials provided with the distribution. |
| 32 | 32 | |
| 33 | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 34 | | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 35 | | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 36 | | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| 37 | | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 38 | | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 39 | | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 40 | | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 41 | | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 42 | | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 43 | | POSSIBILITY OF SUCH DAMAGE. |
| 33 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 34 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 35 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 36 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| 37 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 38 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 39 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 40 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 41 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 42 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 43 | POSSIBILITY OF SUCH DAMAGE. |
| 44 | 44 | |
| 45 | 45 | |
| 46 | 46 | ****************************************************************************/ |
| r15704 | r15705 | |
| 93 | 93 | |
| 94 | 94 | #define NETLIST_END } |
| 95 | 95 | |
| 96 | | #define NETLIST_INCLUDE(_name) \ |
| 96 | #define NETLIST_INCLUDE(_name) \ |
| 97 | 97 | NETLIST_NAME(_name)(netlist); \ |
| 98 | 98 | |
| 99 | 99 | |
| 100 | | #define NETLIST_MEMREGION(_name) \ |
| 100 | #define NETLIST_MEMREGION(_name) \ |
| 101 | 101 | netlist.parse((char *)downcast<netlist_t &>(netlist.netlist()).machine().root_device().memregion(_name)->base()); \ |
| 102 | 102 | |
| 103 | 103 | #if defined(__GNUC__) && (__GNUC__ >= 3) |
| r15704 | r15705 | |
| 154 | 154 | // MAME specific |
| 155 | 155 | |
| 156 | 156 | #define MCFG_NETLIST_ADD(_tag, _clock, _setup, _subcycles) \ |
| 157 | | MCFG_DEVICE_ADD(_tag, NETLIST, _clock) \ |
| 157 | MCFG_DEVICE_ADD(_tag, NETLIST, _clock) \ |
| 158 | 158 | MCFG_NETLIST_SUBCYCLES(_subcycles) \ |
| 159 | | MCFG_NETLIST_SETUP(_setup) \ |
| 159 | MCFG_NETLIST_SETUP(_setup) \ |
| 160 | 160 | |
| 161 | 161 | #define MCFG_NETLIST_REPLACE(_tag, _clock, _setup, _subcycles) \ |
| 162 | | MCFG_DEVICE_REPLACE(_tag, NETLIST, _clock) \ |
| 162 | MCFG_DEVICE_REPLACE(_tag, NETLIST, _clock) \ |
| 163 | 163 | MCFG_NETLIST_SUBCYCLES(_subcycles) \ |
| 164 | | MCFG_NETLIST_SETUP(_setup) \ |
| 164 | MCFG_NETLIST_SETUP(_setup) \ |
| 165 | 165 | |
| 166 | | #define MCFG_NETLIST_SUBCYCLES(_subcycles) \ |
| 166 | #define MCFG_NETLIST_SUBCYCLES(_subcycles) \ |
| 167 | 167 | netlist_mame_device::static_set_subcycles(*device, _subcycles); \ |
| 168 | 168 | |
| 169 | | #define MCFG_NETLIST_SETUP(_setup) \ |
| 169 | #define MCFG_NETLIST_SETUP(_setup) \ |
| 170 | 170 | netlist_mame_device::static_set_constructor(*device, NETLIST_NAME(_setup)); \ |
| 171 | 171 | |
| 172 | 172 | |
| r15704 | r15705 | |
| 267 | 267 | public: |
| 268 | 268 | net_output_t(); |
| 269 | 269 | |
| 270 | | ATTR_HOT inline void clear() { set_Q(nst_LOW); } |
| 271 | | ATTR_HOT inline void set() { set_Q(nst_HIGH); } |
| 270 | ATTR_HOT inline void clear() { set_Q(nst_LOW); } |
| 271 | ATTR_HOT inline void set() { set_Q(nst_HIGH); } |
| 272 | 272 | ATTR_HOT inline void setTo(const net_sig_t val) { set_Q(val); } |
| 273 | 273 | ATTR_HOT inline void setTo(const net_sig_t val, const UINT8 delay_ns) { set_Q(val,delay_ns); } |
| 274 | 274 | ATTR_HOT inline void setToNoCheck(const net_sig_t val) |
| r15704 | r15705 | |
| 285 | 285 | |
| 286 | 286 | ATTR_COLD void initial(const net_sig_t val) { m_Q = val; m_new_Q = val; } |
| 287 | 287 | |
| 288 | | ATTR_HOT inline const net_sig_t Q() const { return m_Q; } |
| 288 | ATTR_HOT inline const net_sig_t Q() const { return m_Q; } |
| 289 | 289 | |
| 290 | 290 | inline net_sig_t *Q_ptr() { return &m_Q; } |
| 291 | | inline net_sig_t *new_Q_ptr() { return &m_new_Q; } |
| 291 | inline net_sig_t *new_Q_ptr() { return &m_new_Q; } |
| 292 | 292 | |
| 293 | 293 | ATTR_COLD void register_con(net_dev_t *dev); |
| 294 | 294 | |
| r15704 | r15705 | |
| 407 | 407 | inline void initial(const double val) { m_param = val; } |
| 408 | 408 | inline void initial(const int val) { m_param = val; } |
| 409 | 409 | |
| 410 | | inline double Value() { return m_param; } |
| 411 | | inline int ValueInt() { return m_param; } |
| 410 | inline double Value() { return m_param; } |
| 411 | inline int ValueInt() { return m_param; } |
| 412 | 412 | |
| 413 | 413 | ATTR_HOT inline const net_dev_t *ttl_dev() { return m_ttldev; } |
| 414 | 414 | void set_ttl_dev(net_dev_t *dev) { m_ttldev = dev; } |
src/mess/drivers/vk100.c
| r15704 | r15705 | |
| 164 | 164 | UINT8 m_VG_MODE; |
| 165 | 165 | UINT8 m_LASTVRAM; |
| 166 | 166 | UINT8 m_vgGO; |
| 167 | | |
| 167 | |
| 168 | 168 | DECLARE_WRITE8_MEMBER(vgLD_X); |
| 169 | 169 | DECLARE_WRITE8_MEMBER(vgLD_Y); |
| 170 | 170 | DECLARE_WRITE8_MEMBER(vgERR); |
| r15704 | r15705 | |
| 189 | 189 | static TIMER_CALLBACK( execute_vg ) |
| 190 | 190 | { |
| 191 | 191 | /* figure out ram address based on tech manual page 5-24: |
| 192 | | * real address to 16-bit chunk a13 a12 | a11 a10 a9 a8 | a7 a6 a5 a4 | a3 a2 a1 a0 |
| 193 | | * X+Y input Y8 Y7 | Y6 Y5 Y4 Y3 | Y2 Y1 X9' X8'| X7' X6' X5' X4' |
| 194 | | * X3' and X2' choose a 4-bit block, X1 and X0 choose a bit within that. |
| 195 | | * Figure out the ram address in address space "vram" based on this: |
| 196 | | * vram is 0x8000 long (0x4000 16-bit blocks in sequence) |
| 197 | | * so: |
| 198 | | * vram: a14 a13 a12 | a11 a10 a9 a8 | a7 a6 a5 a4 | a3 a2 a1 a0 |
| 199 | | * vg: Y8 Y7 Y6 | Y5 Y4 Y3 Y2 | Y1 X9' X8' X7'| X6' X5' X4'(x3') x2' x1 x0 |
| 200 | | * X3' is handled by the nybblenum statement, as is X2' |
| 201 | | * X1 and X0 are handled by the pattern rom directly: |
| 202 | | * x0 -> a0, x1 -> a1 |
| 203 | | * this handles bits like: |
| 204 | | * x1 x0 |
| 205 | | * 0 0 -> bit 0 |
| 206 | | * 0 1 -> bit 1 |
| 207 | | * 1 0 -> bit 2 |
| 208 | | * 1 1 -> bit 3 |
| 209 | | * |
| 210 | | */ |
| 192 | * real address to 16-bit chunk a13 a12 | a11 a10 a9 a8 | a7 a6 a5 a4 | a3 a2 a1 a0 |
| 193 | * X+Y input Y8 Y7 | Y6 Y5 Y4 Y3 | Y2 Y1 X9' X8'| X7' X6' X5' X4' |
| 194 | * X3' and X2' choose a 4-bit block, X1 and X0 choose a bit within that. |
| 195 | * Figure out the ram address in address space "vram" based on this: |
| 196 | * vram is 0x8000 long (0x4000 16-bit blocks in sequence) |
| 197 | * so: |
| 198 | * vram: a14 a13 a12 | a11 a10 a9 a8 | a7 a6 a5 a4 | a3 a2 a1 a0 |
| 199 | * vg: Y8 Y7 Y6 | Y5 Y4 Y3 Y2 | Y1 X9' X8' X7'| X6' X5' X4'(x3') x2' x1 x0 |
| 200 | * X3' is handled by the nybblenum statement, as is X2' |
| 201 | * X1 and X0 are handled by the pattern rom directly: |
| 202 | * x0 -> a0, x1 -> a1 |
| 203 | * this handles bits like: |
| 204 | * x1 x0 |
| 205 | * 0 0 -> bit 0 |
| 206 | * 0 1 -> bit 1 |
| 207 | * 1 0 -> bit 2 |
| 208 | * 1 1 -> bit 3 |
| 209 | * |
| 210 | */ |
| 211 | 211 | vk100_state *state = machine.driver_data<vk100_state>(); |
| 212 | 212 | // XFinal is (X'&0x3FC)|(X&0x3) |
| 213 | 213 | UINT16 XFinal = state->m_trans[(state->m_vgX&0x3FC)>>2]<<2|(state->m_vgX&0x3); // appears correct |
| r15704 | r15705 | |
| 317 | 317 | /* |
| 318 | 318 | void drawVector(UINT16 px, UINT16 py, UINT16 x, UINT16 y, int pattern) |
| 319 | 319 | { |
| 320 | | UINT8 *gfx = machine.root_device().memregion("vram")->base(); |
| 320 | UINT8 *gfx = machine.root_device().memregion("vram")->base(); |
| 321 | 321 | }*/ |
| 322 | 322 | |
| 323 | 323 | /* ports 0x40 and 0x41: load low and high bytes of vector gen X register */ |
| r15704 | r15705 | |
| 349 | 349 | #endif |
| 350 | 350 | } |
| 351 | 351 | |
| 352 | | /* port 0x45: "SOPS" screen options |
| 352 | /* port 0x45: "SOPS" screen options |
| 353 | 353 | * Blink --Background color-- Blink Serial Select Reverse |
| 354 | 354 | * Enable Green Red Blue Control BG/FG |
| 355 | 355 | * d7 d6 d5 d4 d3 d2 d1 d0 |
| 356 | | * apparently, 00 = rs232/eia, 01 = 20ma, 10 = hardcopy, 11 = test/loopback |
| 356 | * apparently, 00 = rs232/eia, 01 = 20ma, 10 = hardcopy, 11 = test/loopback |
| 357 | 357 | */ |
| 358 | 358 | WRITE8_MEMBER(vk100_state::vgSOPS) |
| 359 | 359 | { |
| r15704 | r15705 | |
| 369 | 369 | { |
| 370 | 370 | m_vgPAT = data; |
| 371 | 371 | #ifdef PAT_DEBUG |
| 372 | | for (int i = 7; i >= 0; i--) |
| 372 | for (int i = 7; i >= 0; i--) |
| 373 | 373 | { |
| 374 | 374 | printf("%s", (data&(1<<i))?"X":"."); |
| 375 | 375 | } |
| r15704 | r15705 | |
| 380 | 380 | #endif |
| 381 | 381 | } |
| 382 | 382 | |
| 383 | | /* port 0x47: "PMUL" load vg Pattern Multiply Register |
| 383 | /* port 0x47: "PMUL" load vg Pattern Multiply Register |
| 384 | 384 | The pattern multiply register loads a counter which counts reads from |
| 385 | 385 | the pattern register and increments on each one. if it overflows from |
| 386 | 386 | 1111 to 0000 the pattern register is shifted right one bit and the |
| r15704 | r15705 | |
| 446 | 446 | m_vgPAT_Mask = 0x100; |
| 447 | 447 | m_VG_MODE = 0; |
| 448 | 448 | m_vgGO = 1; |
| 449 | | machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg)); |
| 449 | machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg)); |
| 450 | 450 | } |
| 451 | 451 | |
| 452 | 452 | /* port 0x65: "EX DOT" execute a dot (start the state machine) */ |
| r15704 | r15705 | |
| 460 | 460 | m_vgPAT_Mask = 0x100; // load vgPAT_Mask |
| 461 | 461 | m_VG_MODE = 1; |
| 462 | 462 | m_vgGO = 1; |
| 463 | | machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg)); |
| 463 | machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg)); |
| 464 | 464 | } |
| 465 | 465 | |
| 466 | 466 | /* port 0x66: "EX VEC" execute a pattern (8 fixed direction) vector (start the state machine) */ |
| r15704 | r15705 | |
| 473 | 473 | m_vgPAT_Mask = 0x100; // load vgPAT_Mask |
| 474 | 474 | m_VG_MODE = 2; |
| 475 | 475 | m_vgGO = 1; |
| 476 | | machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg)); |
| 476 | machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg)); |
| 477 | 477 | } |
| 478 | 478 | |
| 479 | 479 | /* port 0x67: "EX ER" execute an "erase"? */ |
| r15704 | r15705 | |
| 487 | 487 | m_vgPAT_Mask = 0x100; // load vgPAT_Mask |
| 488 | 488 | m_VG_MODE = 3; |
| 489 | 489 | m_vgGO = 1; |
| 490 | | machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg)); |
| 490 | machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg)); |
| 491 | 491 | } |
| 492 | 492 | |
| 493 | 493 | /* port 0x68: "KBDW" d7 is beeper, d6 is keyclick, d5-d0 are keyboard LEDS */ |
| r15704 | r15705 | |
| 521 | 521 | /* port 0x40-0x47: "SYSTAT A"; various status bits, poorly documented in the tech manual |
| 522 | 522 | * /GO BIT3 BIT2 BIT1 BIT0 Dip ? ? |
| 523 | 523 | * Switch |
| 524 | | * d7 d6 d5 d4 d3 d2 d1 d0 |
| 524 | * d7 d6 d5 d4 d3 d2 d1 d0 |
| 525 | 525 | * bit3, 2, 1, 0 are the last 4 bits read by the vector generator from VRAM |
| 526 | 526 | * this appears to be the only way the vram can be READ by the cpu |
| 527 | 527 | d2 is where the dipswitch values are read from, based on the offset |
| 528 | 528 | d1 is unknown |
| 529 | 529 | d0 is unknown |
| 530 | | |
| 530 | |
| 531 | 531 | 31D reads and checks d7 in a loop |
| 532 | 532 | 205 reads, xors with 0x55 (from reg D), ANDS result with 0x78 and branches if it is not zero (checking for bit pattern 1010?) |
| 533 | 533 | 299 reads, rotates result right 3 times and ANDs the result with 0x0F |
| r15704 | r15705 | |
| 544 | 544 | |
| 545 | 545 | /* port 0x48: "SYSTAT B"; NOT documented in the tech manual at all. |
| 546 | 546 | * ? ? ? ? ? ? ? ? |
| 547 | | * d7 d6 d5 d4 d3 d2 d1 d0 |
| 547 | * d7 d6 d5 d4 d3 d2 d1 d0 |
| 548 | 548 | * according to the code at 606, the systat b register has something |
| 549 | 549 | * to do with the uart 8251, though what exactly is unclear. |
| 550 | 550 | * the ACTS (inverse of DCTS) signal lives in one of these bits (see 5-62) |
| r15704 | r15705 | |
| 601 | 601 | AM_RANGE (0x68, 0x68) AM_WRITE(KBDW) //KBDW (probably AM_MIRROR(0x03)) |
| 602 | 602 | AM_RANGE (0x6C, 0x6C) AM_WRITE(BAUD) //LD BAUD (baud rate clock divider setting for i8251 tx and rx clocks) (probably AM_MIRROR(0x03)) |
| 603 | 603 | AM_RANGE(0x70, 0x70) AM_DEVWRITE("i8251", i8251_device, data_w) //LD COMD (i8251 data reg) |
| 604 | | AM_RANGE(0x71, 0x71) AM_DEVWRITE("i8251", i8251_device, control_w) //LD COM (i8251 control reg) |
| 604 | AM_RANGE(0x71, 0x71) AM_DEVWRITE("i8251", i8251_device, control_w) //LD COM (i8251 control reg) |
| 605 | 605 | //AM_RANGE (0x74, 0x74) AM_WRITE(unknown_74) |
| 606 | 606 | //AM_RANGE (0x78, 0x78) AM_WRITE(kbdw) //KBDW ?(mirror?) |
| 607 | 607 | //AM_RANGE (0x7C, 0x7C) AM_WRITE(unknown_7C) |
| r15704 | r15705 | |
| 840 | 840 | |
| 841 | 841 | static MC6845_UPDATE_ROW( vk100_update_row ) |
| 842 | 842 | { |
| 843 | | static const UINT32 colorTable[16] = { |
| 843 | static const UINT32 colorTable[16] = { |
| 844 | 844 | 0x000000, 0x0000FF, 0xFF0000, 0xFF00FF, 0x00FF00, 0x00FFFF, 0xFFFF00, 0xFFFFFF, |
| 845 | 845 | 0x000000, 0x0000FF, 0xFF0000, 0xFF00FF, 0x00FF00, 0x00FFFF, 0xFFFF00, 0xFFFFFF }; |
| 846 | | static const UINT32 colorTable2[16] = { |
| 846 | static const UINT32 colorTable2[16] = { |
| 847 | 847 | 0x000000, 0x0000FF, 0xFF0000, 0xFF00FF, 0x00FF00, 0x00FFFF, 0xFFFF00, 0xFFFFFF, |
| 848 | | 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000 }; |
| 848 | 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000 }; |
| 849 | 849 | //printf("y=%d, ma=%04x, ra=%02x, x_count=%02x ", y, ma, ra, x_count); |
| 850 | 850 | /* figure out ram address based on tech manual page 5-23: |
| 851 | | * real address to 16-bit chunk a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0 |
| 852 | | * crtc input MA11 MA10 MA9 MA8 MA7 MA6 RA1 RA0 MA5 MA4 MA3 MA2 MA1 MA0 |
| 853 | | */ |
| 851 | * real address to 16-bit chunk a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0 |
| 852 | * crtc input MA11 MA10 MA9 MA8 MA7 MA6 RA1 RA0 MA5 MA4 MA3 MA2 MA1 MA0 |
| 853 | */ |
| 854 | 854 | vk100_state *state = device->machine().driver_data<vk100_state>(); |
| 855 | 855 | UINT16 EA = ((ma&0xfc0)<<2)|((ra&0x3)<<6)|(ma&0x3F); |
| 856 | 856 | // display the 64 different 12-bit-wide chunks |
| r15704 | r15705 | |
| 967 | 967 | |
| 968 | 968 | ROM_REGION( 0x400, "proms", ROMREGION_ERASEFF ) |
| 969 | 969 | /* some sort of "COUNTER ROM" involved with erasing VRAM dram to the background color? (256*4, 82s129) |
| 970 | | * control bits: |
| 971 | | * /CE1 ----- ? |
| 972 | | * /CE2 ----- ? |
| 973 | | * addr bits: 76543210 |
| 974 | | * |||||||\-- ? |
| 975 | | * ||||||\--- ? |
| 976 | | * |||||\---- ? |
| 977 | | * ||||\----- ? |
| 978 | | * |||\------ ? |
| 979 | | * ||\------- ? |
| 980 | | * |\-------- ? |
| 981 | | * \--------- comes from the gated ERASE L/d5 on the vector rom [verified from tracing] |
| 982 | | * data bits: 3210 |
| 983 | | * |||\-- ? |
| 984 | | * ||\--- ? |
| 985 | | * |\---- ? |
| 986 | | * \----- ? |
| 987 | | */ |
| 970 | * control bits: |
| 971 | * /CE1 ----- ? |
| 972 | * /CE2 ----- ? |
| 973 | * addr bits: 76543210 |
| 974 | * |||||||\-- ? |
| 975 | * ||||||\--- ? |
| 976 | * |||||\---- ? |
| 977 | * ||||\----- ? |
| 978 | * |||\------ ? |
| 979 | * ||\------- ? |
| 980 | * |\-------- ? |
| 981 | * \--------- comes from the gated ERASE L/d5 on the vector rom [verified from tracing] |
| 982 | * data bits: 3210 |
| 983 | * |||\-- ? |
| 984 | * ||\--- ? |
| 985 | * |\---- ? |
| 986 | * \----- ? |
| 987 | */ |
| 988 | 988 | ROM_LOAD( "wb8151_573a2.6301.pr3.ic44", 0x0000, 0x0100, CRC(75885a9f) SHA1(c721dad6a69c291dd86dad102ed3a8ddd620ecc4)) // label verified from nigwil's and andy's board |
| 989 | 989 | /* this is the "DIRECTION ROM" == mb6309 (256x8, 82s135) |
| 990 | | * see figure 5-24 on page 5-39 |
| 991 | | * It tells the direction and enable for counting on the X and Y counters |
| 992 | | * and also handles the non-math related parts of the bresenham line algorithm |
| 993 | | * control bits: |
| 994 | | * /CE1 ----- ? |
| 995 | | * /CE2 ----- ? |
| 996 | | * addr bits: 76543210 |
| 997 | | * ||||\\\\-- DIR (vgDIR register low 4 bits) |
| 998 | | * |||\------ ERROR CARRY (strobed in by STROBE L from the error counter's adder) |
| 999 | | * ||\------- Y0 (the otherwise unused lsb of the Y register, used for bresenham) |
| 1000 | | * |\-------- feedback bit from d5 gated by V CLK |
| 1001 | | * \--------- GND; the second half of the prom is blank (0x00) |
| 1002 | | * data bits: 76543210 |
| 1003 | | * |||||||\-- ENA X (enables change on X counter) |
| 1004 | | * ||||||\--- ENA Y (enables change on Y counter) |
| 1005 | | * |||||\---- Y DIRECTION (high is count down, low is count up) |
| 1006 | | * ||||\----- X DIRECTION (high is count down, low is count up) |
| 1007 | | * |||\------ PIXEL WRT |
| 1008 | | * ||\------- feedback bit to a6 |
| 1009 | | * |\-------- UNUSED, always 0 |
| 1010 | | * \--------- UNUSED, always 0 |
| 1011 | | */ |
| 990 | * see figure 5-24 on page 5-39 |
| 991 | * It tells the direction and enable for counting on the X and Y counters |
| 992 | * and also handles the non-math related parts of the bresenham line algorithm |
| 993 | * control bits: |
| 994 | * /CE1 ----- ? |
| 995 | * /CE2 ----- ? |
| 996 | * addr bits: 76543210 |
| 997 | * ||||\\\\-- DIR (vgDIR register low 4 bits) |
| 998 | * |||\------ ERROR CARRY (strobed in by STROBE L from the error counter's adder) |
| 999 | * ||\------- Y0 (the otherwise unused lsb of the Y register, used for bresenham) |
| 1000 | * |\-------- feedback bit from d5 gated by V CLK |
| 1001 | * \--------- GND; the second half of the prom is blank (0x00) |
| 1002 | * data bits: 76543210 |
| 1003 | * |||||||\-- ENA X (enables change on X counter) |
| 1004 | * ||||||\--- ENA Y (enables change on Y counter) |
| 1005 | * |||||\---- Y DIRECTION (high is count down, low is count up) |
| 1006 | * ||||\----- X DIRECTION (high is count down, low is count up) |
| 1007 | * |||\------ PIXEL WRT |
| 1008 | * ||\------- feedback bit to a6 |
| 1009 | * |\-------- UNUSED, always 0 |
| 1010 | * \--------- UNUSED, always 0 |
| 1011 | */ |
| 1012 | 1012 | ROM_LOAD( "wb8141_059b1.tbp18s22.pr5.ic108", 0x0100, 0x0100, CRC(4b63857a) SHA1(3217247d983521f0b0499b5c4ef6b5de9844c465)) // label verified from andy's board |
| 1013 | 1013 | /* this is the "VECTOR ROM" (256*8, 82s135) which runs the vector generator state machine |
| 1014 | | * the vector rom bits are complex and are unfortunately poorly documented |
| 1015 | | * in the tech manual. see figure 5-23. |
| 1016 | | * control bits: |
| 1017 | | * /CE1 ----- ? |
| 1018 | | * /CE2 ----- ? |
| 1019 | | * addr bits: 76543210 |
| 1020 | | * ||||\\\\-- To sync counter, which counts 0xC 0x3 0x2 0x1 0x0 0x5 0x4 0xB 0xA 0x9 0x8 0xD in that order |
| 1021 | | * |||\------ A0\__Address lsb bits of the execute write, i.e. VG_MODE; these are INVERTED FIRST. |
| 1022 | | * ||\------- A1/ |
| 1023 | | * |\-------- CARRY_IN (when set, only one /LD ERROR pulse occurs instead of two) |
| 1024 | | * \--------- ? possibly tied or somehow pulsed by sync rom d7? /LD ERROR only goes active (low) when this is unset |
| 1025 | | * |
| 1026 | | * data bits: 76543210 |
| 1027 | | * |||||||\-- /WRITE aka WRITE L (fig 5-20, page 5-32, writes the post-pattern-converted value back to vram at X,Y) |
| 1028 | | * ||||||\--- ? vector clk |
| 1029 | | * |||||\---- ? vector clk |
| 1030 | | * ||||\----- /LD ERROR aka STROBE ERROR L (strobes the adder result value into the vgERR register) |
| 1031 | | * |||\------ ? d-load? |
| 1032 | | * ||\------- ERASE L (latched, forces a4 on the sync rom low and also forces a7 on the counter rom; the counter rom may be involved in blanking all of vram) [verified from tracing] |
| 1033 | | * |\-------- C0 aka C IN (high during DVM read, low otherwise, likely a carry in to the adder so DVM is converted from 1s to 2s complement) |
| 1034 | | * \--------- ? done l? |
| 1035 | | * |
| 1036 | | * According to the vt125 tech manual (vt100 tech manual rev 3, page 6-85) the 8 signals here are: |
| 1037 | | * ERASE L - d5 |
| 1038 | | * SHIFT ENA |
| 1039 | | * C IN - d6 |
| 1040 | | * D LOAD |
| 1041 | | * WRITE L - d0 |
| 1042 | | * DONE L |
| 1043 | | * VECTOR CLK |
| 1044 | | * STROBE ERROR L - d3 |
| 1045 | | */ |
| 1014 | * the vector rom bits are complex and are unfortunately poorly documented |
| 1015 | * in the tech manual. see figure 5-23. |
| 1016 | * control bits: |
| 1017 | * /CE1 ----- ? |
| 1018 | * /CE2 ----- ? |
| 1019 | * addr bits: 76543210 |
| 1020 | * ||||\\\\-- To sync counter, which counts 0xC 0x3 0x2 0x1 0x0 0x5 0x4 0xB 0xA 0x9 0x8 0xD in that order |
| 1021 | * |||\------ A0\__Address lsb bits of the execute write, i.e. VG_MODE; these are INVERTED FIRST. |
| 1022 | * ||\------- A1/ |
| 1023 | * |\-------- CARRY_IN (when set, only one /LD ERROR pulse occurs instead of two) |
| 1024 | * \--------- ? possibly tied or somehow pulsed by sync rom d7? /LD ERROR only goes active (low) when this is unset |
| 1025 | * |
| 1026 | * data bits: 76543210 |
| 1027 | * |||||||\-- /WRITE aka WRITE L (fig 5-20, page 5-32, writes the post-pattern-converted value back to vram at X,Y) |
| 1028 | * ||||||\--- ? vector clk |
| 1029 | * |||||\---- ? vector clk |
| 1030 | * ||||\----- /LD ERROR aka STROBE ERROR L (strobes the adder result value into the vgERR register) |
| 1031 | * |||\------ ? d-load? |
| 1032 | * ||\------- ERASE L (latched, forces a4 on the sync rom low and also forces a7 on the counter rom; the counter rom may be involved in blanking all of vram) [verified from tracing] |
| 1033 | * |\-------- C0 aka C IN (high during DVM read, low otherwise, likely a carry in to the adder so DVM is converted from 1s to 2s complement) |
| 1034 | * \--------- ? done l? |
| 1035 | * |
| 1036 | * According to the vt125 tech manual (vt100 tech manual rev 3, page 6-85) the 8 signals here are: |
| 1037 | * ERASE L - d5 |
| 1038 | * SHIFT ENA |
| 1039 | * C IN - d6 |
| 1040 | * D LOAD |
| 1041 | * WRITE L - d0 |
| 1042 | * DONE L |
| 1043 | * VECTOR CLK |
| 1044 | * STROBE ERROR L - d3 |
| 1045 | */ |
| 1046 | 1046 | ROM_LOAD( "wb8146_058b1.6309.pr1.ic99", 0x0200, 0x0100, CRC(71b01864) SHA1(e552f5b0bc3f443299282b1da7e9dbfec60e12bf)) // label verified from nigwil's and andy's board |
| 1047 | 1047 | /* this is the "SYNC ROM" == mb6331 (32x8, 82s123) |
| 1048 | | * It generates the ram RAS/CAS and a few other signals, see figure 5-20 on page 5-32 |
| 1049 | | * The exact pins for each signal are not documented. |
| 1050 | | * control bits: |
| 1051 | | * /CE1 -- GND(Unused) |
| 1052 | | * addr bits: 43210 |
| 1053 | | * |\\\\-- To sync counter, which counts 0xC 0x3 0x2 0x1 0x0 0x5 0x4 0xB 0xA 0x9 0x8 0xD in that order |
| 1054 | | * \------ comes from the gated ERASE L/d5 from the vector rom, only low during VG_MODE == ER (ERase Screen) [verified from tracing] |
| 1055 | | * when high: the sync rom matches figure 5-20 (page 5-32) and 5-23 (page 5-38) |
| 1056 | | * when low: RA/RB is fixed on WOPS in the register file |
| 1057 | | * LD SHFR does NOT output pulses (effectively blanking the screen) |
| 1058 | | * WRT/RD is held at /RD so vg to vram do nothing, |
| 1059 | | * however while the crtc is refreshing the screen it instead is writing zeroes to every location |
| 1060 | | * data bits: 76543210 |
| 1061 | | * |||||||\-- WRT/RD (write high when x,y (vg) drives vram, read low when ma (crtc) drives vram) |
| 1062 | | * ||||||\--- /RAS (for vram) |
| 1063 | | * |||||\---- STROBE aka STROBE L aka VG STROBE(latches the carry bit from the adder to the direction rom AND causes the data at the X,Y address of vram to be read into the holding register before pattern is applied) |
| 1064 | | * ||||\----- LD SHFR (loads the 12-bit shift register of data to be shifted to screen) |
| 1065 | | * |||\------ /CAS (for vram) |
| 1066 | | * ||\------- RA\__selects which slot of the 8x4 register file (du, dvm, dir, or wops) is selected |
| 1067 | | * |\-------- RB/ |
| 1068 | | * \--------- VG vector rom "enable"? (mentioned on page 5-31 last paragraph?) (this is off by one cycle though...) [active low, sync addr 011] |
| 1069 | | * This may actually have to do with gating the DCNT DONE L signal to make the FINISH signal which unsets the /GO register |
| 1070 | | * The VT125 proms E64/E66 and their respective latches E65 and E83 are roughly |
| 1071 | | * but not completely equivalent to the sync rom |
| 1072 | | */ |
| 1048 | * It generates the ram RAS/CAS and a few other signals, see figure 5-20 on page 5-32 |
| 1049 | * The exact pins for each signal are not documented. |
| 1050 | * control bits: |
| 1051 | * /CE1 -- GND(Unused) |
| 1052 | * addr bits: 43210 |
| 1053 | * |\\\\-- To sync counter, which counts 0xC 0x3 0x2 0x1 0x0 0x5 0x4 0xB 0xA 0x9 0x8 0xD in that order |
| 1054 | * \------ comes from the gated ERASE L/d5 from the vector rom, only low during VG_MODE == ER (ERase Screen) [verified from tracing] |
| 1055 | * when high: the sync rom matches figure 5-20 (page 5-32) and 5-23 (page 5-38) |
| 1056 | * when low: RA/RB is fixed on WOPS in the register file |
| 1057 | * LD SHFR does NOT output pulses (effectively blanking the screen) |
| 1058 | * WRT/RD is held at /RD so vg to vram do nothing, |
| 1059 | * however while the crtc is refreshing the screen it instead is writing zeroes to every location |
| 1060 | * data bits: 76543210 |
| 1061 | * |||||||\-- WRT/RD (write high when x,y (vg) drives vram, read low when ma (crtc) drives vram) |
| 1062 | * ||||||\--- /RAS (for vram) |
| 1063 | * |||||\---- STROBE aka STROBE L aka VG STROBE(latches the carry bit from the adder to the direction rom AND causes the data at the X,Y address of vram to be read into the holding register before pattern is applied) |
| 1064 | * ||||\----- LD SHFR (loads the 12-bit shift register of data to be shifted to screen) |
| 1065 | * |||\------ /CAS (for vram) |
| 1066 | * ||\------- RA\__selects which slot of the 8x4 register file (du, dvm, dir, or wops) is selected |
| 1067 | * |\-------- RB/ |
| 1068 | * \--------- VG vector rom "enable"? (mentioned on page 5-31 last paragraph?) (this is off by one cycle though...) [active low, sync addr 011] |
| 1069 | * This may actually have to do with gating the DCNT DONE L signal to make the FINISH signal which unsets the /GO register |
| 1070 | * The VT125 proms E64/E66 and their respective latches E65 and E83 are roughly |
| 1071 | * but not completely equivalent to the sync rom |
| 1072 | */ |
| 1073 | 1073 | ROM_LOAD( "wb8-14_297a1.74s288.pr6.ic89", 0x0300, 0x0020, CRC(e2f7c566) SHA1(a4c3dc5d07667141ad799168a862cb3c489b4934)) // label verified from nigwil's and andy's board |
| 1074 | 1074 | ROM_END |
| 1075 | 1075 | |
src/mess/drivers/pc.c
| r15704 | r15705 | |
| 246 | 246 | AM_RANGE(0x0080, 0x0087) AM_READWRITE8(pc_page_r, pc_page_w, 0xffff) |
| 247 | 247 | AM_RANGE(0x00a0, 0x00a1) AM_WRITE8( pc_nmi_enable_w, 0x00ff ) |
| 248 | 248 | AM_RANGE(0x0210, 0x0217) AM_NOP // expansion chassis interface |
| 249 | | // AM_RANGE(0x0230, 0x021f) // mouse |
| 249 | // AM_RANGE(0x0230, 0x021f) // mouse |
| 250 | 250 | AM_RANGE(0x0240, 0x0257) AM_READWRITE8(pc_rtc_r, pc_rtc_w, 0xffff) |
| 251 | 251 | AM_RANGE(0x02b0, 0x02b3) AM_READWRITE8(ec1841_memboard_r, ec1841_memboard_w, 0xffff); |
| 252 | | // AM_RANGE(0x02f8, 0x02f8) AM_DEVREADWRITE8_LEGACY("upd8251_1", i8251_device, data_r, data_w, 0x00ff) |
| 253 | | // AM_RANGE(0x02f9, 0x02f9) AM_DEVREADWRITE8_LEGACY("upd8251_1", i8251_device, status_r, control_w, 0xff00) |
| 252 | // AM_RANGE(0x02f8, 0x02f8) AM_DEVREADWRITE8_LEGACY("upd8251_1", i8251_device, data_r, data_w, 0x00ff) |
| 253 | // AM_RANGE(0x02f9, 0x02f9) AM_DEVREADWRITE8_LEGACY("upd8251_1", i8251_device, status_r, control_w, 0xff00) |
| 254 | 254 | AM_RANGE(0x0378, 0x037f) AM_DEVREADWRITE8_LEGACY("lpt_0", pc_lpt_r, pc_lpt_w, 0xffff) |
| 255 | 255 | AM_RANGE(0x03f0, 0x03f7) AM_READWRITE8_LEGACY(pc_fdc_r, pc_fdc_w, 0xffff) |
| 256 | | // AM_RANGE(0x03f8, 0x03f9) AM_DEVREADWRITE8_LEGACY("upd8251_0", i8251_device, data_r, data_w, 0x00ff) |
| 257 | | // AM_RANGE(0x03f8, 0x03f9) AM_DEVREADWRITE8_LEGACY("upd8251_0", i8251_device, status_r, control_w, 0xff00) |
| 256 | // AM_RANGE(0x03f8, 0x03f9) AM_DEVREADWRITE8_LEGACY("upd8251_0", i8251_device, data_r, data_w, 0x00ff) |
| 257 | // AM_RANGE(0x03f8, 0x03f9) AM_DEVREADWRITE8_LEGACY("upd8251_0", i8251_device, status_r, control_w, 0xff00) |
| 258 | 258 | ADDRESS_MAP_END |
| 259 | 259 | |
| 260 | 260 | |
| r15704 | r15705 | |
| 266 | 266 | AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE8("ppi8255", i8255_device, read, write, 0xffff) |
| 267 | 267 | AM_RANGE(0x0080, 0x0087) AM_READWRITE8(pc_page_r, pc_page_w, 0xffff) |
| 268 | 268 | AM_RANGE(0x00a0, 0x00a1) AM_WRITE8( pc_nmi_enable_w, 0x00ff ) |
| 269 | | // AM_RANGE(0x0200, 0x0207) AM_READWRITE8_LEGACY(pc_JOY_r, pc_JOY_w, 0xffff) |
| 269 | // AM_RANGE(0x0200, 0x0207) AM_READWRITE8_LEGACY(pc_JOY_r, pc_JOY_w, 0xffff) |
| 270 | 270 | AM_RANGE(0x0240, 0x0257) AM_READWRITE8(pc_rtc_r, pc_rtc_w, 0xffff) |
| 271 | | // AM_RANGE(0x02e8, 0x02ef) AM_DEVREADWRITE8("ins8250_3", ins8250_device, ins8250_r, ins8250_w, 0xffff) |
| 271 | // AM_RANGE(0x02e8, 0x02ef) AM_DEVREADWRITE8("ins8250_3", ins8250_device, ins8250_r, ins8250_w, 0xffff) |
| 272 | 272 | AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE8("ins8250_1", ins8250_device, ins8250_r, ins8250_w, 0xffff) |
| 273 | 273 | AM_RANGE(0x0340, 0x0357) AM_NOP /* anonymous bios should not recogniced realtimeclock */ |
| 274 | 274 | AM_RANGE(0x0378, 0x037f) AM_DEVREADWRITE8_LEGACY("lpt_0", pc_lpt_r, pc_lpt_w, 0xffff) |
| 275 | | // AM_RANGE(0x03e8, 0x03ef) AM_DEVREADWRITE8("ins8250_2", ins8250_device, ins8250_r, ins8250_w, 0xffff) |
| 275 | // AM_RANGE(0x03e8, 0x03ef) AM_DEVREADWRITE8("ins8250_2", ins8250_device, ins8250_r, ins8250_w, 0xffff) |
| 276 | 276 | AM_RANGE(0x03f0, 0x03f7) AM_READWRITE8_LEGACY(pc_fdc_r, pc_fdc_w, 0xffff) |
| 277 | 277 | AM_RANGE(0x03f8, 0x03ff) AM_DEVREADWRITE8("ins8250_0", ins8250_device, ins8250_r, ins8250_w, 0xffff) |
| 278 | 278 | ADDRESS_MAP_END |
| r15704 | r15705 | |
| 1316 | 1316 | |
| 1317 | 1317 | static MACHINE_CONFIG_START( mc1502, pc_state ) |
| 1318 | 1318 | /* basic machine hardware */ |
| 1319 | | // MCFG_CPU_PC(mc1502, mc1502, I8088, XTAL_16MHz/3, pcjr_frame_interrupt) /* check frame_interrupt */ |
| 1319 | // MCFG_CPU_PC(mc1502, mc1502, I8088, XTAL_16MHz/3, pcjr_frame_interrupt) /* check frame_interrupt */ |
| 1320 | 1320 | MCFG_CPU_ADD("maincpu", I8088, XTAL_16MHz/3) |
| 1321 | 1321 | MCFG_CPU_PROGRAM_MAP(mc1502_map) |
| 1322 | 1322 | MCFG_CPU_IO_MAP(mc1502_io) |
| r15704 | r15705 | |
| 1361 | 1361 | static MACHINE_CONFIG_START( ec1841, pc_state ) |
| 1362 | 1362 | /* basic machine hardware */ |
| 1363 | 1363 | MCFG_CPU_PC(ec1841, ec1841, I8086, 4096000, pc_frame_interrupt) // correct but slow |
| 1364 | | // MCFG_CPU_PC(ec1841, ec1841, I8086, 4772720, pc_frame_interrupt) |
| 1364 | // MCFG_CPU_PC(ec1841, ec1841, I8086, 4772720, pc_frame_interrupt) |
| 1365 | 1365 | |
| 1366 | 1366 | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 1367 | 1367 | |
| r15704 | r15705 | |
| 1377 | 1377 | |
| 1378 | 1378 | MCFG_I8255_ADD( "ppi8255", ibm5160_ppi8255_interface ) |
| 1379 | 1379 | |
| 1380 | | // MCFG_I8251_ADD( "upd8251_0", default_i8251_interface ) // modeled after BSC adapter? |
| 1381 | | // MCFG_I8251_ADD( "upd8251_1", default_i8251_interface ) |
| 1380 | // MCFG_I8251_ADD( "upd8251_0", default_i8251_interface ) // modeled after BSC adapter? |
| 1381 | // MCFG_I8251_ADD( "upd8251_1", default_i8251_interface ) |
| 1382 | 1382 | |
| 1383 | 1383 | /* video hardware -- supports font uploads */ |
| 1384 | 1384 | MCFG_FRAGMENT_ADD( pcvideo_cga ) |
| r15704 | r15705 | |
| 1403 | 1403 | /* internal ram -- up to 4 banks of 512K */ |
| 1404 | 1404 | MCFG_RAM_ADD(RAM_TAG) |
| 1405 | 1405 | MCFG_RAM_DEFAULT_SIZE("512K") |
| 1406 | | // MCFG_RAM_EXTRA_OPTIONS("640K,1024K,1576K,2048K") |
| 1406 | // MCFG_RAM_EXTRA_OPTIONS("640K,1024K,1576K,2048K") |
| 1407 | 1407 | MACHINE_CONFIG_END |
| 1408 | 1408 | |
| 1409 | 1409 | |