Previous 15994 Revisions Next

r7596 Wednesday 17th March, 2010 at 13:58:30 UTC by Curt Coder
Added disk change handlers to the Commodore 1541 and 2040 family disk drives. "Edge of Disgrace" demo now loads on C64.
[docs]messnew.txt
[src/mess/machine]c1541.c c1551.c c1571.c c2040.c

src/mess/machine/c2040.c
r7595r7596
289289}
290290
291291/*-------------------------------------------------
292    on_disk_0_change - disk 0 change handler
293-------------------------------------------------*/
294
295static void on_disk_0_change(running_device *image)
296{
297   c2040_t *c2040 = get_safe_token(image->owner);
298
299   read_current_track(c2040, 0);
300}
301
302/*-------------------------------------------------
303    on_disk_1_change - disk 1 change handler
304-------------------------------------------------*/
305
306static void on_disk_1_change(running_device *image)
307{
308   c2040_t *c2040 = get_safe_token(image->owner);
309
310   read_current_track(c2040, 1);
311}
312
313/*-------------------------------------------------
292314    spindle_motor - spindle motor control
293315-------------------------------------------------*/
294316
r7595r7596
14951517   c2040->unit[0].image = device->subdevice(FLOPPY_0);
14961518   c2040->unit[1].image = device->subdevice(FLOPPY_1);
14971519
1520   /* install image callbacks */
1521   floppy_install_unload_proc(c2040->unit[0].image, on_disk_0_change);
1522   floppy_install_load_proc(c2040->unit[0].image, on_disk_0_change);
1523   floppy_install_unload_proc(c2040->unit[1].image, on_disk_1_change);
1524   floppy_install_load_proc(c2040->unit[1].image, on_disk_1_change);
1525
14981526   /* find GCR ROM */
14991527   const region_info *region = device->subregion(C4040_REGION);
15001528
src/mess/machine/c1541.c
r7595r7596
302302}
303303
304304/*-------------------------------------------------
305    on_disk_change - disk change handler
306-------------------------------------------------*/
307
308static void on_disk_change(running_device *image)
309{
310   c1541_t *c1541 = get_safe_token(image->owner);
311
312   read_current_track(c1541);
313}
314
315/*-------------------------------------------------
305316    spindle_motor - spindle motor control
306317-------------------------------------------------*/
307318
r7595r7596
11391150   c1541->bus = devtag_get_device(device->machine, config->bus_tag);
11401151   c1541->image = device->subdevice(FLOPPY_0);
11411152
1153   /* install image callbacks */
1154   floppy_install_unload_proc(c1541->image, on_disk_change);
1155   floppy_install_load_proc(c1541->image, on_disk_change);
1156
11421157   /* allocate track buffer */
11431158//  c1541->track_buffer = auto_alloc_array(device->machine, UINT8, G64_BUFFER_SIZE);
11441159
src/mess/machine/c1551.c
r7595r7596
184184   c1551->track_len = G64_DATA_START + ((c1551->track_buffer[1] << 8) | c1551->track_buffer[0]);
185185}
186186
187/*-------------------------------------------------
188    on_disk_change - disk change handler
189-------------------------------------------------*/
190
191static void on_disk_change(running_device *image)
192{
193   c1551_t *c1551 = get_safe_token(image->owner);
194
195   read_current_track(c1551);
196}
197
198/*-------------------------------------------------
199    spindle_motor - spindle motor control
200-------------------------------------------------*/
201
187202static void spindle_motor(c1551_t *c1551, int mtr)
188203{
189204   if (c1551->mtr != mtr)
r7595r7596
201216   }
202217}
203218
219/*-------------------------------------------------
220    step_motor - stepper motor control
221-------------------------------------------------*/
222
204223static void step_motor(c1551_t *c1551, int mtr, int stp)
205224{
206225   if (mtr && (c1551->stp != stp))
r7595r7596
228247   }
229248}
230249
250/*-------------------------------------------------
251    c1551_port_r - M6510T port read
252-------------------------------------------------*/
253
231254static UINT8 c1551_port_r( running_device *device, UINT8 direction )
232255{
233256   /*
r7595r7596
693716   c1551->tpi1 = device->subdevice(M6523_1_TAG);
694717   c1551->image = device->subdevice(FLOPPY_0);
695718
719   /* install image callbacks */
720   floppy_install_unload_proc(c1551->image, on_disk_change);
721   floppy_install_load_proc(c1551->image, on_disk_change);
722
696723   /* allocate data timer */
697724   c1551->bit_timer = timer_alloc(device->machine, bit_tick, (void *)device);
698725
src/mess/machine/c1571.c
r7595r7596
221221}
222222
223223/*-------------------------------------------------
224    on_disk_change - disk change handler
225-------------------------------------------------*/
226
227static void on_disk_change(running_device *image)
228{
229   c1571_t *c1571 = get_safe_token(image->owner);
230
231   read_current_track(c1571);
232}
233
234/*-------------------------------------------------
224235    set_side - set disk side
225236-------------------------------------------------*/
226237
r7595r7596
945956   c1571->serial_bus = devtag_get_device(device->machine, config->serial_bus_tag);
946957   c1571->image = device->subdevice(FLOPPY_0);
947958
959   /* install image callbacks */
960   floppy_install_unload_proc(c1571->image, on_disk_change);
961   floppy_install_load_proc(c1571->image, on_disk_change);
962
948963   /* allocate data timer */
949964   c1571->bit_timer = timer_alloc(device->machine, bit_tick, (void *)device);
950965
docs/messnew.txt
r7595r7596
2020
2121System Driver Changes:
2222----------------------
23(none)
2423
24- [MTX] Cleaned up driver and added cassette device. [Curt Coder]
2525
26- [TANDY2K] Implemented DMA mux register. [Curt Coder]
2627
28- [VICTOR9K] Connected MC6852 device. [Curt Coder]
29
30
31
2732Imgtool Changes:
2833----------------
2934(none)
r7595r7596
3237
3338Source Changes:
3439----------------
40
3541- [AMSTRAD CPC Family] Updated Hashes to GoodCPC V3.1415 [Cowering]
42
3643- [Thomson MO5] Added Hashes from GoodMO5 V3.1415 [Cowering]
44
3745- [Sega Pico] Updated Hashes to GoodPico V3.1415 [Cowering]
46
3847- [MTX512] Updated Hashes to GoodMTX V3.1415 [Cowering]
48
3949- [Nintendo Virtual Boy] Added Hashes from GoodVBoy V3.1415 [Cowering]
4050
51- Added preliminary emulation of the MC6852 SSDA. [Curt Coder]
52
53- Added preliminary emulation of the 64H156 gate array device
54  (used in C1541 et al). [Curt Coder]
55
56- Added disk change handlers to the Commodore 1541 and 2040 family
57  disk drives. "Edge of Disgrace" demo now loads on C64. [Curt Coder]
58 
59- [C2040] Added DOS 1 FDC ROM (parsed from disassembly). [Curt Coder]
60 
61- Refactored the MOS6530 device to use devcb. [Curt Coder]
62
63
64
41650.137
4266
4367New System Drivers Supported:

Previous 15994 Revisions Next


© 1998-2018 The MESS Team