Previous 15994 Revisions Next

r7635 Wednesday 24th March, 2010 at 15:51:59 UTC by Curt Coder
[CONKORT] Added notes.
[src/mess/machine]abcbus.c conkort.c

src/mess/machine/conkort.c
r7634r7635
7171
7272    Slow Controller
7373    ---------------
74    - FD1791 HLD/HLT callbacks
74
75   - Z80 IN instruction needs to halt in mid air for this controller to ever work (the first data byte of disk sector is read too early)
76
77      wd17xx_command_w $88 READ_SEC
78      wd17xx_data_r: (no new data) $00 (data_count 0)
79      WAIT
80      wd179x: Read Sector callback.
81      sector found! C:$00 H:$00 R:$0b N:$01
82      wd17xx_data_r: $FF (data_count 256)
83      WAIT
84
7585    - copy protection device (sends sector header bytes to CPU? DDEN is serial clock? code checks for either $b6 or $f7)
7686
7787      06F8: ld   a,$2F               ; SEEK
r7634r7635
100110      0704: rr   a
101111      0706: call $073F
102112   
113    - FD1791 HLD/HLT callbacks
103114    - DS/DD SS/DS jumpers
104115    - S1-S5 jumpers
105116
r7634r7635
302313
303314   /* drive selection */
304315   if (BIT(data, 0)) wd17xx_set_drive(device, 0);
305//   if (BIT(data, 1)) wd17xx_set_drive(device, 1);
316   if (BIT(data, 1)) wd17xx_set_drive(device, 1);
306317//  if (BIT(data, 2)) wd17xx_set_drive(device, 2);
307318
308319   /* motor enable */
r7634r7635
350361   slow_t *conkort = get_safe_token_slow(device->owner);
351362   UINT8 data = 0xff;
352363
364   if (!conkort->wait_enable && !conkort->fdc_irq && !conkort->fdc_drq)
365   {
366      /* TODO: this is really connected to the Z80 WAIT line */
367      cpu_set_input_line(conkort->cpu, INPUT_LINE_HALT, ASSERT_LINE);
368   }
369
353370   switch (offset & 0x03)
354371   {
355372   case 0: data = wd17xx_status_r(device, 0);
r7634r7635
358375   case 3:   data = wd17xx_data_r(device, 0);
359376   }
360377
361   if (!conkort->wait_enable && !conkort->fdc_irq && !conkort->fdc_drq)
362   {
363      logerror("WAIT\n");
364      /* TODO: this is really connected to the Z80 _RDY line */
365      cpu_set_input_line(conkort->cpu, INPUT_LINE_HALT, ASSERT_LINE);
366   }
367
378   /* FD1791 has inverted data lines */
368379   return data ^ 0xff;
369380}
370381
r7634r7635
372383{
373384   slow_t *conkort = get_safe_token_slow(device->owner);
374385
386   if (!conkort->wait_enable && !conkort->fdc_irq && !conkort->fdc_drq)
387   {
388      logerror("WAIT\n");
389      /* TODO: this is really connected to the Z80 WAIT line */
390      cpu_set_input_line(conkort->cpu, INPUT_LINE_HALT, ASSERT_LINE);
391   }
392
393   /* FD1791 has inverted data lines */
375394   data ^= 0xff;
376395
377396   switch (offset & 0x03)
r7634r7635
381400   case 2: wd17xx_sector_w(device, 0, data);  break;
382401   case 3: wd17xx_data_w(device, 0, data);    break;
383402   }
384
385   if (!conkort->wait_enable && !conkort->fdc_irq && !conkort->fdc_drq)
386   {
387      logerror("WAIT\n");
388      /* TODO: this is really connected to the Z80 _RDY line */
389      cpu_set_input_line(conkort->cpu, INPUT_LINE_HALT, ASSERT_LINE);
390   }
391403}
392404
393405/* Fast Controller */
r7634r7635
770782
771783   if (state)
772784   {
773      /* TODO: this is really connected to the Z80 _RDY line */
785      /* TODO: this is really connected to the Z80 WAIT line */
774786      cpu_set_input_line(conkort->cpu, INPUT_LINE_HALT, CLEAR_LINE);
775787   }
776788}
r7634r7635
783795
784796   if (state)
785797   {
786      /* TODO: this is really connected to the Z80 _RDY line */
798      /* TODO: this is really connected to the Z80 WAIT line */
787799      cpu_set_input_line(conkort->cpu, INPUT_LINE_HALT, CLEAR_LINE);
788800   }
789801}
src/mess/machine/abcbus.c
r7634r7635
1414    PARAMETERS
1515***************************************************************************/
1616
17#define LOG 1
17#define LOG
1818
1919/***************************************************************************
2020    TYPE DEFINITIONS

Previous 15994 Revisions Next


© 1998-2018 The MESS Team