src/mess/machine/amstrad.c
| r9042 | r9043 | |
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | |
| 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. ?!? */ |
| 308 | static TIMER_CALLBACK(amstrad_pc2_low) |
| 309 | { |
| 310 | i8255a_pc2_w( machine->device("ppi8255"), 0 ); |
| 311 | } |
| 312 | |
| 313 | |
| 306 | 314 | /*************************************************************************/ |
| 307 | 315 | /* KC Compact |
| 308 | 316 | |
| r9042 | r9043 | |
| 1015 | 1023 | } |
| 1016 | 1024 | |
| 1017 | 1025 | 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 ); |
| 1018 | 1029 | } |
| 1019 | 1030 | |
| 1020 | 1031 | |
| r9042 | r9043 | |
| 1034 | 1045 | } |
| 1035 | 1046 | |
| 1036 | 1047 | 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 ); |
| 1037 | 1051 | } |
| 1038 | 1052 | |
| 1039 | 1053 | |
| r9042 | r9043 | |
| 1070 | 1084 | asic.h_start = gate_array.line_ticks; |
| 1071 | 1085 | asic.de_start = 1; |
| 1072 | 1086 | |
| 1087 | /* Start of screen */ |
| 1073 | 1088 | if ( asic.vpos == 1 ) |
| 1074 | 1089 | { |
| 1075 | 1090 | asic.split_ma_base = 0x0000; |
| 1076 | 1091 | asic.split_ma_started = 0x0000; |
| 1077 | 1092 | } |
| 1093 | /* Start of split screen section */ |
| 1078 | 1094 | else if ( asic.enabled && asic.ram[0x2801] != 0 && asic.ram[0x2801] == asic.vpos - 1 ) |
| 1079 | 1095 | { |
| 1080 | 1096 | asic.split_ma_started = gate_array.ma; |
| r9042 | r9043 | |
| 2761 | 2777 | 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. |
| 2762 | 2778 | */ |
| 2763 | 2779 | |
| 2780 | |
| 2764 | 2781 | READ8_DEVICE_HANDLER (amstrad_ppi_portb_r) |
| 2765 | 2782 | { |
| 2766 | 2783 | int data = 0; |
| r9042 | r9043 | |
| 2792 | 2809 | data |= 0x02; |
| 2793 | 2810 | } |
| 2794 | 2811 | |
| 2812 | /* Schedule a write to PC2 */ |
| 2813 | timer_set( device->machine, attotime_zero, NULL, 0, amstrad_pc2_low ); |
| 2814 | |
| 2795 | 2815 | return data; |
| 2796 | 2816 | } |
| 2797 | 2817 | |