Previous 199869 Revisions Next

r29540 Friday 11th April, 2014 at 19:53:49 UTC by James Wallace
BFM BD1 and ROC10937 now have proper device line accessors for the clock (sclk), reset (por) and data (data). All affected drivers have been updated to use these [J. Wallace]

Out of Whatsnew:

MESS digel has been tested and displays correctly now, as opposed to how I had it, which was backwards.
[src/emu/machine]roc10937.c roc10937.h
[src/mame/drivers]bfm_sc1.c bfmsys85.c globalfr.c jpmimpct.c jpmsys5.c maygay1b.c mpu3.c mpu4hw.c proconn.c
[src/mame/includes]maygay1b.h mpu4.h
[src/mame/layout]mpu4.lay mpu4ext.lay mpu4plasma.lay
[src/mame/machine]bfm_bd1.c bfm_bd1.h
[src/mess/drivers]digel804.c

trunk/src/mame/layout/mpu4ext.lay
r29539r29540
845845      <backdrop name="digit39" element="digit" state="0">
846846         <bounds x="356" y="244" width="8" height="10"/>
847847      </backdrop>
848      <backdrop name="vfd0" element="vfd0" state="0">
848      <backdrop name="vfd15" element="vfd0" state="0">
849849         <bounds x="17" y="280" width="7" height="24"/>
850850      </backdrop>
851      <backdrop name="vfd1" element="vfd0" state="0">
851      <backdrop name="vfd14" element="vfd0" state="0">
852852         <bounds x="24" y="280" width="7" height="24"/>
853853      </backdrop>
854      <backdrop name="vfd2" element="vfd0" state="0">
854      <backdrop name="vfd13" element="vfd0" state="0">
855855         <bounds x="31" y="280" width="7" height="24"/>
856856      </backdrop>
857      <backdrop name="vfd3" element="vfd0" state="0">
857      <backdrop name="vfd12" element="vfd0" state="0">
858858         <bounds x="38" y="280" width="7" height="24"/>
859859      </backdrop>
860      <backdrop name="vfd4" element="vfd0" state="0">
860      <backdrop name="vfd11" element="vfd0" state="0">
861861         <bounds x="45" y="280" width="7" height="24"/>
862862      </backdrop>
863      <backdrop name="vfd5" element="vfd0" state="0">
863      <backdrop name="vfd10" element="vfd0" state="0">
864864         <bounds x="52" y="280" width="7" height="24"/>
865865      </backdrop>
866      <backdrop name="vfd6" element="vfd0" state="0">
866      <backdrop name="vfd9" element="vfd0" state="0">
867867         <bounds x="59" y="280" width="7" height="24"/>
868868      </backdrop>
869      <backdrop name="vfd7" element="vfd0" state="0">
869      <backdrop name="vfd8" element="vfd0" state="0">
870870         <bounds x="66" y="280" width="7" height="24"/>
871871      </backdrop>
872      <backdrop name="vfd8" element="vfd0" state="0">
872      <backdrop name="vfd7" element="vfd0" state="0">
873873         <bounds x="73" y="280" width="7" height="24"/>
874874      </backdrop>
875      <backdrop name="vfd9" element="vfd0" state="0">
875      <backdrop name="vfd6" element="vfd0" state="0">
876876         <bounds x="80" y="280" width="7" height="24"/>
877877      </backdrop>
878      <backdrop name="vfd10" element="vfd0" state="0">
878      <backdrop name="vfd5" element="vfd0" state="0">
879879         <bounds x="87" y="280" width="7" height="24"/>
880880      </backdrop>
881      <backdrop name="vfd11" element="vfd0" state="0">
881      <backdrop name="vfd4" element="vfd0" state="0">
882882         <bounds x="94" y="280" width="7" height="24"/>
883883      </backdrop>
884      <backdrop name="vfd12" element="vfd0" state="0">
884      <backdrop name="vfd3" element="vfd0" state="0">
885885         <bounds x="101" y="280" width="7" height="24"/>
886886      </backdrop>
887      <backdrop name="vfd13" element="vfd0" state="0">
887      <backdrop name="vfd2" element="vfd0" state="0">
888888         <bounds x="108" y="280" width="7" height="24"/>
889889      </backdrop>
890      <backdrop name="vfd14" element="vfd0" state="0">
890      <backdrop name="vfd1" element="vfd0" state="0">
891891         <bounds x="115" y="280" width="7" height="24"/>
892892      </backdrop>
893      <backdrop name="vfd15" element="vfd0" state="0">
893      <backdrop name="vfd0" element="vfd0" state="0">
894894         <bounds x="122" y="280" width="7" height="24"/>
895895      </backdrop>
896896   </view>
897897   <view name="VFD Display Output Only">
898      <bezel name="vfd0" element="vfd0" state="0">
898      <bezel name="vfd15" element="vfd0" state="0">
899899         <bounds x="10" y="200" width="9" height="17"/>
900900      </bezel>
901      <bezel name="vfd1" element="vfd0" state="0">
901      <bezel name="vfd14" element="vfd0" state="0">
902902         <bounds x="19" y="200" width="9" height="17"/>
903903      </bezel>
904      <bezel name="vfd2" element="vfd0" state="0">
904      <bezel name="vfd13" element="vfd0" state="0">
905905         <bounds x="28" y="200" width="9" height="17"/>
906906      </bezel>
907      <bezel name="vfd3" element="vfd0" state="0">
907      <bezel name="vfd12" element="vfd0" state="0">
908908         <bounds x="37" y="200" width="9" height="17"/>
909909      </bezel>
910      <bezel name="vfd4" element="vfd0" state="0">
910      <bezel name="vfd11" element="vfd0" state="0">
911911         <bounds x="46" y="200" width="9" height="17"/>
912912      </bezel>
913      <bezel name="vfd5" element="vfd0" state="0">
913      <bezel name="vfd10" element="vfd0" state="0">
914914         <bounds x="55" y="200" width="9" height="17"/>
915915      </bezel>
916      <bezel name="vfd6" element="vfd0" state="0">
916      <bezel name="vfd9" element="vfd0" state="0">
917917         <bounds x="64" y="200" width="9" height="17"/>
918918      </bezel>
919      <bezel name="vfd7" element="vfd0" state="0">
919      <bezel name="vfd8" element="vfd0" state="0">
920920         <bounds x="73" y="200" width="9" height="17"/>
921921      </bezel>
922      <bezel name="vfd8" element="vfd0" state="0">
922      <bezel name="vfd7" element="vfd0" state="0">
923923         <bounds x="82" y="200" width="9" height="17"/>
924924      </bezel>
925      <bezel name="vfd9" element="vfd0" state="0">
925      <bezel name="vfd6" element="vfd0" state="0">
926926         <bounds x="91" y="200" width="9" height="17"/>
927927      </bezel>
928      <bezel name="vfd10" element="vfd0" state="0">
928      <bezel name="vfd5" element="vfd0" state="0">
929929         <bounds x="100" y="200" width="9" height="17"/>
930930      </bezel>
931      <bezel name="vfd11" element="vfd0" state="0">
931      <bezel name="vfd4" element="vfd0" state="0">
932932         <bounds x="109" y="200" width="9" height="17"/>
933933      </bezel>
934      <bezel name="vfd12" element="vfd0" state="0">
934      <bezel name="vfd3" element="vfd0" state="0">
935935         <bounds x="118" y="200" width="9" height="17"/>
936936      </bezel>
937      <bezel name="vfd13" element="vfd0" state="0">
937      <bezel name="vfd2" element="vfd0" state="0">
938938         <bounds x="127" y="200" width="9" height="17"/>
939939      </bezel>
940      <bezel name="vfd14" element="vfd0" state="0">
940      <bezel name="vfd1" element="vfd0" state="0">
941941         <bounds x="136" y="200" width="9" height="17"/>
942942      </bezel>
943      <bezel name="vfd15" element="vfd0" state="0">
943      <bezel name="vfd0" element="vfd0" state="0">
944944         <bounds x="145" y="200" width="9" height="17"/>
945945      </bezel>
946946   </view>
trunk/src/mame/layout/mpu4plasma.lay
r29539r29540
458458      <backdrop name="digit7" element="digit" state="0">
459459         <bounds x="356" y="200" width="8" height="10"/>
460460      </backdrop>
461      <backdrop name="vfd0" element="vfd0" state="0">
461      <backdrop name="vfd15" element="vfd0" state="0">
462462         <bounds x="17" y="280" width="7" height="24"/>
463463      </backdrop>
464      <backdrop name="vfd1" element="vfd0" state="0">
464      <backdrop name="vfd14" element="vfd0" state="0">
465465         <bounds x="24" y="280" width="7" height="24"/>
466466      </backdrop>
467      <backdrop name="vfd2" element="vfd0" state="0">
467      <backdrop name="vfd13" element="vfd0" state="0">
468468         <bounds x="31" y="280" width="7" height="24"/>
469469      </backdrop>
470      <backdrop name="vfd3" element="vfd0" state="0">
470      <backdrop name="vfd12" element="vfd0" state="0">
471471         <bounds x="38" y="280" width="7" height="24"/>
472472      </backdrop>
473      <backdrop name="vfd4" element="vfd0" state="0">
473      <backdrop name="vfd11" element="vfd0" state="0">
474474         <bounds x="45" y="280" width="7" height="24"/>
475475      </backdrop>
476      <backdrop name="vfd5" element="vfd0" state="0">
476      <backdrop name="vfd10" element="vfd0" state="0">
477477         <bounds x="52" y="280" width="7" height="24"/>
478478      </backdrop>
479      <backdrop name="vfd6" element="vfd0" state="0">
479      <backdrop name="vfd9" element="vfd0" state="0">
480480         <bounds x="59" y="280" width="7" height="24"/>
481481      </backdrop>
482      <backdrop name="vfd7" element="vfd0" state="0">
482      <backdrop name="vfd8" element="vfd0" state="0">
483483         <bounds x="66" y="280" width="7" height="24"/>
484484      </backdrop>
485      <backdrop name="vfd8" element="vfd0" state="0">
485      <backdrop name="vfd7" element="vfd0" state="0">
486486         <bounds x="73" y="280" width="7" height="24"/>
487487      </backdrop>
488      <backdrop name="vfd9" element="vfd0" state="0">
488      <backdrop name="vfd6" element="vfd0" state="0">
489489         <bounds x="80" y="280" width="7" height="24"/>
490490      </backdrop>
491      <backdrop name="vfd10" element="vfd0" state="0">
491      <backdrop name="vfd5" element="vfd0" state="0">
492492         <bounds x="87" y="280" width="7" height="24"/>
493493      </backdrop>
494      <backdrop name="vfd11" element="vfd0" state="0">
494      <backdrop name="vfd4" element="vfd0" state="0">
495495         <bounds x="94" y="280" width="7" height="24"/>
496496      </backdrop>
497      <backdrop name="vfd12" element="vfd0" state="0">
497      <backdrop name="vfd3" element="vfd0" state="0">
498498         <bounds x="101" y="280" width="7" height="24"/>
499499      </backdrop>
500      <backdrop name="vfd13" element="vfd0" state="0">
500      <backdrop name="vfd2" element="vfd0" state="0">
501501         <bounds x="108" y="280" width="7" height="24"/>
502502      </backdrop>
503      <backdrop name="vfd14" element="vfd0" state="0">
503      <backdrop name="vfd1" element="vfd0" state="0">
504504         <bounds x="115" y="280" width="7" height="24"/>
505505      </backdrop>
506      <backdrop name="vfd15" element="vfd0" state="0">
506      <backdrop name="vfd0" element="vfd0" state="0">
507507         <bounds x="122" y="280" width="7" height="24"/>
508508      </backdrop>
509509
trunk/src/mame/layout/mpu4.lay
r29539r29540
458458      <backdrop name="digit7" element="digit" state="0">
459459         <bounds x="356" y="200" width="8" height="10"/>
460460      </backdrop>
461      <backdrop name="vfd0" element="vfd0" state="0">
461      <backdrop name="vfd15" element="vfd0" state="0">
462462         <bounds x="17" y="280" width="7" height="24"/>
463463      </backdrop>
464      <backdrop name="vfd1" element="vfd0" state="0">
464      <backdrop name="vfd14" element="vfd0" state="0">
465465         <bounds x="24" y="280" width="7" height="24"/>
466466      </backdrop>
467      <backdrop name="vfd2" element="vfd0" state="0">
467      <backdrop name="vfd13" element="vfd0" state="0">
468468         <bounds x="31" y="280" width="7" height="24"/>
469469      </backdrop>
470      <backdrop name="vfd3" element="vfd0" state="0">
470      <backdrop name="vfd12" element="vfd0" state="0">
471471         <bounds x="38" y="280" width="7" height="24"/>
472472      </backdrop>
473      <backdrop name="vfd4" element="vfd0" state="0">
473      <backdrop name="vfd11" element="vfd0" state="0">
474474         <bounds x="45" y="280" width="7" height="24"/>
475475      </backdrop>
476      <backdrop name="vfd5" element="vfd0" state="0">
476      <backdrop name="vfd10" element="vfd0" state="0">
477477         <bounds x="52" y="280" width="7" height="24"/>
478478      </backdrop>
479      <backdrop name="vfd6" element="vfd0" state="0">
479      <backdrop name="vfd9" element="vfd0" state="0">
480480         <bounds x="59" y="280" width="7" height="24"/>
481481      </backdrop>
482      <backdrop name="vfd7" element="vfd0" state="0">
482      <backdrop name="vfd8" element="vfd0" state="0">
483483         <bounds x="66" y="280" width="7" height="24"/>
484484      </backdrop>
485      <backdrop name="vfd8" element="vfd0" state="0">
485      <backdrop name="vfd7" element="vfd0" state="0">
486486         <bounds x="73" y="280" width="7" height="24"/>
487487      </backdrop>
488      <backdrop name="vfd9" element="vfd0" state="0">
488      <backdrop name="vfd6" element="vfd0" state="0">
489489         <bounds x="80" y="280" width="7" height="24"/>
490490      </backdrop>
491      <backdrop name="vfd10" element="vfd0" state="0">
491      <backdrop name="vfd5" element="vfd0" state="0">
492492         <bounds x="87" y="280" width="7" height="24"/>
493493      </backdrop>
494      <backdrop name="vfd11" element="vfd0" state="0">
494      <backdrop name="vfd4" element="vfd0" state="0">
495495         <bounds x="94" y="280" width="7" height="24"/>
496496      </backdrop>
497      <backdrop name="vfd12" element="vfd0" state="0">
497      <backdrop name="vfd3" element="vfd0" state="0">
498498         <bounds x="101" y="280" width="7" height="24"/>
499499      </backdrop>
500      <backdrop name="vfd13" element="vfd0" state="0">
500      <backdrop name="vfd2" element="vfd0" state="0">
501501         <bounds x="108" y="280" width="7" height="24"/>
502502      </backdrop>
503      <backdrop name="vfd14" element="vfd0" state="0">
503      <backdrop name="vfd1" element="vfd0" state="0">
504504         <bounds x="115" y="280" width="7" height="24"/>
505505      </backdrop>
506      <backdrop name="vfd15" element="vfd0" state="0">
506      <backdrop name="vfd0" element="vfd0" state="0">
507507         <bounds x="122" y="280" width="7" height="24"/>
508508      </backdrop>
509509   </view>
510510   <view name="VFD Display Output Only">
511      <bezel name="vfd0" element="vfd0" state="0">
511      <bezel name="vfd15" element="vfd0" state="0">
512512         <bounds x="10" y="200" width="9" height="17"/>
513513      </bezel>
514      <bezel name="vfd1" element="vfd0" state="0">
514      <bezel name="vfd14" element="vfd0" state="0">
515515         <bounds x="19" y="200" width="9" height="17"/>
516516      </bezel>
517      <bezel name="vfd2" element="vfd0" state="0">
517      <bezel name="vfd13" element="vfd0" state="0">
518518         <bounds x="28" y="200" width="9" height="17"/>
519519      </bezel>
520      <bezel name="vfd3" element="vfd0" state="0">
520      <bezel name="vfd12" element="vfd0" state="0">
521521         <bounds x="37" y="200" width="9" height="17"/>
522522      </bezel>
523      <bezel name="vfd4" element="vfd0" state="0">
523      <bezel name="vfd11" element="vfd0" state="0">
524524         <bounds x="46" y="200" width="9" height="17"/>
525525      </bezel>
526      <bezel name="vfd5" element="vfd0" state="0">
526      <bezel name="vfd10" element="vfd0" state="0">
527527         <bounds x="55" y="200" width="9" height="17"/>
528528      </bezel>
529      <bezel name="vfd6" element="vfd0" state="0">
529      <bezel name="vfd9" element="vfd0" state="0">
530530         <bounds x="64" y="200" width="9" height="17"/>
531531      </bezel>
532      <bezel name="vfd7" element="vfd0" state="0">
532      <bezel name="vfd8" element="vfd0" state="0">
533533         <bounds x="73" y="200" width="9" height="17"/>
534534      </bezel>
535      <bezel name="vfd8" element="vfd0" state="0">
535      <bezel name="vfd7" element="vfd0" state="0">
536536         <bounds x="82" y="200" width="9" height="17"/>
537537      </bezel>
538      <bezel name="vfd9" element="vfd0" state="0">
538      <bezel name="vfd6" element="vfd0" state="0">
539539         <bounds x="91" y="200" width="9" height="17"/>
540540      </bezel>
541      <bezel name="vfd10" element="vfd0" state="0">
541      <bezel name="vfd5" element="vfd0" state="0">
542542         <bounds x="100" y="200" width="9" height="17"/>
543543      </bezel>
544      <bezel name="vfd11" element="vfd0" state="0">
544      <bezel name="vfd4" element="vfd0" state="0">
545545         <bounds x="109" y="200" width="9" height="17"/>
546546      </bezel>
547      <bezel name="vfd12" element="vfd0" state="0">
547      <bezel name="vfd3" element="vfd0" state="0">
548548         <bounds x="118" y="200" width="9" height="17"/>
549549      </bezel>
550      <bezel name="vfd13" element="vfd0" state="0">
550      <bezel name="vfd2" element="vfd0" state="0">
551551         <bounds x="127" y="200" width="9" height="17"/>
552552      </bezel>
553      <bezel name="vfd14" element="vfd0" state="0">
553      <bezel name="vfd1" element="vfd0" state="0">
554554         <bounds x="136" y="200" width="9" height="17"/>
555555      </bezel>
556      <bezel name="vfd15" element="vfd0" state="0">
556      <bezel name="vfd0" element="vfd0" state="0">
557557         <bounds x="145" y="200" width="9" height="17"/>
558558      </bezel>
559559   </view>
trunk/src/mame/drivers/bfmsys85.c
r29539r29540
259259{
260260//reset 0x20, clock 0x80, data 0x40
261261
262   if (data & 0x20)//inverted?
263   {
264      if (m_alpha_clock != (data & 0x80))
265      {
266         if (m_alpha_clock)//rising edge
267         {
268            m_vfd->shift_data(data & 0x40?1:0);
269         }
270      }
271   m_alpha_clock = (data & 0x80);
272   }
273   else
274   {
275      m_vfd->reset();
276   }
277
262   m_vfd->por(data & 0x20);//inverted?
263   m_vfd->sclk(data & 0x80);
264   m_vfd->data(data&0x40);
278265}
279266
280267//////////////////////////////////////////////////////////////////////////////////
trunk/src/mame/drivers/mpu4hw.c
r29539r29540
645645WRITE_LINE_MEMBER(mpu4_state::pia_ic3_ca2_w)
646646{
647647   LOG_IC3(("%s: IC3 PIA Write CA2 (alpha data), %02X\n", machine().describe_context(),state));
648
649   m_alpha_data_line = state;
648   m_vfd->data(state);
650649}
651650
652651
r29539r29540
654653{
655654   LOG_IC3(("%s: IC3 PIA Write CB (alpha reset), %02X\n",machine().describe_context(),state));
656655// DM Data pin A
657   if ( !state )
658   {
659      m_vfd->reset();
660   }
656   m_vfd->por(state);
661657}
662658
663659
r29539r29540
13461342   LOG_IC8(("%s: IC8 PIA write CB2 (alpha clock) %02X\n", machine().describe_context(), state & 0xFF));
13471343
13481344   // DM Data pin B
1349   if (m_alpha_clock != state)
1350   {
1351      if (!m_alpha_clock)//falling edge
1352      {
1353         m_vfd->shift_data(m_alpha_data_line?0:1);
1354      }
1355   }
1356   m_alpha_clock = state;
1345   
1346   m_vfd->sclk(!state);
13571347}
13581348
13591349// universal sampled sound program card PCB 683077
trunk/src/mame/drivers/jpmimpct.c
r29539r29540
957957WRITE8_MEMBER(jpmimpct_state::display_c_w)
958958{
959959   //Reset 0x04, data 0x02, clock 0x01
960   if(data & 0x04)
961   {
962      int alpha_data = (data & 0x02)?0:1;
963      if (m_alpha_clock != (data & 0x01))
964      {
965         if (!m_alpha_clock)//falling edge
966         {
967            m_vfd->shift_data(alpha_data);
968         }
969      }
970      m_alpha_clock = (data & 0x01);
971   }
972   else
973   {
974      m_vfd->reset();
975   }
960   m_vfd->por(data & 0x04);
961   m_vfd->data(data & 0x02);
962   m_vfd->sclk(data & 0x01);
976963}
977964
978965static I8255_INTERFACE (ppi8255_intf)
trunk/src/mame/drivers/proconn.c
r29539r29540
332332WRITE16_MEMBER(proconn_state::serial_transmit)
333333{
334334//Don't like the look of this, should be a clock somewhere
335//  if (offset == 0)
336//      m_vfd->write_char( data );
337
335 
338336   // should probably be in the pios above
339337
340   for (int i=0; i<8;i++)
338   if (offset == 0)
341339   {
342      m_vfd->shift_data( (data & (1<<i))?0:1  );
340      for (int i=0; i<8;i++)
341      {
342         m_vfd->data(data & (1<<i));
343         m_vfd->sclk(1);
344         m_vfd->sclk(0);     
345      }
343346   }
344347}
345348
346
347349READ16_MEMBER(proconn_state::serial_receive)
348350{
349351   logerror("proconn serial receive read %x",offset);
trunk/src/mame/drivers/mpu3.c
r29539r29540
136136   optional_device<roc10937_t> m_vfd;
137137
138138
139int m_alpha_data_line;
140int m_alpha_clock;
141139int m_triac_ic3;
142140int m_triac_ic4;
143141int m_triac_ic5;
r29539r29540
595593WRITE8_MEMBER(mpu3_state::pia_ic6_porta_w)
596594{
597595   LOG(("%s: IC6 PIA Port A Set to %2x (Alpha)\n", machine().describe_context(),data));
598   if ( data & 0x08 ) m_vfd->reset();
599
600   m_alpha_data_line = ((data & 0x20) >> 5);
601
602   if (m_alpha_clock != ((data & 0x10) >>4))
603   {
604      if (!m_alpha_clock)//falling edge
605      {
606         m_vfd->shift_data(m_alpha_data_line?1:0);
607      }
608   }
609   m_alpha_clock = (data & 0x10) >>4;
596   m_vfd->por((!data&0x08));
597   m_vfd->data((data & 0x20) >> 5);
598   m_vfd->sclk((data & 0x10) >>4);
610599}
611600
612601WRITE8_MEMBER(mpu3_state::pia_ic6_portb_w)
trunk/src/mame/drivers/jpmsys5.c
r29539r29540
238238      }
239239      case 1:
240240      {
241         //Reset 0x04, data 0x02, clock 0x01
242         if(data & 0x04)
243         {
244            int alpha_data = (data & 0x02)?0:1;
245            if (m_alpha_clock != (data & 0x01))
246            {
247               if (!m_alpha_clock)//falling edge
248               {
249                  m_vfd->shift_data(alpha_data);
250               }
251            }
252            m_alpha_clock = (data & 0x01);
253         }
254         else
255         {
256            m_vfd->reset();
257         }
241         //Reset 0x04, data 0x02, clock
242         m_vfd->por(data & 0x04);
243         m_vfd->data(data & 0x02);
244         m_vfd->sclk(data & 0x01);
258245         break;
259246      }
260247      case 2:
trunk/src/mame/drivers/bfm_sc1.c
r29539r29540
355355
356356WRITE8_MEMBER(bfm_sc1_state::vfd_w)
357357{
358   int changed = m_vfd_latch ^ data;
358/*   int changed = m_vfd_latch ^ data;
359359
360360   m_vfd_latch = data;
361361
r29539r29540
376376         }
377377      }
378378   }
379*/
380   m_vfd0->por(!(data & VFD_RESET));
381   m_vfd0->data(data & VFD_DATA);
382   m_vfd0->sclk(data & VFD_CLOCK1);
379383}
380384
381385/////////////////////////////////////////////////////////////////////////////////////
trunk/src/mame/drivers/maygay1b.c
r29539r29540
147147{
148148//  printf("m1_pia_porta_w %02x\n",data);
149149
150   if((data & 0x40))
151   {
152      if (m_alpha_clock != (data & 0x20))
153      {
154         if (!m_alpha_clock)
155         {
156            m_vfd->shift_data((data & 0x10)?0:1);
157         }
158      }
159      m_alpha_clock = (data & 0x20);
160   }
161   else
162   {
163      m_vfd->reset();
164   }
150      m_vfd->por(!data & 0x40);
151      m_vfd->data(data & 0x10);
152      m_vfd->sclk(data & 0x20);
165153}
166154
167155WRITE8_MEMBER(maygay1b_state::m1_pia_portb_w)
trunk/src/mame/drivers/globalfr.c
r29539r29540
77  Motherboard contains very few major components
88
99  Missing sound roms? (or is sound data in the program roms?)
10  NOTE: VFD is guessed as Samsung 16 segment, need to know more
10  NOTE: VFD is guessed as Samsung 16 segment, like other Global products
11  need to know more
1112*******************************************************************************/
1213
1314
r29539r29540
3132   optional_device<s16lf01_t> m_vfd;
3233
3334// serial vfd
34   int m_alpha_clock;
3535
3636   DECLARE_WRITE16_MEMBER(vfd_w);
3737
r29539r29540
4141
4242WRITE16_MEMBER(globalfr_state::vfd_w)
4343{
44//  if(!(data & 0x20)) need to find reset
44//  m_vfd->(data & 0x20) need to find reset
4545   {
46      int clock = (data & 0x40) != 0;
47      int datline = (data & 0x80);
48      if (m_alpha_clock != clock)
49      {
50         if (!m_alpha_clock)
51         {
52            m_vfd->shift_data(datline?1:0);
53         }
54      }
55      m_alpha_clock = clock;
46      m_vfd->sclk((data&0x40));
47      m_vfd->data(!(data&0x80));
5648   }
57//  else
58//  {
59//      m_vfd->reset();
60//  }
6149}
6250
6351static ADDRESS_MAP_START( globalfr_map, AS_PROGRAM, 16, globalfr_state )
trunk/src/mame/machine/bfm_bd1.c
r29539r29540
130130   save_item(NAME(m_outputs));
131131   save_item(NAME(m_user_data));           // user defined character data (16 bit)
132132   save_item(NAME(m_user_def));            // user defined character state
133   save_item(NAME(m_sclk));
134   save_item(NAME(m_data));
133135
134136   device_reset();
135137}
r29539r29540
150152   m_flash_control = 0;
151153   m_user_data = 0;
152154   m_user_def = 0;
155   m_sclk = 0;
156   m_data = 0;
153157
154158   memset(m_chars, 0, sizeof(m_chars));
155159   memset(m_outputs, 0, sizeof(m_outputs));
r29539r29540
163167
164168void bfm_bd1_t::device_post_load()
165169{
166   for (int i =0; i<16; i++)
167   {
168      output_set_indexed_value("vfd", (m_port_val*16) + i, m_outputs[i]);
169   }
170   update_display();
170171}
171172
172173void bfm_bd1_t::update_display()
r29539r29540
535536   }
536537}
537538
538void bfm_bd1_t::shift_data(int data)
539void bfm_bd1_t::shift_clock(int state)
539540{
540   m_shift_data <<= 1;
541   if (m_sclk != state)
542   {
543      if (!m_sclk)
544      {
545         m_shift_data <<= 1;
541546
542   if ( !data ) m_shift_data |= 1;
547         if ( !m_data ) m_shift_data |= 1;
543548
544   if ( ++m_shift_count >= 8 )
549         if ( ++m_shift_count >= 8 )
550         {
551            write_char(m_shift_data);
552            m_shift_count = 0;
553            m_shift_data  = 0;
554         }
555         update_display();
556
557      }
558   }
559   m_sclk = state;
560}
561
562WRITE_LINE_MEMBER( bfm_bd1_t::sclk ) { shift_clock(state); }
563WRITE_LINE_MEMBER( bfm_bd1_t::data ) { m_data = state; }
564
565WRITE_LINE_MEMBER( bfm_bd1_t::por )
566{
567   if (!state)
545568   {
546      write_char(m_shift_data);
547      m_shift_count = 0;
548      m_shift_data  = 0;
569      reset();
549570   }
550571}
trunk/src/mame/machine/bfm_bd1.h
r29539r29540
2323   UINT8   m_port_val;
2424   void blank(int data);
2525
26   void shift_data(int data);
26   void shift_clock(int state);
2727   void setdata(int segdata, int data);
2828   UINT16 set_display(UINT16 segin);
29   DECLARE_WRITE_LINE_MEMBER( sclk );
30   DECLARE_WRITE_LINE_MEMBER( data );
31   DECLARE_WRITE_LINE_MEMBER( por );
2932
3033protected:
3134   static const UINT8 AT_NORMAL  = 0x00;
r29539r29540
4447   int m_display_mode;
4548   int m_flash_rate;
4649   int m_flash_control;
50   int m_sclk;
51   int m_data;
52
4753   UINT8 m_cursor;
4854   UINT16 m_chars[16];
4955   UINT16 m_outputs[16];
trunk/src/mame/includes/mpu4.h
r29539r29540
250250
251251   int m_mod_number;
252252   int m_mmtr_data;
253   int m_alpha_data_line;
254   int m_alpha_clock;
255253   int m_ay8913_address;
256254   int m_serial_data;
257255   int m_signal_50hz;
trunk/src/mame/includes/maygay1b.h
r29539r29540
6060   int m_old_lamp_strobe;
6161   int m_lamp_strobe2;
6262   int m_old_lamp_strobe2;
63   int m_alpha_clock;
6463   int m_RAMEN;
6564   int m_ALARMEN;
6665   int m_PSUrelay;
trunk/src/emu/machine/roc10937.c
r29539r29540
9595         //                     -.
9696   0x2001, // 0010 0000 0000 0001 -
9797         //                     /.
98   0x2430, // 0010 0010 0011 0000 <.
98   0x2230, // 0010 0010 0011 0000 <.
9999   0x4430, // 0100 0100 0011 0000 =.
100100   0x8830, // 1000 1000 0011 0000 >.
101101   0x1407, // 0001 0100 0000 0111 ?.
r29539r29540
150150   save_item(NAME(m_outputs));
151151   save_item(NAME(m_brightness));
152152   save_item(NAME(m_count));
153   save_item(NAME(m_sclk));
154   save_item(NAME(m_data));
153155   save_item(NAME(m_duty));
154156   save_item(NAME(m_disp));
155157
r29539r29540
168170   m_count=0;
169171   m_duty=31;
170172   m_disp = 0;
173   m_sclk = 0;
174   m_data = 0;
171175
172176   memset(m_chars, 0, sizeof(m_chars));
173177   memset(m_outputs, 0, sizeof(m_outputs));
r29539r29540
183187///////////////////////////////////////////////////////////////////////////
184188void rocvfd_t::device_post_load()
185189{
190   update_display();
191}
192
193void rocvfd_t::update_display()
194{
186195   for (int i =0; i<16; i++)
187196   {
197      m_outputs[i] = set_display(m_chars[i]);
188198      output_set_indexed_value("vfd", (m_port_val*16) + i, m_outputs[i]);
189199   }
190200}
191201
192//Display on Rockwell chips is naturally backwards, due to the way it is wired. We emulate this by flipping the display at update time
193void rocvfd_t::update_display()
202WRITE_LINE_MEMBER( rocvfd_t::sclk )
203{
204   shift_clock(state);
205}
206
207WRITE_LINE_MEMBER( rocvfd_t::data )
208{
209   m_data = state;
210}
211
212WRITE_LINE_MEMBER( rocvfd_t::por )
194213{
195   for (int i =0; i<16; i++)
214   //If line goes low, reset mode is engaged, until such a time as it goes high again.
215   if (!state)
196216   {
197      m_outputs[i] = set_display(m_chars[15-i]);
198      output_set_indexed_value("vfd", (m_port_val*16) + i, m_outputs[i]);
217      reset();
199218   }
200219}
201220
202void rocvfd_t::shift_data(int data)
221
222void rocvfd_t::shift_clock(int state)
203223{
204   m_shift_data <<= 1;
224   if (m_sclk != state)
225   {
226      //Clock data on FALLING edge
227      if (!m_sclk)
228      {
229         m_shift_data <<= 1;
205230
206   if ( !data ) m_shift_data |= 1;
231         if ( m_data ) m_shift_data |= 1;
207232
208   if ( ++m_shift_count >= 8 )
209   {
210      write_char(m_shift_data);
211      m_shift_count = 0;
212      m_shift_data  = 0;
233         if ( ++m_shift_count >= 8 )
234         {
235            write_char(m_shift_data);
236            m_shift_count = 0;
237            m_shift_data  = 0;
238         }
239         update_display();
240
241      }
213242   }
214   update_display();
243   m_sclk = state;
215244}
216245
217246///////////////////////////////////////////////////////////////////////////
r29539r29540
355384{
356385   m_port_val=0;
357386}
358
359//Samsung chips fix the issue with the reversal of the drive.
360void s16lf01_t::update_display()
361{
362   for (int i =0; i<16; i++)
363   {
364      m_outputs[i] = set_display(m_chars[i]);
365      output_set_indexed_value("vfd", (m_port_val*16) + i, m_outputs[i]);
366   }
367}
trunk/src/emu/machine/roc10937.h
r29539r29540
5454   virtual void update_display();
5555   UINT8   m_port_val;
5656   void blank(int data);
57   void shift_data(int data);
57   void shift_clock(int data);
5858   void write_char(int data);
5959   void setdata(int segdata, int data);
6060   UINT32 set_display(UINT32 segin);
61   DECLARE_WRITE_LINE_MEMBER( sclk );
62   DECLARE_WRITE_LINE_MEMBER( data );
63   DECLARE_WRITE_LINE_MEMBER( por );
6164
6265
6366protected:
r29539r29540
6871   int m_pcursor_pos;
6972   int m_brightness;
7073   int m_count;
74   int m_data;
7175   int m_duty;
7276   int m_disp;
77   int m_sclk;
7378   UINT8 m_cursor;
7479   UINT32 m_chars[16];
7580   UINT32 m_outputs[16];
r29539r29540
109114class s16lf01_t : public rocvfd_t {
110115public:
111116   s16lf01_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
112
113   virtual void update_display();
114117protected:
115118
116119};
trunk/src/mess/drivers/digel804.c
r29539r29540
117117   DECLARE_WRITE8_MEMBER( acia_control_w );
118118   DECLARE_WRITE_LINE_MEMBER( da_w );
119119   DECLARE_INPUT_CHANGED_MEMBER(mode_change);
120   // vfd helper stuff for port 44, should be unnecessary after 10937 gets a proper device
121   UINT8 m_vfd_sclk;
122120   // current speaker state for port 45
123121   UINT8 m_speaker_state;
124122   // ram stuff for banking
r29539r29540
164162void digel804_state::machine_reset()
165163{
166164   m_vfd->reset();
167   m_vfd_sclk = 0;
168165}
169166
170167READ8_MEMBER( digel804_state::ip40 ) // eprom data bus read
r29539r29540
288285#ifdef PORT44_W_VERBOSE
289286   logerror("Digel804: port 0x44 vfd/state control had %02x written to it!\n", data);
290287#endif
291   // latch vfd data on falling edge of clock only; this should really be part of the 10937 device, not here!
292   if (m_vfd_sclk && ((data&1)==0))
293   {
294      m_vfd->shift_data((data & 0x80) ? 0 : 1);
295   }
296   m_vfd_sclk = data & 1;
288   m_vfd->por(!(data&0x04));
289   m_vfd->data(data&0x80);
290   m_vfd->sclk(data&1);
297291}
298292
299293WRITE8_MEMBER( digel804_state::op45 ) // speaker write

Previous 199869 Revisions Next


© 1997-2024 The MAME Team