Previous 199869 Revisions Next

r22582 Saturday 27th April, 2013 at 22:26:47 UTC by hap
(moved tables to c files)
[src/mame/drivers]taitojc.c
[src/mame/includes]taitojc.h
[src/mame/video]taitojc.c

trunk/src/mame/includes/taitojc.h
r22581r22582
169169   void debug_dsp_command();
170170};
171171
172
173/*----------- defined in video/taitojc.c -----------*/
174
175void taitojc_clear_frame(running_machine &machine);
176void taitojc_render_polygons(running_machine &machine, UINT16 *polygon_fifo, int length);
177
178
179
180
181
182// lookup tables for densha de go analog controls/meters
183const int dendego_odometer_table[0x100] =
184{
185      0,    3,    7,   10,   14,   17,   21,   24,   28,   31,   34,   38,   41,   45,   48,   52,
186      55,   59,   62,   66,   69,   72,   76,   79,   83,   86,   90,   93,   97,  100,  105,  111,
187      116,  121,  126,  132,  137,  142,  147,  153,  158,  163,  168,  174,  179,  184,  189,  195,
188      200,  206,  211,  217,  222,  228,  233,  239,  244,  250,  256,  261,  267,  272,  278,  283,
189      289,  294,  300,  306,  311,  317,  322,  328,  333,  339,  344,  350,  356,  361,  367,  372,
190      378,  383,  389,  394,  400,  406,  412,  418,  424,  429,  435,  441,  447,  453,  459,  465,
191      471,  476,  482,  488,  494,  500,  505,  511,  516,  521,  526,  532,  537,  542,  547,  553,
192      558,  563,  568,  574,  579,  584,  589,  595,  600,  607,  613,  620,  627,  633,  640,  647,
193      653,  660,  667,  673,  680,  687,  693,  700,  705,  711,  716,  721,  726,  732,  737,  742,
194      747,  753,  758,  763,  768,  774,  779,  784,  789,  795,  800,  806,  812,  818,  824,  829,
195      835,  841,  847,  853,  859,  865,  871,  876,  882,  888,  894,  900,  906,  911,  917,  922,
196      928,  933,  939,  944,  950,  956,  961,  967,  972,  978,  983,  989,  994, 1000, 1005, 1011,
197   1016, 1021, 1026, 1032, 1037, 1042, 1047, 1053, 1058, 1063, 1068, 1074, 1079, 1084, 1089, 1095,
198   1100, 1107, 1113, 1120, 1127, 1133, 1140, 1147, 1153, 1160, 1167, 1173, 1180, 1187, 1193, 1200,
199   1203, 1206, 1209, 1212, 1216, 1219, 1222, 1225, 1228, 1231, 1234, 1238, 1241, 1244, 1247, 1250,
200   1253, 1256, 1259, 1262, 1266, 1269, 1272, 1275, 1278, 1281, 1284, 1288, 1291, 1294, 1297, 1300,
201};
202
203const int dendego_pressure_table[0x100] =
204{
205      0,    0,    0,    0,    5,   10,   14,   19,   24,   29,   33,   38,   43,   48,   52,   57,
206      62,   67,   71,   76,   81,   86,   90,   95,  100,  106,  112,  119,  125,  131,  138,  144,
207      150,  156,  162,  169,  175,  181,  188,  194,  200,  206,  212,  219,  225,  231,  238,  244,
208      250,  256,  262,  269,  275,  281,  288,  294,  300,  306,  312,  318,  324,  329,  335,  341,
209      347,  353,  359,  365,  371,  376,  382,  388,  394,  400,  407,  413,  420,  427,  433,  440,
210      447,  453,  460,  467,  473,  480,  487,  493,  500,  507,  514,  521,  529,  536,  543,  550,
211      557,  564,  571,  579,  586,  593,  600,  607,  614,  621,  629,  636,  643,  650,  657,  664,
212      671,  679,  686,  693,  700,  706,  712,  719,  725,  731,  738,  744,  750,  756,  762,  769,
213      775,  781,  788,  794,  800,  807,  814,  821,  829,  836,  843,  850,  857,  864,  871,  879,
214      886,  893,  900,  907,  914,  921,  929,  936,  943,  950,  957,  964,  971,  979,  986,  993,
215   1000, 1008, 1015, 1023, 1031, 1038, 1046, 1054, 1062, 1069, 1077, 1085, 1092, 1100, 1108, 1115,
216   1123, 1131, 1138, 1146, 1154, 1162, 1169, 1177, 1185, 1192, 1200, 1207, 1214, 1221, 1229, 1236,
217   1243, 1250, 1257, 1264, 1271, 1279, 1286, 1293, 1300, 1307, 1314, 1321, 1329, 1336, 1343, 1350,
218   1357, 1364, 1371, 1379, 1386, 1393, 1400, 1407, 1414, 1421, 1429, 1436, 1443, 1450, 1457, 1464,
219   1471, 1479, 1486, 1493, 1500, 1504, 1507, 1511, 1515, 1519, 1522, 1526, 1530, 1533, 1537, 1541,
220   1544, 1548, 1552, 1556, 1559, 1563, 1567, 1570, 1574, 1578, 1581, 1585, 1589, 1593, 1596, 1600,
221};
222
223const int dendego_brake_table[11] = { 0x00, 0x05, 0x1d, 0x35, 0x4d, 0x65, 0x7d, 0x95, 0xad, 0xc5, 0xd4 };
224
225// Mascon must always be in a defined state, Densha de Go 2 in particular returns black screen if the Mascon input is undefined
226const ioport_value dendego_mascon_table[6] = { 0x76, 0x67, 0x75, 0x57, 0x73, 0x37 };
trunk/src/mame/video/taitojc.c
r22581r22582
353353UINT32 taitojc_state::screen_update_dendego(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
354354{
355355   // update controller state in artwork
356   static const UINT8 dendego_mascon_table[6] = { 0x76, 0x67, 0x75, 0x57, 0x73, 0x37 };
357   static const UINT8 dendego_brake_table[11] = { 0x00, 0x05, 0x1d, 0x35, 0x4d, 0x65, 0x7d, 0x95, 0xad, 0xc5, 0xd4 };
358
356359   UINT8 btn = (ioport("BUTTONS")->read() & 0x77);
357360   int level;
358361   for (level = 5; level > 0; level--)
trunk/src/mame/drivers/taitojc.c
r22581r22582
388388#include "dendego.lh"
389389
390390
391// lookup tables for densha de go analog controls/meters
392static const int dendego_odometer_table[0x100] =
393{
394      0,    3,    7,   10,   14,   17,   21,   24,   28,   31,   34,   38,   41,   45,   48,   52,
395     55,   59,   62,   66,   69,   72,   76,   79,   83,   86,   90,   93,   97,  100,  105,  111,
396    116,  121,  126,  132,  137,  142,  147,  153,  158,  163,  168,  174,  179,  184,  189,  195,
397    200,  206,  211,  217,  222,  228,  233,  239,  244,  250,  256,  261,  267,  272,  278,  283,
398    289,  294,  300,  306,  311,  317,  322,  328,  333,  339,  344,  350,  356,  361,  367,  372,
399    378,  383,  389,  394,  400,  406,  412,  418,  424,  429,  435,  441,  447,  453,  459,  465,
400    471,  476,  482,  488,  494,  500,  505,  511,  516,  521,  526,  532,  537,  542,  547,  553,
401    558,  563,  568,  574,  579,  584,  589,  595,  600,  607,  613,  620,  627,  633,  640,  647,
402    653,  660,  667,  673,  680,  687,  693,  700,  705,  711,  716,  721,  726,  732,  737,  742,
403    747,  753,  758,  763,  768,  774,  779,  784,  789,  795,  800,  806,  812,  818,  824,  829,
404    835,  841,  847,  853,  859,  865,  871,  876,  882,  888,  894,  900,  906,  911,  917,  922,
405    928,  933,  939,  944,  950,  956,  961,  967,  972,  978,  983,  989,  994, 1000, 1005, 1011,
406   1016, 1021, 1026, 1032, 1037, 1042, 1047, 1053, 1058, 1063, 1068, 1074, 1079, 1084, 1089, 1095,
407   1100, 1107, 1113, 1120, 1127, 1133, 1140, 1147, 1153, 1160, 1167, 1173, 1180, 1187, 1193, 1200,
408   1203, 1206, 1209, 1212, 1216, 1219, 1222, 1225, 1228, 1231, 1234, 1238, 1241, 1244, 1247, 1250,
409   1253, 1256, 1259, 1262, 1266, 1269, 1272, 1275, 1278, 1281, 1284, 1288, 1291, 1294, 1297, 1300,
410};
411
412static const int dendego_pressure_table[0x100] =
413{
414      0,    0,    0,    0,    5,   10,   14,   19,   24,   29,   33,   38,   43,   48,   52,   57,
415     62,   67,   71,   76,   81,   86,   90,   95,  100,  106,  112,  119,  125,  131,  138,  144,
416    150,  156,  162,  169,  175,  181,  188,  194,  200,  206,  212,  219,  225,  231,  238,  244,
417    250,  256,  262,  269,  275,  281,  288,  294,  300,  306,  312,  318,  324,  329,  335,  341,
418    347,  353,  359,  365,  371,  376,  382,  388,  394,  400,  407,  413,  420,  427,  433,  440,
419    447,  453,  460,  467,  473,  480,  487,  493,  500,  507,  514,  521,  529,  536,  543,  550,
420    557,  564,  571,  579,  586,  593,  600,  607,  614,  621,  629,  636,  643,  650,  657,  664,
421    671,  679,  686,  693,  700,  706,  712,  719,  725,  731,  738,  744,  750,  756,  762,  769,
422    775,  781,  788,  794,  800,  807,  814,  821,  829,  836,  843,  850,  857,  864,  871,  879,
423    886,  893,  900,  907,  914,  921,  929,  936,  943,  950,  957,  964,  971,  979,  986,  993,
424   1000, 1008, 1015, 1023, 1031, 1038, 1046, 1054, 1062, 1069, 1077, 1085, 1092, 1100, 1108, 1115,
425   1123, 1131, 1138, 1146, 1154, 1162, 1169, 1177, 1185, 1192, 1200, 1207, 1214, 1221, 1229, 1236,
426   1243, 1250, 1257, 1264, 1271, 1279, 1286, 1293, 1300, 1307, 1314, 1321, 1329, 1336, 1343, 1350,
427   1357, 1364, 1371, 1379, 1386, 1393, 1400, 1407, 1414, 1421, 1429, 1436, 1443, 1450, 1457, 1464,
428   1471, 1479, 1486, 1493, 1500, 1504, 1507, 1511, 1515, 1519, 1522, 1526, 1530, 1533, 1537, 1541,
429   1544, 1548, 1552, 1556, 1559, 1563, 1567, 1570, 1574, 1578, 1581, 1585, 1589, 1593, 1596, 1600,
430};
431
432
391433// hmm, what is the pixel clock? let's assume it's same as the 68040
392434// 54MHz(/4) or 16MHz would make HTOTAL unrealistically short
393435#define PIXEL_CLOCK         (10000000*2)
r22581r22582
10821124   PORT_BIT( 0x10000000, IP_ACTIVE_LOW,  IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_device, set_cs_line)
10831125INPUT_PORTS_END
10841126
1127// Mascon must always be in a defined state, Densha de Go 2 in particular returns black screen if the Mascon input is undefined
1128static const ioport_value dendego_mascon_table[6] = { 0x76, 0x67, 0x75, 0x57, 0x73, 0x37 };
1129
10851130static INPUT_PORTS_START( dendego )
10861131   PORT_INCLUDE( common )
10871132

Previous 199869 Revisions Next


© 1997-2024 The MAME Team