Previous 15994 Revisions Next

r8899 Wednesday 25th August, 2010 at 13:39:12 UTC by Miodrag Milanović
[JR100] Made cassette write works
6255via: added support for shift mode 5 (shift out under T2 control)
[src/emu/machine]6522via.c
[src/mess/drivers]jr100.c

src/emu/machine/6522via.c
r8898r8899
374374
375375void via6522_device::shift()
376376{
377   if (SO_O2_CONTROL(m_acr))
377   if (SO_O2_CONTROL(m_acr) || SO_T2_CONTROL(m_acr))
378378   {
379379      m_out_cb2 = (m_sr >> 7) & 1;
380380      m_sr =  (m_sr << 1) | m_out_cb2;
r8898r8899
391391
392392      if (m_shift_counter)
393393        {
394         timer_adjust_oneshot(m_shift_timer, cycles_to_time(2), 0);
394         if (SO_O2_CONTROL(m_acr)) {
395            timer_adjust_oneshot(m_shift_timer, cycles_to_time(2), 0);
396         } else {
397            timer_adjust_oneshot(m_shift_timer, cycles_to_time((m_t2ll + 2)*2), 0);
398         }
395399        }
396400      else
397401      {
r8898r8899
683687         m_shift_counter=0;
684688         timer_adjust_oneshot(m_shift_timer, cycles_to_time(2), 0);
685689      }
690      if (SO_T2_CONTROL(m_acr))
691      {
692         m_shift_counter=0;
693         timer_adjust_oneshot(m_shift_timer, cycles_to_time((m_t2ll + 2)*2), 0);
694      }
686695      break;
687696
688697    case VIA_PCR:
r8898r8899
880889      {
881890         timer_set(&m_machine, cycles_to_time(2), (void *)this, 0, shift_callback);
882891      }
892      if (SO_T2_CONTROL(m_acr))
893      {
894         timer_set(&m_machine, cycles_to_time((m_t2ll + 2)*2), (void *)this, 0, shift_callback);
895      }
883896      break;
884897
885898    case VIA_PCR:
src/mess/drivers/jr100.c
r8898r8899
179179   jr100_speaker = data>>7;
180180}
181181
182static WRITE_LINE_DEVICE_HANDLER(jr100_via_write_cb2)
183{
184   cassette_output(device->machine->device("cassette"), state ? -1.0 : +1.0);
185}
182186static const via6522_interface jr100_via_intf =
183187{
184188   DEVCB_NULL,                                 /* in_a_func */
r8898r8899
190194   DEVCB_HANDLER(jr100_via_write_a),               /* out_a_func */
191195   DEVCB_HANDLER(jr100_via_write_b),               /* out_b_func */
192196   DEVCB_NULL,                                 /* out_ca1_func */
193   DEVCB_NULL,                                 /* out_cb1_func */
197   DEVCB_NULL,                                 /* out_cb1_func */
194198   DEVCB_NULL,                                 /* out_ca2_func */
195   DEVCB_NULL,                                 /* out_cb2_func */
196   DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_IRQ0)    /* irq_func */   
199   DEVCB_LINE(jr100_via_write_cb2),                  /* out_cb2_func */
200   DEVCB_NULL                                  /* irq_func */   
197201};
198202static const cassette_config jr100_cassette_config =
199203{

Previous 15994 Revisions Next


© 1998-2018 The MESS Team