Previous 15994 Revisions Next

r5070 Tuesday 23rd June, 2009 at 20:45:29 UTC by Curt Coder
[PROF80] Added NE555 motor timeout, INUSE led.
[src/mess/drivers]prof80.c

src/mess/drivers/prof80.c
r5069r5070
1414   TODO:
1515
1616   - keyboard
17   - NE555 timeout is 10x too high
1718   - GRIP does not send keys back to PROF-80
18   - NE555 timeout
19   - INUSE led
2019   - grip31 does not work
2120   - PROF-80 RAM banking
2221   - PROF-80 floppy format
r5069r5070
3938#include "machine/upd1990a.h"
4039#include "machine/z80sti.h"
4140#include "machine/ctronics.h"
41#include "machine/rescap.h"
4242
4343INLINE const device_config *get_floppy_image(running_machine *machine, int drive)
4444{
r5069r5070
205205
206206   switch (sa)
207207   {
208   case 0:
208   case 0: /* C0/TDI */
209209      upd1990a_data_w(state->upd1990a, fa);
210210      upd1990a_c0_w(state->upd1990a, fa);
211211      break;
212212
213   case 1:
213   case 1: /* C1 */
214214      upd1990a_c1_w(state->upd1990a, fa);
215215      break;
216216
217   case 2:
217   case 2: /* C2 */
218218      upd1990a_c2_w(state->upd1990a, fa);
219219      break;
220220
221   case 3:
222      /* READY */
221   case 3:   /* READY */
223222      break;
224223
225   case 4:
224   case 4: /* TCK */
226225      upd1990a_clk_w(state->upd1990a, fa);
227226      break;
228227
229   case 5:
230      /* IN USE */
228   case 5:   /* IN USE */
229      output_set_led_value(0, fa);
231230      break;
232231
233   case 6:
234      /* _MOTOR */
232   case 6:   /* _MOTOR */
235233      if (fa)
236234      {
237235         /* trigger floppy motor off NE555 timer */
238//         attotime duration = 0; // TODO: NE555 R=10M C=6.8uF
239         timer_adjust_oneshot(state->floppy_motor_off_timer, ATTOTIME_IN_SEC(10), 0);
236         int t = 110 * RES_M(10) * CAP_U(6.8); // t = 1.1 * R8 * C6
237
238         timer_adjust_oneshot(state->floppy_motor_off_timer, ATTOTIME_IN_MSEC(t), 0);
240239      }
241240      else
242241      {
r5069r5070
253252      }
254253      break;
255254
256   case 7:
257      /* SELECT */
255   case 7:   /* SELECT */
258256      break;
259257   }
260258
r5069r5070
276274   case 4: /* _MSTOP */
277275      if (!fb)
278276      {
279         /* turn floppy motor off immediately */
277         /* immediately turn off floppy motor */
280278         timer_adjust_oneshot(state->floppy_motor_off_timer, attotime_zero, 0);
281279      }
282280      break;
r5069r5070
439437      4      JS0
440438      5      JS1
441439      6      _ERROR
442      7      LPS
440      7      LPSTB      light pen strobe
443441
444442   */
445443

Previous 15994 Revisions Next


© 1998-2018 The MESS Team