fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

rc759: Fix the video display height

The video display height was off by one in most modes.

+53 -47
+49 -45
src/arch/rc759/video.c
··· 5 5 /***************************************************************************** 6 6 * File name: src/arch/rc759/video.c * 7 7 * Created: 2012-06-29 by Hampa Hug <hampa@hampa.ch> * 8 - * Copyright: (C) 2012 Hampa Hug <hampa@hampa.ch> * 8 + * Copyright: (C) 2012-2025 Hampa Hug <hampa@hampa.ch> * 9 9 *****************************************************************************/ 10 10 11 11 /***************************************************************************** ··· 15 15 * * 16 16 * This program is distributed in the hope that it will be useful, but * 17 17 * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 19 * Public License for more details. * 20 20 *****************************************************************************/ 21 21 ··· 638 638 static 639 639 void e82730_dscmd_eof (e82730_t *crt, e82730_rowbuf_t *rb) 640 640 { 641 + #if DEBUG_E82730 >= 2 642 + sim_log_deb ("82730: DS CMD: EOF (%u)\n", crt->buf_y); 643 + #endif 644 + 641 645 crt->end_of_frame = 1; 646 + crt->strptr = e82730_get_mem32 (crt, crt->cbp + 34); 642 647 } 643 648 644 649 static ··· 1007 1012 static 1008 1013 void e82730_rowbuf_switch (e82730_t *crt) 1009 1014 { 1010 - e82730_rowbuf_t *rb; 1015 + e82730_rowbuf_t *rb0, *rb1; 1011 1016 1012 - rb = crt->rbp[0]; 1013 - crt->rbp[0] = crt->rbp[1]; 1014 - crt->rbp[1] = rb; 1017 + rb0 = crt->rbp[1]; 1018 + rb1 = crt->rbp[0]; 1015 1019 1016 - rb = crt->rbp[0]; 1020 + crt->rbp[0] = rb0; 1021 + crt->rbp[1] = rb1; 1017 1022 1018 - if (rb->fullrowdesc_cnt > 0) { 1019 - crt->mode_lines_per_row = rb->fullrowdesc[0] & 0x1f; 1020 - crt->blank_row = (rb->fullrowdesc[0] & 0x400) != 0; 1023 + crt->cur_row_idx = 0; 1024 + 1025 + if (rb0->fullrowdesc_cnt > 0) { 1026 + crt->mode_lines_per_row = rb0->fullrowdesc[0] & 0x1f; 1027 + rb0->lines_per_row = crt->mode_lines_per_row; 1028 + crt->blank_row = (rb0->fullrowdesc[0] & 0x400) != 0; 1021 1029 } 1022 1030 1023 - if (rb->fullrowdesc_cnt >= 5) { 1024 - crt->cursor_start[0] = (rb->fullrowdesc[4] >> 8) & 0x1f; 1025 - crt->cursor_stop[0] = rb->fullrowdesc[4] & 0x1f; 1031 + if (rb0->fullrowdesc_cnt >= 5) { 1032 + crt->cursor_start[0] = (rb0->fullrowdesc[4] >> 8) & 0x1f; 1033 + crt->cursor_stop[0] = rb0->fullrowdesc[4] & 0x1f; 1026 1034 } 1027 1035 1028 - if (rb->fullrowdesc_cnt >= 6) { 1029 - crt->cursor_start[1] = (rb->fullrowdesc[5] >> 8) & 0x1f; 1030 - crt->cursor_stop[1] = rb->fullrowdesc[5] & 0x1f; 1036 + if (rb0->fullrowdesc_cnt >= 6) { 1037 + crt->cursor_start[1] = (rb0->fullrowdesc[5] >> 8) & 0x1f; 1038 + crt->cursor_stop[1] = rb0->fullrowdesc[5] & 0x1f; 1031 1039 } 1032 1040 1033 - crt->rbp[0]->fullrowdesc_cnt = 0; 1041 + rb0->fullrowdesc_cnt = 0; 1034 1042 1035 - crt->rbp[1]->ready = 0; 1036 - crt->rbp[1]->cnt = 0; 1037 - crt->rbp[1]->fullrowdesc_cnt = 0; 1043 + rb1->ready = 0; 1044 + rb1->cnt = 0; 1045 + rb1->fullrowdesc_cnt = 0; 1046 + rb1->lines_per_row = crt->mode_lines_per_row; 1038 1047 } 1039 1048 1040 1049 static ··· 1061 1070 } 1062 1071 else if (crt->cur_line < crt->mode_vfldstp) { 1063 1072 if (crt->cur_line == crt->mode_vfldstrt) { 1073 + e82730_rowbuf_switch (crt); 1074 + 1064 1075 crt->cur_row = 0; 1065 - crt->cur_row_idx = 0; 1066 - 1067 1076 crt->buf_y = 0; 1068 - 1069 - e82730_rowbuf_switch (crt); 1070 1077 } 1071 1078 1072 1079 e82730_line (crt); 1073 1080 1074 1081 crt->cur_row_idx += 1; 1075 1082 1076 - if (crt->cur_row_idx > crt->mode_lines_per_row) { 1077 - crt->cur_row += 1; 1078 - crt->cur_row_idx = 0; 1079 - 1083 + if (crt->cur_row_idx > crt->rbp[0]->lines_per_row) { 1080 1084 e82730_rowbuf_switch (crt); 1081 1085 1082 - if (crt->cur_line == (crt->mode_vfldstp - 1)) { 1083 - crt->rbp[1]->ready = 1; 1084 - } 1086 + crt->cur_row += 1; 1085 1087 } 1086 - } 1087 - else if (crt->cur_line == crt->mode_vfldstp) { 1088 - crt->cur_row_idx = 0; 1089 - crt->end_of_frame = 0; 1090 - crt->strptr = e82730_get_mem32 (crt, crt->cbp + 34); 1091 - e82730_rowbuf_switch (crt); 1088 + 1089 + if (crt->cur_line == (crt->mode_vfldstp - 1)) { 1090 + crt->strptr = e82730_get_mem32 (crt, crt->cbp + 34); 1091 + crt->end_of_frame = 0; 1092 + } 1092 1093 } 1093 - else if (crt->cur_line <= (crt->mode_vfldstp + crt->mode_lines_per_row + 1)) { 1094 - if (crt->cur_row_idx == 0) { 1094 + else if (crt->cur_line < (crt->mode_vfldstp + crt->rbp[0]->lines_per_row)) { 1095 + if (crt->cur_line == crt->mode_vfldstp) { 1095 1096 e82730_rowbuf_switch (crt); 1097 + 1096 1098 crt->rbp[1]->ready = 1; 1097 1099 } 1098 1100 1099 - e82730_line (crt); 1101 + if (crt->rbp[0]->lines_per_row > 0) { 1102 + e82730_line (crt); 1100 1103 1101 - crt->cur_row_idx += 1; 1104 + crt->cur_row_idx += 1; 1102 1105 1103 - if (crt->cur_row_idx > crt->mode_lines_per_row) { 1104 - crt->cur_row += 1; 1105 - crt->cur_row_idx = 0; 1106 + if (crt->cur_row_idx > crt->rbp[0]->lines_per_row) { 1107 + crt->cur_row += 1; 1108 + crt->cur_row_idx = 0; 1109 + } 1106 1110 } 1107 1111 } 1108 1112 ··· 1156 1160 1157 1161 crt->rclk += crt->input_clock_mul * cnt; 1158 1162 1159 - ll = crt->input_clock_div * crt->mode_line_length; 1163 + ll = crt->input_clock_div * (crt->mode_line_length + 1); 1160 1164 1161 1165 while (crt->rclk >= ll) { 1162 1166 e82730_clock_line (crt);
+4 -2
src/arch/rc759/video.h
··· 5 5 /***************************************************************************** 6 6 * File name: src/arch/rc759/video.h * 7 7 * Created: 2012-06-29 by Hampa Hug <hampa@hampa.ch> * 8 - * Copyright: (C) 2012 Hampa Hug <hampa@hampa.ch> * 8 + * Copyright: (C) 2012-2025 Hampa Hug <hampa@hampa.ch> * 9 9 *****************************************************************************/ 10 10 11 11 /***************************************************************************** ··· 15 15 * * 16 16 * This program is distributed in the hope that it will be useful, but * 17 17 * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 19 * Public License for more details. * 20 20 *****************************************************************************/ 21 21 ··· 34 34 35 35 unsigned short fullrowdesc_cnt; 36 36 unsigned short fullrowdesc[7]; 37 + 38 + unsigned char lines_per_row; 37 39 } e82730_rowbuf_t; 38 40 39 41 typedef struct {