Previous 15994 Revisions Next

r7971 Wednesday 5th May, 2010 at 01:10:20 UTC by incog
SCV
- Added 2 more dumps to software list.
- Audio fix [plgDavid]
[hash]scv.xml
[src/mess/audio]upd1771.c

hash/scv.xml
r7970r7971
136136      </part>
137137   </software>
138138
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
139151   <software name="lupin3" supported="no">
140152      <description>Lupin III</description>
141153      <year>1984</year>
r7970r7971
250262      </part>
251263   </software>
252264
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
253276   <software name="sansupyu">
254277      <description>Sansupyuta/Super Professor</description>
255278      <year>1985</year>
src/mess/audio/upd1771.c
r7970r7971
2424     NC           3        26        ACK
2525    !WR           4        25        D7
2626    !CS           5        24        D6
27     PCM          6        23        D5
27     RESET        6        23        D5
2828     NC           7        22        D4
2929     VCC          8        21        D3
3030     6Mhz XIN     9        20        D2
r7970r7971
3737    In the SCV:
3838    pin  5 is tied to the !SCPU pin on the Epoch TV chip pin 29 (0x3600 writes)
3939    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.
4140    pin 26 is tied to the  INT1 pin of the upD7801 (CPU pin 12),
4241
4342    1,2,3,28,27 dont generate any digital signals
r7970r7971
5453
5554    All NC pins are unknown, maybe some are  "test" pins.
5655
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
5857    Instead of useing register=value, this chip require sending multiple
5958    bytes for each command, one after the other.
6059
r7970r7971
6766
6867#define LOG 0
6968
70#define MAX_PACKET_SIZE 16 //protection/padding max is really 10
69#define MAX_PACKET_SIZE 0x8000
7170
7271
73
72size_t g_count = 0;
7473/*
7574  Each of the 8 waveforms have been sampled at 192Khz using period 0xFF,
7675  filtered, and each of the 32 levels have been calculated with averages on around 10 samples
r7970r7971
101100    devcb_resolved_write_line ack_out_func;
102101    emu_timer *timer;
103102
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;
107106
108107    UINT8   state;//0:silence, 1 noise, 2 tone
109   UINT8   pcm;
108   UINT8   pc3;
110109
111110    //tone
112111    UINT8    t_timbre; //[0;  7]
r7970r7971
175174
176175    devcb_call_write_line( &state->ack_out_func, 0 );
177176
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   }
179183
180184    switch(state->packet[0]){
181185
r7970r7971
187191        }break;
188192
189193        case 1:
194      {
190195            if (state->index == 10){
191196                state->state = STATE_NOISE;
192197                state->index = 0;
r7970r7971
204209            }
205210            else
206211                timer_adjust_oneshot( state->timer, ticks_to_attotime( 512, device->clock ), 0 );
207        break;
212      }break;
208213
209214        case 2:
215      {
210216            if (state->index == 4){
211217                //logerror( "upd1771_w: ----------------tone  state reset\n");
212218                state->t_timbre = (state->packet[1] & 0xE0) >> 5;
r7970r7971
223229            else
224230                timer_adjust_oneshot( state->timer, ticks_to_attotime( 512, device->clock ), 0 );
225231
226        break;
232      }break;
227233
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
228250        //garbage: wipe stack
229        default:
230            state->index = 0;
251        default:   
252         state->index = 0;
231253        break;
232254    }
233255}
r7970r7971
237259{
238260   upd1771_state *upd1771 = get_safe_token( device );
239261
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;
242270}
243271
244272
r7970r7971
341369
342370    state->index = 0;
343371    state->expected_bytes = 0;
344   state->pcm = 0;
372   state->pc3 = 0;
345373}
346374
347375

Previous 15994 Revisions Next


© 1998-2018 The MESS Team