Previous 15994 Revisions Next

r1956 Tuesday 11th March, 2008 at 23:01:00 UTC by Wilbert Pol
machine/99_dsk.c: Some Machine -> machine updates.
[src/mess/machine]99_dsk.c

src/mess/machine/99_dsk.c
r1955r1956
7272   Emulation is faulty because the CPU is actually stopped in the midst of
7373   instruction, at the end of the memory access
7474*/
75static void fdc_handle_hold(void)
75static void fdc_handle_hold(running_machine *machine)
7676{
7777   if (DSKhold && (!DRQ_IRQ_status) && DVENA)
78      cpunum_set_input_line(Machine, 0, INPUT_LINE_HALT, ASSERT_LINE);
78      cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, ASSERT_LINE);
7979   else
80      cpunum_set_input_line(Machine, 0, INPUT_LINE_HALT, CLEAR_LINE);
80      cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, CLEAR_LINE);
8181}
8282
8383/*
r1955r1956
8686static TIMER_CALLBACK(motor_on_timer_callback)
8787{
8888   DVENA = 0;
89   fdc_handle_hold();
89   fdc_handle_hold(machine);
9090}
9191
9292typedef struct ti99_geometry
r1955r1956
388388      break;
389389   }
390390
391   fdc_handle_hold();
391   fdc_handle_hold(Machine);
392392}
393393
394394/*
r1955r1956
507507      if (data && !motor_on)
508508      {   /* on rising edge, set DVENA for 4.23s */
509509         DVENA = 1;
510         fdc_handle_hold();
510         fdc_handle_hold(machine);
511511         timer_adjust_oneshot(motor_on_timer, ATTOTIME_IN_MSEC(4230), 0);
512512      }
513513      motor_on = data;
r1955r1956
520520           for 4.23s after write to revelant CRU bit, this is not emulated and could cause
521521           the TI99 to lock...) */
522522      DSKhold = data;
523      fdc_handle_hold();
523      fdc_handle_hold(machine);
524524      break;
525525
526526   case 3:
r1955r1956
697697/*
698698   Write disk CRU interface
699699*/
700static void ccfdc_cru_w(int offset, int data)
700static void ccfdc_cru_w(running_machine *machine, int offset, int data)
701701{
702702   switch (offset)
703703   {
r1955r1956
711711      if (data && !motor_on)
712712      {   /* on rising edge, set DVENA for 4.23s */
713713         DVENA = 1;
714         fdc_handle_hold();
714         fdc_handle_hold(machine);
715715         timer_adjust_oneshot(motor_on_timer, ATTOTIME_IN_MSEC(4230), 0);
716716      }
717717      motor_on = data;
r1955r1956
724724           for 4.23s after write to revelant CRU bit, this is not emulated and could cause
725725           the TI99 to lock...) */
726726      DSKhold = data;
727      fdc_handle_hold();
727      fdc_handle_hold(machine);
728728      break;
729729
730730   case 4:
r1955r1956
925925      if (data && !motor_on)
926926      {   /* on rising edge, set DVENA for 4.23s */
927927         DVENA = 1;
928         fdc_handle_hold();
928         fdc_handle_hold(machine);
929929         timer_adjust_oneshot(motor_on_timer, ATTOTIME_IN_MSEC(4230), 0);
930930      }
931931      motor_on = data;
r1955r1956
938938           for 4.23s after write to revelant CRU bit, this is not emulated and could cause
939939           the TI99 to lock...) */
940940      DSKhold = data;
941      fdc_handle_hold();
941      fdc_handle_hold(machine);
942942      break;
943943
944944   case 4:
r1955r1956
13171317      if (data && !motor_on)
13181318      {
13191319         DVENA = 1;
1320         fdc_handle_hold();
1320         fdc_handle_hold(machine);
13211321         timer_adjust_oneshot(motor_on_timer, ATTOTIME_IN_MSEC(4230), 0);
13221322      }
13231323      motor_on = data;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team