Previous 15994 Revisions Next

r6647 Tuesday 15th December, 2009 at 17:29:19 UTC by Curt Coder
[C1581] Added mirroring and fixed CIA writes.
[src/mess/machine]c1581.c

src/mess/machine/c1581.c
r6646r6647
112112-------------------------------------------------*/
113113
114114static ADDRESS_MAP_START( c1581_map, ADDRESS_SPACE_PROGRAM, 8 )
115   AM_RANGE(0x0000, 0x1fff) AM_RAM
116   AM_RANGE(0x4000, 0x4010) AM_DEVREADWRITE(M8520_TAG, cia_r, cia_w)
117   AM_RANGE(0x6000, 0x6003) AM_DEVREADWRITE(WD1770_TAG, wd17xx_r, wd17xx_w)
115   AM_RANGE(0x0000, 0x1fff) AM_MIRROR(0x2000) AM_RAM
116   AM_RANGE(0x4000, 0x400f) AM_MIRROR(0x1ff0) AM_DEVREADWRITE(M8520_TAG, cia_r, cia_w)
117   AM_RANGE(0x6000, 0x6003) AM_MIRROR(0x1ffc) AM_DEVREADWRITE(WD1770_TAG, wd17xx_r, wd17xx_w)
118118   AM_RANGE(0x8000, 0xffff) AM_ROM AM_REGION("c1581", 0)
119119ADDRESS_MAP_END
120120
r6646r6647
139139
140140   */
141141
142   c1581_t *c1581 = get_safe_token(device);
142   c1581_t *c1581 = get_safe_token(device->owner);
143143   UINT8 data = 0;
144144
145145   /* ready */
r6646r6647
168168
169169   */
170170
171   c1581_t *c1581 = get_safe_token(device);
171   c1581_t *c1581 = get_safe_token(device->owner);
172172   int motor = BIT(data, 2);
173173
174174   /* side 0 */
r6646r6647
176176
177177   /* motor */
178178   floppy_drive_set_motor_state(c1581->image, motor ? 0 : FLOPPY_DRIVE_MOTOR_ON);
179   floppy_drive_set_ready_state(c1581->image, motor, 1);
179   floppy_drive_set_ready_state(c1581->image, !motor, 1);
180180
181181   /* power led */
182182
r6646r6647
200200
201201   */
202202
203   c1581_t *c1581 = get_safe_token(device);
203   c1581_t *c1581 = get_safe_token(device->owner);
204204   UINT8 data = 0;
205205
206206   /* data in */
r6646r6647
235235
236236   */
237237
238   c1581_t *c1581 = get_safe_token(device);
238   c1581_t *c1581 = get_safe_token(device->owner);
239239
240240   int data_out = BIT(data, 1);
241241   int clk_out = BIT(data, 3);
r6646r6647
283283   FLOPPY_OPTION( c1581, "d81", "Commodore 1581 Disk Image", basicdsk_identify_default, basicdsk_construct_default,
284284      HEADS([2])
285285      TRACKS([80])
286      SECTORS([20])
287      SECTOR_LENGTH([256])
288      FIRST_SECTOR_ID([0]))
286      SECTORS([10])
287      SECTOR_LENGTH([512])
288      FIRST_SECTOR_ID([1]))
289289FLOPPY_OPTIONS_END
290290
291291/*-------------------------------------------------

Previous 15994 Revisions Next


© 1998-2018 The MESS Team