Previous 15994 Revisions Next

r7634 Wednesday 24th March, 2010 at 14:18:55 UTC by Curt Coder
[CONKORT] Patched out protection checks, tries to load something from disk now.
[src/mess/machine]conkort.c

src/mess/machine/conkort.c
r7633r7634
7272    Slow Controller
7373    ---------------
7474    - FD1791 HLD/HLT callbacks
75    - copy protection device
75    - copy protection device (sends sector header bytes to CPU? DDEN is serial clock? code checks for either $b6 or $f7)
76
77      06F8: ld   a,$2F               ; SEEK
78      06FA: out  ($BC),a
79      06FC: push af
80      06FD: push bc
81      06FE: ld   bc,$0724
82      0701: push bc
83      0702: ld   b,$07
84      0704: rr   a
85      0706: call $073F
86      073F: DB 7E         in   a,($7E)   ; PIO PORT B
87      0741: EE 08         xor  $08      ; DDEN
88      0743: D3 7E         out  ($7E),a
89      0745: EE 08         xor  $08
90      0747: D3 7E         out  ($7E),a
91      0749: DB 7E         in   a,($7E)
92      074B: 1F            rra
93      074C: 1F            rra
94      074D: 1F            rra
95      074E: CB 11         rl   c
96      0750: 79            ld   a,c
97      0751: C9            ret
98      0709: djnz $0703         <-- jumps to middle of instruction!
99      0703: rlca
100      0704: rr   a
101      0706: call $073F
102   
76103    - DS/DD SS/DS jumpers
77104    - S1-S5 jumpers
78105
r7633r7634
263290        0       SEL 0
264291        1       SEL 1
265292        2       SEL 2
266        3       MOT ON
293        3       _MOT ON
267294        4       SIDE
268295        5       _PRECOMP ON
269296        6       _WAIT ENABLE
r7633r7634
275302
276303   /* drive selection */
277304   if (BIT(data, 0)) wd17xx_set_drive(device, 0);
278   if (BIT(data, 1)) wd17xx_set_drive(device, 1);
305//   if (BIT(data, 1)) wd17xx_set_drive(device, 1);
279306//  if (BIT(data, 2)) wd17xx_set_drive(device, 2);
280307
281308   /* motor enable */
282   floppy_mon_w(conkort->image0, !BIT(data, 3));
283   floppy_mon_w(conkort->image1, !BIT(data, 3));
309   floppy_mon_w(conkort->image0, BIT(data, 3));
310   floppy_mon_w(conkort->image1, BIT(data, 3));
284311   floppy_drive_set_ready_state(conkort->image0, 1, 1);
285312   floppy_drive_set_ready_state(conkort->image1, 1, 1);
286313
287314   /* disk side selection */
288   wd17xx_set_side(device, BIT(data, 4));
315//   wd17xx_set_side(device, BIT(data, 4));
289316
290317   /* wait enable */
291318   conkort->wait_enable = BIT(data, 6);
r7633r7634
321348static READ8_DEVICE_HANDLER( slow_fdc_r )
322349{
323350   slow_t *conkort = get_safe_token_slow(device->owner);
324   UINT8 data = 0;
351   UINT8 data = 0xff;
325352
326353   switch (offset & 0x03)
327354   {
r7633r7634
338365      cpu_set_input_line(conkort->cpu, INPUT_LINE_HALT, ASSERT_LINE);
339366   }
340367
341   return data;
368   return data ^ 0xff;
342369}
343370
344371static WRITE8_DEVICE_HANDLER( slow_fdc_w )
345372{
346373   slow_t *conkort = get_safe_token_slow(device->owner);
347374
375   data ^= 0xff;
376
348377   switch (offset & 0x03)
349378   {
350379   case 0: wd17xx_command_w(device, 0, data); break;
r7633r7634
602631
603632   slow_t *conkort = get_safe_token_slow(device->owner);
604633
605   UINT8 data = 0;
634   UINT8 data = 4;
606635
607636   /* single/double sided drive */
608   data |= 0x01;
637//   data |= 0x01;
609638
610639   /* single/double density drive */
611640   data |= 0x02;
r7633r7634
615644
616645   /* head load */
617646//   data |= wd17xx_hdld_r(device) << 6;
647   data |= 0x40;
618648
619649   /* FDC interrupt request */
620650   data |= conkort->fdc_irq << 7;
r7633r7634
736766   slow_t *conkort = get_safe_token_slow(device->owner);
737767
738768   conkort->fdc_irq = state;
769   z80pio_pb_w(conkort->z80pio, 0, state << 7);
739770
740771   if (state)
741772   {
r7633r7634
884915   state_save_register_device_item(device, 0, conkort->fdc_irq);
885916   state_save_register_device_item(device, 0, conkort->fdc_drq);
886917   state_save_register_device_item(device, 0, conkort->wait_enable);
918
919   /* patch out protection checks */
920   UINT8 *rom = device->subregion("abc830")->base.u8;
921   rom[0x0718] = 0xff;
922   rom[0x072c] = 0xff;
923   rom[0x0336] = 0xff;
924   rom[0x00fa] = 0xff;
925   rom[0x0771] = 0xff;
926   rom[0x0788] = 0xff;
887927}
888928
889929/*-------------------------------------------------

Previous 15994 Revisions Next


© 1998-2018 The MESS Team