src/mess/machine/amstrad.c
| r9020 | r9021 | |
| 126 | 126 | UINT8 addr_6845; /* We need these to store a shadow copy of R1 of the mc6845 */ |
| 127 | 127 | UINT8 horiz_disp; |
| 128 | 128 | UINT8 hscroll; |
| 129 | UINT8 de_start; /* flag to check if DE is been enabled this frame yet */ |
| 129 | 130 | |
| 130 | 131 | /* DMA */ |
| 131 | 132 | UINT8 dma_status; |
| r9020 | r9021 | |
| 990 | 991 | } |
| 991 | 992 | // CPC+/GX4000 DMA channels |
| 992 | 993 | amstrad_plus_handle_dma(device->machine); // a DMA command is handled at the leading edge of HSYNC (every 64us) |
| 994 | if(asic.de_start != 0) |
| 995 | asic.vpos++; |
| 993 | 996 | } |
| 994 | 997 | } |
| 995 | 998 | gate_array.hsync = state ? 1 : 0; |
| r9020 | r9021 | |
| 1007 | 1010 | |
| 1008 | 1011 | /* Start of new frame */ |
| 1009 | 1012 | gate_array.y = -1; |
| 1010 | | asic.vpos = 0; |
| 1013 | asic.vpos = 1; |
| 1014 | asic.de_start = 0; |
| 1011 | 1015 | } |
| 1012 | 1016 | |
| 1013 | 1017 | gate_array.vsync = state ? 1 : 0; |
| r9020 | r9021 | |
| 1025 | 1029 | |
| 1026 | 1030 | /* Start of new frame */ |
| 1027 | 1031 | gate_array.y = -1; |
| 1028 | | asic.vpos = 0; |
| 1032 | asic.vpos = 1; |
| 1033 | asic.de_start = 0; |
| 1029 | 1034 | } |
| 1030 | 1035 | |
| 1031 | 1036 | gate_array.vsync = state ? 1 : 0; |
| r9020 | r9021 | |
| 1044 | 1049 | gate_array.ma = mc6845_get_ma( mc6845 ); |
| 1045 | 1050 | gate_array.ra = mc6845_get_ra( mc6845 ); |
| 1046 | 1051 | amstrad_gate_array_get_video_data( device->machine ); |
| 1052 | asic.de_start = 1; |
| 1047 | 1053 | } |
| 1048 | 1054 | |
| 1049 | | if ( gate_array.de && ! state ) |
| 1050 | | { |
| 1051 | | asic.vpos++; |
| 1052 | | } |
| 1053 | | |
| 1054 | 1055 | gate_array.de = state ? 1 : 0; |
| 1055 | 1056 | } |
| 1056 | 1057 | |
| r9020 | r9021 | |
| 1067 | 1068 | gate_array.ma = mc6845_get_ma( mc6845 ); |
| 1068 | 1069 | gate_array.ra = mc6845_get_ra( mc6845 ); |
| 1069 | 1070 | asic.h_start = gate_array.line_ticks; |
| 1071 | asic.de_start = 1; |
| 1070 | 1072 | |
| 1071 | | if ( asic.vpos == 0 ) |
| 1073 | if ( asic.vpos == 1 ) |
| 1072 | 1074 | { |
| 1073 | 1075 | asic.split_ma_base = 0x0000; |
| 1074 | 1076 | asic.split_ma_started = 0x0000; |
| r9020 | r9021 | |
| 1090 | 1092 | { |
| 1091 | 1093 | asic.h_end = gate_array.line_ticks; |
| 1092 | 1094 | amstrad_plus_update_video_sprites( device->machine ); |
| 1093 | | asic.vpos++; |
| 1094 | 1095 | } |
| 1095 | 1096 | |
| 1096 | 1097 | gate_array.de = state ? 1 : 0; |