src/mess/video/fmtowns.c
| r7607 | r7608 | |
| 876 | 876 | UINT16 colour; |
| 877 | 877 | int hzoom = 1; |
| 878 | 878 | int linesize; |
| 879 | UINT32 scroll; |
| 879 | 880 | |
| 880 | 881 | if(layer == 0) |
| 881 | 882 | linesize = towns_crtc_reg[20] * 4; |
| r7607 | r7608 | |
| 888 | 889 | { |
| 889 | 890 | if(!(towns_video_reg[0] & 0x10)) |
| 890 | 891 | return; |
| 891 | | off += (towns_crtc_reg[21]) << 2; // initial offset |
| 892 | if(!(towns_crtc_reg[28] & 0x10)) |
| 893 | off += (towns_crtc_reg[21]) << 2; // initial offset |
| 894 | else |
| 895 | { |
| 896 | scroll = ((towns_crtc_reg[21] & 0xfc00) << 2) | (((towns_crtc_reg[21] & 0x3ff) << 2)); |
| 897 | off += scroll; |
| 898 | } |
| 892 | 899 | if(towns_crtc_reg[27] & 0x0100) |
| 893 | 900 | hzoom = 2; |
| 894 | 901 | } |
| 895 | 902 | else |
| 896 | 903 | { |
| 897 | | off += (towns_crtc_reg[17]) << 2; // initial offset |
| 904 | if(!(towns_crtc_reg[28] & 0x20)) |
| 905 | off += (towns_crtc_reg[17]) << 2; // initial offset |
| 906 | else |
| 907 | { |
| 908 | scroll = ((towns_crtc_reg[17] & 0xfc00) << 2) | (((towns_crtc_reg[17] & 0x3ff) << 2)); |
| 909 | off += scroll; |
| 910 | } |
| 898 | 911 | if(towns_crtc_reg[27] & 0x0001) |
| 899 | 912 | hzoom = 2; |
| 900 | 913 | } |
| r7607 | r7608 | |
| 953 | 966 | UINT8 colour; |
| 954 | 967 | int hzoom = 1; |
| 955 | 968 | int linesize; |
| 969 | UINT32 scroll; |
| 956 | 970 | |
| 957 | 971 | if(towns_display_page_sel != 0) |
| 958 | 972 | off = 0x20000; |
| r7607 | r7608 | |
| 965 | 979 | { |
| 966 | 980 | if(!(towns_video_reg[0] & 0x10)) |
| 967 | 981 | return; |
| 968 | | off += towns_crtc_reg[21]; // initial offset |
| 982 | if(!(towns_crtc_reg[28] & 0x10)) |
| 983 | off += towns_crtc_reg[21]; // initial offset |
| 984 | else |
| 985 | { |
| 986 | scroll = ((towns_crtc_reg[21] & 0xfc00) << 2) | (((towns_crtc_reg[21] & 0x3ff) << 2)); |
| 987 | off += scroll; |
| 988 | } |
| 969 | 989 | if(towns_crtc_reg[27] & 0x0100) |
| 970 | 990 | hzoom = 2; |
| 971 | 991 | } |
| 972 | 992 | else |
| 973 | 993 | { |
| 974 | | off += towns_crtc_reg[17]; // initial offset |
| 994 | if(!(towns_crtc_reg[28] & 0x20)) |
| 995 | off += towns_crtc_reg[17]; // initial offset |
| 996 | else |
| 997 | { |
| 998 | scroll = ((towns_crtc_reg[17] & 0xfc00) << 2) | (((towns_crtc_reg[17] & 0x3ff) << 2)); |
| 999 | off += scroll; |
| 1000 | } |
| 975 | 1001 | if(towns_crtc_reg[27] & 0x0001) |
| 976 | 1002 | hzoom = 2; |
| 977 | 1003 | } |
| r7607 | r7608 | |
| 1021 | 1047 | UINT8 colour; |
| 1022 | 1048 | int hzoom = 1; |
| 1023 | 1049 | int linesize; |
| 1050 | UINT32 scroll; |
| 1024 | 1051 | |
| 1025 | 1052 | if(towns_display_page_sel != 0) |
| 1026 | 1053 | off = 0x20000; |
| r7607 | r7608 | |
| 1033 | 1060 | { |
| 1034 | 1061 | if(!(towns_video_reg[0] & 0x10)) |
| 1035 | 1062 | return; |
| 1036 | | off += towns_crtc_reg[21]; // initial offset |
| 1063 | if(!(towns_crtc_reg[28] & 0x10)) |
| 1064 | off += towns_crtc_reg[21]; // initial offset |
| 1065 | else |
| 1066 | { |
| 1067 | scroll = ((towns_crtc_reg[21] & 0xfc00)<<2) | (((towns_crtc_reg[21] & 0x3ff)<<2)); |
| 1068 | off += scroll; |
| 1069 | } |
| 1037 | 1070 | if(towns_crtc_reg[27] & 0x0100) |
| 1038 | 1071 | hzoom = 2; |
| 1039 | 1072 | } |
| 1040 | 1073 | else |
| 1041 | 1074 | { |
| 1042 | | off += towns_crtc_reg[17]; // initial offset |
| 1075 | if(!(towns_crtc_reg[28] & 0x20)) |
| 1076 | off += towns_crtc_reg[17]; // initial offset |
| 1077 | else |
| 1078 | { |
| 1079 | scroll = ((towns_crtc_reg[17] & 0xfc00)<<2) | (((towns_crtc_reg[17] & 0x3ff)<<2)); |
| 1080 | off += scroll; |
| 1081 | } |
| 1043 | 1082 | if(towns_crtc_reg[27] & 0x0001) |
| 1044 | 1083 | hzoom = 2; |
| 1045 | 1084 | } |
| r7607 | r7608 | |
| 1368 | 1407 | #endif*/ |
| 1369 | 1408 | |
| 1370 | 1409 | #ifdef CRTC_REG_DISP |
| 1371 | | popmessage("CRTC: %i %i %i %i %i %i %i %i %i\n%i %i %i %i | %i %i %i %i\n%i %i %i %i | %i %i %i %i\nZOOM: %04x\nVideo: %02x %02x\nText=%i Spr=%02x", |
| 1410 | popmessage("CRTC: %i %i %i %i %i %i %i %i %i\n%i %i %i %i | %i %i %i %i\n%04x %i %i %i | %04x %i %i %i\nZOOM: %04x\nVideo: %02x %02x\nText=%i Spr=%02x\nReg28=%04x", |
| 1372 | 1411 | towns_crtc_reg[0],towns_crtc_reg[1],towns_crtc_reg[2],towns_crtc_reg[3], |
| 1373 | 1412 | towns_crtc_reg[4],towns_crtc_reg[5],towns_crtc_reg[6],towns_crtc_reg[7], |
| 1374 | 1413 | towns_crtc_reg[8], |
| r7607 | r7608 | |
| 1376 | 1415 | towns_crtc_reg[13],towns_crtc_reg[14],towns_crtc_reg[15],towns_crtc_reg[16], |
| 1377 | 1416 | towns_crtc_reg[17],towns_crtc_reg[18],towns_crtc_reg[19],towns_crtc_reg[20], |
| 1378 | 1417 | towns_crtc_reg[21],towns_crtc_reg[22],towns_crtc_reg[23],towns_crtc_reg[24], |
| 1379 | | towns_crtc_reg[27],towns_video_reg[0],towns_video_reg[1],towns_tvram_enable,towns_sprite_reg[1] & 0x80); |
| 1418 | towns_crtc_reg[27],towns_video_reg[0],towns_video_reg[1],towns_tvram_enable,towns_sprite_reg[1] & 0x80, |
| 1419 | towns_crtc_reg[28]); |
| 1380 | 1420 | #endif |
| 1381 | 1421 | |
| 1382 | 1422 | return 0; |