Previous 15994 Revisions Next

r6671 Wednesday 16th December, 2009 at 12:11:27 UTC by Curt Coder
[C1581] Fixed serial comms.
[src/emu/machine]6526cia.c
[src/mess/machine]c1581.c

src/emu/machine/6526cia.c
r6670r6671
144144   cia->device = device;
145145   devcb_resolve_write_line(&cia->irq_func, &intf->irq_func, device);
146146   devcb_resolve_write_line(&cia->pc_func, &intf->pc_func, device);
147   cia->flag = 1;
147148
148149   /* setup ports */
149150   for (p = 0; p < (sizeof(cia->port) / sizeof(cia->port[0])); p++)
r6670r6671
663664
664665   if (cia->flag && !state)
665666   {
666      cia->flag = state;
667667      cia_issue_index(device);
668668   }
669
670   cia->flag = state;
669671}
670672
671673/*-------------------------------------------------
src/mess/machine/c1581.c
r6670r6671
1111
1212    TODO:
1313
14    - floppy access
15    - WD1770 DDEN = 0
14   - D81 sector translation
15   - WD1770 MO/RDY pin confusion
16   - ready signal polarity
17   - floppy access
1618    - fast serial
1719    - power LED
1820    - activity LED
r6670r6671
131133        PA0     SIDE0
132134        PA1     /RDY
133135        PA2     /MOTOR
134        PA3     SW1
135        PA4     SW1
136        PA3     DEV# SEL
137        PA4     DEV# SEL
136138        PA5     POWER LED
137139        PA6     ACT LED
138        PA7     /DISK CHANGE
140        PA7     /DISK CHNG
139141
140142    */
141143
r6670r6671
160162        PA0     SIDE0
161163        PA1     /RDY
162164        PA2     /MOTOR
163        PA3     SW1
164        PA4     SW1
165        PA3     DEV# SEL
166        PA4     DEV# SEL
165167        PA5     POWER LED
166168        PA6     ACT LED
167        PA7     /DISK CHANGE
169        PA7     /DISK CHNG
168170
169171    */
170172
r6670r6671
175177   wd17xx_set_side(c1581->wd1770, !BIT(data, 0));
176178
177179   /* motor */
178   floppy_drive_set_motor_state(c1581->image, motor ? 0 : FLOPPY_DRIVE_MOTOR_ON);
180   floppy_drive_set_motor_state(c1581->image, !motor);
179181   floppy_drive_set_ready_state(c1581->image, !motor, 1);
180182
181183   /* power led */
182184
183185   /* active led */
186
184187}
185188
186189static READ8_DEVICE_HANDLER( c1581_cia_pb_r )
r6670r6671
257260{
258261   DEVCB_CPU_INPUT_LINE(M6502_TAG, INPUT_LINE_IRQ0),
259262   DEVCB_NULL,
260   10, /* 1/10 second */
263   XTAL_16MHz/8,
261264   {
262265      { DEVCB_HANDLER(c1581_cia_pa_r), DEVCB_HANDLER(c1581_cia_pa_w) },
263266      { DEVCB_HANDLER(c1581_cia_pb_r), DEVCB_HANDLER(c1581_cia_pb_w) }
r6670r6671
360363   c1581->serial_bus = devtag_get_device(device->machine, config->serial_bus_tag);
361364   c1581->image = device_find_child_by_tag(device, FLOPPY_0);
362365
366   /* set floppy density */
367   wd17xx_set_density(c1581->wd1770, DEN_MFM_LO);
368
363369   /* register for state saving */
364370}
365371

Previous 15994 Revisions Next


© 1998-2018 The MESS Team