Previous 15994 Revisions Next

r9043 Sunday 5th September, 2010 at 13:04:31 UTC by Wilbert Pol
[CPC Fomily] Add a small workaround to allow games that put 8255 Port B into mode 1 to keep reading the Vsync signal (among others).
[src/mess/machine]amstrad.c

src/mess/machine/amstrad.c
r9042r9043
303303}
304304
305305
306/* Some games set the 8255 to mode 1 and expect a strobe signal */
307/* on PC2. Apparently PC2 is always low on the CPC. ?!? */
308static TIMER_CALLBACK(amstrad_pc2_low)
309{
310   i8255a_pc2_w( machine->device("ppi8255"), 0 );
311}
312
313
306314/*************************************************************************/
307315/* KC Compact
308316
r9042r9043
10151023   }
10161024
10171025   gate_array.vsync = state ? 1 : 0;
1026
1027   /* Schedule a write to PC2 */
1028   timer_set( device->machine, attotime_zero, NULL, 0, amstrad_pc2_low );
10181029}
10191030
10201031
r9042r9043
10341045   }
10351046
10361047   gate_array.vsync = state ? 1 : 0;
1048
1049   /* Schedule a write to PC2 */
1050   timer_set( device->machine, attotime_zero, NULL, 0, amstrad_pc2_low );
10371051}
10381052
10391053
r9042r9043
10701084      asic.h_start = gate_array.line_ticks;
10711085      asic.de_start = 1;
10721086
1087      /* Start of screen */
10731088      if ( asic.vpos == 1 )
10741089      {
10751090         asic.split_ma_base = 0x0000;
10761091         asic.split_ma_started = 0x0000;
10771092      }
1093      /* Start of split screen section */
10781094      else if ( asic.enabled && asic.ram[0x2801] != 0 && asic.ram[0x2801] == asic.vpos - 1 )
10791095      {
10801096         asic.split_ma_started = gate_array.ma;
r9042r9043
27612777  On the CPC this can be used by a expansion device to report it's presence. "1" = device connected, "0" = device not connected. This is not always used by all expansion devices.
27622778*/
27632779
2780
27642781READ8_DEVICE_HANDLER (amstrad_ppi_portb_r)
27652782{
27662783   int data = 0;
r9042r9043
27922809         data |= 0x02;
27932810   }
27942811
2812   /* Schedule a write to PC2 */
2813   timer_set( device->machine, attotime_zero, NULL, 0, amstrad_pc2_low );
2814
27952815   return data;
27962816}
27972817

Previous 15994 Revisions Next


© 1998-2018 The MESS Team