hash/scv.xml
| r7970 | r7971 | |
| 136 | 136 | </part> |
| 137 | 137 | </software> |
| 138 | 138 | |
| 139 | <software name="kungfurd" supported="no"> |
| 140 | <description>Kung Fu Road</description> |
| 141 | <year>1985</year> |
| 142 | <publisher>Epoch</publisher> |
| 143 | <part name="cart" interface="scv_cart"> |
| 144 | <dataarea name="rom" size="40960"> |
| 145 | <rom name="kungfurd.0" size="32768" crc="9cfc5a67" sha1="1c34470c1f389db7be755e130db298f6b475c7ce" offset="0" /> |
| 146 | <rom name="kungfurd.1" size="8192" crc="a895375a" sha1="644ab7c7fb85d0d80aa3a416b0a5359d395e48a3" offset="8000" /> |
| 147 | </dataarea> |
| 148 | </part> |
| 149 | </software> |
| 150 | |
| 139 | 151 | <software name="lupin3" supported="no"> |
| 140 | 152 | <description>Lupin III</description> |
| 141 | 153 | <year>1984</year> |
| r7970 | r7971 | |
| 250 | 262 | </part> |
| 251 | 263 | </software> |
| 252 | 264 | |
| 265 | <software name="ttball"> |
| 266 | <description>Ton Ton Ball</description> |
| 267 | <year>1985</year> |
| 268 | <publisher>Epoch</publisher> |
| 269 | <part name="cart" interface="scv_cart"> |
| 270 | <dataarea name="rom" size="16384"> |
| 271 | <rom name="ttball.bin" size="16384" crc="7f873bfa" sha1="093235ac2234c4c4e78a2addaab780d7a2cbe004" offset="0" /> |
| 272 | </dataarea> |
| 273 | </part> |
| 274 | </software> |
| 275 | |
| 253 | 276 | <software name="sansupyu"> |
| 254 | 277 | <description>Sansupyuta/Super Professor</description> |
| 255 | 278 | <year>1985</year> |
src/mess/audio/upd1771.c
| r7970 | r7971 | |
| 24 | 24 | NC 3 26 ACK |
| 25 | 25 | !WR 4 25 D7 |
| 26 | 26 | !CS 5 24 D6 |
| 27 | | PCM 6 23 D5 |
| 27 | RESET 6 23 D5 |
| 28 | 28 | NC 7 22 D4 |
| 29 | 29 | VCC 8 21 D3 |
| 30 | 30 | 6Mhz XIN 9 20 D2 |
| r7970 | r7971 | |
| 37 | 37 | In the SCV: |
| 38 | 38 | pin 5 is tied to the !SCPU pin on the Epoch TV chip pin 29 (0x3600 writes) |
| 39 | 39 | pin 6 is tied to the PC3 pin of the upD7801 CPU |
| 40 | | and according to the Enri is used for 1 bit PCM injection. |
| 41 | 40 | pin 26 is tied to the INT1 pin of the upD7801 (CPU pin 12), |
| 42 | 41 | |
| 43 | 42 | 1,2,3,28,27 dont generate any digital signals |
| r7970 | r7971 | |
| 54 | 53 | |
| 55 | 54 | All NC pins are unknown, maybe some are "test" pins. |
| 56 | 55 | |
| 57 | | All non PCM writes are made through adress 0x3600 on the upD7801 |
| 56 | All non PCM writes are made through address 0x3600 on the upD7801 |
| 58 | 57 | Instead of useing register=value, this chip require sending multiple |
| 59 | 58 | bytes for each command, one after the other. |
| 60 | 59 | |
| r7970 | r7971 | |
| 67 | 66 | |
| 68 | 67 | #define LOG 0 |
| 69 | 68 | |
| 70 | | #define MAX_PACKET_SIZE 16 //protection/padding max is really 10 |
| 69 | #define MAX_PACKET_SIZE 0x8000 |
| 71 | 70 | |
| 72 | 71 | |
| 73 | | |
| 72 | size_t g_count = 0; |
| 74 | 73 | /* |
| 75 | 74 | Each of the 8 waveforms have been sampled at 192Khz using period 0xFF, |
| 76 | 75 | filtered, and each of the 32 levels have been calculated with averages on around 10 samples |
| r7970 | r7971 | |
| 101 | 100 | devcb_resolved_write_line ack_out_func; |
| 102 | 101 | emu_timer *timer; |
| 103 | 102 | |
| 104 | | UINT8 packet[MAX_PACKET_SIZE]; |
| 105 | | UINT8 index; |
| 106 | | UINT8 expected_bytes; |
| 103 | UINT8 packet[MAX_PACKET_SIZE]; |
| 104 | UINT32 index; |
| 105 | UINT8 expected_bytes; |
| 107 | 106 | |
| 108 | 107 | UINT8 state;//0:silence, 1 noise, 2 tone |
| 109 | | UINT8 pcm; |
| 108 | UINT8 pc3; |
| 110 | 109 | |
| 111 | 110 | //tone |
| 112 | 111 | UINT8 t_timbre; //[0; 7] |
| r7970 | r7971 | |
| 175 | 174 | |
| 176 | 175 | devcb_call_write_line( &state->ack_out_func, 0 ); |
| 177 | 176 | |
| 178 | | state->packet[state->index++]=data; |
| 177 | if (state->index < MAX_PACKET_SIZE) |
| 178 | state->packet[state->index++]=data; |
| 179 | else{ |
| 180 | logerror( "upd1771_w: received byte 0x%02x overload!\n", data ); |
| 181 | return; |
| 182 | } |
| 179 | 183 | |
| 180 | 184 | switch(state->packet[0]){ |
| 181 | 185 | |
| r7970 | r7971 | |
| 187 | 191 | }break; |
| 188 | 192 | |
| 189 | 193 | case 1: |
| 194 | { |
| 190 | 195 | if (state->index == 10){ |
| 191 | 196 | state->state = STATE_NOISE; |
| 192 | 197 | state->index = 0; |
| r7970 | r7971 | |
| 204 | 209 | } |
| 205 | 210 | else |
| 206 | 211 | timer_adjust_oneshot( state->timer, ticks_to_attotime( 512, device->clock ), 0 ); |
| 207 | | break; |
| 212 | }break; |
| 208 | 213 | |
| 209 | 214 | case 2: |
| 215 | { |
| 210 | 216 | if (state->index == 4){ |
| 211 | 217 | //logerror( "upd1771_w: ----------------tone state reset\n"); |
| 212 | 218 | state->t_timbre = (state->packet[1] & 0xE0) >> 5; |
| r7970 | r7971 | |
| 223 | 229 | else |
| 224 | 230 | timer_adjust_oneshot( state->timer, ticks_to_attotime( 512, device->clock ), 0 ); |
| 225 | 231 | |
| 226 | | break; |
| 232 | }break; |
| 227 | 233 | |
| 234 | case 0x1F: |
| 235 | { |
| 236 | //6Khz(ish) DIGI playback |
| 237 | |
| 238 | //end capture |
| 239 | if (state->packet[state->index-2] == 0xFE && |
| 240 | state->packet[state->index-1] == 0x00){ |
| 241 | //TODO play capture! |
| 242 | state->index = 0; |
| 243 | state->packet[0]=0; |
| 244 | } |
| 245 | else |
| 246 | timer_adjust_oneshot( state->timer, ticks_to_attotime( 512, device->clock ), 0 ); |
| 247 | |
| 248 | }break; |
| 249 | |
| 228 | 250 | //garbage: wipe stack |
| 229 | | default: |
| 230 | | state->index = 0; |
| 251 | default: |
| 252 | state->index = 0; |
| 231 | 253 | break; |
| 232 | 254 | } |
| 233 | 255 | } |
| r7970 | r7971 | |
| 237 | 259 | { |
| 238 | 260 | upd1771_state *upd1771 = get_safe_token( device ); |
| 239 | 261 | |
| 240 | | logerror( "upd1771_pcm_w: state = %d\n", state ); |
| 241 | | upd1771->pcm = state ? 1 : 0; |
| 262 | //RESET upon HIGH |
| 263 | if (state != upd1771->pc3){ |
| 264 | logerror( "upd1771_pc3 change!: state = %d\n", state ); |
| 265 | upd1771->index = 0; |
| 266 | upd1771->packet[0]=0; |
| 267 | } |
| 268 | |
| 269 | upd1771->pc3 = state; |
| 242 | 270 | } |
| 243 | 271 | |
| 244 | 272 | |
| r7970 | r7971 | |
| 341 | 369 | |
| 342 | 370 | state->index = 0; |
| 343 | 371 | state->expected_bytes = 0; |
| 344 | | state->pcm = 0; |
| 372 | state->pc3 = 0; |
| 345 | 373 | } |
| 346 | 374 | |
| 347 | 375 | |