Previous 199869 Revisions Next

r29558 Saturday 12th April, 2014 at 12:34:53 UTC by Nathan Woods
Merge branch 'master' of ssh://mess.org/mame into new_menus
[/branches/new_menus/src/emu/bus/centronics]image.c
[/branches/new_menus/src/emu/bus/iq151]staper.c
[/branches/new_menus/src/emu/bus/midi]midiinport.c
[/branches/new_menus/src/emu/imagedev]midiin.c midiin.h printer.c printer.h
[/branches/new_menus/src/emu/machine]8042kbdc.c 8042kbdc.h 8257dma.c 8257dma.h aakart.c roc10937.c roc10937.h
[/branches/new_menus/src/emu/sound]tms36xx.c tms36xx.h
[/branches/new_menus/src/lib/util]corefile.c
[/branches/new_menus/src/mame/audio]segag80r.c
[/branches/new_menus/src/mame/drivers]bfm_sc1.c bfmsys85.c bladestl.c dkong.c globalfr.c jpmimpct.c jpmsys5.c maygay1b.c model2.c mpu3.c mpu4hw.c naughtyb.c phoenix.c pinkiri8.c proconn.c
[/branches/new_menus/src/mame/includes]archimds.h maygay1b.h model2.h mpu4.h
[/branches/new_menus/src/mame/layout]mpu4.lay mpu4ext.lay mpu4plasma.lay
[/branches/new_menus/src/mame/machine]archimds.c bfm_bd1.c bfm_bd1.h pcshare.c
[/branches/new_menus/src/mame/video]archimds.c
[/branches/new_menus/src/mess/drivers]a310.c apogee.c apple3.c bebox.c digel804.c dragon.c fanucspmg.c hec2hrp.c interact.c ip22.c mc10.c mikrosha.c partner.c pc8001.c ql.c radio86.c unior.c vg5k.c x07.c
[/branches/new_menus/src/mess/includes]apple3.h partner.h radio86.h
[/branches/new_menus/src/mess/machine]apple3.c partner.c radio86.c

branches/new_menus/src/mame/layout/mpu4plasma.lay
r29557r29558
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
branches/new_menus/src/mame/layout/mpu4.lay
r29557r29558
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>
branches/new_menus/src/mame/layout/mpu4ext.lay
r29557r29558
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>
branches/new_menus/src/mame/drivers/phoenix.c
r29557r29558
411411GFXDECODE_END
412412
413413
414static const tms36xx_interface phoenix_tms36xx_interface =
415{
416   MM6221AA,   /* TMS36xx subtype(s) */
417   {0.50,0,0,1.05,0,0}, /* decay times of voices */
418   0.21       /* tune speed (time between beats) */
419};
420
421static const tms36xx_interface pleiads_tms36xx_interface =
422{
423   TMS3615,    /* TMS36xx subtype(s) */
424   /*
425    * Decay times of the voices; NOTE: it's unknown if
426    * the the TMS3615 mixes more than one voice internally.
427    * A wav taken from Pop Flamer sounds like there
428    * are at least no 'odd' harmonics (5 1/3' and 2 2/3')
429    */
430   {0.33,0.33,0,0.33,0,0.33}
431};
432
433414static const ay8910_interface survival_ay8910_interface =
434415{
435416   AY8910_LEGACY_OUTPUT,
r29557r29558
471452   /* sound hardware */
472453   MCFG_SPEAKER_STANDARD_MONO("mono")
473454
474   MCFG_TMS36XX_ADD("tms",  372)
475   MCFG_SOUND_CONFIG(phoenix_tms36xx_interface)
455   MCFG_TMS36XX_ADD("tms", 372)
456   MCFG_TMS36XX_TYPE(MM6221AA)
457   MCFG_TMS36XX_DECAY_TIMES(0.50, 0, 0, 1.05, 0, 0)
458   MCFG_TMS36XX_TUNE_SPEED(0.21)
476459   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
477460
478461   MCFG_SOUND_ADD("cust", PHOENIX, 0)
r29557r29558
498481
499482   /* sound hardware */
500483   MCFG_TMS36XX_REPLACE("tms", 247)
501   MCFG_SOUND_CONFIG(pleiads_tms36xx_interface)
484   MCFG_TMS36XX_TYPE(TMS3615)
485   MCFG_TMS36XX_DECAY_TIMES(0.33, 0.33, 0, 0.33, 0, 0.33)
486   // NOTE: it's unknown if the TMS3615 mixes more than one voice internally.
487   // A wav taken from Pop Flamer sounds like there are at least no 'odd'
488   // harmonics (5 1/3' and 2 2/3')
502489   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
503490
504491   MCFG_DEVICE_REMOVE("cust")
branches/new_menus/src/mame/drivers/globalfr.c
r29557r29558
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
r29557r29558
3132   optional_device<s16lf01_t> m_vfd;
3233
3334// serial vfd
34   int m_alpha_clock;
3535
3636   DECLARE_WRITE16_MEMBER(vfd_w);
3737
r29557r29558
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 )
branches/new_menus/src/mame/drivers/dkong.c
r29557r29558
370370   DEVCB_NULL
371371};
372372
373static I8257_INTERFACE( dk_dma )
374{
375   DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_HALT),
376   DEVCB_NULL,
377   DEVCB_NULL,
378   DEVCB_DRIVER_MEMBER(dkong_state, memory_read_byte),
379   DEVCB_DRIVER_MEMBER(dkong_state, memory_write_byte),
380   { DEVCB_NULL, DEVCB_DRIVER_MEMBER(dkong_state,p8257_ctl_r), DEVCB_NULL, DEVCB_NULL },
381   { DEVCB_DRIVER_MEMBER(dkong_state,p8257_ctl_w), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL }
382};
383
384static I8257_INTERFACE( hb_dma )
385{
386   DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_HALT),
387   DEVCB_NULL,
388   DEVCB_NULL,
389   DEVCB_DRIVER_MEMBER(dkong_state, hb_dma_read_byte),
390   DEVCB_DRIVER_MEMBER(dkong_state, hb_dma_write_byte),
391   { DEVCB_NULL, DEVCB_DRIVER_MEMBER(dkong_state,p8257_ctl_r), DEVCB_NULL, DEVCB_NULL },
392   { DEVCB_DRIVER_MEMBER(dkong_state,p8257_ctl_w), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL }
393};
394
395373/*************************************
396374 *
397375 *  VBLANK and IRQ generation
r29557r29558
16571635   MCFG_MACHINE_START_OVERRIDE(dkong_state,dkong2b)
16581636   MCFG_MACHINE_RESET_OVERRIDE(dkong_state,dkong)
16591637
1660   MCFG_I8257_ADD("dma8257", CLOCK_1H, dk_dma)
1638   MCFG_DEVICE_ADD("dma8257", I8257, CLOCK_1H)
1639   MCFG_I8257_OUT_HRQ_CB(INPUTLINE("maincpu", INPUT_LINE_HALT))
1640   MCFG_I8257_IN_MEMR_CB(READ8(dkong_state, memory_read_byte))
1641   MCFG_I8257_OUT_MEMW_CB(WRITE8(dkong_state, memory_write_byte))
1642   MCFG_I8257_IN_IOR_1_CB(READ8(dkong_state, p8257_ctl_r))
1643   MCFG_I8257_OUT_IOW_0_CB(WRITE8(dkong_state, p8257_ctl_w))
16611644
16621645   /* video hardware */
16631646   MCFG_SCREEN_ADD("screen", RASTER)
r29557r29558
17841767   MCFG_CPU_VBLANK_INT_DRIVER("screen", dkong_state,  s2650_interrupt)
17851768
17861769   MCFG_DEVICE_MODIFY("dma8257")
1787   MCFG_DEVICE_CONFIG(hb_dma)
1770   MCFG_I8257_IN_MEMR_CB(READ8(dkong_state, hb_dma_read_byte))
1771   MCFG_I8257_OUT_MEMW_CB(WRITE8(dkong_state, hb_dma_write_byte))
17881772
17891773   MCFG_MACHINE_START_OVERRIDE(dkong_state,s2650)
17901774MACHINE_CONFIG_END
branches/new_menus/src/mame/drivers/bfmsys85.c
r29557r29558
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//////////////////////////////////////////////////////////////////////////////////
branches/new_menus/src/mame/drivers/bladestl.c
r29557r29558
5353
5454READ8_MEMBER(bladestl_state::trackball_r)
5555{
56   static const char *const port[] = { "TRACKBALL_P1_1", "TRACKBALL_P1_2", "TRACKBALL_P2_1", "TRACKBALL_P1_2" };
56   static const char *const port[] = { "TRACKBALL_P1_1", "TRACKBALL_P1_2", "TRACKBALL_P2_1", "TRACKBALL_P2_2" };
5757   int curr, delta;
5858
5959   curr = ioport(port[offset])->read();
branches/new_menus/src/mame/drivers/naughtyb.c
r29557r29558
402402GFXDECODE_END
403403
404404
405
406static const tms36xx_interface tms3615_interface =
407{
408   TMS3615,    /* TMS36xx subtype */
409   /*
410    * Decay times of the voices; NOTE: it's unknown if
411    * the the TMS3615 mixes more than one voice internally.
412    * A wav taken from Pop Flamer sounds like there
413    * are at least no 'odd' harmonics (5 1/3' and 2 2/3')
414    */
415   {0.15,0.20,0,0,0,0}
416
417};
418
419
420
421405static MACHINE_CONFIG_START( naughtyb, naughtyb_state )
422406
423407   /* basic machine hardware */
r29557r29558
442426   MCFG_SPEAKER_STANDARD_MONO("mono")
443427
444428   MCFG_TMS36XX_ADD("tms", 350)
445   MCFG_SOUND_CONFIG(tms3615_interface)
429   MCFG_TMS36XX_TYPE(TMS3615)
430   MCFG_TMS36XX_DECAY_TIMES(0.15, 0.20, 0, 0, 0, 0)
431   // NOTE: it's unknown if the TMS3615 mixes more than one voice internally.
432   // A wav taken from Pop Flamer sounds like there are at least no 'odd'
433   // harmonics (5 1/3' and 2 2/3')
446434   MCFG_SOUND_ROUTE(0, "mono", 0.60)
447435
448436   MCFG_SOUND_ADD("naughtyb_custom", NAUGHTYB, 0)
r29557r29558
475463   MCFG_SPEAKER_STANDARD_MONO("mono")
476464
477465   MCFG_TMS36XX_ADD("tms", 350)
478   MCFG_SOUND_CONFIG(tms3615_interface)
466   MCFG_TMS36XX_TYPE(TMS3615)
467   MCFG_TMS36XX_DECAY_TIMES(0.15, 0.20, 0, 0, 0, 0)
468   // NOTE: it's unknown if the TMS3615 mixes more than one voice internally.
469   // A wav taken from Pop Flamer sounds like there are at least no 'odd'
470   // harmonics (5 1/3' and 2 2/3')
479471   MCFG_SOUND_ROUTE(0, "mono", 0.60)
480472
481473   MCFG_SOUND_ADD("popflame_custom", POPFLAME, 0)
branches/new_menus/src/mame/drivers/proconn.c
r29557r29558
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);
branches/new_menus/src/mame/drivers/model2.c
r29557r29558
969969   return 0x00400000;
970970}
971971
972#if 0
972973READ32_MEMBER(model2_state::desert_unk_r)
973974{
975   static UINT8 test;
976
977   test ^= 8;
974978   // vcop needs bit 3 clear (infinite loop otherwise)
975979   // desert needs other bits set (not sure which specifically)
976980   // daytona needs the MSW to return ff
977   return 0x00ff00f7;
981   return 0x00f700ff | (test << 16);
978982}
983#endif
979984
980985READ32_MEMBER(model2_state::model2_irq_r)
981986{
r29557r29558
10001005   }
10011006
10021007   m_intreq &= data;
1008   UINT32 irq_ack = data ^ 0xffffffff;
1009
1010   if(irq_ack & 1<<0)
1011      m_maincpu->set_input_line(I960_IRQ0, CLEAR_LINE);
1012
1013   if(irq_ack & 1<<10)
1014      m_maincpu->set_input_line(I960_IRQ3, CLEAR_LINE);
1015
10031016}
10041017
10051018READ32_MEMBER(model2_state::model2_serial_r)
r29557r29558
13921405   AM_RANGE(0x11680000, 0x116fffff) AM_RAM AM_SHARE("share1") // FB mirror
13931406ADDRESS_MAP_END
13941407
1408READ8_MEMBER(model2_state::virtuacop_lightgun_r)
1409{
1410   static const char *const ports[] = { "P1_Y", "P1_X", "P2_Y", "P2_X" };
1411   UINT8 res;
1412
1413   res = (ioport(ports[offset >> 1])->read_safe(0) >> ((offset & 1)*8)) & 0xff;
1414
1415   return res;
1416}
1417
1418/* handles offscreen gun trigger detection here */
1419READ8_MEMBER(model2_state::virtuacop_lightgun_offscreen_r)
1420{
1421   UINT16 special_res = 0xfffc;
1422   UINT16 p1x,p1y,p2x,p2y;
1423
1424   p1x = ioport("P1_X")->read_safe(0);
1425   p1y = ioport("P1_Y")->read_safe(0);
1426   p2x = ioport("P2_X")->read_safe(0);
1427   p2y = ioport("P2_Y")->read_safe(0);
1428
1429   /* TODO: might be better, supposedly user has to calibrate guns in order to make these settings to work ... */
1430   if(p1x <= 0x28 || p1x >= 0x3e0 || p1y <= 0x40 || p1y >= 0x3c0)
1431      special_res |= 1;
1432
1433   if(p2x <= 0x28 || p2x >= 0x3e0 || p2y <= 0x40 || p2y >= 0x3c0)
1434      special_res |= 2;
1435
1436   return (special_res >> ((offset & 1)*8)) & 0xff;
1437}
1438
13951439/* original Model 2 overrides */
13961440static ADDRESS_MAP_START( model2o_mem, AS_PROGRAM, 32, model2_state )
13971441   AM_RANGE(0x00200000, 0x0021ffff) AM_RAM
r29557r29558
14151459   AM_RANGE(0x01c00004, 0x01c00007) AM_READ_PORT("1c00004")
14161460   AM_RANGE(0x01c00010, 0x01c00013) AM_READ_PORT("1c00010")
14171461   AM_RANGE(0x01c00014, 0x01c00017) AM_READ_PORT("1c00014")
1418   AM_RANGE(0x01c0001c, 0x01c0001f) AM_READ(desert_unk_r )
1462   AM_RANGE(0x01c0001c, 0x01c0001f) AM_READ_PORT("1c0001c")
14191463   AM_RANGE(0x01c00040, 0x01c00043) AM_READ(daytona_unk_r )
1464   AM_RANGE(0x01c00100, 0x01c0010f) AM_READ8(virtuacop_lightgun_r,0x00ff00ff)
1465   AM_RANGE(0x01c00110, 0x01c00113) AM_READ8(virtuacop_lightgun_offscreen_r,0x00ff00ff)
14201466   AM_RANGE(0x01c00200, 0x01c002ff) AM_RAM AM_SHARE("backup2")
14211467   AM_RANGE(0x01c80000, 0x01c80003) AM_READWRITE(model2_serial_r, model2o_serial_w )
14221468
r29557r29558
15841630   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2")
15851631   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
15861632
1633   PORT_START("1c0001c")
1634   PORT_BIT( 0xfff7ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
1635   PORT_BIT( 0x00080000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
1636
15871637   PORT_START("IN0")
15881638   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 )
15891639   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 )
r29557r29558
16141664   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
16151665INPUT_PORTS_END
16161666
1667static INPUT_PORTS_START( vcop )
1668   PORT_START("1c00000")
1669   PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
1670   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1671
1672   PORT_START("1c00004")
1673   PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
1674   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1675
1676   PORT_START("1c00010")
1677   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN0")
1678   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1")
1679
1680   PORT_START("1c00014")
1681   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2")
1682   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1683
1684   PORT_START("1c0001c")
1685   PORT_BIT( 0xfff7ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
1686   PORT_BIT( 0x00080000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
1687
1688   PORT_START("IN0")
1689   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 )
1690   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 )
1691   PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW )
1692   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
1693   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START1 )
1694   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START2 )
1695   PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
1696
1697   PORT_START("IN1")
1698   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Trigger")
1699   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Trigger")
1700   PORT_BIT( 0xfffc, IP_ACTIVE_LOW, IPT_UNUSED )
1701
1702   PORT_START("IN2")
1703   PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED ) // <- one bit here enables "debug mode"
1704
1705   PORT_START("TEST")
1706   PORT_DIPNAME( 0x01, 0x00, "SYSA" )
1707   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1708   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
1709   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
1710   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1711   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
1712   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
1713   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1714   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
1715   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
1716   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1717   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
1718   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
1719   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1720   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
1721   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
1722   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1723   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
1724   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1725   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1726   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
1727   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
1728   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1729   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
1730   PORT_DIPNAME( 0x0100, 0x00, "SYSA" )
1731   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1732   PORT_DIPSETTING(    0x0100, DEF_STR( On ) )
1733   PORT_DIPNAME( 0x0200, 0x00, DEF_STR( Unknown ) )
1734   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1735   PORT_DIPSETTING(    0x0200, DEF_STR( On ) )
1736   PORT_DIPNAME( 0x0400, 0x00, DEF_STR( Unknown ) )
1737   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1738   PORT_DIPSETTING(    0x0400, DEF_STR( On ) )
1739   PORT_DIPNAME( 0x0800, 0x00, DEF_STR( Unknown ) )
1740   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1741   PORT_DIPSETTING(    0x0800, DEF_STR( On ) )
1742   PORT_DIPNAME( 0x1000, 0x00, DEF_STR( Unknown ) )
1743   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1744   PORT_DIPSETTING(    0x1000, DEF_STR( On ) )
1745   PORT_DIPNAME( 0x2000, 0x00, DEF_STR( Unknown ) )
1746   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1747   PORT_DIPSETTING(    0x2000, DEF_STR( On ) )
1748   PORT_DIPNAME( 0x4000, 0x00, DEF_STR( Unknown ) )
1749   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1750   PORT_DIPSETTING(    0x4000, DEF_STR( On ) )
1751   PORT_DIPNAME( 0x8000, 0x00, DEF_STR( Unknown ) )
1752   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1753   PORT_DIPSETTING(    0x8000, DEF_STR( On ) )
1754
1755   PORT_START("P1_X")
1756   PORT_BIT( 0x3ff, 0x200, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX( 0, 0x3ff ) PORT_SENSITIVITY( 50 ) PORT_KEYDELTA( 15 ) PORT_PLAYER(1)
1757
1758   PORT_START("P1_Y")
1759   PORT_BIT( 0x3ff, 0x200, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX( 0, 0x3ff ) PORT_SENSITIVITY( 50 ) PORT_KEYDELTA( 15 ) PORT_PLAYER(1)
1760
1761   PORT_START("P2_X")
1762   PORT_BIT( 0x3ff, 0x200, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX( 0, 0x3ff ) PORT_SENSITIVITY( 50 ) PORT_KEYDELTA( 15 ) PORT_PLAYER(2)
1763
1764   PORT_START("P2_Y")
1765   PORT_BIT( 0x3ff, 0x200, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX( 0, 0x3ff ) PORT_SENSITIVITY( 50 ) PORT_KEYDELTA( 15 ) PORT_PLAYER(2)
1766INPUT_PORTS_END
1767
16171768static INPUT_PORTS_START( daytona )
16181769   PORT_START("1c00000")
16191770   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "STEER")
r29557r29558
16311782   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2")
16321783   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
16331784
1785   PORT_START("1c0001c")
1786   PORT_BIT( 0xfff7ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
1787   PORT_BIT( 0x00080000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
1788
1789
16341790   PORT_START("IN0")
16351791   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 )
16361792   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 )
r29557r29558
17841940{
17851941   int scanline = param;
17861942
1787   if(scanline == 0) // 384
1943   if(scanline == 384) // 384
17881944   {
17891945      m_intreq |= (1<<10);
17901946      if (m_intena & (1<<10))
17911947         m_maincpu->set_input_line(I960_IRQ3, ASSERT_LINE);
17921948   }
17931949
1794   if(scanline == 384/2)
1950   if(scanline == 0)
17951951   {
17961952      m_intreq |= (1<<0);
17971953      if (m_intena & (1<<0))
r29557r29558
19612117   MCFG_S24TILE_DEVICE_PALETTE("palette")
19622118
19632119   MCFG_SCREEN_ADD("screen", RASTER)
1964   MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK )
1965   MCFG_SCREEN_REFRESH_RATE(60)
1966   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1967   MCFG_SCREEN_SIZE(62*8, 48*8)
1968   MCFG_SCREEN_VISIBLE_AREA(0*8, 62*8-1, 0*8, 48*8-1)
2120   MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
2121   MCFG_SCREEN_RAW_PARAMS(25000000/2, 496+16, 0, 496, 384+16, 0, 384) // not accurate
19692122   MCFG_SCREEN_UPDATE_DRIVER(model2_state, screen_update_model2)
19702123
19712124   MCFG_PALETTE_ADD("palette", 8192)
r29557r29558
54835636GAME( 1993, daytonata, daytona, model2o, daytona, driver_device, 0,       ROT0, "Sega",   "Daytona USA (Japan, Turbo hack, set 2)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
54845637GAME( 1993, daytonam,  daytona, model2o, daytona, model2_state,  daytonam,ROT0, "Sega",   "Daytona USA (Japan, To The MAXX)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
54855638GAME( 1994, desert,          0, model2o, desert,  driver_device, 0,       ROT0, "Sega / Martin Marietta", "Desert Tank", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
5486GAME( 1994, vcop,            0, model2o, daytona, driver_device, 0,       ROT0, "Sega",   "Virtua Cop (Revision B)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
5487GAME( 1994, vcopa,           0, model2o, daytona, driver_device, 0,       ROT0, "Sega",   "Virtua Cop (Revision A)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
5639GAME( 1994, vcop,            0, model2o, vcop,    driver_device, 0,       ROT0, "Sega",   "Virtua Cop (Revision B)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
5640GAME( 1994, vcopa,           0, model2o, vcop,    driver_device, 0,       ROT0, "Sega",   "Virtua Cop (Revision A)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
54885641
54895642// Model 2A-CRX (TGPs, SCSP sound board)
54905643GAME( 1995, manxtt, 0, manxttdx,model2, driver_device, 0, ROT0, "Sega", "Manx TT Superbike - DX (Revision D)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
branches/new_menus/src/mame/drivers/pinkiri8.c
r29557r29558
4646public:
4747   pinkiri8_state(const machine_config &mconfig, device_type type, const char *tag)
4848      : driver_device(mconfig, type, tag),
49      m_janshi_back_vram(*this, "back_vram"),
50      m_janshi_vram1(*this, "vram1"),
51      m_janshi_unk1(*this, "unk1"),
52      m_janshi_widthflags(*this, "widthflags"),
53      m_janshi_unk2(*this, "unk2"),
54      m_janshi_vram2(*this, "vram2"),
55      m_janshi_paletteram(*this, "paletteram"),
56      m_janshi_paletteram2(*this, "paletteram2"),
57      m_janshi_crtc_regs(*this, "crtc_regs"),
49      m_janshi_back_vram(*this, "janshivdp:back_vram"),
50      m_janshi_vram1(*this, "janshivdp:vram1"),
51      m_janshi_unk1(*this, "janshivdp:unk1"),
52      m_janshi_widthflags(*this, "janshivdp:widthflags"),
53      m_janshi_unk2(*this, "janshivdp:unk2"),
54      m_janshi_vram2(*this, "janshivdp:vram2"),
55      m_janshi_paletteram(*this, "janshivdp:paletteram"),
56      m_janshi_paletteram2(*this, "janshivdp:paletteram2"),
57      m_janshi_crtc_regs(*this, "janshivdp:crtc_regs"),
5858      m_maincpu(*this, "maincpu"),
5959      m_gfxdecode(*this, "gfxdecode"),
6060      m_palette(*this, "palette")  { }
r29557r29558
102102{
103103public:
104104   janshi_vdp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
105   DECLARE_ADDRESS_MAP(map, 8);
105106protected:
106107   virtual void device_config_complete();
107108   virtual void device_validity_check(validity_checker &valid) const;
r29557r29558
112113};
113114
114115
115static ADDRESS_MAP_START( janshi_vdp_map8, AS_0, 8, janshi_vdp_device )
116
116DEVICE_ADDRESS_MAP_START( map, 8, janshi_vdp_device )
117117   AM_RANGE(0xfc0000, 0xfc1fff) AM_RAM AM_SHARE("back_vram") // bg tilemap?
118118   AM_RANGE(0xfc2000, 0xfc2fff) AM_RAM AM_SHARE("vram1") // xpos, colour, tile number etc.
119119
r29557r29558
134134janshi_vdp_device::janshi_vdp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
135135   : device_t(mconfig, JANSHIVDP, "JANSHIVDP", tag, owner, clock, "janshi_vdp", __FILE__),
136136      device_memory_interface(mconfig, *this),
137      m_space_config("janshi_vdp", ENDIANNESS_LITTLE, 8,24, 0, NULL, *ADDRESS_MAP_NAME(janshi_vdp_map8))
137      m_space_config("janshi_vdp", ENDIANNESS_LITTLE, 8,24, 0, address_map_delegate(FUNC(janshi_vdp_device::map), this))
138138{
139139}
140140
branches/new_menus/src/mame/drivers/jpmimpct.c
r29557r29558
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)
branches/new_menus/src/mame/drivers/jpmsys5.c
r29557r29558
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:
branches/new_menus/src/mame/drivers/bfm_sc1.c
r29557r29558
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
r29557r29558
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/////////////////////////////////////////////////////////////////////////////////////
branches/new_menus/src/mame/drivers/mpu4hw.c
r29557r29558
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
r29557r29558
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
r29557r29558
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
branches/new_menus/src/mame/drivers/mpu3.c
r29557r29558
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;
r29557r29558
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)
branches/new_menus/src/mame/drivers/maygay1b.c
r29557r29558
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)
branches/new_menus/src/mame/audio/segag80r.c
r29557r29558
711711};
712712
713713
714static const tms36xx_interface monsterb_tms3617_interface =
715{
716   TMS3617,
717   {0.5,0.5,0.5,0.5,0.5,0.5}  /* decay times of voices */
718};
719
720
721
722714/*************************************
723715 *
724716 *  N7751 memory maps
r29557r29558
769761   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
770762
771763   MCFG_TMS36XX_ADD("music", 247)
772   MCFG_SOUND_CONFIG(monsterb_tms3617_interface)
764   MCFG_TMS36XX_TYPE(TMS3617)
765   MCFG_TMS36XX_DECAY_TIMES(0.5, 0.5, 0.5, 0.5, 0.5, 0.5)
773766   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
774767
775768   MCFG_DAC_ADD("dac")
branches/new_menus/src/mame/machine/archimds.c
r29557r29558
5858
5959   if (m_ioc_regs[IRQ_STATUS_B] & m_ioc_regs[IRQ_MASK_B])
6060   {
61      generic_pulse_irq_line(m_maincpu, ARM_IRQ_LINE, 1);
61      m_maincpu->set_input_line(ARM_IRQ_LINE, HOLD_LINE);
6262   }
6363}
6464
r29557r29558
6666{
6767   m_ioc_regs[FIQ_STATUS] |= mask;
6868
69   //printf("STATUS:%02x IRQ:%02x MASK:%02x\n",m_ioc_regs[FIQ_STATUS],mask,m_ioc_regs[FIQ_MASK]);
70
6971   if (m_ioc_regs[FIQ_STATUS] & m_ioc_regs[FIQ_MASK])
7072   {
71      generic_pulse_irq_line(m_maincpu, ARM_FIRQ_LINE, 1);
73      m_maincpu->set_input_line(ARM_FIRQ_LINE, HOLD_LINE);
7274   }
7375}
7476
r29557r29558
8183void archimedes_state::archimedes_clear_irq_b(int mask)
8284{
8385   m_ioc_regs[IRQ_STATUS_B] &= ~mask;
84   archimedes_request_irq_b(0);
86   //archimedes_request_irq_b(0);
8587}
8688
8789void archimedes_state::archimedes_clear_fiq(int mask)
8890{
8991   m_ioc_regs[FIQ_STATUS] &= ~mask;
90   archimedes_request_fiq(0);
92   //archimedes_request_fiq(0);
9193}
9294
9395void archimedes_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
r29557r29558
138140         offset_ptr = m_vidc_vidstart;
139141   }
140142
141   size = m_vidc_vidend-m_vidc_vidstart+0x10;
143   if(m_cursor_enabled == true)
144   {
145      for(m_vidc_ccur = 0;m_vidc_ccur < 0x200;m_vidc_ccur++)
146         m_cursor_vram[m_vidc_ccur] = (space.read_byte(m_vidc_cinit+m_vidc_ccur));
147   }
142148
143   for(m_vidc_ccur = 0;m_vidc_ccur < 0x200;m_vidc_ccur++)
144      m_cursor_vram[m_vidc_ccur] = (space.read_byte(m_vidc_cinit+m_vidc_ccur));
145
146149   if(m_video_dma_on)
147150   {
148151      m_vid_timer->adjust(m_screen->time_until_pos(m_vidc_regs[0xb4]));
r29557r29558
276279   }
277280
278281   m_ioc_regs[IRQ_STATUS_A] = 0x10 | 0x80; //set up POR (Power On Reset) and Force IRQ at start-up
279   m_ioc_regs[IRQ_STATUS_B] = 0x02; //set up IL[1] On
282   m_ioc_regs[IRQ_STATUS_B] = 0x00; //set up IL[1] On
280283   m_ioc_regs[FIQ_STATUS] = 0x80;   //set up Force FIQ
281284   m_ioc_regs[CONTROL] = 0xff;
282285}
r29557r29558
685688         {
686689            case 0: return ioc_ctrl_r(space,offset,mem_mask);
687690            case 1:
688               if (m_wd1772) {
689                  logerror("17XX: R @ addr %x mask %08x\n", offset*4, mem_mask);
690                  return m_wd1772->data_r(space, offset&0xf);
691               if (m_fdc)
692               {
693                  //printf("17XX: R @ addr %x mask %08x\n", offset*4, mem_mask);
694                  switch(ioc_addr & 0xc)
695                  {
696                     case 0x00: return m_fdc->status_r();
697                     case 0x04: return m_fdc->track_r();
698                     case 0x08: return m_fdc->sector_r();
699                     case 0x0c: return m_fdc->data_r();
700                  }
701
702                  return 0;
691703               } else {
692704                  logerror("Read from FDC device?\n");
693705                  return 0;
r29557r29558
702714               logerror("IOC: Internal Podule Read\n");
703715               return 0xffff;
704716            case 5:
705               if (m_wd1772) {
717               if (m_fdc)
718               {
706719                  switch(ioc_addr & 0xfffc)
707720                  {
721                     case 0x18: return 0xff; // FDC latch B
722                     case 0x40: return 0xff; // FDC latch A
708723                     case 0x50: return 0; //fdc type, new model returns 5 here
724                            case 0x70: return 0x0F;
725                            case 0x74: return 0xFF; // unknown
726//                          case 0x78: /* joystick */
727//                          case 0x7c:
709728                  }
710729               }
711730
712               logerror("IOC: Internal Latches Read %08x\n",ioc_addr);
731               //printf("IOC: Internal Latches Read %08x\n",ioc_addr);
713732
714733               return 0xffff;
715734         }
r29557r29558
740759         {
741760            case 0: ioc_ctrl_w(space,offset,data,mem_mask); return;
742761            case 1:
743                  if (m_wd1772) {
744                     logerror("17XX: %x to addr %x mask %08x\n", data, offset*4, mem_mask);
745                     m_wd1772->data_w(space, offset&0xf, data&0xff);
746                  } else {
762                  if (m_fdc)
763                  {
764                     //printf("17XX: %x to addr %x mask %08x\n", data, offset*4, mem_mask);
765                     switch(ioc_addr & 0xc)
766                     {
767                        case 0x00:
768                           m_fdc->cmd_w(data);
769                           return;
770
771                        case 0x04:
772                           m_fdc->track_w(data);
773                           return;
774
775                        case 0x08:
776                           m_fdc->sector_w(data);
777                           return;
778
779                           case 0x0c:
780                           m_fdc->data_w(data);
781                           return;
782                     }
783                  }
784                  else
785                  {
747786                     logerror("Write to FDC device?\n");
748787                  }
749788                  return;
r29557r29558
757796               logerror("IOC: Internal Podule Write\n");
758797               return;
759798            case 5:
760               if (m_wd1772) {
799               if (m_fdc)
800               {
761801                  switch(ioc_addr & 0xfffc)
762802                  {
763803                     case 0x18: // latch B
764                        m_wd1772->dden_w(BIT(data, 1));
804                        m_fdc->dden_w(BIT(data, 1));
765805                        return;
766806
767807                     case 0x40: // latch A
768                        if (data & 1) { m_wd1772->set_drive(0); }
769                        if (data & 2) { m_wd1772->set_drive(1); }
770                        if (data & 4) { m_wd1772->set_drive(2); }
771                        if (data & 8) { m_wd1772->set_drive(3); }
808                        floppy_image_device *floppy = NULL;
772809
773                        m_wd1772->set_side((data & 0x10)>>4);
810                        if (!(data & 1)) { floppy = m_floppy0->get_device(); }
811                        if (!(data & 2)) { floppy = m_floppy1->get_device(); }
812                        if (!(data & 4)) { floppy = NULL; } // floppy 2
813                        if (!(data & 8)) { floppy = NULL; } // floppy 3
814
815                        m_fdc->set_floppy(floppy);
816
817                        if(floppy)
818                        {
819                           floppy->mon_w(BIT(data, 5));
820                           floppy->ss_w(!(BIT(data, 4)));
821                        }
774822                        //bit 5 is motor on
775823                        return;
776824                  }
825
826                  //printf("%08x\n",ioc_addr);
777827               }
778828               break;
779829         }
r29557r29558
920970
921971
922972      //#ifdef MAME_DEBUG
973      if(1)
923974      logerror("VIDC: %s = %d\n", vrnames[(reg-0x80)/4], m_vidc_regs[reg]);
924975      //#endif
925976
r29557r29558
9531004      switch ((data >> 17) & 7)
9541005      {
9551006         case 0: /* video init */
1007            m_cursor_enabled = false;
9561008            m_vidc_vidinit = ((data>>2)&0x7fff)*16;
9571009            //printf("MEMC: VIDINIT %08x\n",m_vidc_vidinit);
9581010            break;
r29557r29558
9681020            break;
9691021
9701022         case 3: /* cursor init */
1023            //m_cursor_enabled = true;
9711024            m_vidc_cinit = 0x2000000 | (((data>>2)&0x7fff)*16);
972            //printf("MEMC: CURSOR %08x\n",((data>>2)&0x7fff)*16);
1025            //printf("MEMC: CURSOR INIT %08x\n",((data>>2)&0x7fff)*16);
9731026            break;
9741027
9751028         case 4: /* sound start */
branches/new_menus/src/mame/machine/pcshare.c
r29557r29558
164164   m_kbdc->write_out2(state);
165165}
166166
167/*************************************************************
168 *
169 * Keyboard
170 *
171 *************************************************************/
172167
173static const struct kbdc8042_interface at8042 =
174{
175   KBDC8042_AT386,
176   DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_RESET),
177   DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_A20),
178   DEVCB_DEVICE_LINE_MEMBER("pic8259_1", pic8259_device, ir1_w),
179   DEVCB_NULL,
180
181   DEVCB_NULL
182};
183
184ADDRESS_MAP_START( pcat32_io_common, AS_IO, 32, pcat_base_state )
168 ADDRESS_MAP_START( pcat32_io_common, AS_IO, 32, pcat_base_state )
185169   AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", am9517a_device, read, write, 0xffffffff)
186170   AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8("pic8259_1", pic8259_device, read, write, 0xffffffff)
187171   AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8("pit8254", pit8254_device, read, write, 0xffffffff)
r29557r29558
209193   MCFG_MC146818_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir0_w))
210194   MCFG_MC146818_CENTURY_INDEX(0x32)
211195
212   MCFG_KBDC8042_ADD("kbdc", at8042)
196   MCFG_DEVICE_ADD("kbdc", KBDC8042, 0)
197   MCFG_KBDC8042_KEYBOARD_TYPE(KBDC8042_AT386)
198   MCFG_KBDC8042_SYSTEM_RESET_CB(INPUTLINE("maincpu", INPUT_LINE_RESET))
199   MCFG_KBDC8042_GATE_A20_CB(INPUTLINE("maincpu", INPUT_LINE_A20))
200   MCFG_KBDC8042_INPUT_BUFFER_FULL_CB(DEVWRITELINE("pic8259_1", pic8259_device, ir1_w))
213201MACHINE_CONFIG_END
branches/new_menus/src/mame/machine/bfm_bd1.c
r29557r29558
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}
r29557r29558
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));
r29557r29558
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()
r29557r29558
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}
branches/new_menus/src/mame/machine/bfm_bd1.h
r29557r29558
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;
r29557r29558
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];
branches/new_menus/src/mame/includes/model2.h
r29557r29558
196196   DECLARE_READ_LINE_MEMBER(copro_tgp_fifoin_pop_ok);
197197   DECLARE_READ32_MEMBER(copro_tgp_fifoin_pop);
198198   DECLARE_WRITE32_MEMBER(copro_tgp_fifoout_push);
199   DECLARE_READ8_MEMBER(virtuacop_lightgun_r);
200   DECLARE_READ8_MEMBER(virtuacop_lightgun_offscreen_r);
199201};
200202
201203/*----------- defined in video/model2.c -----------*/
branches/new_menus/src/mame/includes/archimds.h
r29557r29558
1010#include "machine/aakart.h"
1111#include "sound/dac.h"
1212#include "machine/i2cmem.h"
13#include "machine/wd17xx.h"
13#include "machine/wd_fdc.h"
1414
1515// interrupt definitions.  these are for the real Archimedes computer - arcade
1616// and gambling knockoffs likely are a bit different.
r29557r29558
4747      m_kart(*this, "kart"),
4848      m_maincpu(*this, "maincpu"),
4949      m_i2cmem(*this, "i2cmem"),
50      m_wd1772(*this, "wd1772"),
50      m_fdc(*this, "fdc"),
51      m_floppy0(*this, "fdc:0"),
52      m_floppy1(*this, "fdc:1"),
5153      m_region_maincpu(*this, "maincpu"),
5254      m_region_vram(*this, "vram"),
5355      m_screen(*this, "screen"),
r29557r29558
9294protected:
9395   required_device<cpu_device> m_maincpu;
9496   optional_device<i2cmem_device> m_i2cmem;
95   optional_device<wd1772_device> m_wd1772;
97   optional_device<wd1772_t> m_fdc;
98   optional_device<floppy_connector> m_floppy0;
99   optional_device<floppy_connector> m_floppy1;
96100   required_memory_region m_region_maincpu;
97101   required_memory_region m_region_vram;
98102   required_device<screen_device> m_screen;
r29557r29558
126130   UINT8 m_video_dma_on,m_audio_dma_on;
127131   UINT8 m_vidc_pixel_clk;
128132   UINT8 m_vidc_stereo_reg[8];
133   bool m_cursor_enabled;
129134   emu_timer *m_timer[4], *m_snd_timer, *m_vid_timer;
130135   emu_timer *m_vbl_timer;
131136};
branches/new_menus/src/mame/includes/mpu4.h
r29557r29558
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;
branches/new_menus/src/mame/includes/maygay1b.h
r29557r29558
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;
branches/new_menus/src/mame/video/archimds.c
r29557r29558
176176      }
177177
178178
179      if(0)
179      if(m_cursor_enabled == true)
180180      {
181181         count = 0;
182182         for(y=0;y<16;y++)
branches/new_menus/src/emu/sound/tms36xx.c
r29557r29558
55
66#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
77
8#define VMIN    0x0000
9#define VMAX    0x7fff
10
118/* the frequencies are later adjusted by "* clock / FSCALE" */
129#define FSCALE  1024
1310
r29557r29558
338335      m_enable(0),
339336      m_tune_num(0),
340337      m_tune_ofs(0),
341      m_tune_max(0),
342      m_intf(NULL)
338      m_tune_max(0)
343339{
344340   memset(m_vol, 0, sizeof(int)*12);
345341   memset(m_vol_counter, 0, sizeof(int)*12);
r29557r29558
355351
356352void tms36xx_device::device_start()
357353{
358   int j;
359   int enable;
354   int enable = 0;
360355
361   m_intf = (const tms36xx_interface *)static_config();
362
363356   m_channel = stream_alloc(0, 1, clock() * 64);
364357   m_samplerate = clock() * 64;
365358   m_basefreq = clock();
366   enable = 0;
367   for (j = 0; j < 6; j++)
359
360   for (int j = 0; j < 6; j++)
368361   {
369      if( m_intf->decay[j] > 0 )
362      if (m_decay_time[j] > 0)
370363      {
371         m_decay[j+0] = m_decay[j+6] = VMAX / m_intf->decay[j];
364         m_decay[j+0] = m_decay[j+6] = VMAX / m_decay_time[j];
372365         enable |= 0x41 << j;
373366      }
374367   }
375   m_speed = (m_intf->speed > 0) ? VMAX / m_intf->speed : VMAX;
376368   tms3617_enable(enable);
377369
378370   LOG(("TMS36xx samplerate    %d\n", m_samplerate));
branches/new_menus/src/emu/sound/tms36xx.h
r29557r29558
1212#define MCFG_TMS36XX_REPLACE(_tag, _clock) \
1313   MCFG_DEVICE_REPLACE(_tag, TMS36XX, _clock)
1414
15#define MCFG_TMS36XX_TYPE(_type) \
16   tms36xx_device::set_subtype(*device, _type);
1517
18#define MCFG_TMS36XX_DECAY_TIMES(_dec0, _dec1, _dec2, _dec3, _dec4, _dec5) \
19   tms36xx_device::set_decays(*device, _dec0, _dec1, _dec2, _dec3, _dec4, _dec5);
20
21#define MCFG_TMS36XX_TUNE_SPEED(_speed) \
22   tms36xx_device::set_tune_speed(*device, _speed);
23
24
1625//**************************************************************************
1726//  TYPE DEFINITIONS
1827//**************************************************************************
r29557r29558
2231#define TMS3615     15      // Naughty Boy, Pleiads (13 notes, one output)
2332#define TMS3617     17      // Monster Bash (13 notes, six outputs)
2433
34#define VMIN    0x0000
35#define VMAX    0x7fff
2536
26// ======================> tms36xx_interface
2737
28struct tms36xx_interface
29{
30   int subtype;
31   double decay[6];    // decay times for the six harmonic notes
32   double speed;       // tune speed (meaningful for the TMS3615 only)
33};
34
35
3638// ======================> tms36xx_device
3739
3840class tms36xx_device : public device_t,
r29557r29558
4244   tms36xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
4345   ~tms36xx_device() { }
4446
47   static void set_subtype(device_t &device, int type)
48   {
49      tms36xx_device &dev = downcast<tms36xx_device &>(device);
50      switch (type)
51      {
52      case MM6221AA:
53         dev.m_subtype = "MM6221AA";
54         break;
55      case TMS3615:
56         dev.m_subtype = "TMS3615";
57         break;
58      case TMS3617:
59         dev.m_subtype = "TMS3617";
60         break;
61      default:
62         fatalerror("Invalid TMS36XX type: %d\n", type);
63         break;
64      }
65   }
66   static void set_tune_speed(device_t &device, double speed)
67   {
68      downcast<tms36xx_device &>(device).m_speed = (speed > 0) ? VMAX / speed : VMAX;
69   }
70   static void set_decays(device_t &device, double decay_0, double decay_1, double decay_2, double decay_3, double decay_4, double decay_5)
71   {
72      tms36xx_device &dev = downcast<tms36xx_device &>(device);
73      dev.m_decay_time[0] = decay_0;
74      dev.m_decay_time[1] = decay_1;
75      dev.m_decay_time[2] = decay_2;
76      dev.m_decay_time[3] = decay_3;
77      dev.m_decay_time[4] = decay_4;
78      dev.m_decay_time[5] = decay_5;
79   }
80   
4581protected:
4682   // device-level overrides
4783   virtual void device_start();
r29557r29558
6399   void tms36xx_reset_counters();
64100   void tms3617_enable(int enable);
65101
66private:
67   char *m_subtype;      // subtype name MM6221AA, TMS3615 or TMS3617
102   double m_decay_time[6];  // decay times for the six harmonic notes
103
104   const char *m_subtype;      // subtype name MM6221AA, TMS3615 or TMS3617
68105   sound_stream *m_channel; // returned by stream_create()
69106
70107   int m_samplerate;     // output sample rate
r29557r29558
80117   int m_shift;          // shift toggles between 0 and 6 to allow decaying voices
81118   int m_vol[12];        // (decaying) volume of harmonics notes
82119   int m_vol_counter[12];// volume adjustment counter
83   int m_decay[12];      // volume adjustment rate - dervied from decay
120   int m_decay[12];      // volume adjustment rate - derived from m_intf_decay
84121
85122   int m_counter[12];    // tone frequency counter
86123   int m_frequency[12];  // tone frequency
r29557r29558
90127   int m_tune_num;       // tune currently playing
91128   int m_tune_ofs;       // note currently playing
92129   int m_tune_max;       // end of tune
93
94   const tms36xx_interface *m_intf;
95130};
96131
97132extern const device_type TMS36XX;
branches/new_menus/src/emu/machine/aakart.c
r29557r29558
149149                    m_keyb_state = 0;
150150                }
151151
152
153152                break;
154153            case 0xfd:
155154                m_rx = 0xfd;
branches/new_menus/src/emu/machine/8257dma.c
r29557r29558
6060
6161i8257_device::i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
6262   : device_t(mconfig, I8257, "DMA8257", tag, owner, clock, "i8257", __FILE__),
63      m_out_hrq_cb(*this),
64      m_out_tc_cb(*this),
65      m_out_mark_cb(*this),
66      m_in_memr_cb(*this),
67      m_out_memw_cb(*this),
68      m_in_ior_0_cb(*this),
69      m_in_ior_1_cb(*this),
70      m_in_ior_2_cb(*this),
71      m_in_ior_3_cb(*this),
72      m_out_iow_0_cb(*this),
73      m_out_iow_1_cb(*this),
74      m_out_iow_2_cb(*this),
75      m_out_iow_3_cb(*this),
6376      m_mode(0),
6477      m_rr(0),
6578      m_msb(0),
r29557r29558
7285   memset(m_rwmode, 0, sizeof(m_rwmode));
7386}
7487
75
7688//-------------------------------------------------
77//  device_config_complete - perform any
78//  operations now that the configuration is
79//  complete
80//-------------------------------------------------
81
82void i8257_device::device_config_complete()
83{
84   // inherit a copy of the static data
85   const i8257_interface *intf = reinterpret_cast<const i8257_interface *>(static_config());
86   if (intf != NULL)
87   {
88      *static_cast<i8257_interface *>(this) = *intf;
89   }
90
91   // or initialize to defaults if none provided
92   else
93   {
94      memset(&m_out_hrq_cb, 0, sizeof(m_out_hrq_cb));
95      memset(&m_out_tc_cb, 0, sizeof(m_out_tc_cb));
96      memset(&m_out_mark_cb, 0, sizeof(m_out_mark_cb));
97      memset(&m_in_memr_cb, 0, sizeof(m_in_memr_cb));
98      memset(&m_out_memw_cb, 0, sizeof(m_out_memw_cb));
99      memset(&m_in_ior_cb[0], 0, sizeof(m_in_ior_cb[0]));
100      memset(&m_in_ior_cb[1], 0, sizeof(m_in_ior_cb[1]));
101      memset(&m_in_ior_cb[2], 0, sizeof(m_in_ior_cb[2]));
102      memset(&m_in_ior_cb[3], 0, sizeof(m_in_ior_cb[3]));
103      memset(&m_out_iow_cb[0], 0, sizeof(m_out_iow_cb[0]));
104      memset(&m_out_iow_cb[1], 0, sizeof(m_out_iow_cb[1]));
105      memset(&m_out_iow_cb[2], 0, sizeof(m_out_iow_cb[2]));
106      memset(&m_out_iow_cb[3], 0, sizeof(m_out_iow_cb[3]));
107   }
108}
109
110
111//-------------------------------------------------
11289//  device_start - device-specific startup
11390//-------------------------------------------------
11491
r29557r29558
11895   assert(this != NULL);
11996
12097   /* resolve callbacks */
121   m_out_hrq_func.resolve(m_out_hrq_cb, *this);
122   m_out_tc_func.resolve(m_out_tc_cb, *this);
123   m_out_mark_func.resolve(m_out_mark_cb, *this);
124   m_in_memr_func.resolve(m_in_memr_cb, *this);
125   m_out_memw_func.resolve(m_out_memw_cb, *this);
126
127   for (int i = 0; i < I8257_NUM_CHANNELS; i++)
128   {
129      m_in_ior_func[i].resolve(m_in_ior_cb[i], *this);
130      m_out_iow_func[i].resolve(m_out_iow_cb[i], *this);
131   }
132
98   m_out_hrq_cb.resolve_safe();
99   m_out_tc_cb.resolve_safe();
100   m_out_mark_cb.resolve_safe();
101   m_in_memr_cb.resolve();
102   m_out_memw_cb.resolve();
103   m_in_ior_0_cb.resolve();
104   m_in_ior_1_cb.resolve();
105   m_in_ior_2_cb.resolve();
106   m_in_ior_3_cb.resolve();
107   m_out_iow_0_cb.resolve();
108   m_out_iow_1_cb.resolve();
109   m_out_iow_2_cb.resolve();
110   m_out_iow_3_cb.resolve();
111   
133112   /* set initial values */
134113   m_timer = timer_alloc(TIMER_OPERATION);
135114   m_msbflip_timer = timer_alloc(TIMER_MSBFLIP);
r29557r29558
162141int i8257_device::i8257_do_operation(int channel)
163142{
164143   int done;
165   UINT8 data;
144   UINT8 data = 0;
166145
167146   UINT8 mode = m_rwmode[channel];
168147   if (m_count[channel] == 0x0000)
169148   {
170149      m_status |=  (0x01 << channel);
171150
172      m_out_tc_func(ASSERT_LINE);
151      m_out_tc_cb(ASSERT_LINE);
173152   }
174   switch(mode) {
153
154   switch(mode)
155   {
175156   case 1:
176      if (!m_in_memr_func.isnull())
177      {
178         data = m_in_memr_func(m_address[channel]);
179      }
157      if (!m_in_memr_cb.isnull())
158         data = m_in_memr_cb(m_address[channel]);
180159      else
181160      {
182161         data = 0;
183162         logerror("8257: No memory read function defined.\n");
184163      }
185      if (!m_out_iow_func[channel].isnull())
164         
165      switch (channel)
186166      {
187         m_out_iow_func[channel](m_address[channel], data);
167      case 0:
168         if (!m_out_iow_0_cb.isnull())
169            m_out_iow_0_cb((offs_t)m_address[channel], data);
170         else
171            logerror("8257: No channel write function for channel %d defined.\n", channel);
172         break;
173      case 1:
174         if (!m_out_iow_1_cb.isnull())
175            m_out_iow_1_cb((offs_t)m_address[channel], data);
176         else
177            logerror("8257: No channel write function for channel %d defined.\n", channel);
178         break;
179      case 2:
180         if (!m_out_iow_2_cb.isnull())
181            m_out_iow_2_cb((offs_t)m_address[channel], data);
182         else
183            logerror("8257: No channel write function for channel %d defined.\n", channel);
184         break;
185      case 3:
186         if (!m_out_iow_3_cb.isnull())
187            m_out_iow_3_cb((offs_t)m_address[channel], data);
188         else
189            logerror("8257: No channel write function for channel %d defined.\n", channel);
190         break;
188191      }
189      else
190      {
191         logerror("8257: No channel write function for channel %d defined.\n",channel);
192      }
193192
194193      m_address[channel]++;
195194      m_count[channel]--;
r29557r29558
197196      break;
198197
199198   case 2:
200      if (!m_in_ior_func[channel].isnull())
199      switch (channel)
201200      {
202         data = m_in_ior_func[channel](m_address[channel]);
201      case 0:
202         if (!m_in_ior_0_cb.isnull())
203            data = m_in_ior_0_cb((offs_t)m_address[channel]);
204         else
205         {
206            data = 0;
207            logerror("8257: No channel read function for channel %d defined.\n", channel);
208         }
209         break;
210      case 1:
211         if (!m_in_ior_1_cb.isnull())
212            data = m_in_ior_1_cb((offs_t)m_address[channel]);
213         else
214         {
215            data = 0;
216            logerror("8257: No channel read function for channel %d defined.\n", channel);
217         }
218         break;
219      case 2:
220         if (!m_in_ior_2_cb.isnull())
221            data = m_in_ior_2_cb((offs_t)m_address[channel]);
222         else
223         {
224            data = 0;
225            logerror("8257: No channel read function for channel %d defined.\n", channel);
226         }
227         break;
228      case 3:
229         if (!m_in_ior_3_cb.isnull())
230            data = m_in_ior_3_cb((offs_t)m_address[channel]);
231         else
232         {
233            data = 0;
234            logerror("8257: No channel read function for channel %d defined.\n", channel);
235         }
236         break;
203237      }
204      else
205      {
206         data = 0;
207         logerror("8257: No channel read function for channel %d defined.\n",channel);
208      }
209238
210      if (!m_out_memw_func.isnull())
211      {
212         m_out_memw_func(m_address[channel], data);
213      }
239      if (!m_out_memw_cb.isnull())
240         m_out_memw_cb((offs_t)m_address[channel], data);
214241      else
215      {
216242         logerror("8257: No memory write function defined.\n");
217      }
243
218244      m_address[channel]++;
219245      m_count[channel]--;
220      done = (m_count[channel] == 0xFFFF);
246      done = (m_count[channel] == 0xffff);
221247      break;
248
222249   case 0: /* verify */
223250      m_address[channel]++;
224251      m_count[channel]--;
225      done = (m_count[channel] == 0xFFFF);
252      done = (m_count[channel] == 0xffff);
226253      break;
254
227255   default:
228256      fatalerror("i8257_do_operation: invalid mode!\n");
229257      break;
230258   }
259
231260   if (done)
232261   {
233262      if ((channel==2) && DMA_MODE_AUTOLOAD(m_mode))
r29557r29558
238267         m_registers[5] = m_registers[7];
239268      }
240269
241      m_out_tc_func(CLEAR_LINE);
270      m_out_tc_cb(CLEAR_LINE);
242271   }
243272   return done;
244273}
r29557r29558
337366   }
338367
339368   /* set the halt line */
340   m_out_hrq_func(pending_transfer ? ASSERT_LINE : CLEAR_LINE);
369   m_out_hrq_cb(pending_transfer ? ASSERT_LINE : CLEAR_LINE);
341370}
342371
343372
branches/new_menus/src/emu/machine/8257dma.h
r29557r29558
4040#include "emu.h"
4141
4242
43#define I8257_NUM_CHANNELS      (4)
4344
45
4446/***************************************************************************
4547    DEVICE CONFIGURATION MACROS
4648***************************************************************************/
4749
48#define MCFG_I8257_ADD(_tag, _clock, _config) \
49   MCFG_DEVICE_ADD(_tag, I8257, _clock) \
50   MCFG_DEVICE_CONFIG(_config)
50#define MCFG_I8257_OUT_HRQ_CB(_devcb) \
51   devcb = &i8257_device::set_out_hrq_callback(*device, DEVCB2_##_devcb);
5152
52#define I8257_INTERFACE(_name) \
53   const i8257_interface (_name) =
53#define MCFG_I8257_OUT_TC_CB(_devcb) \
54   devcb = &i8257_device::set_out_tc_callback(*device, DEVCB2_##_devcb);
5455
55#define I8257_NUM_CHANNELS      (4)
56#define MCFG_I8257_OUT_MARK_CB(_devcb) \
57   devcb = &i8257_device::set_out_mark_callback(*device, DEVCB2_##_devcb);
5658
5759
58/***************************************************************************
59    TYPE DEFINITIONS
60***************************************************************************/
60#define MCFG_I8257_IN_MEMR_CB(_devcb) \
61   devcb = &i8257_device::set_in_memr_callback(*device, DEVCB2_##_devcb);
6162
63#define MCFG_I8257_OUT_MEMW_CB(_devcb) \
64   devcb = &i8257_device::set_out_memw_callback(*device, DEVCB2_##_devcb);
6265
63// ======================> i8257_interface
6466
65struct i8257_interface
66{
67   devcb_write_line    m_out_hrq_cb;
68   devcb_write_line    m_out_tc_cb;
69   devcb_write_line    m_out_mark_cb;
67#define MCFG_I8257_IN_IOR_0_CB(_devcb) \
68   devcb = &i8257_device::set_in_ior_0_callback(*device, DEVCB2_##_devcb);
7069
71   /* accessors to main memory */
72   devcb_read8         m_in_memr_cb; // TODO m_in_memr_cb[I8257_NUM_CHANNELS];
73   devcb_write8        m_out_memw_cb; // TODO m_out_memw_cb[I8257_NUM_CHANNELS];
70#define MCFG_I8257_IN_IOR_1_CB(_devcb) \
71   devcb = &i8257_device::set_in_ior_1_callback(*device, DEVCB2_##_devcb);
7472
75   /* channel accesors */
76   devcb_read8         m_in_ior_cb[I8257_NUM_CHANNELS];
77   devcb_write8        m_out_iow_cb[I8257_NUM_CHANNELS];
78};
73#define MCFG_I8257_IN_IOR_2_CB(_devcb) \
74   devcb = &i8257_device::set_in_ior_2_callback(*device, DEVCB2_##_devcb);
7975
76#define MCFG_I8257_IN_IOR_3_CB(_devcb) \
77   devcb = &i8257_device::set_in_ior_3_callback(*device, DEVCB2_##_devcb);
8078
8179
80#define MCFG_I8257_OUT_IOW_0_CB(_devcb) \
81   devcb = &i8257_device::set_out_iow_0_callback(*device, DEVCB2_##_devcb);
82
83#define MCFG_I8257_OUT_IOW_1_CB(_devcb) \
84   devcb = &i8257_device::set_out_iow_1_callback(*device, DEVCB2_##_devcb);
85
86#define MCFG_I8257_OUT_IOW_2_CB(_devcb) \
87   devcb = &i8257_device::set_out_iow_2_callback(*device, DEVCB2_##_devcb);
88
89#define MCFG_I8257_OUT_IOW_3_CB(_devcb) \
90   devcb = &i8257_device::set_out_iow_3_callback(*device, DEVCB2_##_devcb);
91
92
93/***************************************************************************
94    TYPE DEFINITIONS
95***************************************************************************/
96
97
8298// ======================> i8257_device
8399
84class i8257_device :  public device_t,
85                  public i8257_interface
100class i8257_device :  public device_t
86101{
87102public:
88103   // construction/destruction
89104   i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
90105
106   template<class _Object> static devcb2_base &set_out_hrq_callback(device_t &device, _Object object) { return downcast<i8257_device &>(device).m_out_hrq_cb.set_callback(object); }
107   template<class _Object> static devcb2_base &set_out_tc_callback(device_t &device, _Object object) { return downcast<i8257_device &>(device).m_out_tc_cb.set_callback(object); }
108   template<class _Object> static devcb2_base &set_out_mark_callback(device_t &device, _Object object) { return downcast<i8257_device &>(device).m_out_mark_cb.set_callback(object); }
109
110   template<class _Object> static devcb2_base &set_in_memr_callback(device_t &device, _Object object) { return downcast<i8257_device &>(device).m_in_memr_cb.set_callback(object); }
111   template<class _Object> static devcb2_base &set_out_memw_callback(device_t &device, _Object object) { return downcast<i8257_device &>(device).m_out_memw_cb.set_callback(object); }
112   
113   template<class _Object> static devcb2_base &set_in_ior_0_callback(device_t &device, _Object object) { return downcast<i8257_device &>(device).m_in_ior_0_cb.set_callback(object); }
114   template<class _Object> static devcb2_base &set_in_ior_1_callback(device_t &device, _Object object) { return downcast<i8257_device &>(device).m_in_ior_1_cb.set_callback(object); }
115   template<class _Object> static devcb2_base &set_in_ior_2_callback(device_t &device, _Object object) { return downcast<i8257_device &>(device).m_in_ior_2_cb.set_callback(object); }
116   template<class _Object> static devcb2_base &set_in_ior_3_callback(device_t &device, _Object object) { return downcast<i8257_device &>(device).m_in_ior_3_cb.set_callback(object); }
117   
118   template<class _Object> static devcb2_base &set_out_iow_0_callback(device_t &device, _Object object) { return downcast<i8257_device &>(device).m_out_iow_0_cb.set_callback(object); }
119   template<class _Object> static devcb2_base &set_out_iow_1_callback(device_t &device, _Object object) { return downcast<i8257_device &>(device).m_out_iow_1_cb.set_callback(object); }
120   template<class _Object> static devcb2_base &set_out_iow_2_callback(device_t &device, _Object object) { return downcast<i8257_device &>(device).m_out_iow_2_cb.set_callback(object); }
121   template<class _Object> static devcb2_base &set_out_iow_3_callback(device_t &device, _Object object) { return downcast<i8257_device &>(device).m_out_iow_3_cb.set_callback(object); }
122   
91123   /* register access */
92124   DECLARE_READ8_MEMBER( i8257_r );
93125   DECLARE_WRITE8_MEMBER( i8257_w );
r29557r29558
107139
108140protected:
109141   // device-level overrides
110   virtual void device_config_complete();
111142   virtual void device_start();
112143   virtual void device_reset();
113144   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
r29557r29558
121152   void i8257_update_status();
122153   void i8257_prepare_msb_flip();
123154
124   devcb_resolved_write_line   m_out_hrq_func;
125   devcb_resolved_write_line   m_out_tc_func;
126   devcb_resolved_write_line   m_out_mark_func;
127   devcb_resolved_read8        m_in_memr_func;
128   devcb_resolved_write8       m_out_memw_func;
129   devcb_resolved_read8        m_in_ior_func[I8257_NUM_CHANNELS];
130   devcb_resolved_write8       m_out_iow_func[I8257_NUM_CHANNELS];
155   devcb2_write_line   m_out_hrq_cb;
156   devcb2_write_line   m_out_tc_cb;
157   devcb2_write_line   m_out_mark_cb;
131158
159   /* accessors to main memory */
160   devcb2_read8        m_in_memr_cb;
161   devcb2_write8       m_out_memw_cb;
162
163   /* channel accesors */
164   devcb2_read8        m_in_ior_0_cb;
165   devcb2_read8        m_in_ior_1_cb;
166   devcb2_read8        m_in_ior_2_cb;
167   devcb2_read8        m_in_ior_3_cb;
168   devcb2_write8       m_out_iow_0_cb;
169   devcb2_write8       m_out_iow_1_cb;
170   devcb2_write8       m_out_iow_2_cb;
171   devcb2_write8       m_out_iow_3_cb;
172
132173   emu_timer *m_timer;
133174   emu_timer *m_msbflip_timer;
134175
branches/new_menus/src/emu/machine/roc10937.c
r29557r29558
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 ?.
r29557r29558
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
r29557r29558
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));
r29557r29558
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///////////////////////////////////////////////////////////////////////////
r29557r29558
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}
branches/new_menus/src/emu/machine/roc10937.h
r29557r29558
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:
r29557r29558
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];
r29557r29558
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};
branches/new_menus/src/emu/machine/8042kbdc.c
r29557r29558
197197kbdc8042_device::kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
198198   : device_t(mconfig, KBDC8042, "Keyboard Controller 8042", tag, owner, clock, "kbdc8042", __FILE__)
199199   , m_keyboard_dev(*this, "at_keyboard")
200   , m_system_reset_cb(*this)
201   , m_gate_a20_cb(*this)
202   , m_input_buffer_full_cb(*this)
203   , m_output_buffer_empty_cb(*this)
204   , m_speaker_cb(*this)
200205{
201206}
202207
r29557r29558
209214   return MACHINE_CONFIG_NAME( keyboard );
210215}
211216
212//-------------------------------------------------
213//  device_config_complete - perform any
214//  operations now that the configuration is
215//  complete
216//-------------------------------------------------
217
218void kbdc8042_device::device_config_complete()
219{
220   // inherit a copy of the static data
221   const kbdc8042_interface *intf = reinterpret_cast<const kbdc8042_interface *>(static_config());
222
223   if (intf != NULL)
224   {
225      *static_cast<kbdc8042_interface *>(this) = *intf;
226   }
227
228   // or initialize to defaults if none provided
229   else
230   {
231      memset(&m_system_reset_cb, 0, sizeof(m_system_reset_cb));
232      memset(&m_gate_a20_cb, 0, sizeof(m_gate_a20_cb));
233      memset(&m_input_buffer_full_func, 0, sizeof(m_input_buffer_full_func));
234      memset(&m_output_buffer_empty_cb, 0, sizeof(m_output_buffer_empty_cb));
235      memset(&m_speaker_cb, 0, sizeof(m_speaker_cb));
236   }
237}
238
239217/*-------------------------------------------------
240218    device_start - device-specific startup
241219-------------------------------------------------*/
r29557r29558
243221void kbdc8042_device::device_start()
244222{
245223   // resolve callbacks
246   m_system_reset_func.resolve(m_system_reset_cb, *this);
247   m_gate_a20_func.resolve(m_gate_a20_cb, *this);
248   m_input_buffer_full_func.resolve(m_input_buffer_full_cb, *this);
249   m_output_buffer_empty_func.resolve(m_output_buffer_empty_cb, *this);
250   m_speaker_func.resolve(m_speaker_cb, *this);
224   m_system_reset_cb.resolve_safe();
225   m_gate_a20_cb.resolve();
226   m_input_buffer_full_cb.resolve();
227   m_output_buffer_empty_cb.resolve_safe();
228   m_speaker_cb.resolve();
251229   m_operation_write_state = 0; /* first write to 0x60 might occur before anything can set this */
252230}
253231
r29557r29558
271249   m_outport = data;
272250   if (change & 0x02)
273251   {
274      if (!m_gate_a20_func.isnull())
275         m_gate_a20_func(data & 0x02 ? 1 : 0);
252      if (!m_gate_a20_cb.isnull())
253         m_gate_a20_cb(data & 0x02 ? 1 : 0);
276254   }
277255}
278256
r29557r29558
286264{
287265   /* Lets 8952's timers do their job before clear the interrupt line, */
288266   /* else Keyboard interrupt never happens. */
289   m_input_buffer_full_func(0);
267   m_input_buffer_full_cb(0);
290268}
291269
292270void kbdc8042_device::at_8042_receive(UINT8 data)
r29557r29558
297275   m_data = data;
298276   m_keyboard.received = 1;
299277
300   if (!m_input_buffer_full_func.isnull())
278   if (!m_input_buffer_full_cb.isnull())
301279   {
302      m_input_buffer_full_func(1);
280      m_input_buffer_full_cb(1);
303281      /* Lets 8952's timers do their job before clear the interrupt line, */
304282      /* else Keyboard interrupt never happens. */
305283      machine().scheduler().timer_set(attotime::from_usec(2), timer_expired_delegate(FUNC(kbdc8042_device::kbdc8042_clr_int),this));
r29557r29558
515493
516494   case 1:
517495      m_speaker = data;
518      if (!m_speaker_func.isnull())
519               m_speaker_func(0, m_speaker);
496      if (!m_speaker_cb.isnull())
497               m_speaker_cb((offs_t)0, m_speaker);
520498
521499      break;
522500
r29557r29558
617595          * the bits low set in the command byte.  The only pulse that has
618596          * an effect currently is bit 0, which pulses the CPU's reset line
619597          */
620         m_system_reset_func(PULSE_LINE);
598         m_system_reset_cb(PULSE_LINE);
621599         at_8042_set_outport(m_outport | 0x02, 0);
622600         break;
623601      }
branches/new_menus/src/emu/machine/8042kbdc.h
r29557r29558
2424//  INTERFACE CONFIGURATION MACROS
2525//**************************************************************************
2626
27#define MCFG_KBDC8042_ADD(_tag, _interface) \
28   MCFG_DEVICE_ADD(_tag, KBDC8042, 0) \
29   MCFG_DEVICE_CONFIG(_interface)
27#define MCFG_KBDC8042_KEYBOARD_TYPE(_kbdt) \
28   kbdc8042_device::set_keyboard_type(*device, _kbdt);
3029
30#define MCFG_KBDC8042_SYSTEM_RESET_CB(_devcb) \
31   devcb = &kbdc8042_device::set_system_reset_callback(*device, DEVCB2_##_devcb);
3132
33#define MCFG_KBDC8042_GATE_A20_CB(_devcb) \
34   devcb = &kbdc8042_device::set_gate_a20_callback(*device, DEVCB2_##_devcb);
35
36#define MCFG_KBDC8042_INPUT_BUFFER_FULL_CB(_devcb) \
37   devcb = &kbdc8042_device::set_input_buffer_full_callback(*device, DEVCB2_##_devcb);
38
39#define MCFG_KBDC8042_OUTPUT_BUFFER_EMPTY_CB(_devcb) \
40   devcb = &kbdc8042_device::set_output_buffer_empty_callback(*device, DEVCB2_##_devcb);
41
42#define MCFG_KBDC8042_SPEAKER_CB(_devcb) \
43    devcb = &kbdc8042_device::set_speaker_callback(*device, DEVCB2_##_devcb);
44
3245//**************************************************************************
3346//  TYPE DEFINITIONS
3447//**************************************************************************
3548
36// ======================> kbdc8042_interface
37
38struct kbdc8042_interface
39{
40   kbdc8042_type_t     m_keybtype;
41   // interface to the host pc
42   devcb_write_line    m_system_reset_cb;
43   devcb_write_line    m_gate_a20_cb;
44   devcb_write_line    m_input_buffer_full_cb;
45   devcb_write_line    m_output_buffer_empty_cb;
46
47   devcb_write8        m_speaker_cb;
48};
49
5049// ======================> kbdc8042_device
5150
52class kbdc8042_device : public device_t,
53                  public kbdc8042_interface
51class kbdc8042_device : public device_t
5452{
5553public:
5654   // construction/destruction
5755   kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
5856
5957   virtual machine_config_constructor device_mconfig_additions() const;
58   
59   static void set_keyboard_type(device_t &device, kbdc8042_type_t keybtype) { downcast<kbdc8042_device &>(device).m_keybtype = keybtype; }
60   template<class _Object> static devcb2_base &set_system_reset_callback(device_t &device, _Object object) { return downcast<kbdc8042_device &>(device).m_system_reset_cb.set_callback(object); }
61   template<class _Object> static devcb2_base &set_gate_a20_callback(device_t &device, _Object object) { return downcast<kbdc8042_device &>(device).m_gate_a20_cb.set_callback(object); }
62   template<class _Object> static devcb2_base &set_input_buffer_full_callback(device_t &device, _Object object) { return downcast<kbdc8042_device &>(device).m_input_buffer_full_cb.set_callback(object); }
63   template<class _Object> static devcb2_base &set_output_buffer_empty_callback(device_t &device, _Object object) { return downcast<kbdc8042_device &>(device).m_output_buffer_empty_cb.set_callback(object); }
64   template<class _Object> static devcb2_base &set_speaker_callback(device_t &device, _Object object) { return downcast<kbdc8042_device &>(device).m_speaker_cb.set_callback(object); }
6065
6166   DECLARE_READ8_MEMBER( data_r );
6267   DECLARE_WRITE8_MEMBER( data_w );
r29557r29558
7479   // device-level overrides
7580   virtual void device_start();
7681   virtual void device_reset();
77   virtual void device_config_complete();
7882
7983   UINT8 m_inport, m_outport, m_data, m_command;
8084
r29557r29558
104108
105109   required_device<at_keyboard_device> m_keyboard_dev;
106110
107   devcb_resolved_write_line   m_system_reset_func;
108   devcb_resolved_write_line   m_gate_a20_func;
109   devcb_resolved_write_line   m_input_buffer_full_func;
110   devcb_resolved_write_line   m_output_buffer_empty_func;
111   kbdc8042_type_t     m_keybtype;
112   
113   devcb2_write_line    m_system_reset_cb;
114   devcb2_write_line    m_gate_a20_cb;
115   devcb2_write_line    m_input_buffer_full_cb;
116   devcb2_write_line    m_output_buffer_empty_cb;
111117
112   devcb_resolved_write8       m_speaker_func;
118   devcb2_write8        m_speaker_cb;
113119};
114120
115121// device type definition
branches/new_menus/src/emu/bus/centronics/image.c
r29557r29558
88// device type definition
99const device_type CENTRONICS_PRINTER_IMAGE = &device_creator<centronics_printer_image_device>;
1010
11/*****************************************************************************
12    PRINTER INTERFACE
13*****************************************************************************/
14const struct printer_interface centronics_printer_config =
15{
16   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, centronics_printer_image_device, printer_online)
17};
1811
1912static MACHINE_CONFIG_FRAGMENT( centronics_printer )
20   MCFG_PRINTER_ADD("printer")
21   MCFG_DEVICE_CONFIG(centronics_printer_config)
13   MCFG_DEVICE_ADD("printer", PRINTER, 0)
14   MCFG_PRINTER_ONLINE_CB(WRITELINE(centronics_printer_image_device, printer_online))
2215MACHINE_CONFIG_END
2316
2417
branches/new_menus/src/emu/bus/midi/midiinport.c
r29557r29558
1717{
1818}
1919
20static midiin_config midiin_port_image_config =
21{
22   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, midiin_port_device, read)
23};
24
2520static MACHINE_CONFIG_FRAGMENT(midiin_port_config)
26   MCFG_MIDIIN_ADD("midiinimg", midiin_port_image_config)
21   MCFG_DEVICE_ADD("midiinimg", MIDIIN, 0)
22   MCFG_MIDIIN_INPUT_CB(WRITELINE(midiin_port_device, read))
2723MACHINE_CONFIG_END
2824
2925machine_config_constructor midiin_port_device::device_mconfig_additions() const
branches/new_menus/src/emu/bus/iq151/staper.c
r29557r29558
3434static MACHINE_CONFIG_FRAGMENT( iq151_staper )
3535   MCFG_I8255A_ADD("ppi8255", iq151_staper_ppi_intf)
3636
37   MCFG_PRINTER_ADD("printer")
37   MCFG_DEVICE_ADD("printer", PRINTER, 0)
3838MACHINE_CONFIG_END
3939
4040//**************************************************************************
branches/new_menus/src/emu/imagedev/midiin.c
r29557r29558
2222midiin_device::midiin_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2323   : device_t(mconfig, MIDIIN, "MIDI In image device", tag, owner, clock, "midiin", __FILE__),
2424      device_image_interface(mconfig, *this),
25         device_serial_interface(mconfig, *this)
25         device_serial_interface(mconfig, *this),
26         m_input_cb(*this)
2627{
2728}
2829
r29557r29558
3233
3334void midiin_device::device_start()
3435{
35   m_input_func.resolve(m_input_callback, *this);
36   m_input_cb.resolve_safe();
3637   m_timer = timer_alloc(0);
3738   m_midi = NULL;
3839   m_timer->enable(false);
r29557r29558
5556
5657void midiin_device::device_config_complete(void)
5758{
58   const midiin_config *intf = reinterpret_cast<const midiin_config *>(static_config());
59   if(intf != NULL)
60   {
61      *static_cast<midiin_config *>(this) = *intf;
62   }
63   else
64   {
65      memset(&m_input_callback, 0, sizeof(m_input_callback));
66   }
6759   update_names();
6860}
6961
r29557r29558
152144void midiin_device::tra_callback()
153145{
154146   int bit = transmit_register_get_data_bit();
155   m_input_func(bit);
147   m_input_cb(bit);
156148}
157149
158150void midiin_device::xmit_char(UINT8 data)
branches/new_menus/src/emu/imagedev/midiin.h
r29557r29558
1010#define __MIDIIN_H__
1111
1212
13/***************************************************************************
14    CONSTANTS
15***************************************************************************/
13#define MCFG_MIDIIN_INPUT_CB(_devcb) \
14   devcb = &midiin_device::set_input_callback(*device, DEVCB2_##_devcb);
1615
17struct midiin_config
18{
19   /* callback to driver */
20   devcb_write_line        m_input_callback;
21};
2216
23#define MCFG_MIDIIN_ADD(_tag, _config) \
24   MCFG_DEVICE_ADD(_tag, MIDIIN, 0) \
25   MCFG_DEVICE_CONFIG(_config)
26
27
2817/***************************************************************************
2918    TYPE DEFINITIONS
3019***************************************************************************/
3120
3221class midiin_device :    public device_t,
3322                  public device_image_interface,
34                  public device_serial_interface,
35                  public midiin_config
23                  public device_serial_interface
3624{
3725public:
3826   // construction/destruction
3927   midiin_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
4028
29   template<class _Object> static devcb2_base &set_input_callback(device_t &device, _Object object) { return downcast<midiin_device &>(device).m_input_cb.set_callback(object); }
30   
4131   // image-level overrides
4232   virtual bool call_load();
4333   virtual void call_unload();
r29557r29558
7262
7363   osd_midi_device *m_midi;
7464   emu_timer *m_timer;
75   devcb_resolved_write_line m_input_func;
65   devcb2_write_line        m_input_cb;
7666   UINT8 m_xmitring[XMIT_RING_SIZE];
7767   int m_xmit_read, m_xmit_write;
7868   bool m_tx_busy;
branches/new_menus/src/emu/imagedev/printer.c
r29557r29558
1919
2020printer_image_device::printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2121   : device_t(mconfig, PRINTER, "Printer", tag, owner, clock, "printer_image", __FILE__),
22      device_image_interface(mconfig, *this)
22      device_image_interface(mconfig, *this),
23      m_online_cb(*this)
2324{
2425}
2526
r29557r29558
3940
4041void printer_image_device::device_config_complete()
4142{
42   // inherit a copy of the static data
43   const printer_interface *intf = reinterpret_cast<const printer_interface *>(static_config());
44   if (intf != NULL)
45      *static_cast<printer_interface *>(this) = *intf;
46
47   // or initialize to defaults if none provided
48   else
49   {
50      memset(&m_online, 0, sizeof(m_online));
51   }
52
5343   // set brief and instance name
5444   update_names();
5545}
r29557r29558
6151
6252void printer_image_device::device_start()
6353{
64   m_online_func.resolve(m_online, *this);
54   m_online_cb.resolve();
6555}
6656
6757/***************************************************************************
r29557r29558
10797bool printer_image_device::call_load()
10898{
10999   /* send notify that the printer is now online */
110   if (!m_online_func.isnull())
111      m_online_func(TRUE);
100   if (!m_online_cb.isnull())
101      m_online_cb(TRUE);
112102
113103   /* we don't need to do anything special */
114104   return IMAGE_INIT_PASS;
r29557r29558
121111void printer_image_device::call_unload()
122112{
123113   /* send notify that the printer is now offline */
124   if (!m_online_func.isnull())
125      m_online_func(FALSE);
114   if (!m_online_cb.isnull())
115      m_online_cb(FALSE);
126116}
branches/new_menus/src/emu/imagedev/printer.h
r29557r29558
1010#define __PRINTER_H__
1111
1212
13#define MCFG_PRINTER_ONLINE_CB(_devcb) \
14   devcb = &printer_image_device::set_online_callback(*device, DEVCB2_##_devcb);
15   
16
1317/***************************************************************************
1418    TYPE DEFINITIONS
1519***************************************************************************/
1620
17// ======================> printer_interface
18
19struct printer_interface
20{
21   devcb_write_line m_online;
22};
23
2421// ======================> printer_image_device
2522
2623class printer_image_device :    public device_t,
27                        public printer_interface,
2824                        public device_image_interface
2925{
3026public:
3127   // construction/destruction
3228   printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
3329   virtual ~printer_image_device();
30   
31   template<class _Object> static devcb2_base &set_online_callback(device_t &device, _Object object) { return downcast<printer_image_device &>(device).m_online_cb.set_callback(object); }
3432
3533   // image-level overrides
3634   virtual bool call_load();
r29557r29558
5654   void output(UINT8 data);
5755protected:
5856   // device-level overrides
59   virtual void device_config_complete();
6057   virtual void device_start();
58   virtual void device_config_complete();
6159
62   devcb_resolved_write_line m_online_func;
60   devcb2_write_line m_online_cb;
6361};
6462
6563
6664// device type definition
6765extern const device_type PRINTER;
6866
69
70#define MCFG_PRINTER_ADD(_tag) \
71   MCFG_DEVICE_ADD(_tag, PRINTER, 0)
7267#endif /* __PRINTER_H__ */
branches/new_menus/src/lib/util/corefile.c
r29557r29558
410410   file->back_char_tail = 0;
411411
412412   /* handle real files */
413   if (file->data == NULL)
413   if (file->length && file->data == NULL)
414414   {
415415      /* if we're within the buffer, consume that first */
416416      if (file->offset >= file->bufferbase && file->offset < file->bufferbase + file->bufferbytes)
r29557r29558
657657   UINT32 read_length;
658658
659659   /* if we already have data, just return it */
660   if (file->data != NULL)
660   if (file->data != NULL || !file->length)
661661      return file->data;
662662
663663   /* allocate some memory */
branches/new_menus/src/mess/drivers/interact.c
r29557r29558
176176   MCFG_SOFTWARE_LIST_ADD("cass_list","interact")
177177
178178   /* printer */
179   MCFG_PRINTER_ADD("printer")
179   MCFG_DEVICE_ADD("printer", PRINTER, 0)
180180
181181MACHINE_CONFIG_END
182182
r29557r29558
218218   MCFG_CASSETTE_ADD( "cassette", interact_cassette_interface )
219219
220220   /* printer */
221   MCFG_PRINTER_ADD("printer")
221   MCFG_DEVICE_ADD("printer", PRINTER, 0)
222222
223223MACHINE_CONFIG_END
224224
branches/new_menus/src/mess/drivers/pc8001.c
r29557r29558
444444   program.write_byte(offset, data);
445445}
446446
447static I8257_INTERFACE( dmac_intf )
448{
449   DEVCB_DRIVER_LINE_MEMBER(pc8001_state, hrq_w),
450   DEVCB_NULL,
451   DEVCB_NULL,
452   DEVCB_NULL,
453   DEVCB_DRIVER_MEMBER(pc8001_state, dma_mem_w),
454   { DEVCB_DRIVER_MEMBER(pc8001_state, dma_io_r), DEVCB_DRIVER_MEMBER(pc8001_state, dma_io_r), DEVCB_DRIVER_MEMBER(pc8001_state, dma_io_r), DEVCB_DRIVER_MEMBER(pc8001_state, dma_io_r) },
455   { DEVCB_DRIVER_MEMBER(pc8001_state, dma_io_w), DEVCB_DRIVER_MEMBER(pc8001_state, dma_io_w), DEVCB_DRIVER_MEMBER(pc8001_state, dma_io_w), DEVCB_DRIVER_MEMBER(pc8001_state, dma_io_w) },
456};
457447
458448/* Machine Initialization */
459449
r29557r29558
545535   MCFG_DEVICE_ADD(I8251_TAG, I8251, 0)
546536
547537   MCFG_I8255A_ADD(I8255A_TAG, ppi_intf)
548   MCFG_I8257_ADD(I8257_TAG, 4000000, dmac_intf)
538
539   MCFG_DEVICE_ADD(I8257_TAG, I8257, 4000000)
540   MCFG_I8257_OUT_HRQ_CB(WRITELINE(pc8001_state, hrq_w))
541   MCFG_I8257_OUT_MEMW_CB(WRITE8(pc8001_state, dma_mem_w))
542   MCFG_I8257_IN_IOR_0_CB(READ8(pc8001_state, dma_io_r))
543   MCFG_I8257_IN_IOR_1_CB(READ8(pc8001_state, dma_io_r))
544   MCFG_I8257_IN_IOR_2_CB(READ8(pc8001_state, dma_io_r))
545   MCFG_I8257_IN_IOR_3_CB(READ8(pc8001_state, dma_io_r))
546   MCFG_I8257_OUT_IOW_0_CB(WRITE8(pc8001_state, dma_io_w))
547   MCFG_I8257_OUT_IOW_1_CB(WRITE8(pc8001_state, dma_io_w))
548   MCFG_I8257_OUT_IOW_2_CB(WRITE8(pc8001_state, dma_io_w))
549   MCFG_I8257_OUT_IOW_3_CB(WRITE8(pc8001_state, dma_io_w))
550
549551   MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, NULL)
550552
551553   MCFG_DEVICE_ADD(UPD3301_TAG, UPD3301, 14318180)
r29557r29558
589591   MCFG_DEVICE_ADD(I8251_TAG, I8251, 0)
590592
591593   MCFG_I8255A_ADD(I8255A_TAG, ppi_intf)
592   MCFG_I8257_ADD(I8257_TAG, 4000000, dmac_intf)
594
595   MCFG_DEVICE_ADD(I8257_TAG, I8257, 4000000)
596   MCFG_I8257_OUT_HRQ_CB(WRITELINE(pc8001_state, hrq_w))
597   MCFG_I8257_OUT_MEMW_CB(WRITE8(pc8001_state, dma_mem_w))
598   MCFG_I8257_IN_IOR_0_CB(READ8(pc8001_state, dma_io_r))
599   MCFG_I8257_IN_IOR_1_CB(READ8(pc8001_state, dma_io_r))
600   MCFG_I8257_IN_IOR_2_CB(READ8(pc8001_state, dma_io_r))
601   MCFG_I8257_IN_IOR_3_CB(READ8(pc8001_state, dma_io_r))
602   MCFG_I8257_OUT_IOW_0_CB(WRITE8(pc8001_state, dma_io_w))
603   MCFG_I8257_OUT_IOW_1_CB(WRITE8(pc8001_state, dma_io_w))
604   MCFG_I8257_OUT_IOW_2_CB(WRITE8(pc8001_state, dma_io_w))
605   MCFG_I8257_OUT_IOW_3_CB(WRITE8(pc8001_state, dma_io_w))
606
593607   MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, NULL)
594608
595609   MCFG_DEVICE_ADD(UPD3301_TAG, UPD3301, 14318180)
branches/new_menus/src/mess/drivers/partner.c
r29557r29558
215215   MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
216216   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
217217
218   MCFG_I8257_ADD("dma8257", XTAL_16MHz / 9, partner_dma)
218   MCFG_DEVICE_ADD("dma8257", I8257, XTAL_16MHz / 9)
219   MCFG_I8257_OUT_HRQ_CB(WRITELINE(partner_state, hrq_w))
220   MCFG_I8257_IN_MEMR_CB(READ8(radio86_state, memory_read_byte))
221   MCFG_I8257_OUT_MEMW_CB(WRITE8(radio86_state, memory_write_byte))
222   MCFG_I8257_IN_IOR_0_CB(READ8(partner_state, partner_fdc_r))
223   MCFG_I8257_OUT_IOW_0_CB(WRITE8(partner_state, partner_fdc_w))
224   MCFG_I8257_OUT_IOW_2_CB(DEVWRITE8("i8275", i8275_device, dack_w))
219225
220226   MCFG_CASSETTE_ADD( "cassette", partner_cassette_interface )
221227   MCFG_SOFTWARE_LIST_ADD("cass_list","partner_cass")
branches/new_menus/src/mess/drivers/hec2hrp.c
r29557r29558
466466   MCFG_CASSETTE_ADD( "cassette", hector_cassette_interface )
467467
468468   /* printer */
469   MCFG_PRINTER_ADD("printer")
469   MCFG_DEVICE_ADD("printer", PRINTER, 0)
470470
471471MACHINE_CONFIG_END
472472
r29557r29558
510510   MCFG_CASSETTE_ADD( "cassette", hector_cassette_interface )
511511
512512   /* printer */
513   MCFG_PRINTER_ADD("printer")
513   MCFG_DEVICE_ADD("printer", PRINTER, 0)
514514
515515MACHINE_CONFIG_END
516516
r29557r29558
568568   MCFG_CASSETTE_ADD( "cassette", hector_cassette_interface )
569569
570570   /* printer */
571   MCFG_PRINTER_ADD("printer")
571   MCFG_DEVICE_ADD("printer", PRINTER, 0)
572572
573573MACHINE_CONFIG_END
574574/*****************************************************************************/
r29557r29558
621621   MCFG_CASSETTE_ADD( "cassette", hector_cassette_interface )
622622
623623   /* printer */
624   MCFG_PRINTER_ADD("printer")
624   MCFG_DEVICE_ADD("printer", PRINTER, 0)
625625
626626MACHINE_CONFIG_END
627627/*****************************************************************************/
r29557r29558
670670   MCFG_CASSETTE_ADD( "cassette", hector_cassette_interface )
671671
672672   /* printer */
673   MCFG_PRINTER_ADD("printer")
673   MCFG_DEVICE_ADD("printer", PRINTER, 0)
674674
675675MACHINE_CONFIG_END
676676
r29557r29558
724724   MCFG_CASSETTE_ADD( "cassette", hector_cassette_interface )
725725
726726   /* printer */
727   MCFG_PRINTER_ADD("printer")
727   MCFG_DEVICE_ADD("printer", PRINTER, 0)
728728
729729   MACHINE_CONFIG_END
730730
branches/new_menus/src/mess/drivers/bebox.c
r29557r29558
2121#include "bus/pci/pci.h"
2222#include "machine/am9517a.h"
2323#include "machine/pckeybrd.h"
24#include "machine/8042kbdc.h"
2524#include "machine/idectrl.h"
2625#include "bus/pci/mpc105.h"
2726#include "machine/intelfsh.h"
r29557r29558
155154   m_pic8259_1->ir1_w(state);
156155}
157156
158static const struct kbdc8042_interface bebox_8042_interface =
159{
160   KBDC8042_STANDARD,
161   DEVCB_CPU_INPUT_LINE("ppc1", INPUT_LINE_RESET),
162   DEVCB_NULL,
163   DEVCB_DRIVER_LINE_MEMBER(bebox_state,bebox_keyboard_interrupt),
164   DEVCB_NULL,
165
166   DEVCB_NULL
167};
168
169157static SLOT_INTERFACE_START( pci_devices )
170158   SLOT_INTERFACE_INTERNAL("mpc105", MPC105)
171159   SLOT_INTERFACE("cirrus", CIRRUS)
r29557r29558
235223
236224   MCFG_MC146818_ADD( "rtc", XTAL_32_768kHz )
237225
238   MCFG_KBDC8042_ADD("kbdc", bebox_8042_interface)
226   MCFG_DEVICE_ADD("kbdc", KBDC8042, 0)
227   MCFG_KBDC8042_KEYBOARD_TYPE(KBDC8042_STANDARD)
228   MCFG_KBDC8042_SYSTEM_RESET_CB(INPUTLINE("ppc1", INPUT_LINE_RESET))
229   MCFG_KBDC8042_INPUT_BUFFER_FULL_CB(WRITELINE(bebox_state, bebox_keyboard_interrupt))
230   
239231   /* internal ram */
240232   MCFG_RAM_ADD(RAM_TAG)
241233   MCFG_RAM_DEFAULT_SIZE("32M")
branches/new_menus/src/mess/drivers/apogee.c
r29557r29558
237237   MCFG_SOUND_CONFIG(apogee_speaker_interface)
238238   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
239239
240   MCFG_I8257_ADD("dma8257", XTAL_16MHz / 9, radio86_dma)
240   MCFG_DEVICE_ADD("dma8257", I8257, XTAL_16MHz / 9)
241   MCFG_I8257_OUT_HRQ_CB(WRITELINE(radio86_state, hrq_w))
242   MCFG_I8257_IN_MEMR_CB(READ8(radio86_state, memory_read_byte))
243   MCFG_I8257_OUT_MEMW_CB(WRITE8(radio86_state, memory_write_byte))
244   MCFG_I8257_OUT_IOW_2_CB(DEVWRITE8("i8275", i8275_device, dack_w))
241245
242246   MCFG_CASSETTE_ADD( "cassette", apogee_cassette_interface )
243247   MCFG_SOFTWARE_LIST_ADD("cass_list","apogee")
branches/new_menus/src/mess/drivers/radio86.c
r29557r29558
372372   MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
373373   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
374374
375   MCFG_I8257_ADD("dma8257", XTAL_16MHz / 9, radio86_dma)
375   MCFG_DEVICE_ADD("dma8257", I8257, XTAL_16MHz / 9)
376   MCFG_I8257_OUT_HRQ_CB(WRITELINE(radio86_state, hrq_w))
377   MCFG_I8257_IN_MEMR_CB(READ8(radio86_state, memory_read_byte))
378   MCFG_I8257_OUT_MEMW_CB(WRITE8(radio86_state, memory_write_byte))
379   MCFG_I8257_OUT_IOW_2_CB(DEVWRITE8("i8275", i8275_device, dack_w))
376380
377381   MCFG_CASSETTE_ADD( "cassette", radio86_cassette_interface )
378382   MCFG_SOFTWARE_LIST_ADD("cass_list","radio86")
branches/new_menus/src/mess/drivers/mikrosha.c
r29557r29558
209209   MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
210210   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
211211
212   MCFG_I8257_ADD("dma8257", XTAL_16MHz / 9, radio86_dma)
212   MCFG_DEVICE_ADD("dma8257", I8257, XTAL_16MHz / 9)
213   MCFG_I8257_OUT_HRQ_CB(WRITELINE(radio86_state, hrq_w))
214   MCFG_I8257_IN_MEMR_CB(READ8(radio86_state, memory_read_byte))
215   MCFG_I8257_OUT_MEMW_CB(WRITE8(radio86_state, memory_write_byte))
216   MCFG_I8257_OUT_IOW_2_CB(DEVWRITE8("i8275", i8275_device, dack_w))
213217
214218   MCFG_CASSETTE_ADD( "cassette", mikrosha_cassette_interface )
215219   MCFG_SOFTWARE_LIST_ADD("cass_list","mikrosha")
branches/new_menus/src/mess/drivers/digel804.c
r29557r29558
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
r29557r29558
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
r29557r29558
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
branches/new_menus/src/mess/drivers/x07.c
r29557r29558
14951495   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
14961496
14971497   /* printer */
1498   MCFG_PRINTER_ADD("printer")
1498   MCFG_DEVICE_ADD("printer", PRINTER, 0)
14991499
15001500   MCFG_TIMER_DRIVER_ADD_PERIODIC("blink_timer", x07_state, blink_timer, attotime::from_msec(300))
15011501
branches/new_menus/src/mess/drivers/dragon.c
r29557r29558
162162   MCFG_SAM6883_ADD(SAM_TAG, XTAL_4_433619MHz, dragon_state::sam6883_config)
163163   MCFG_SAM6883_RES_CALLBACK(READ8(dragon_state, sam_read))
164164   MCFG_CASSETTE_ADD("cassette", dragon_state::coco_cassette_interface)
165   MCFG_PRINTER_ADD(PRINTER_TAG)
165   MCFG_DEVICE_ADD(PRINTER_TAG, PRINTER, 0)
166166
167167   // video hardware
168168   MCFG_SCREEN_MC6847_PAL_ADD(SCREEN_TAG, VDG_TAG)
branches/new_menus/src/mess/drivers/mc10.c
r29557r29558
520520   MCFG_CASSETTE_ADD("cassette", mc10_cassette_interface)
521521
522522   /* printer */
523   MCFG_PRINTER_ADD("printer")
523   MCFG_DEVICE_ADD("printer", PRINTER, 0)
524524
525525   /* internal ram */
526526   MCFG_RAM_ADD(RAM_TAG)
r29557r29558
555555   MCFG_CASSETTE_ADD("cassette", alice32_cassette_interface)
556556
557557   /* printer */
558   MCFG_PRINTER_ADD("printer")
558   MCFG_DEVICE_ADD("printer", PRINTER, 0)
559559
560560   /* internal ram */
561561   MCFG_RAM_ADD(RAM_TAG)
branches/new_menus/src/mess/drivers/unior.c
r29557r29558
393393      return m_p_vram[offset & 0x7ff];
394394}
395395
396static I8257_INTERFACE( dma_intf )
397{
398   DEVCB_CPU_INPUT_LINE("maincpu", I8085_HALT),
399   DEVCB_NULL,
400   DEVCB_NULL,
401   DEVCB_NULL,
402   DEVCB_DEVICE_MEMBER("crtc", i8275_device, dack_w),
403   { DEVCB_NULL, DEVCB_NULL, DEVCB_DRIVER_MEMBER(unior_state, dma_r), DEVCB_NULL },
404   { DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL },
405};
406
407396WRITE8_MEMBER( unior_state::cpu_status_callback )
408397{
409398   m_dma->i8257_hlda_w(BIT(data, 3));
r29557r29558
462451
463452   MCFG_I8255_ADD( "ppi0", ppi0_intf )
464453   MCFG_I8255_ADD( "ppi1", ppi1_intf )
465   MCFG_I8257_ADD("dma", XTAL_20MHz / 9, dma_intf) // unknown clock
454
455   MCFG_DEVICE_ADD("dma", I8257, XTAL_20MHz / 9) // unknown clock
456   MCFG_I8257_OUT_HRQ_CB(INPUTLINE("maincpu", I8085_HALT))
457   MCFG_I8257_OUT_MEMW_CB(DEVWRITE8("crtc", i8275_device, dack_w))
458   MCFG_I8257_IN_IOR_2_CB(READ8(unior_state, dma_r))
459
466460   MCFG_I8275_ADD("crtc", crtc_intf)
467461MACHINE_CONFIG_END
468462
branches/new_menus/src/mess/drivers/vg5k.c
r29557r29558
405405   MCFG_CASSETTE_ADD( "cassette", vg5k_cassette_interface )
406406
407407   /* printer */
408   MCFG_PRINTER_ADD("printer")
408   MCFG_DEVICE_ADD("printer", PRINTER, 0)
409409
410410   /* internal ram */
411411   MCFG_RAM_ADD(RAM_TAG)
branches/new_menus/src/mess/drivers/a310.c
r29557r29558
1515 *  \- some subtle memory paging fault
1616 *  \- missing RAM max size
1717 *  \- ARM bug?
18 *  - 38776b8
1819 *
1920 *
2021=======================================================================================
r29557r29558
5859
5960
6061#include "emu.h"
61#include "machine/wd17xx.h"
62#include "imagedev/flopdrv.h"
6362#include "cpu/arm/arm.h"
6463#include "sound/dac.h"
6564#include "includes/archimds.h"
6665#include "machine/i2cmem.h"
6766//#include "machine/aakart.h"
6867#include "machine/ram.h"
68#include "machine/wd_fdc.h"
69#include "formats/applix_dsk.h"
6970
7071
7172class a310_state : public archimedes_state
r29557r29558
8788   virtual void machine_start();
8889   virtual void machine_reset();
8990    DECLARE_INPUT_CHANGED_MEMBER(key_stroke);
91   DECLARE_FLOPPY_FORMATS( floppy_formats );
9092
9193
9294protected:
r29557r29558
9698
9799WRITE_LINE_MEMBER(a310_state::a310_wd177x_intrq_w)
98100{
101   printf("%d IRQ\n",state);
99102   if (state)
103   {
100104      archimedes_request_fiq(ARCHIMEDES_FIQ_FLOPPY);
105   }
101106   else
102107      archimedes_clear_fiq(ARCHIMEDES_FIQ_FLOPPY);
103108}
104109
105110WRITE_LINE_MEMBER(a310_state::a310_wd177x_drq_w)
106111{
112   printf("%d DRQ\n",state);
107113   if (state)
114   {
108115      archimedes_request_fiq(ARCHIMEDES_FIQ_FLOPPY_DRQ);
116   }
109117   else
110118      archimedes_clear_fiq(ARCHIMEDES_FIQ_FLOPPY_DRQ);
111119}
r29557r29558
202210   PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("=  +") PORT_CODE(KEYCODE_EQUALS) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x1c) PORT_IMPULSE(1)
203211   PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("`  ~") PORT_CODE(KEYCODE_TILDE) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x10) PORT_IMPULSE(1)
204212   PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("BACK SPACE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x1e) PORT_IMPULSE(1)
205   PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB)
213   PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x26) PORT_IMPULSE(1)
206214
207215   PORT_START("key2") /* KEY ROW 2 */
208216    PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("q  Q") PORT_CODE(KEYCODE_Q) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x27) PORT_IMPULSE(1)
r29557r29558
221229   PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("]  }") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x32) PORT_IMPULSE(1)
222230   PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("RETURN") PORT_CODE(KEYCODE_ENTER) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x47) PORT_IMPULSE(1)
223231   PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_DEL)
224   PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL)
232   PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x61) PORT_IMPULSE(1)
225233   PORT_BIT(0x80, 0x80, IPT_KEYBOARD) PORT_NAME("CAPS LOCK") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE
226234
227235   PORT_START("key4") /* KEY ROW 4 */
r29557r29558
252260   PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME(",  <") PORT_CODE(KEYCODE_COMMA) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x55) PORT_IMPULSE(1)
253261   PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME(".  >") PORT_CODE(KEYCODE_STOP) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x56) PORT_IMPULSE(1)
254262   PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("/  ?") PORT_CODE(KEYCODE_SLASH) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x23) PORT_IMPULSE(1)
255   PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("SHIFT (R)") PORT_CODE(KEYCODE_RSHIFT)
263   PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("SHIFT (R)") PORT_CODE(KEYCODE_RSHIFT) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x58) PORT_IMPULSE(1)
256264
257265   PORT_START("key7") /* KEY ROW 7 */
258266   PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("LINE FEED")
259   PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x26) PORT_IMPULSE(1)
267   PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x5f) PORT_IMPULSE(1)
260268    PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("- (KP)") PORT_CODE(KEYCODE_MINUS_PAD)
261269    PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME(", (KP)") PORT_CODE(KEYCODE_PLUS_PAD)
262270   PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("ENTER (KP)") PORT_CODE(KEYCODE_ENTER_PAD)
r29557r29558
279287    PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("*") PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x24) PORT_IMPULSE(1) // (KP?)
280288    PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("#") PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x25) PORT_IMPULSE(1) // (KP?)
281289
290    PORT_START("keya")
291    PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x01) PORT_IMPULSE(1)
292    PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x02) PORT_IMPULSE(1)
293    PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x03) PORT_IMPULSE(1)
294    PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x04) PORT_IMPULSE(1)
295    PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x05) PORT_IMPULSE(1)
296    PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("F6") PORT_CODE(KEYCODE_F6) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x06) PORT_IMPULSE(1)
297    PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x07) PORT_IMPULSE(1)
298    PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("F8") PORT_CODE(KEYCODE_F8) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x08) PORT_IMPULSE(1)
299
300    PORT_START("keyb")
301    PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("F9") PORT_CODE(KEYCODE_F9) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x09) PORT_IMPULSE(1)
302    PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("F10") PORT_CODE(KEYCODE_F10) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x0a) PORT_IMPULSE(1)
303    PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("F11") PORT_CODE(KEYCODE_F11) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x0b) PORT_IMPULSE(1)
304    PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("F12") PORT_CODE(KEYCODE_F12) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x0c) PORT_IMPULSE(1)
305//    PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x05) PORT_IMPULSE(1)
306//    PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("F6") PORT_CODE(KEYCODE_F6) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x06) PORT_IMPULSE(1)
307//    PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x07) PORT_IMPULSE(1)
308//    PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("F8") PORT_CODE(KEYCODE_F8) PORT_CHANGED_MEMBER(DEVICE_SELF, a310_state, key_stroke, 0x08) PORT_IMPULSE(1)
309
310
282311   PORT_START("via1a") /* VIA #1 PORT A */
283312   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START) PORT_PLAYER(1)
284313   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START) PORT_PLAYER(2)
r29557r29558
296325   PORT_BIT (0xf8, 0x80, IPT_UNUSED)
297326INPUT_PORTS_END
298327
299static const wd17xx_interface a310_wd17xx_interface =
300{
301   DEVCB_NULL,
302   DEVCB_DRIVER_LINE_MEMBER(a310_state, a310_wd177x_intrq_w),
303   DEVCB_DRIVER_LINE_MEMBER(a310_state, a310_wd177x_drq_w),
304   {FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3}
305};
328FLOPPY_FORMATS_MEMBER( a310_state::floppy_formats )
329   FLOPPY_APPLIX_FORMAT
330FLOPPY_FORMATS_END
306331
332static SLOT_INTERFACE_START( a310_floppies )
333   SLOT_INTERFACE( "35dd", FLOPPY_35_DD )
334SLOT_INTERFACE_END
335
307336WRITE_LINE_MEMBER( archimedes_state::a310_kart_tx_w )
308337{
309338   if(state)
r29557r29558
331360   ARM_COPRO_TYPE_VL86C020
332361};
333362
363
334364static MACHINE_CONFIG_START( a310, a310_state )
335365   /* basic machine hardware */
336366   MCFG_CPU_ADD("maincpu", ARM, 8000000)        /* 8 MHz */
337367   MCFG_CPU_PROGRAM_MAP(a310_mem)
338368   MCFG_CPU_CONFIG(a310_config)
339369
340   MCFG_AAKART_ADD("kart", 8000000/256, kart_interface) // TODO: frequency
370   MCFG_AAKART_ADD("kart", 8000000/256, kart_interface)
341371
342372   MCFG_I2CMEM_ADD("i2cmem")
343373   MCFG_I2CMEM_DATA_SIZE(0x100)
r29557r29558
356386   MCFG_RAM_DEFAULT_SIZE("2M")
357387   MCFG_RAM_EXTRA_OPTIONS("512K, 1M, 4M, 8M, 16M")
358388
359   MCFG_WD1772_ADD("wd1772", a310_wd17xx_interface )
389   MCFG_WD1772x_ADD("fdc", 8000000 / 1) // TODO: frequency
390   MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE( a310_state, a310_wd177x_intrq_w))
391   MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(a310_state, a310_wd177x_drq_w))
392   MCFG_FLOPPY_DRIVE_ADD("fdc:0", a310_floppies, "35dd", a310_state::floppy_formats)
393   MCFG_FLOPPY_DRIVE_ADD("fdc:1", a310_floppies, "35dd", a310_state::floppy_formats)
360394
361   //MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(a310_floppy_interface)
362
363395   MCFG_SPEAKER_STANDARD_MONO("mono")
364396   MCFG_SOUND_ADD("dac0", DAC, 0)
365397   MCFG_SOUND_ROUTE(0, "mono", 0.10)
branches/new_menus/src/mess/drivers/fanucspmg.c
r29557r29558
710710   return prog_space.write_byte(offset, data);
711711}
712712
713I8257_INTERFACE( fanucspmg_dma )
714{
715   DEVCB_NULL,
716   DEVCB_NULL,
717   DEVCB_NULL,
718   DEVCB_DRIVER_MEMBER(fanucspmg_state, memory_read_byte),
719   DEVCB_DRIVER_MEMBER(fanucspmg_state, memory_write_byte),
720   { DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL },
721   { DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL }
722};
723
724713static MC6845_UPDATE_ROW( fanuc_update_row )
725714{
726715   fanucspmg_state *state = downcast<fanucspmg_state *>(device->owner());
r29557r29558
819808   MCFG_PIT8253_CLK1(XTAL_15MHz/12)
820809   MCFG_PIT8253_CLK2(XTAL_15MHz/12)
821810
822   MCFG_I8257_ADD(DMAC_TAG, XTAL_15MHz / 5, fanucspmg_dma)
811   MCFG_DEVICE_ADD(DMAC_TAG, I8257, XTAL_15MHz / 5)
812   MCFG_I8257_IN_MEMR_CB(READ8(fanucspmg_state, memory_read_byte))
813   MCFG_I8257_OUT_MEMW_CB(WRITE8(fanucspmg_state, memory_write_byte))
823814
824815   MCFG_PIC8259_ADD(PIC0_TAG, INPUTLINE("maincpu", 0), VCC, NULL)
825816   MCFG_PIC8259_ADD(PIC1_TAG, INPUTLINE("maincpu", 0), VCC, NULL)
branches/new_menus/src/mess/drivers/apple3.c
r29557r29558
121121   MCFG_RS232_DSR_HANDLER(DEVWRITELINE("acia", mos6551_device, write_dsr))
122122   // TODO: remove cts kludge from machine/apple3.c and come up with a good way of coping with pull up resistors.
123123
124   /* paddle */
125   MCFG_TIMER_DRIVER_ADD("pdltimer", apple3_state, paddle_timer);
126
124127   /* rtc */
125128   MCFG_DEVICE_ADD("rtc", MM58167, XTAL_32_768kHz)
126129
127130   /* via */
128   MCFG_DEVICE_ADD("via6522_0", VIA6522, 1000000)
131   MCFG_DEVICE_ADD("via6522_0", VIA6522, 2000000)
129132   MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(apple3_state, apple3_via_0_out_a))
130133   MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(apple3_state, apple3_via_0_out_b))
131134   MCFG_VIA6522_IRQ_HANDLER(WRITELINE(apple3_state, apple3_via_0_irq_func))
r29557r29558
313316   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Open Apple")   PORT_CODE(KEYCODE_LALT)
314317   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Solid Apple")  PORT_CODE(KEYCODE_RALT)
315318   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RESET")        PORT_CODE(KEYCODE_F12)
319
320   PORT_START("joy_1_x")      /* Joystick 1 X Axis */
321   PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_NAME("P1 Joystick X")
322   PORT_MINMAX(0, 0xff) PORT_PLAYER(1)
323
324   PORT_START("joy_1_y")      /* Joystick 1 Y Axis */
325   PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_NAME("P1 Joystick Y")
326   PORT_MINMAX(0,0xff) PORT_PLAYER(1)
327
328   PORT_START("joy_2_x")      /* Joystick 2 X Axis */
329   PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_NAME("P2 Joystick X")
330   PORT_MINMAX(0,0xff) PORT_PLAYER(2)
331
332   PORT_START("joy_2_y")      /* Joystick 2 Y Axis */
333   PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_NAME("P2 Joystick Y")
334   PORT_MINMAX(0,0xff) PORT_PLAYER(2)
335
336   PORT_START("joy_buttons")
337   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(1) PORT_NAME("Joystick 1 Button 1")
338   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(1) PORT_NAME("Joystick 1 Button 2")
339   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(2) PORT_NAME("Joystick 2 Button 1")
340   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(2) PORT_NAME("Joystick 2 Button 2")
316341INPUT_PORTS_END
317342
318343ROM_START(apple3)
branches/new_menus/src/mess/drivers/ip22.c
r29557r29558
14881488   machine().device<nvram_device>("nvram")->set_base(m_RTC.nRAM, 0x200);
14891489}
14901490
1491static const struct kbdc8042_interface at8042 =
1492{
1493   KBDC8042_STANDARD,
1494   DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_RESET),
1495   DEVCB_NULL,
1496   DEVCB_NULL,
1497   DEVCB_NULL,
1498
1499   DEVCB_NULL
1500};
1501
15021491DRIVER_INIT_MEMBER(ip22_state,ip225015)
15031492{
15041493   // IP22 uses 2 pieces of PC-compatible hardware: the 8042 PS/2 keyboard/mouse
r29557r29558
16431632   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "^^^lspeaker", 1.0)
16441633   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "^^^rspeaker", 1.0)
16451634
1646   MCFG_KBDC8042_ADD("kbdc", at8042)
1635   MCFG_DEVICE_ADD("kbdc", KBDC8042, 0)
1636   MCFG_KBDC8042_KEYBOARD_TYPE(KBDC8042_STANDARD)
1637   MCFG_KBDC8042_SYSTEM_RESET_CB(INPUTLINE("maincpu", INPUT_LINE_RESET))
16471638MACHINE_CONFIG_END
16481639
16491640static MACHINE_CONFIG_DERIVED( ip224613, ip225015 )
branches/new_menus/src/mess/drivers/ql.c
r29557r29558
11751175   MCFG_RAM_EXTRA_OPTIONS("192K,256K,384K,640K,896K")
11761176
11771177   // Parallel printer port on Sandy disk interface
1178   MCFG_PRINTER_ADD(PRINTER_TAG)
1178   MCFG_DEVICE_ADD(PRINTER_TAG, PRINTER, 0)
11791179MACHINE_CONFIG_END
11801180
11811181
branches/new_menus/src/mess/machine/radio86.c
r29557r29558
146146   return prog_space.write_byte(offset, data);
147147}
148148
149I8257_INTERFACE( radio86_dma )
150{
151   DEVCB_DRIVER_LINE_MEMBER(radio86_state,hrq_w),
152   DEVCB_NULL,
153   DEVCB_NULL,
154   DEVCB_DRIVER_MEMBER(radio86_state, memory_read_byte),
155   DEVCB_DRIVER_MEMBER(radio86_state, memory_write_byte),
156   { DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL },
157   { DEVCB_NULL, DEVCB_NULL, DEVCB_DEVICE_MEMBER("i8275", i8275_device, dack_w), DEVCB_NULL }
158};
159
160149void radio86_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
161150{
162151   switch (id)
branches/new_menus/src/mess/machine/partner.c
r29557r29558
362362{
363363   return m_fdc->data_r(space,offset);
364364}
365
365366WRITE8_MEMBER(partner_state::partner_fdc_w)
366367{
367368   m_fdc->data_w(space,offset,data);
368369}
369370
370I8257_INTERFACE( partner_dma )
371{
372   DEVCB_DRIVER_LINE_MEMBER(partner_state,hrq_w),
373   DEVCB_NULL,
374   DEVCB_NULL,
375   DEVCB_DRIVER_MEMBER(radio86_state, memory_read_byte),
376   DEVCB_DRIVER_MEMBER(radio86_state, memory_write_byte),
377   { DEVCB_DRIVER_MEMBER(partner_state, partner_fdc_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL },
378   { DEVCB_DRIVER_MEMBER(partner_state, partner_fdc_w), DEVCB_NULL, DEVCB_DEVICE_MEMBER("i8275", i8275_device, dack_w), DEVCB_NULL }
379};
380
381
382371MACHINE_RESET_MEMBER(partner_state,partner)
383372{
384373   m_mem_page = 0;
branches/new_menus/src/mess/machine/apple3.c
r29557r29558
3939            bits 0-5: 6-bit audio DAC output
4040            bit 6: screen blank
4141            bit 7: OR of NMI from slots
42
42
4343***************************************************************************/
4444
4545#include "emu.h"
r29557r29558
150150            m_flags &= ~(1 << ((offset - 0x50) / 2));
151151         break;
152152
153      case 0x60: case 0x61: case 0x62: case 0x63:
154      case 0x64: case 0x65: case 0x66: case 0x67:
155      case 0x68: case 0x69: case 0x6A: case 0x6B:
156      case 0x6C: case 0x6D: case 0x6E: case 0x6F:
157         /* unsure what these are */
158         result = 0x00;
153      case 0x58:
154      case 0x59:
155      case 0x5a:
156      case 0x5b:
157      case 0x5c:
158      case 0x5d:
159      case 0x5e:
160      case 0x5f:
161         pdl_handler(offset);
159162         break;
160163
164      case 0x60:   // joystick switch 0
165      case 0x68:
166         result = (m_joybuttons->read() & 1) ? 0x80 : 0x00;
167         break;
168
169      case 0x61:   // joystick switch 1 (margin switch for Silentype)
170      case 0x69:
171         result = (m_joybuttons->read() & 4) ? 0x80 : 0x00;
172         break;
173
174      case 0x62:   // joystick switch 2
175      case 0x6a:
176         result = (m_joybuttons->read() & 2) ? 0x80 : 0x00;
177         break;
178
179      case 0x63:   // joystick switch 3 (serial clock for silentype)
180      case 0x6b:
181         result = (m_joybuttons->read() & 8) ? 0x80 : 0x00;
182         break;
183
184      case 0x66:   // paddle A/D conversion done (bit 7 = 1 while counting, 0 when done)
185      case 0x6e:
186         return m_ramp_active ? 0x80 : 0x00;
187         break;
188
161189      case 0x70: case 0x71: case 0x72: case 0x73:
162190      case 0x74: case 0x75: case 0x76: case 0x77:
163191      case 0x78: case 0x79: case 0x7A: case 0x7B:
r29557r29558
287315            m_flags &= ~(1 << ((offset - 0x50) / 2));
288316         break;
289317
318      case 0x58:
319      case 0x59:
320      case 0x5a:
321      case 0x5b:
322      case 0x5c:
323      case 0x5d:
324      case 0x5e:
325      case 0x5f:
326         pdl_handler(offset);
327         break;
290328
291329      case 0x70: case 0x71: case 0x72: case 0x73:
292330      case 0x74: case 0x75: case 0x76: case 0x77:
r29557r29558
582620   m_lastchar = 0x0d;
583621   m_rom_has_been_disabled = false;
584622   m_cnxx_slot = -1;
623   m_analog_sel = 0;
624   m_ramp_active = false;
585625}
586626
587627
r29557r29558
715755   save_item(NAME(m_transchar));
716756   save_item(NAME(m_flags));
717757   save_item(NAME(m_char_mem));
758   save_item(NAME(m_analog_sel));
759   save_item(NAME(m_ramp_active));
760   save_item(NAME(m_pdl_charge));
718761
719762   machine().save().register_postload(save_prepost_delegate(FUNC(apple3_state::apple3_postload), this));
720763}
r29557r29558
11521195      }
11531196   }
11541197}
1198
1199void apple3_state::pdl_handler(int offset)
1200{
1201   UINT8 pdlread;
1202
1203   switch (offset)
1204   {
1205      case 0x58:
1206         m_analog_sel &= ~1;
1207         break;
1208
1209      case 0x59:
1210         m_analog_sel |= 1;
1211         break;
1212
1213      case 0x5a:
1214         m_analog_sel &= ~4;
1215         break;
1216
1217      case 0x5b:
1218         m_analog_sel |= 4;
1219         break;
1220
1221      case 0x5c:
1222         m_ramp_active = false;
1223         m_pdl_charge = 0;
1224         m_pdltimer->adjust(attotime::from_hz(1000000.0));
1225         break;
1226
1227      case 0x5d:
1228         switch (m_analog_sel)
1229         {
1230            case 1:
1231               pdlread = m_joy1x->read();
1232               break;
1233
1234            case 2:
1235               pdlread = m_joy1y->read();
1236               break;
1237
1238            case 4:
1239               pdlread = m_joy2x->read();
1240               break;
1241
1242            case 5:
1243               pdlread = m_joy2y->read();
1244               break;
1245
1246            default:
1247               pdlread = 127;
1248               break;
1249         }
1250
1251         // help the ROM self-test
1252         if (m_pdl_charge > 82)
1253         {
1254            m_pdl_charge += (pdlread*4);
1255            m_pdl_charge -= 93;
1256         }
1257         m_pdltimer->adjust(attotime::from_hz(1000000.0));
1258         m_ramp_active = true;
1259         break;
1260
1261      case 0x5e:
1262         m_analog_sel &= ~2;
1263         break;
1264
1265      case 0x5f:
1266         m_analog_sel |= 2;
1267         break;
1268   }
1269}
1270
1271TIMER_DEVICE_CALLBACK_MEMBER(apple3_state::paddle_timer)
1272{
1273   if (m_ramp_active)
1274   {
1275      m_pdl_charge--;
1276
1277      if (m_pdl_charge > 0)
1278      {
1279         m_pdltimer->adjust(attotime::from_hz(1000000.0));
1280      }
1281      else
1282      {
1283         m_pdltimer->adjust(attotime::never);
1284         m_ramp_active = false;
1285      }
1286   }
1287   else
1288   {
1289      m_pdl_charge++;
1290      m_pdltimer->adjust(attotime::from_hz(1000000.0));
1291   }
1292}
1293
branches/new_menus/src/mess/includes/radio86.h
r29557r29558
133133extern const i8275_interface mikrosha_i8275_interface;
134134extern const i8275_interface apogee_i8275_interface;
135135
136extern const i8257_interface radio86_dma;
137
138
139136extern void radio86_init_keyboard(running_machine &machine);
140137
141138
branches/new_menus/src/mess/includes/partner.h
r29557r29558
4747
4848/*----------- defined in machine/partner.c -----------*/
4949
50extern const i8257_interface partner_dma;
5150extern const wd17xx_interface partner_wd17xx_interface;
5251
5352#endif /* partner_H_ */
branches/new_menus/src/mess/includes/apple3.h
r29557r29558
5050      m_speaker(*this, SPEAKER_TAG),
5151      m_dac(*this, DAC_TAG),
5252      m_kbspecial(*this, "keyb_special"),
53      m_palette(*this, "palette")
53      m_palette(*this, "palette"),
54      m_joy1x(*this, "joy_1_x"),
55      m_joy1y(*this, "joy_1_y"),
56      m_joy2x(*this, "joy_2_x"),
57      m_joy2y(*this, "joy_2_y"),
58      m_joybuttons(*this, "joy_buttons"),
59      m_pdltimer(*this, "pdltimer")
5460   {
5561   }
5662
r29557r29558
6773   required_device<dac_device> m_dac;
6874   required_ioport m_kbspecial;
6975   required_device<palette_device> m_palette;
76   required_ioport m_joy1x, m_joy1y, m_joy2x, m_joy2y, m_joybuttons;
77   required_device<timer_device> m_pdltimer;
7078
7179   DECLARE_READ8_MEMBER(apple3_memory_r);
7280   DECLARE_WRITE8_MEMBER(apple3_memory_w);
r29557r29558
107115   DECLARE_READ_LINE_MEMBER(ay3600_control_r);
108116   DECLARE_WRITE_LINE_MEMBER(ay3600_data_ready_w);
109117   void apple3_postload();
118   TIMER_DEVICE_CALLBACK_MEMBER(paddle_timer);
119   void pdl_handler(int offset);
110120
111121   // these need to be public for now
112122   UINT32 m_flags;
r29557r29558
137147   int m_c040_time;
138148   UINT16 m_lastchar, m_strobe;
139149   UINT8 m_transchar;
150
151   int m_analog_sel;
152   bool m_ramp_active;
153   int m_pdl_charge;
140154};
141155
142156
Property changes on: branches/new_menus
Modified: svn:mergeinfo
   Merged /trunk:r29536-29556

Previous 199869 Revisions Next


© 1997-2024 The MAME Team