trunk/src/mame/video/antic.c
| r32014 | r32015 | |
| 19 | 19 | |
| 20 | 20 | #define LOG(x) do { if (VERBOSE) logerror x; } while (0) |
| 21 | 21 | |
| 22 | | // declaration of renderer functions |
| 23 | | #define ANTIC_RENDERER(name) void name(address_space &space, VIDEO *video) |
| 24 | | |
| 25 | | static ANTIC_RENDERER( antic_mode_0_xx ); |
| 26 | | static ANTIC_RENDERER( antic_mode_2_32 ); |
| 27 | | static ANTIC_RENDERER( antic_mode_2_40 ); |
| 28 | | static ANTIC_RENDERER( antic_mode_2_48 ); |
| 29 | | static ANTIC_RENDERER( antic_mode_3_32 ); |
| 30 | | static ANTIC_RENDERER( antic_mode_3_40 ); |
| 31 | | static ANTIC_RENDERER( antic_mode_3_48 ); |
| 32 | | static ANTIC_RENDERER( antic_mode_4_32 ); |
| 33 | | static ANTIC_RENDERER( antic_mode_4_40 ); |
| 34 | | static ANTIC_RENDERER( antic_mode_4_48 ); |
| 35 | | static ANTIC_RENDERER( antic_mode_5_32 ); |
| 36 | | static ANTIC_RENDERER( antic_mode_5_40 ); |
| 37 | | static ANTIC_RENDERER( antic_mode_5_48 ); |
| 38 | | static ANTIC_RENDERER( antic_mode_6_32 ); |
| 39 | | static ANTIC_RENDERER( antic_mode_6_40 ); |
| 40 | | static ANTIC_RENDERER( antic_mode_6_48 ); |
| 41 | | static ANTIC_RENDERER( antic_mode_7_32 ); |
| 42 | | static ANTIC_RENDERER( antic_mode_7_40 ); |
| 43 | | static ANTIC_RENDERER( antic_mode_7_48 ); |
| 44 | | static ANTIC_RENDERER( antic_mode_8_32 ); |
| 45 | | static ANTIC_RENDERER( antic_mode_8_40 ); |
| 46 | | static ANTIC_RENDERER( antic_mode_8_48 ); |
| 47 | | static ANTIC_RENDERER( antic_mode_9_32 ); |
| 48 | | static ANTIC_RENDERER( antic_mode_9_40 ); |
| 49 | | static ANTIC_RENDERER( antic_mode_9_48 ); |
| 50 | | static ANTIC_RENDERER( antic_mode_a_32 ); |
| 51 | | static ANTIC_RENDERER( antic_mode_a_40 ); |
| 52 | | static ANTIC_RENDERER( antic_mode_a_48 ); |
| 53 | | static ANTIC_RENDERER( antic_mode_b_32 ); |
| 54 | | static ANTIC_RENDERER( antic_mode_b_40 ); |
| 55 | | static ANTIC_RENDERER( antic_mode_b_48 ); |
| 56 | | static ANTIC_RENDERER( antic_mode_c_32 ); |
| 57 | | static ANTIC_RENDERER( antic_mode_c_40 ); |
| 58 | | static ANTIC_RENDERER( antic_mode_c_48 ); |
| 59 | | static ANTIC_RENDERER( antic_mode_d_32 ); |
| 60 | | static ANTIC_RENDERER( antic_mode_d_40 ); |
| 61 | | static ANTIC_RENDERER( antic_mode_d_48 ); |
| 62 | | static ANTIC_RENDERER( antic_mode_e_32 ); |
| 63 | | static ANTIC_RENDERER( antic_mode_e_40 ); |
| 64 | | static ANTIC_RENDERER( antic_mode_e_48 ); |
| 65 | | static ANTIC_RENDERER( antic_mode_f_32 ); |
| 66 | | static ANTIC_RENDERER( antic_mode_f_40 ); |
| 67 | | static ANTIC_RENDERER( antic_mode_f_48 ); |
| 68 | | static ANTIC_RENDERER( gtia_mode_1_32 ); |
| 69 | | static ANTIC_RENDERER( gtia_mode_1_40 ); |
| 70 | | static ANTIC_RENDERER( gtia_mode_1_48 ); |
| 71 | | static ANTIC_RENDERER( gtia_mode_2_32 ); |
| 72 | | static ANTIC_RENDERER( gtia_mode_2_40 ); |
| 73 | | static ANTIC_RENDERER( gtia_mode_2_48 ); |
| 74 | | static ANTIC_RENDERER( gtia_mode_3_32 ); |
| 75 | | static ANTIC_RENDERER( gtia_mode_3_40 ); |
| 76 | | static ANTIC_RENDERER( gtia_mode_3_48 ); |
| 77 | | |
| 78 | | |
| 79 | | |
| 80 | 22 | /************************************************************************* |
| 81 | 23 | * The priority tables tell which playfield, player or missile colors |
| 82 | 24 | * have precedence about the others, depending on the contents of the |
| r32014 | r32015 | |
| 1031 | 973 | } |
| 1032 | 974 | } |
| 1033 | 975 | |
| 1034 | | |
| 1035 | | static const atari_renderer_func renderer[2][19][5] = { |
| 1036 | | /* no playfield narrow normal wide */ |
| 1037 | | { |
| 1038 | | {antic_mode_0_xx,antic_mode_0_xx,antic_mode_0_xx,antic_mode_0_xx}, |
| 1039 | | {antic_mode_0_xx,antic_mode_0_xx,antic_mode_0_xx,antic_mode_0_xx}, |
| 1040 | | {antic_mode_0_xx,antic_mode_2_32,antic_mode_2_40,antic_mode_2_48}, |
| 1041 | | {antic_mode_0_xx,antic_mode_3_32,antic_mode_3_40,antic_mode_3_48}, |
| 1042 | | {antic_mode_0_xx,antic_mode_4_32,antic_mode_4_40,antic_mode_4_48}, |
| 1043 | | {antic_mode_0_xx,antic_mode_5_32,antic_mode_5_40,antic_mode_5_48}, |
| 1044 | | {antic_mode_0_xx,antic_mode_6_32,antic_mode_6_40,antic_mode_6_48}, |
| 1045 | | {antic_mode_0_xx,antic_mode_7_32,antic_mode_7_40,antic_mode_7_48}, |
| 1046 | | {antic_mode_0_xx,antic_mode_8_32,antic_mode_8_40,antic_mode_8_48}, |
| 1047 | | {antic_mode_0_xx,antic_mode_9_32,antic_mode_9_40,antic_mode_9_48}, |
| 1048 | | {antic_mode_0_xx,antic_mode_a_32,antic_mode_a_40,antic_mode_a_48}, |
| 1049 | | {antic_mode_0_xx,antic_mode_b_32,antic_mode_b_40,antic_mode_b_48}, |
| 1050 | | {antic_mode_0_xx,antic_mode_c_32,antic_mode_c_40,antic_mode_c_48}, |
| 1051 | | {antic_mode_0_xx,antic_mode_d_32,antic_mode_d_40,antic_mode_d_48}, |
| 1052 | | {antic_mode_0_xx,antic_mode_e_32,antic_mode_e_40,antic_mode_e_48}, |
| 1053 | | {antic_mode_0_xx,antic_mode_f_32,antic_mode_f_40,antic_mode_f_48}, |
| 1054 | | {antic_mode_0_xx, gtia_mode_1_32, gtia_mode_1_40, gtia_mode_1_48}, |
| 1055 | | {antic_mode_0_xx, gtia_mode_2_32, gtia_mode_2_40, gtia_mode_2_48}, |
| 1056 | | {antic_mode_0_xx, gtia_mode_3_32, gtia_mode_3_40, gtia_mode_3_48}, |
| 1057 | | }, |
| 1058 | | /* with hscrol enabled playfield width is +32 color clocks */ |
| 1059 | | /* no playfield narrow->normal normal->wide wide->wide */ |
| 1060 | | { |
| 1061 | | {antic_mode_0_xx,antic_mode_0_xx,antic_mode_0_xx,antic_mode_0_xx}, |
| 1062 | | {antic_mode_0_xx,antic_mode_0_xx,antic_mode_0_xx,antic_mode_0_xx}, |
| 1063 | | {antic_mode_0_xx,antic_mode_2_40,antic_mode_2_48,antic_mode_2_48}, |
| 1064 | | {antic_mode_0_xx,antic_mode_3_40,antic_mode_3_48,antic_mode_3_48}, |
| 1065 | | {antic_mode_0_xx,antic_mode_4_40,antic_mode_4_48,antic_mode_4_48}, |
| 1066 | | {antic_mode_0_xx,antic_mode_5_40,antic_mode_5_48,antic_mode_5_48}, |
| 1067 | | {antic_mode_0_xx,antic_mode_6_40,antic_mode_6_48,antic_mode_6_48}, |
| 1068 | | {antic_mode_0_xx,antic_mode_7_40,antic_mode_7_48,antic_mode_7_48}, |
| 1069 | | {antic_mode_0_xx,antic_mode_8_40,antic_mode_8_48,antic_mode_8_48}, |
| 1070 | | {antic_mode_0_xx,antic_mode_9_40,antic_mode_9_48,antic_mode_9_48}, |
| 1071 | | {antic_mode_0_xx,antic_mode_a_40,antic_mode_a_48,antic_mode_a_48}, |
| 1072 | | {antic_mode_0_xx,antic_mode_b_40,antic_mode_b_48,antic_mode_b_48}, |
| 1073 | | {antic_mode_0_xx,antic_mode_c_40,antic_mode_c_48,antic_mode_c_48}, |
| 1074 | | {antic_mode_0_xx,antic_mode_d_40,antic_mode_d_48,antic_mode_d_48}, |
| 1075 | | {antic_mode_0_xx,antic_mode_e_40,antic_mode_e_48,antic_mode_e_48}, |
| 1076 | | {antic_mode_0_xx,antic_mode_f_40,antic_mode_f_48,antic_mode_f_48}, |
| 1077 | | {antic_mode_0_xx, gtia_mode_1_40, gtia_mode_1_48, gtia_mode_1_48}, |
| 1078 | | {antic_mode_0_xx, gtia_mode_2_40, gtia_mode_2_48, gtia_mode_2_48}, |
| 1079 | | {antic_mode_0_xx, gtia_mode_3_40, gtia_mode_3_48, gtia_mode_3_48}, |
| 1080 | | } |
| 1081 | | }; |
| 1082 | | |
| 1083 | | void antic_render(address_space &space, int param1, int param2, int param3) |
| 1084 | | { |
| 1085 | | VIDEO *video = antic.video[antic.scanline]; |
| 1086 | | (*renderer[param1][param2][param3])(space, video); |
| 1087 | | } |
| 1088 | | |
| 1089 | 976 | /************* ANTIC mode 00: ********************************* |
| 1090 | 977 | * generate 1-8 empty scanlines |
| 1091 | 978 | ***************************************************************/ |
| 1092 | | static ANTIC_RENDERER( antic_mode_0_xx ) |
| 979 | static inline void antic_mode_0_xx(address_space &space, VIDEO *video) |
| 1093 | 980 | { |
| 1094 | 981 | PREPARE(); |
| 1095 | 982 | memset(dst, PBK, HWIDTH*4); |
| r32014 | r32015 | |
| 1115 | 1002 | POST_TXT(bytes); |
| 1116 | 1003 | } |
| 1117 | 1004 | |
| 1118 | | static ANTIC_RENDERER( antic_mode_2_32 ) |
| 1119 | | { |
| 1120 | | antic_mode_2(space, video, 32, 8); |
| 1121 | | } |
| 1122 | | static ANTIC_RENDERER( antic_mode_2_40 ) |
| 1123 | | { |
| 1124 | | antic_mode_2(space, video, 40, 4); |
| 1125 | | } |
| 1126 | | static ANTIC_RENDERER( antic_mode_2_48 ) |
| 1127 | | { |
| 1128 | | antic_mode_2(space, video, 48, 0); |
| 1129 | | } |
| 1130 | | |
| 1131 | 1005 | /************* ANTIC mode 03: ********************************* |
| 1132 | 1006 | * character mode 8x10:2 (32/40/48 byte per line) |
| 1133 | 1007 | ***************************************************************/ |
| r32014 | r32015 | |
| 1142 | 1016 | POST_TXT(bytes); |
| 1143 | 1017 | } |
| 1144 | 1018 | |
| 1145 | | static ANTIC_RENDERER( antic_mode_3_32 ) |
| 1146 | | { |
| 1147 | | antic_mode_3(space, video, 32, 8); |
| 1148 | | } |
| 1149 | | static ANTIC_RENDERER( antic_mode_3_40 ) |
| 1150 | | { |
| 1151 | | antic_mode_3(space, video, 40, 4); |
| 1152 | | } |
| 1153 | | static ANTIC_RENDERER( antic_mode_3_48 ) |
| 1154 | | { |
| 1155 | | antic_mode_3(space, video, 48, 0); |
| 1156 | | } |
| 1157 | | |
| 1158 | 1019 | /************* ANTIC mode 04: ********************************* |
| 1159 | 1020 | * character mode 8x8:4 multi color (32/40/48 byte per line) |
| 1160 | 1021 | ***************************************************************/ |
| r32014 | r32015 | |
| 1169 | 1030 | POST_TXT(bytes); |
| 1170 | 1031 | } |
| 1171 | 1032 | |
| 1172 | | static ANTIC_RENDERER( antic_mode_4_32 ) |
| 1173 | | { |
| 1174 | | antic_mode_4(space, video, 32, 8); |
| 1175 | | } |
| 1176 | | static ANTIC_RENDERER( antic_mode_4_40 ) |
| 1177 | | { |
| 1178 | | antic_mode_4(space, video, 40, 4); |
| 1179 | | } |
| 1180 | | static ANTIC_RENDERER( antic_mode_4_48 ) |
| 1181 | | { |
| 1182 | | antic_mode_4(space, video, 48, 0); |
| 1183 | | } |
| 1184 | | |
| 1185 | 1033 | /************* ANTIC mode 05: ********************************* |
| 1186 | 1034 | * character mode 8x16:4 multi color (32/40/48 byte per line) |
| 1187 | 1035 | ***************************************************************/ |
| r32014 | r32015 | |
| 1196 | 1044 | POST_TXT(bytes); |
| 1197 | 1045 | } |
| 1198 | 1046 | |
| 1199 | | static ANTIC_RENDERER( antic_mode_5_32 ) |
| 1200 | | { |
| 1201 | | antic_mode_5(space, video, 32, 8); |
| 1202 | | } |
| 1203 | | static ANTIC_RENDERER( antic_mode_5_40 ) |
| 1204 | | { |
| 1205 | | antic_mode_5(space, video, 40, 4); |
| 1206 | | } |
| 1207 | | static ANTIC_RENDERER( antic_mode_5_48 ) |
| 1208 | | { |
| 1209 | | antic_mode_5(space, video, 48, 0); |
| 1210 | | } |
| 1211 | | |
| 1212 | 1047 | /************* ANTIC mode 06: ********************************* |
| 1213 | 1048 | * character mode 16x8:5 single color (16/20/24 byte per line) |
| 1214 | 1049 | ***************************************************************/ |
| r32014 | r32015 | |
| 1223 | 1058 | POST_TXT(bytes); |
| 1224 | 1059 | } |
| 1225 | 1060 | |
| 1226 | | static ANTIC_RENDERER( antic_mode_6_32 ) |
| 1227 | | { |
| 1228 | | antic_mode_6(space, video, 16, 8); |
| 1229 | | } |
| 1230 | | static ANTIC_RENDERER( antic_mode_6_40 ) |
| 1231 | | { |
| 1232 | | antic_mode_6(space, video, 20, 4); |
| 1233 | | } |
| 1234 | | static ANTIC_RENDERER( antic_mode_6_48 ) |
| 1235 | | { |
| 1236 | | antic_mode_6(space, video, 24, 0); |
| 1237 | | } |
| 1238 | | |
| 1239 | 1061 | /************* ANTIC mode 07: ********************************* |
| 1240 | 1062 | * character mode 16x16:5 single color (16/20/24 byte per line) |
| 1241 | 1063 | ***************************************************************/ |
| r32014 | r32015 | |
| 1250 | 1072 | POST_TXT(bytes); |
| 1251 | 1073 | } |
| 1252 | 1074 | |
| 1253 | | static ANTIC_RENDERER( antic_mode_7_32 ) |
| 1254 | | { |
| 1255 | | antic_mode_7(space, video, 16, 8); |
| 1256 | | } |
| 1257 | | static ANTIC_RENDERER( antic_mode_7_40 ) |
| 1258 | | { |
| 1259 | | antic_mode_7(space, video, 20, 4); |
| 1260 | | } |
| 1261 | | static ANTIC_RENDERER( antic_mode_7_48 ) |
| 1262 | | { |
| 1263 | | antic_mode_7(space, video, 24, 0); |
| 1264 | | } |
| 1265 | | |
| 1266 | 1075 | /************* ANTIC mode 08: ********************************* |
| 1267 | 1076 | * graphics mode 8x8:4 (8/10/12 byte per line) |
| 1268 | 1077 | ***************************************************************/ |
| r32014 | r32015 | |
| 1277 | 1086 | POST_GFX(bytes); |
| 1278 | 1087 | } |
| 1279 | 1088 | |
| 1280 | | static ANTIC_RENDERER( antic_mode_8_32 ) |
| 1281 | | { |
| 1282 | | antic_mode_8(space, video, 8, 8); |
| 1283 | | } |
| 1284 | | static ANTIC_RENDERER( antic_mode_8_40 ) |
| 1285 | | { |
| 1286 | | antic_mode_8(space, video, 10, 4); |
| 1287 | | } |
| 1288 | | static ANTIC_RENDERER( antic_mode_8_48 ) |
| 1289 | | { |
| 1290 | | antic_mode_8(space, video, 12, 0); |
| 1291 | | } |
| 1292 | | |
| 1293 | 1089 | /************* ANTIC mode 09: ********************************* |
| 1294 | 1090 | * graphics mode 4x4:2 (8/10/12 byte per line) |
| 1295 | 1091 | ***************************************************************/ |
| r32014 | r32015 | |
| 1304 | 1100 | POST_GFX(bytes); |
| 1305 | 1101 | } |
| 1306 | 1102 | |
| 1307 | | static ANTIC_RENDERER( antic_mode_9_32 ) |
| 1308 | | { |
| 1309 | | antic_mode_9(space, video, 16, 8); |
| 1310 | | } |
| 1311 | | static ANTIC_RENDERER( antic_mode_9_40 ) |
| 1312 | | { |
| 1313 | | antic_mode_9(space, video, 20, 4); |
| 1314 | | } |
| 1315 | | static ANTIC_RENDERER( antic_mode_9_48 ) |
| 1316 | | { |
| 1317 | | antic_mode_9(space, video, 24, 0); |
| 1318 | | } |
| 1319 | | |
| 1320 | 1103 | /************* ANTIC mode 0A: ********************************* |
| 1321 | 1104 | * graphics mode 4x4:4 (16/20/24 byte per line) |
| 1322 | 1105 | ***************************************************************/ |
| r32014 | r32015 | |
| 1331 | 1114 | POST_GFX(bytes); |
| 1332 | 1115 | } |
| 1333 | 1116 | |
| 1334 | | static ANTIC_RENDERER( antic_mode_a_32 ) |
| 1335 | | { |
| 1336 | | antic_mode_a(space, video, 16, 8); |
| 1337 | | } |
| 1338 | | static ANTIC_RENDERER( antic_mode_a_40 ) |
| 1339 | | { |
| 1340 | | antic_mode_a(space, video, 20, 4); |
| 1341 | | } |
| 1342 | | static ANTIC_RENDERER( antic_mode_a_48 ) |
| 1343 | | { |
| 1344 | | antic_mode_a(space, video, 24, 0); |
| 1345 | | } |
| 1346 | | |
| 1347 | 1117 | /************* ANTIC mode 0B: ********************************* |
| 1348 | 1118 | * graphics mode 2x2:2 (16/20/24 byte per line) |
| 1349 | 1119 | ***************************************************************/ |
| r32014 | r32015 | |
| 1358 | 1128 | POST_GFX(bytes); |
| 1359 | 1129 | } |
| 1360 | 1130 | |
| 1361 | | static ANTIC_RENDERER( antic_mode_b_32 ) |
| 1362 | | { |
| 1363 | | antic_mode_b(space, video, 16, 8); |
| 1364 | | } |
| 1365 | | static ANTIC_RENDERER( antic_mode_b_40 ) |
| 1366 | | { |
| 1367 | | antic_mode_b(space, video, 20, 4); |
| 1368 | | } |
| 1369 | | static ANTIC_RENDERER( antic_mode_b_48 ) |
| 1370 | | { |
| 1371 | | antic_mode_b(space, video, 24, 0); |
| 1372 | | } |
| 1373 | | |
| 1374 | 1131 | /************* ANTIC mode 0C: ********************************* |
| 1375 | 1132 | * graphics mode 2x1:2 (16/20/24 byte per line) |
| 1376 | 1133 | ***************************************************************/ |
| r32014 | r32015 | |
| 1385 | 1142 | POST_GFX(bytes); |
| 1386 | 1143 | } |
| 1387 | 1144 | |
| 1388 | | static ANTIC_RENDERER( antic_mode_c_32 ) |
| 1389 | | { |
| 1390 | | antic_mode_c(space, video, 16, 8); |
| 1391 | | } |
| 1392 | | static ANTIC_RENDERER( antic_mode_c_40 ) |
| 1393 | | { |
| 1394 | | antic_mode_c(space, video, 20, 4); |
| 1395 | | } |
| 1396 | | static ANTIC_RENDERER( antic_mode_c_48 ) |
| 1397 | | { |
| 1398 | | antic_mode_c(space, video, 24, 0); |
| 1399 | | } |
| 1400 | | |
| 1401 | 1145 | /************* ANTIC mode 0D: ********************************* |
| 1402 | 1146 | * graphics mode 2x2:4 (32/40/48 byte per line) |
| 1403 | 1147 | ***************************************************************/ |
| r32014 | r32015 | |
| 1412 | 1156 | POST_GFX(bytes); |
| 1413 | 1157 | } |
| 1414 | 1158 | |
| 1415 | | static ANTIC_RENDERER( antic_mode_d_32 ) |
| 1416 | | { |
| 1417 | | antic_mode_d(space, video, 32, 8); |
| 1418 | | } |
| 1419 | | static ANTIC_RENDERER( antic_mode_d_40 ) |
| 1420 | | { |
| 1421 | | antic_mode_d(space, video, 40, 4); |
| 1422 | | } |
| 1423 | | static ANTIC_RENDERER( antic_mode_d_48 ) |
| 1424 | | { |
| 1425 | | antic_mode_d(space, video, 48, 0); |
| 1426 | | } |
| 1427 | | |
| 1428 | 1159 | /************* ANTIC mode 0E: ********************************* |
| 1429 | 1160 | * graphics mode 2x1:4 (32/40/48 byte per line) |
| 1430 | 1161 | ***************************************************************/ |
| r32014 | r32015 | |
| 1439 | 1170 | POST_GFX(bytes); |
| 1440 | 1171 | } |
| 1441 | 1172 | |
| 1442 | | static ANTIC_RENDERER( antic_mode_e_32 ) |
| 1443 | | { |
| 1444 | | antic_mode_e(space, video, 32, 8); |
| 1445 | | } |
| 1446 | | static ANTIC_RENDERER( antic_mode_e_40 ) |
| 1447 | | { |
| 1448 | | antic_mode_e(space, video, 40, 4); |
| 1449 | | } |
| 1450 | | static ANTIC_RENDERER( antic_mode_e_48 ) |
| 1451 | | { |
| 1452 | | antic_mode_e(space, video, 48, 0); |
| 1453 | | } |
| 1454 | | |
| 1455 | 1173 | /************* ANTIC mode 0F: ********************************* |
| 1456 | 1174 | * graphics mode 1x1:2 (32/40/48 byte per line) |
| 1457 | 1175 | ***************************************************************/ |
| r32014 | r32015 | |
| 1466 | 1184 | POST_GFX(bytes); |
| 1467 | 1185 | } |
| 1468 | 1186 | |
| 1469 | | static ANTIC_RENDERER( antic_mode_f_32 ) |
| 1470 | | { |
| 1471 | | antic_mode_f(space, video, 32, 8); |
| 1472 | | } |
| 1473 | | static ANTIC_RENDERER( antic_mode_f_40 ) |
| 1474 | | { |
| 1475 | | antic_mode_f(space, video, 40, 4); |
| 1476 | | } |
| 1477 | | static ANTIC_RENDERER( antic_mode_f_48 ) |
| 1478 | | { |
| 1479 | | antic_mode_f(space, video, 48, 0); |
| 1480 | | } |
| 1481 | | |
| 1482 | 1187 | /************* ANTIC mode 0F : GTIA mode 1 ******************** |
| 1483 | 1188 | * graphics mode 8x1:16 (32/40/48 byte per line) |
| 1484 | 1189 | ***************************************************************/ |
| r32014 | r32015 | |
| 1493 | 1198 | POST_GFX(bytes); |
| 1494 | 1199 | } |
| 1495 | 1200 | |
| 1496 | | static ANTIC_RENDERER( gtia_mode_1_32 ) |
| 1497 | | { |
| 1498 | | antic_mode_gtia1(space, video, 32, 8); |
| 1499 | | } |
| 1500 | | static ANTIC_RENDERER( gtia_mode_1_40 ) |
| 1501 | | { |
| 1502 | | antic_mode_gtia1(space, video, 40, 4); |
| 1503 | | } |
| 1504 | | static ANTIC_RENDERER( gtia_mode_1_48 ) |
| 1505 | | { |
| 1506 | | antic_mode_gtia1(space, video, 48, 0); |
| 1507 | | } |
| 1508 | | |
| 1509 | 1201 | /************* ANTIC mode 0F : GTIA mode 2 ******************** |
| 1510 | 1202 | * graphics mode 8x1:16 (32/40/48 byte per line) |
| 1511 | 1203 | ***************************************************************/ |
| r32014 | r32015 | |
| 1520 | 1212 | POST_GFX(bytes); |
| 1521 | 1213 | } |
| 1522 | 1214 | |
| 1523 | | static ANTIC_RENDERER( gtia_mode_2_32 ) |
| 1524 | | { |
| 1525 | | antic_mode_gtia2(space, video, 32, 8); |
| 1526 | | } |
| 1527 | | static ANTIC_RENDERER( gtia_mode_2_40 ) |
| 1528 | | { |
| 1529 | | antic_mode_gtia2(space, video, 40, 4); |
| 1530 | | } |
| 1531 | | static ANTIC_RENDERER( gtia_mode_2_48 ) |
| 1532 | | { |
| 1533 | | antic_mode_gtia2(space, video, 48, 0); |
| 1534 | | } |
| 1535 | | |
| 1536 | 1215 | /************* ANTIC mode 0F : GTIA mode 3 ******************** |
| 1537 | 1216 | * graphics mode 8x1:16 (32/40/48 byte per line) |
| 1538 | 1217 | ***************************************************************/ |
| r32014 | r32015 | |
| 1547 | 1226 | POST_GFX(bytes); |
| 1548 | 1227 | } |
| 1549 | 1228 | |
| 1550 | | static ANTIC_RENDERER( gtia_mode_3_32 ) |
| 1229 | |
| 1230 | /************* ANTIC render ********************/ |
| 1231 | |
| 1232 | void antic_render(address_space &space, int param1, int param2, int param3) |
| 1551 | 1233 | { |
| 1552 | | antic_mode_gtia3(space, video, 32, 8); |
| 1234 | VIDEO *video = antic.video[antic.scanline]; |
| 1235 | int add_bytes = 0, erase = 0; |
| 1236 | |
| 1237 | if (param3 == 0 || param2 <= 1) |
| 1238 | { |
| 1239 | antic_mode_0_xx(space, video); |
| 1240 | return; |
| 1241 | } |
| 1242 | |
| 1243 | if ((param3 == 1 || param3 == 2) && param1) |
| 1244 | param3++; |
| 1245 | |
| 1246 | switch (param3) |
| 1247 | { |
| 1248 | case 1: |
| 1249 | add_bytes = 32; |
| 1250 | erase = 8; |
| 1251 | break; |
| 1252 | case 2: |
| 1253 | add_bytes = 40; |
| 1254 | erase = 4; |
| 1255 | break; |
| 1256 | case 3: |
| 1257 | add_bytes = 48; |
| 1258 | erase = 0; |
| 1259 | break; |
| 1260 | } |
| 1261 | |
| 1262 | switch (param2) |
| 1263 | { |
| 1264 | case 0x02: |
| 1265 | antic_mode_2(space, video, add_bytes, erase); |
| 1266 | return; |
| 1267 | case 0x03: |
| 1268 | antic_mode_3(space, video, add_bytes, erase); |
| 1269 | return; |
| 1270 | case 0x04: |
| 1271 | antic_mode_4(space, video, add_bytes, erase); |
| 1272 | return; |
| 1273 | case 0x05: |
| 1274 | antic_mode_5(space, video, add_bytes, erase); |
| 1275 | return; |
| 1276 | case 0x06: |
| 1277 | antic_mode_6(space, video, add_bytes >> 1, erase); |
| 1278 | return; |
| 1279 | case 0x07: |
| 1280 | antic_mode_7(space, video, add_bytes >> 1, erase); |
| 1281 | return; |
| 1282 | case 0x08: |
| 1283 | antic_mode_8(space, video, add_bytes >> 2, erase); |
| 1284 | return; |
| 1285 | case 0x09: |
| 1286 | antic_mode_9(space, video, add_bytes >> 1, erase); |
| 1287 | return; |
| 1288 | case 0x0a: |
| 1289 | antic_mode_a(space, video, add_bytes >> 1, erase); |
| 1290 | return; |
| 1291 | case 0x0b: |
| 1292 | antic_mode_b(space, video, add_bytes >> 1, erase); |
| 1293 | return; |
| 1294 | case 0x0c: |
| 1295 | antic_mode_c(space, video, add_bytes >> 1, erase); |
| 1296 | return; |
| 1297 | case 0x0d: |
| 1298 | antic_mode_d(space, video, add_bytes, erase); |
| 1299 | return; |
| 1300 | case 0x0e: |
| 1301 | antic_mode_e(space, video, add_bytes, erase); |
| 1302 | return; |
| 1303 | case 0x0f: |
| 1304 | antic_mode_f(space, video, add_bytes, erase); |
| 1305 | return; |
| 1306 | case 0x10: |
| 1307 | antic_mode_gtia1(space, video, add_bytes, erase); |
| 1308 | return; |
| 1309 | case 0x11: |
| 1310 | antic_mode_gtia2(space, video, add_bytes, erase); |
| 1311 | return; |
| 1312 | case 0x12: |
| 1313 | antic_mode_gtia3(space, video, add_bytes, erase); |
| 1314 | return; |
| 1315 | default: |
| 1316 | return; |
| 1317 | } |
| 1553 | 1318 | } |
| 1554 | | static ANTIC_RENDERER( gtia_mode_3_40 ) |
| 1555 | | { |
| 1556 | | antic_mode_gtia3(space, video, 40, 4); |
| 1557 | | } |
| 1558 | | static ANTIC_RENDERER( gtia_mode_3_48 ) |
| 1559 | | { |
| 1560 | | antic_mode_gtia3(space, video, 48, 0); |
| 1561 | | } |
| 1562 | 1319 | |
| 1320 | |
| 1321 | |
| 1563 | 1322 | /************************************************************************ |
| 1564 | 1323 | * atari_vh_screenrefresh |
| 1565 | 1324 | * Refresh screen bitmap. |