trunk/src/mame/video/taitoic.c
| r17691 | r17692 | |
| 632 | 632 | TILE_FLIPYX((attr & 0xc000) >> 14)); |
| 633 | 633 | } |
| 634 | 634 | |
| 635 | | static TILE_GET_INFO_DEVICE( pc080sn_get_bg_tile_info ) |
| 635 | TILE_GET_INFO_MEMBER(pc080sn_device::pc080sn_get_bg_tile_info) |
| 636 | 636 | { |
| 637 | | pc080sn_state *pc080sn = pc080sn_get_safe_token(device); |
| 638 | | common_get_pc080sn_bg_tile_info(device, tileinfo, tile_index, pc080sn->bg_ram[0], pc080sn->bg_gfx); |
| 637 | pc080sn_state *pc080sn = pc080sn_get_safe_token(this); |
| 638 | common_get_pc080sn_bg_tile_info(this, tileinfo, tile_index, pc080sn->bg_ram[0], pc080sn->bg_gfx); |
| 639 | 639 | } |
| 640 | 640 | |
| 641 | | static TILE_GET_INFO_DEVICE( pc080sn_get_fg_tile_info ) |
| 641 | TILE_GET_INFO_MEMBER(pc080sn_device::pc080sn_get_fg_tile_info) |
| 642 | 642 | { |
| 643 | | pc080sn_state *pc080sn = pc080sn_get_safe_token(device); |
| 644 | | common_get_pc080sn_fg_tile_info(device, tileinfo, tile_index, pc080sn->bg_ram[1], pc080sn->bg_gfx); |
| 643 | pc080sn_state *pc080sn = pc080sn_get_safe_token(this); |
| 644 | common_get_pc080sn_fg_tile_info(this, tileinfo, tile_index, pc080sn->bg_ram[1], pc080sn->bg_gfx); |
| 645 | 645 | } |
| 646 | 646 | |
| 647 | 647 | |
| r17691 | r17692 | |
| 969 | 969 | pc080sn->tilemap[1]->set_flip(flip); |
| 970 | 970 | } |
| 971 | 971 | |
| 972 | | /***************************************************************************** |
| 973 | | DEVICE INTERFACE |
| 974 | | *****************************************************************************/ |
| 972 | const device_type PC080SN = &device_creator<pc080sn_device>; |
| 975 | 973 | |
| 976 | | static DEVICE_START( pc080sn ) |
| 974 | pc080sn_device::pc080sn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 975 | : device_t(mconfig, PC080SN, "Taito PC080SN", tag, owner, clock) |
| 977 | 976 | { |
| 978 | | pc080sn_state *pc080sn = pc080sn_get_safe_token(device); |
| 979 | | const pc080sn_interface *intf = pc080sn_get_interface(device); |
| 977 | m_token = global_alloc_array_clear(UINT8, sizeof(pc080sn_state)); |
| 978 | } |
| 980 | 979 | |
| 980 | //------------------------------------------------- |
| 981 | // device_config_complete - perform any |
| 982 | // operations now that the configuration is |
| 983 | // complete |
| 984 | //------------------------------------------------- |
| 985 | |
| 986 | void pc080sn_device::device_config_complete() |
| 987 | { |
| 988 | } |
| 989 | |
| 990 | //------------------------------------------------- |
| 991 | // device_start - device-specific startup |
| 992 | //------------------------------------------------- |
| 993 | |
| 994 | void pc080sn_device::device_start() |
| 995 | { |
| 996 | pc080sn_state *pc080sn = pc080sn_get_safe_token(this); |
| 997 | const pc080sn_interface *intf = pc080sn_get_interface(this); |
| 998 | |
| 981 | 999 | /* use the given gfx set for bg tiles */ |
| 982 | 1000 | pc080sn->bg_gfx = intf->gfxnum; |
| 983 | 1001 | |
| r17691 | r17692 | |
| 988 | 1006 | |
| 989 | 1007 | if (!pc080sn->dblwidth) /* standard tilemaps */ |
| 990 | 1008 | { |
| 991 | | pc080sn->tilemap[0] = tilemap_create_device(device, pc080sn_get_bg_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 992 | | pc080sn->tilemap[1] = tilemap_create_device(device, pc080sn_get_fg_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 1009 | pc080sn->tilemap[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(pc080sn_device::pc080sn_get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 1010 | pc080sn->tilemap[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(pc080sn_device::pc080sn_get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 993 | 1011 | } |
| 994 | 1012 | else /* double width tilemaps */ |
| 995 | 1013 | { |
| 996 | | pc080sn->tilemap[0] = tilemap_create_device(device, pc080sn_get_bg_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 128, 64); |
| 997 | | pc080sn->tilemap[1] = tilemap_create_device(device, pc080sn_get_fg_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 128, 64); |
| 1014 | pc080sn->tilemap[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(pc080sn_device::pc080sn_get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64); |
| 1015 | pc080sn->tilemap[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(pc080sn_device::pc080sn_get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64); |
| 998 | 1016 | } |
| 999 | 1017 | |
| 1000 | 1018 | pc080sn->tilemap[0]->set_transparent_pen(0); |
| r17691 | r17692 | |
| 1011 | 1029 | pc080sn->tilemap[1]->set_scroll_rows(512); |
| 1012 | 1030 | } |
| 1013 | 1031 | |
| 1014 | | pc080sn->ram = auto_alloc_array_clear(device->machine(), UINT16, PC080SN_RAM_SIZE / 2); |
| 1032 | pc080sn->ram = auto_alloc_array_clear(machine(), UINT16, PC080SN_RAM_SIZE / 2); |
| 1015 | 1033 | |
| 1016 | 1034 | pc080sn->bg_ram[0] = pc080sn->ram + 0x0000 /2; |
| 1017 | 1035 | pc080sn->bg_ram[1] = pc080sn->ram + 0x8000 /2; |
| 1018 | 1036 | pc080sn->bgscroll_ram[0] = pc080sn->ram + 0x4000 /2; |
| 1019 | 1037 | pc080sn->bgscroll_ram[1] = pc080sn->ram + 0xc000 /2; |
| 1020 | 1038 | |
| 1021 | | device->save_pointer(NAME(pc080sn->ram), PC080SN_RAM_SIZE / 2); |
| 1022 | | device->save_item(NAME(pc080sn->ctrl)); |
| 1023 | | device->machine().save().register_postload(save_prepost_delegate(FUNC(pc080sn_restore_scroll), pc080sn)); |
| 1039 | save_pointer(NAME(pc080sn->ram), PC080SN_RAM_SIZE / 2); |
| 1040 | save_item(NAME(pc080sn->ctrl)); |
| 1041 | machine().save().register_postload(save_prepost_delegate(FUNC(pc080sn_restore_scroll), pc080sn)); |
| 1042 | |
| 1024 | 1043 | } |
| 1025 | 1044 | |
| 1026 | | |
| 1027 | 1045 | /***************************************************************************/ |
| 1028 | 1046 | /* */ |
| 1029 | 1047 | /* PC090OJ */ |
| r17691 | r17692 | |
| 1217 | 1235 | pc090oj->ctrl = 0; |
| 1218 | 1236 | } |
| 1219 | 1237 | |
| 1238 | const device_type PC090OJ = &device_creator<pc090oj_device>; |
| 1220 | 1239 | |
| 1240 | pc090oj_device::pc090oj_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1241 | : device_t(mconfig, PC090OJ, "Taito PC090OJ", tag, owner, clock) |
| 1242 | { |
| 1243 | m_token = global_alloc_array_clear(UINT8, sizeof(pc090oj_state)); |
| 1244 | } |
| 1245 | |
| 1246 | //------------------------------------------------- |
| 1247 | // device_config_complete - perform any |
| 1248 | // operations now that the configuration is |
| 1249 | // complete |
| 1250 | //------------------------------------------------- |
| 1251 | |
| 1252 | void pc090oj_device::device_config_complete() |
| 1253 | { |
| 1254 | } |
| 1255 | |
| 1256 | //------------------------------------------------- |
| 1257 | // device_start - device-specific startup |
| 1258 | //------------------------------------------------- |
| 1259 | |
| 1260 | void pc090oj_device::device_start() |
| 1261 | { |
| 1262 | DEVICE_START_NAME( pc090oj )(this); |
| 1263 | } |
| 1264 | |
| 1265 | //------------------------------------------------- |
| 1266 | // device_reset - device-specific reset |
| 1267 | //------------------------------------------------- |
| 1268 | |
| 1269 | void pc090oj_device::device_reset() |
| 1270 | { |
| 1271 | DEVICE_RESET_NAME( pc090oj )(this); |
| 1272 | } |
| 1273 | |
| 1274 | |
| 1221 | 1275 | /***************************************************************************/ |
| 1222 | 1276 | /* */ |
| 1223 | 1277 | /* TC0080VCO */ |
| r17691 | r17692 | |
| 1304 | 1358 | #endif |
| 1305 | 1359 | |
| 1306 | 1360 | |
| 1307 | | static TILE_GET_INFO_DEVICE( tc0080vco_get_bg0_tile_info ) |
| 1361 | TILE_GET_INFO_MEMBER(tc0080vco_device::tc0080vco_get_bg0_tile_info) |
| 1308 | 1362 | { |
| 1309 | | tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device); |
| 1363 | tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(this); |
| 1310 | 1364 | int color, tile; |
| 1311 | 1365 | |
| 1312 | 1366 | color = tc0080vco->bg0_ram_1[tile_index] & 0x001f; |
| r17691 | r17692 | |
| 1314 | 1368 | |
| 1315 | 1369 | tileinfo.category = 0; |
| 1316 | 1370 | |
| 1317 | | SET_TILE_INFO_DEVICE( |
| 1371 | SET_TILE_INFO_MEMBER( |
| 1318 | 1372 | tc0080vco->bg_gfx, |
| 1319 | 1373 | tile, |
| 1320 | 1374 | color, |
| 1321 | 1375 | TILE_FLIPYX((tc0080vco->bg0_ram_1[tile_index] & 0x00c0) >> 6)); |
| 1322 | 1376 | } |
| 1323 | 1377 | |
| 1324 | | static TILE_GET_INFO_DEVICE( tc0080vco_get_bg1_tile_info ) |
| 1378 | TILE_GET_INFO_MEMBER(tc0080vco_device::tc0080vco_get_bg1_tile_info) |
| 1325 | 1379 | { |
| 1326 | | tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device); |
| 1380 | tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(this); |
| 1327 | 1381 | int color, tile; |
| 1328 | 1382 | |
| 1329 | 1383 | color = tc0080vco->bg1_ram_1[tile_index] & 0x001f; |
| r17691 | r17692 | |
| 1331 | 1385 | |
| 1332 | 1386 | tileinfo.category = 0; |
| 1333 | 1387 | |
| 1334 | | SET_TILE_INFO_DEVICE( |
| 1388 | SET_TILE_INFO_MEMBER( |
| 1335 | 1389 | tc0080vco->bg_gfx, |
| 1336 | 1390 | tile, |
| 1337 | 1391 | color, |
| 1338 | 1392 | TILE_FLIPYX((tc0080vco->bg1_ram_1[tile_index] & 0x00c0) >> 6)); |
| 1339 | 1393 | } |
| 1340 | 1394 | |
| 1341 | | static TILE_GET_INFO_DEVICE( tc0080vco_get_tx_tile_info ) |
| 1395 | TILE_GET_INFO_MEMBER(tc0080vco_device::tc0080vco_get_tx_tile_info) |
| 1342 | 1396 | { |
| 1343 | | tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device); |
| 1397 | tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(this); |
| 1344 | 1398 | int tile; |
| 1345 | 1399 | |
| 1346 | 1400 | if (!tc0080vco->flipscreen) |
| r17691 | r17692 | |
| 1360 | 1414 | tileinfo.category = 0; |
| 1361 | 1415 | } |
| 1362 | 1416 | |
| 1363 | | SET_TILE_INFO_DEVICE( |
| 1417 | SET_TILE_INFO_MEMBER( |
| 1364 | 1418 | tc0080vco->tx_gfx, |
| 1365 | 1419 | tile, |
| 1366 | 1420 | 0x40, |
| r17691 | r17692 | |
| 1847 | 1901 | DEVICE INTERFACE |
| 1848 | 1902 | *****************************************************************************/ |
| 1849 | 1903 | |
| 1850 | | static DEVICE_START( tc0080vco ) |
| 1904 | |
| 1905 | const device_type TC0080VCO = &device_creator<tc0080vco_device>; |
| 1906 | |
| 1907 | tc0080vco_device::tc0080vco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1908 | : device_t(mconfig, TC0080VCO, "Taito TC0080VCO", tag, owner, clock) |
| 1851 | 1909 | { |
| 1852 | | tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(device); |
| 1853 | | const tc0080vco_interface *intf = tc0080vco_get_interface(device); |
| 1910 | m_token = global_alloc_array_clear(UINT8, sizeof(tc0080vco_state)); |
| 1911 | } |
| 1854 | 1912 | |
| 1913 | //------------------------------------------------- |
| 1914 | // device_config_complete - perform any |
| 1915 | // operations now that the configuration is |
| 1916 | // complete |
| 1917 | //------------------------------------------------- |
| 1918 | |
| 1919 | void tc0080vco_device::device_config_complete() |
| 1920 | { |
| 1921 | } |
| 1922 | |
| 1923 | //------------------------------------------------- |
| 1924 | // device_start - device-specific startup |
| 1925 | //------------------------------------------------- |
| 1926 | |
| 1927 | void tc0080vco_device::device_start() |
| 1928 | { |
| 1929 | tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(this); |
| 1930 | const tc0080vco_interface *intf = tc0080vco_get_interface(this); |
| 1931 | |
| 1855 | 1932 | /* use the given gfx sets for bg/tx tiles*/ |
| 1856 | 1933 | tc0080vco->bg_gfx = intf->gfxnum; |
| 1857 | 1934 | tc0080vco->tx_gfx = intf->txnum; |
| r17691 | r17692 | |
| 1861 | 1938 | tc0080vco->bg_flip_yoffs = intf->bg_flip_yoffs; /* usually -2 */ |
| 1862 | 1939 | tc0080vco->has_tx = intf->has_fg0; /* for debugging only */ |
| 1863 | 1940 | |
| 1864 | | tc0080vco->tilemap[0] = tilemap_create_device(device, tc0080vco_get_bg0_tile_info, TILEMAP_SCAN_ROWS, 16, 16, 64, 64); |
| 1865 | | tc0080vco->tilemap[1] = tilemap_create_device(device, tc0080vco_get_bg1_tile_info, TILEMAP_SCAN_ROWS, 16, 16, 64, 64); |
| 1941 | tc0080vco->tilemap[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0080vco_device::tc0080vco_get_bg0_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 64); |
| 1942 | tc0080vco->tilemap[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0080vco_device::tc0080vco_get_bg1_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 64); |
| 1866 | 1943 | |
| 1867 | 1944 | tc0080vco->tilemap[0]->set_transparent_pen(0); |
| 1868 | 1945 | tc0080vco->tilemap[1]->set_transparent_pen(0); |
| r17691 | r17692 | |
| 1876 | 1953 | tc0080vco->tilemap[0]->set_scroll_rows(512); |
| 1877 | 1954 | |
| 1878 | 1955 | /* Perform extra initialisations for text layer */ |
| 1879 | | tc0080vco->tilemap[2] = tilemap_create_device(device, tc0080vco_get_tx_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 1956 | tc0080vco->tilemap[2] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0080vco_device::tc0080vco_get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 1880 | 1957 | |
| 1881 | 1958 | tc0080vco->tilemap[2]->set_scrolldx(0, 0); |
| 1882 | 1959 | tc0080vco->tilemap[2]->set_scrolldy(48, -448); |
| 1883 | 1960 | |
| 1884 | 1961 | tc0080vco->tilemap[2]->set_transparent_pen(0); |
| 1885 | 1962 | |
| 1886 | | tc0080vco->ram = auto_alloc_array_clear(device->machine(), UINT16, TC0080VCO_RAM_SIZE / 2); |
| 1963 | tc0080vco->ram = auto_alloc_array_clear(machine(), UINT16, TC0080VCO_RAM_SIZE / 2); |
| 1887 | 1964 | |
| 1888 | 1965 | tc0080vco->char_ram = tc0080vco->ram + 0x00000 / 2; /* continues at +0x10000 */ |
| 1889 | 1966 | tc0080vco->tx_ram_0 = tc0080vco->ram + 0x01000 / 2; |
| r17691 | r17692 | |
| 1902 | 1979 | tc0080vco->scroll_ram = tc0080vco->ram + 0x20800 / 2; |
| 1903 | 1980 | |
| 1904 | 1981 | /* create the char set (gfx will then be updated dynamically from RAM) */ |
| 1905 | | device->machine().gfx[tc0080vco->tx_gfx] = auto_alloc(device->machine(), gfx_element(device->machine(), tc0080vco_charlayout, (UINT8 *)tc0080vco->char_ram, 64, 0)); |
| 1982 | machine().gfx[tc0080vco->tx_gfx] = auto_alloc(machine(), gfx_element(machine(), tc0080vco_charlayout, (UINT8 *)tc0080vco->char_ram, 64, 0)); |
| 1906 | 1983 | |
| 1907 | | device->save_pointer(NAME(tc0080vco->ram), TC0080VCO_RAM_SIZE / 2); |
| 1908 | | device->machine().save().register_postload(save_prepost_delegate(FUNC(tc0080vco_postload), tc0080vco)); |
| 1984 | save_pointer(NAME(tc0080vco->ram), TC0080VCO_RAM_SIZE / 2); |
| 1985 | machine().save().register_postload(save_prepost_delegate(FUNC(tc0080vco_postload), tc0080vco)); |
| 1909 | 1986 | } |
| 1910 | 1987 | |
| 1911 | 1988 | /***************************************************************************/ |
| r17691 | r17692 | |
| 1969 | 2046 | DEVICE HANDLERS |
| 1970 | 2047 | *****************************************************************************/ |
| 1971 | 2048 | |
| 1972 | | INLINE void common_get_bg0_tile_info( device_t *device, tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) |
| 2049 | INLINE void common_get_bg0_tile_info( running_machine &machine, device_t *device, tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) |
| 1973 | 2050 | { |
| 1974 | 2051 | tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); |
| 1975 | 2052 | int code, attr; |
| r17691 | r17692 | |
| 1986 | 2063 | attr = ram[2 * tile_index]; |
| 1987 | 2064 | } |
| 1988 | 2065 | |
| 1989 | | SET_TILE_INFO_DEVICE( |
| 2066 | SET_TILE_INFO( |
| 1990 | 2067 | gfxnum, |
| 1991 | 2068 | code, |
| 1992 | 2069 | (((attr * tc0100scn->bg_col_mult) + tc0100scn->bg0_colbank) & 0xff) + colbank, |
| 1993 | 2070 | TILE_FLIPYX((attr & 0xc000) >> 14)); |
| 1994 | 2071 | } |
| 1995 | 2072 | |
| 1996 | | INLINE void common_get_bg1_tile_info( device_t *device, tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) |
| 2073 | INLINE void common_get_bg1_tile_info( running_machine &machine, device_t *device, tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) |
| 1997 | 2074 | { |
| 1998 | 2075 | tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); |
| 1999 | 2076 | int code, attr; |
| r17691 | r17692 | |
| 2010 | 2087 | attr = ram[2 * tile_index]; |
| 2011 | 2088 | } |
| 2012 | 2089 | |
| 2013 | | SET_TILE_INFO_DEVICE( |
| 2090 | SET_TILE_INFO( |
| 2014 | 2091 | gfxnum, |
| 2015 | 2092 | code, |
| 2016 | 2093 | (((attr * tc0100scn->bg_col_mult) + tc0100scn->bg1_colbank) & 0xff) + colbank, |
| 2017 | 2094 | TILE_FLIPYX((attr & 0xc000) >> 14)); |
| 2018 | 2095 | } |
| 2019 | 2096 | |
| 2020 | | INLINE void common_get_tx_tile_info( device_t *device, tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) |
| 2097 | INLINE void common_get_tx_tile_info( running_machine &machine, device_t *device, tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) |
| 2021 | 2098 | { |
| 2022 | 2099 | tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); |
| 2023 | 2100 | int attr = ram[tile_index]; |
| 2024 | 2101 | |
| 2025 | | SET_TILE_INFO_DEVICE( |
| 2102 | SET_TILE_INFO( |
| 2026 | 2103 | gfxnum, |
| 2027 | 2104 | attr & 0xff, |
| 2028 | 2105 | ((((attr >> 6) & 0xfc) * tc0100scn->tx_col_mult + (tc0100scn->tx_colbank << 2)) & 0x3ff) + colbank * 4, |
| 2029 | 2106 | TILE_FLIPYX((attr & 0xc000) >> 14)); |
| 2030 | 2107 | } |
| 2031 | 2108 | |
| 2032 | | static TILE_GET_INFO_DEVICE( tc0100scn_get_bg_tile_info ) |
| 2109 | TILE_GET_INFO_MEMBER(tc0100scn_device::tc0100scn_get_bg_tile_info) |
| 2033 | 2110 | { |
| 2034 | | tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); |
| 2035 | | common_get_bg0_tile_info(device, tileinfo, tile_index, tc0100scn->bg_ram, tc0100scn->bg_gfx, tc0100scn->colbank, tc0100scn->dblwidth); |
| 2111 | tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(this); |
| 2112 | common_get_bg0_tile_info(machine(), this, tileinfo, tile_index, tc0100scn->bg_ram, tc0100scn->bg_gfx, tc0100scn->colbank, tc0100scn->dblwidth); |
| 2036 | 2113 | } |
| 2037 | 2114 | |
| 2038 | | static TILE_GET_INFO_DEVICE( tc0100scn_get_fg_tile_info ) |
| 2115 | TILE_GET_INFO_MEMBER(tc0100scn_device::tc0100scn_get_fg_tile_info) |
| 2039 | 2116 | { |
| 2040 | | tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); |
| 2041 | | common_get_bg1_tile_info(device, tileinfo, tile_index, tc0100scn->fg_ram, tc0100scn->bg_gfx, tc0100scn->colbank, tc0100scn->dblwidth); |
| 2117 | tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(this); |
| 2118 | common_get_bg1_tile_info(machine(), this, tileinfo, tile_index, tc0100scn->fg_ram, tc0100scn->bg_gfx, tc0100scn->colbank, tc0100scn->dblwidth); |
| 2042 | 2119 | } |
| 2043 | 2120 | |
| 2044 | | static TILE_GET_INFO_DEVICE( tc0100scn_get_tx_tile_info ) |
| 2121 | TILE_GET_INFO_MEMBER(tc0100scn_device::tc0100scn_get_tx_tile_info) |
| 2045 | 2122 | { |
| 2046 | | tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); |
| 2047 | | common_get_tx_tile_info(device, tileinfo, tile_index, tc0100scn->tx_ram, tc0100scn->tx_gfx, tc0100scn->colbank, tc0100scn->dblwidth); |
| 2123 | tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(this); |
| 2124 | common_get_tx_tile_info(machine(), this, tileinfo, tile_index, tc0100scn->tx_ram, tc0100scn->tx_gfx, tc0100scn->colbank, tc0100scn->dblwidth); |
| 2048 | 2125 | } |
| 2049 | 2126 | |
| 2050 | 2127 | static const gfx_layout tc0100scn_charlayout = |
| r17691 | r17692 | |
| 2411 | 2488 | return (tc0100scn->ctrl[6] & 0x8) >> 3; |
| 2412 | 2489 | } |
| 2413 | 2490 | |
| 2414 | | /***************************************************************************** |
| 2415 | | DEVICE INTERFACE |
| 2416 | | *****************************************************************************/ |
| 2491 | const device_type TC0100SCN = &device_creator<tc0100scn_device>; |
| 2417 | 2492 | |
| 2418 | | static DEVICE_START( tc0100scn ) |
| 2493 | tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 2494 | : device_t(mconfig, TC0100SCN, "Taito TC0100SCN", tag, owner, clock) |
| 2419 | 2495 | { |
| 2420 | | tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); |
| 2421 | | const tc0100scn_interface *intf = tc0100scn_get_interface(device); |
| 2496 | m_token = global_alloc_array_clear(UINT8, sizeof(tc0100scn_state)); |
| 2497 | } |
| 2498 | |
| 2499 | //------------------------------------------------- |
| 2500 | // device_config_complete - perform any |
| 2501 | // operations now that the configuration is |
| 2502 | // complete |
| 2503 | //------------------------------------------------- |
| 2504 | |
| 2505 | void tc0100scn_device::device_config_complete() |
| 2506 | { |
| 2507 | } |
| 2508 | |
| 2509 | //------------------------------------------------- |
| 2510 | // device_start - device-specific startup |
| 2511 | //------------------------------------------------- |
| 2512 | |
| 2513 | void tc0100scn_device::device_start() |
| 2514 | { |
| 2515 | tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(this); |
| 2516 | const tc0100scn_interface *intf = tc0100scn_get_interface(this); |
| 2422 | 2517 | int xd, yd; |
| 2423 | 2518 | |
| 2424 | | tc0100scn->screen = device->machine().device<screen_device>(intf->screen); |
| 2519 | tc0100scn->screen = machine().device<screen_device>(intf->screen); |
| 2425 | 2520 | |
| 2426 | 2521 | /* Set up clipping for multi-TC0100SCN games. We assume |
| 2427 | 2522 | this code won't ever affect single screen games: |
| r17691 | r17692 | |
| 2435 | 2530 | tc0100scn->tx_gfx = intf->txnum; |
| 2436 | 2531 | |
| 2437 | 2532 | /* Single width versions */ |
| 2438 | | tc0100scn->tilemap[0][0] = tilemap_create_device(device, tc0100scn_get_bg_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 2439 | | tc0100scn->tilemap[1][0] = tilemap_create_device(device, tc0100scn_get_fg_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 2440 | | tc0100scn->tilemap[2][0] = tilemap_create_device(device, tc0100scn_get_tx_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 2533 | tc0100scn->tilemap[0][0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::tc0100scn_get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 2534 | tc0100scn->tilemap[1][0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::tc0100scn_get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 2535 | tc0100scn->tilemap[2][0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::tc0100scn_get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 2441 | 2536 | |
| 2442 | 2537 | /* Double width versions */ |
| 2443 | | tc0100scn->tilemap[0][1] = tilemap_create_device(device, tc0100scn_get_bg_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 128, 64); |
| 2444 | | tc0100scn->tilemap[1][1] = tilemap_create_device(device, tc0100scn_get_fg_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 128, 64); |
| 2445 | | tc0100scn->tilemap[2][1] = tilemap_create_device(device, tc0100scn_get_tx_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 128, 32); |
| 2538 | tc0100scn->tilemap[0][1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::tc0100scn_get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64); |
| 2539 | tc0100scn->tilemap[1][1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::tc0100scn_get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64); |
| 2540 | tc0100scn->tilemap[2][1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0100scn_device::tc0100scn_get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 32); |
| 2446 | 2541 | |
| 2447 | 2542 | tc0100scn->tilemap[0][0]->set_transparent_pen(0); |
| 2448 | 2543 | tc0100scn->tilemap[1][0]->set_transparent_pen(0); |
| r17691 | r17692 | |
| 2491 | 2586 | tc0100scn->bg_col_mult = 1; /* multiplier for when bg gfx != 4bpp */ |
| 2492 | 2587 | tc0100scn->tx_col_mult = 1; /* multiplier needed when bg gfx is 6bpp */ |
| 2493 | 2588 | |
| 2494 | | if (device->machine().gfx[intf->gfxnum]->granularity() == 2) /* Yuyugogo, Yesnoj */ |
| 2589 | if (machine().gfx[intf->gfxnum]->granularity() == 2) /* Yuyugogo, Yesnoj */ |
| 2495 | 2590 | tc0100scn->bg_col_mult = 8; |
| 2496 | 2591 | |
| 2497 | | if (device->machine().gfx[intf->gfxnum]->granularity() == 0x40) /* Undrfire */ |
| 2592 | if (machine().gfx[intf->gfxnum]->granularity() == 0x40) /* Undrfire */ |
| 2498 | 2593 | tc0100scn->tx_col_mult = 4; |
| 2499 | 2594 | |
| 2500 | | //logerror("TC0100SCN bg gfx granularity %04x: multiplier %04x\n", device->machine().gfx[intf->gfxnum]->granularity(), tc0100scn->tx_col_mult); |
| 2595 | //logerror("TC0100SCN bg gfx granularity %04x: multiplier %04x\n", machine().gfx[intf->gfxnum]->granularity(), tc0100scn->tx_col_mult); |
| 2501 | 2596 | |
| 2502 | | tc0100scn->ram = auto_alloc_array_clear(device->machine(), UINT16, TC0100SCN_RAM_SIZE / 2); |
| 2597 | tc0100scn->ram = auto_alloc_array_clear(machine(), UINT16, TC0100SCN_RAM_SIZE / 2); |
| 2503 | 2598 | |
| 2504 | 2599 | tc0100scn_set_layer_ptrs(tc0100scn); |
| 2505 | 2600 | |
| 2506 | | tc0100scn_set_colbanks(device, 0, 0, 0); /* standard values, only Wgp & multiscreen games change them */ |
| 2601 | tc0100scn_set_colbanks(this, 0, 0, 0); /* standard values, only Wgp & multiscreen games change them */ |
| 2507 | 2602 | /* we call this here, so that they can be modified at VIDEO_START*/ |
| 2508 | 2603 | |
| 2509 | 2604 | /* create the char set (gfx will then be updated dynamically from RAM) */ |
| 2510 | | device->machine().gfx[tc0100scn->tx_gfx] = auto_alloc(device->machine(), gfx_element(device->machine(), tc0100scn_charlayout, (UINT8 *)tc0100scn->char_ram, 64, 0)); |
| 2605 | machine().gfx[tc0100scn->tx_gfx] = auto_alloc(machine(), gfx_element(machine(), tc0100scn_charlayout, (UINT8 *)tc0100scn->char_ram, 64, 0)); |
| 2511 | 2606 | |
| 2512 | | device->save_pointer(NAME(tc0100scn->ram), TC0100SCN_RAM_SIZE / 2); |
| 2513 | | device->save_item(NAME(tc0100scn->ctrl)); |
| 2514 | | device->save_item(NAME(tc0100scn->dblwidth)); |
| 2515 | | device->save_item(NAME(tc0100scn->gfxbank)); |
| 2516 | | device->machine().save().register_postload(save_prepost_delegate(FUNC(tc0100scn_postload), tc0100scn)); |
| 2607 | save_pointer(NAME(tc0100scn->ram), TC0100SCN_RAM_SIZE / 2); |
| 2608 | save_item(NAME(tc0100scn->ctrl)); |
| 2609 | save_item(NAME(tc0100scn->dblwidth)); |
| 2610 | save_item(NAME(tc0100scn->gfxbank)); |
| 2611 | machine().save().register_postload(save_prepost_delegate(FUNC(tc0100scn_postload), tc0100scn)); |
| 2517 | 2612 | } |
| 2518 | 2613 | |
| 2614 | //------------------------------------------------- |
| 2615 | // device_reset - device-specific reset |
| 2616 | //------------------------------------------------- |
| 2519 | 2617 | |
| 2520 | | static DEVICE_RESET( tc0100scn ) |
| 2618 | void tc0100scn_device::device_reset() |
| 2521 | 2619 | { |
| 2522 | | tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(device); |
| 2620 | tc0100scn_state *tc0100scn = tc0100scn_get_safe_token(this); |
| 2523 | 2621 | int i; |
| 2524 | 2622 | |
| 2525 | 2623 | tc0100scn->dblwidth = 0; |
| r17691 | r17692 | |
| 2528 | 2626 | |
| 2529 | 2627 | for (i = 0; i < 8; i++) |
| 2530 | 2628 | tc0100scn->ctrl[i] = 0; |
| 2531 | | |
| 2532 | 2629 | } |
| 2533 | 2630 | |
| 2631 | |
| 2632 | |
| 2534 | 2633 | /***************************************************************************/ |
| 2535 | 2634 | /* */ |
| 2536 | 2635 | /* TC0280GRD / TC0430GRW */ |
| r17691 | r17692 | |
| 2573 | 2672 | DEVICE HANDLERS |
| 2574 | 2673 | *****************************************************************************/ |
| 2575 | 2674 | |
| 2576 | | static TILE_GET_INFO_DEVICE( tc0280grd_get_tile_info ) |
| 2675 | TILE_GET_INFO_MEMBER(tc0280grd_device::tc0280grd_get_tile_info) |
| 2577 | 2676 | { |
| 2578 | | tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(device); |
| 2677 | tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(this); |
| 2579 | 2678 | int attr = tc0280grd->ram[tile_index]; |
| 2580 | | SET_TILE_INFO_DEVICE( |
| 2679 | SET_TILE_INFO_MEMBER( |
| 2581 | 2680 | tc0280grd->gfxnum, |
| 2582 | 2681 | attr & 0x3fff, |
| 2583 | 2682 | ((attr & 0xc000) >> 14) + tc0280grd->base_color, |
| r17691 | r17692 | |
| 2678 | 2777 | zoom_draw(device, bitmap, cliprect, xoffset, yoffset, priority, 1); |
| 2679 | 2778 | } |
| 2680 | 2779 | |
| 2681 | | /***************************************************************************** |
| 2682 | | DEVICE INTERFACE |
| 2683 | | *****************************************************************************/ |
| 2780 | const device_type TC0280GRD = &device_creator<tc0280grd_device>; |
| 2684 | 2781 | |
| 2685 | | static DEVICE_START( tc0280grd ) |
| 2782 | tc0280grd_device::tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 2783 | : device_t(mconfig, TC0280GRD, "Taito TC0280GRD & TC0430GRW", tag, owner, clock) |
| 2686 | 2784 | { |
| 2687 | | tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(device); |
| 2688 | | const tc0280grd_interface *intf = tc0280grd_get_interface(device); |
| 2785 | m_token = global_alloc_array_clear(UINT8, sizeof(tc0280grd_state)); |
| 2786 | } |
| 2689 | 2787 | |
| 2788 | //------------------------------------------------- |
| 2789 | // device_config_complete - perform any |
| 2790 | // operations now that the configuration is |
| 2791 | // complete |
| 2792 | //------------------------------------------------- |
| 2793 | |
| 2794 | void tc0280grd_device::device_config_complete() |
| 2795 | { |
| 2796 | } |
| 2797 | |
| 2798 | //------------------------------------------------- |
| 2799 | // device_start - device-specific startup |
| 2800 | //------------------------------------------------- |
| 2801 | |
| 2802 | void tc0280grd_device::device_start() |
| 2803 | { |
| 2804 | tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(this); |
| 2805 | const tc0280grd_interface *intf = tc0280grd_get_interface(this); |
| 2806 | |
| 2690 | 2807 | tc0280grd->gfxnum = intf->gfxnum; |
| 2691 | 2808 | |
| 2692 | | tc0280grd->tilemap = tilemap_create_device(device, tc0280grd_get_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 2809 | tc0280grd->tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0280grd_device::tc0280grd_get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 2693 | 2810 | tc0280grd->tilemap->set_transparent_pen(0); |
| 2694 | 2811 | |
| 2695 | | tc0280grd->ram = auto_alloc_array(device->machine(), UINT16, TC0280GRD_RAM_SIZE / 2); |
| 2812 | tc0280grd->ram = auto_alloc_array(machine(), UINT16, TC0280GRD_RAM_SIZE / 2); |
| 2696 | 2813 | |
| 2697 | | device->save_pointer(NAME(tc0280grd->ram), TC0280GRD_RAM_SIZE / 2); |
| 2698 | | device->save_item(NAME(tc0280grd->ctrl)); |
| 2814 | save_pointer(NAME(tc0280grd->ram), TC0280GRD_RAM_SIZE / 2); |
| 2815 | save_item(NAME(tc0280grd->ctrl)); |
| 2699 | 2816 | } |
| 2700 | 2817 | |
| 2701 | | static DEVICE_RESET( tc0280grd ) |
| 2818 | //------------------------------------------------- |
| 2819 | // device_reset - device-specific reset |
| 2820 | //------------------------------------------------- |
| 2821 | |
| 2822 | void tc0280grd_device::device_reset() |
| 2702 | 2823 | { |
| 2703 | | tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(device); |
| 2824 | tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(this); |
| 2704 | 2825 | int i; |
| 2705 | 2826 | |
| 2706 | 2827 | for (i = 0; i < 8; i++) |
| 2707 | 2828 | tc0280grd->ctrl[i] = 0; |
| 2708 | | |
| 2709 | 2829 | } |
| 2710 | 2830 | |
| 2831 | |
| 2711 | 2832 | /***************************************************************************/ |
| 2712 | 2833 | /* */ |
| 2713 | 2834 | /* TC0360PRI */ |
| r17691 | r17692 | |
| 2778 | 2899 | |
| 2779 | 2900 | } |
| 2780 | 2901 | |
| 2902 | const device_type TC0360PRI = &device_creator<tc0360pri_device>; |
| 2903 | |
| 2904 | tc0360pri_device::tc0360pri_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 2905 | : device_t(mconfig, TC0360PRI, "Taito TC0360PRI", tag, owner, clock) |
| 2906 | { |
| 2907 | m_token = global_alloc_array_clear(UINT8, sizeof(tc0360pri_state)); |
| 2908 | } |
| 2909 | |
| 2910 | //------------------------------------------------- |
| 2911 | // device_config_complete - perform any |
| 2912 | // operations now that the configuration is |
| 2913 | // complete |
| 2914 | //------------------------------------------------- |
| 2915 | |
| 2916 | void tc0360pri_device::device_config_complete() |
| 2917 | { |
| 2918 | } |
| 2919 | |
| 2920 | //------------------------------------------------- |
| 2921 | // device_start - device-specific startup |
| 2922 | //------------------------------------------------- |
| 2923 | |
| 2924 | void tc0360pri_device::device_start() |
| 2925 | { |
| 2926 | DEVICE_START_NAME( tc0360pri )(this); |
| 2927 | } |
| 2928 | |
| 2929 | //------------------------------------------------- |
| 2930 | // device_reset - device-specific reset |
| 2931 | //------------------------------------------------- |
| 2932 | |
| 2933 | void tc0360pri_device::device_reset() |
| 2934 | { |
| 2935 | DEVICE_RESET_NAME( tc0360pri )(this); |
| 2936 | } |
| 2937 | |
| 2781 | 2938 | /***************************************************************************/ |
| 2782 | 2939 | /* */ |
| 2783 | 2940 | /* TC0480SCP */ |
| r17691 | r17692 | |
| 2836 | 2993 | *****************************************************************************/ |
| 2837 | 2994 | |
| 2838 | 2995 | |
| 2839 | | INLINE void common_get_tc0480bg_tile_info( device_t *device, tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum ) |
| 2996 | INLINE void common_get_tc0480bg_tile_info( running_machine &machine, device_t *device, tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum ) |
| 2840 | 2997 | { |
| 2841 | 2998 | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); |
| 2842 | 2999 | int code = ram[2 * tile_index + 1] & 0x7fff; |
| 2843 | 3000 | int attr = ram[2 * tile_index]; |
| 2844 | | SET_TILE_INFO_DEVICE( |
| 3001 | SET_TILE_INFO( |
| 2845 | 3002 | gfxnum, |
| 2846 | 3003 | code, |
| 2847 | 3004 | (attr & 0xff) + tc0480scp->tile_colbase, |
| 2848 | 3005 | TILE_FLIPYX((attr & 0xc000) >> 14)); |
| 2849 | 3006 | } |
| 2850 | 3007 | |
| 2851 | | INLINE void common_get_tc0480tx_tile_info( device_t *device, tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum ) |
| 3008 | INLINE void common_get_tc0480tx_tile_info( running_machine &machine, device_t *device, tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum ) |
| 2852 | 3009 | { |
| 2853 | 3010 | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); |
| 2854 | 3011 | int attr = ram[tile_index]; |
| 2855 | | SET_TILE_INFO_DEVICE( |
| 3012 | SET_TILE_INFO( |
| 2856 | 3013 | gfxnum, |
| 2857 | 3014 | attr & 0xff, |
| 2858 | 3015 | ((attr & 0x3f00) >> 8) + tc0480scp->tile_colbase, |
| 2859 | 3016 | TILE_FLIPYX((attr & 0xc000) >> 14)); |
| 2860 | 3017 | } |
| 2861 | 3018 | |
| 2862 | | static TILE_GET_INFO_DEVICE( tc0480scp_get_bg0_tile_info ) |
| 3019 | TILE_GET_INFO_MEMBER(tc0480scp_device::tc0480scp_get_bg0_tile_info) |
| 2863 | 3020 | { |
| 2864 | | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); |
| 2865 | | common_get_tc0480bg_tile_info(device, tileinfo, tile_index, tc0480scp->bg_ram[0], tc0480scp->bg_gfx ); |
| 3021 | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(this); |
| 3022 | common_get_tc0480bg_tile_info(machine(), this, tileinfo, tile_index, tc0480scp->bg_ram[0], tc0480scp->bg_gfx ); |
| 2866 | 3023 | } |
| 2867 | 3024 | |
| 2868 | | static TILE_GET_INFO_DEVICE( tc0480scp_get_bg1_tile_info ) |
| 3025 | TILE_GET_INFO_MEMBER(tc0480scp_device::tc0480scp_get_bg1_tile_info) |
| 2869 | 3026 | { |
| 2870 | | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); |
| 2871 | | common_get_tc0480bg_tile_info(device, tileinfo, tile_index, tc0480scp->bg_ram[1], tc0480scp->bg_gfx); |
| 3027 | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(this); |
| 3028 | common_get_tc0480bg_tile_info(machine(), this, tileinfo, tile_index, tc0480scp->bg_ram[1], tc0480scp->bg_gfx); |
| 2872 | 3029 | } |
| 2873 | 3030 | |
| 2874 | | static TILE_GET_INFO_DEVICE( tc0480scp_get_bg2_tile_info ) |
| 3031 | TILE_GET_INFO_MEMBER(tc0480scp_device::tc0480scp_get_bg2_tile_info) |
| 2875 | 3032 | { |
| 2876 | | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); |
| 2877 | | common_get_tc0480bg_tile_info(device, tileinfo, tile_index, tc0480scp->bg_ram[2], tc0480scp->bg_gfx); |
| 3033 | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(this); |
| 3034 | common_get_tc0480bg_tile_info(machine(), this, tileinfo, tile_index, tc0480scp->bg_ram[2], tc0480scp->bg_gfx); |
| 2878 | 3035 | } |
| 2879 | 3036 | |
| 2880 | | static TILE_GET_INFO_DEVICE( tc0480scp_get_bg3_tile_info ) |
| 3037 | TILE_GET_INFO_MEMBER(tc0480scp_device::tc0480scp_get_bg3_tile_info) |
| 2881 | 3038 | { |
| 2882 | | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); |
| 2883 | | common_get_tc0480bg_tile_info(device, tileinfo, tile_index, tc0480scp->bg_ram[3], tc0480scp->bg_gfx); |
| 3039 | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(this); |
| 3040 | common_get_tc0480bg_tile_info(machine(), this, tileinfo, tile_index, tc0480scp->bg_ram[3], tc0480scp->bg_gfx); |
| 2884 | 3041 | } |
| 2885 | 3042 | |
| 2886 | | static TILE_GET_INFO_DEVICE( tc0480scp_get_tx_tile_info ) |
| 3043 | TILE_GET_INFO_MEMBER(tc0480scp_device::tc0480scp_get_tx_tile_info) |
| 2887 | 3044 | { |
| 2888 | | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); |
| 2889 | | common_get_tc0480tx_tile_info(device, tileinfo, tile_index, tc0480scp->tx_ram, tc0480scp->tx_gfx); |
| 3045 | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(this); |
| 3046 | common_get_tc0480tx_tile_info(machine(), this, tileinfo, tile_index, tc0480scp->tx_ram, tc0480scp->tx_gfx); |
| 2890 | 3047 | } |
| 2891 | 3048 | |
| 2892 | 3049 | static const gfx_layout tc0480scp_charlayout = |
| r17691 | r17692 | |
| 3623 | 3780 | tc0480scp->tilemap[4][1]->set_scrolly(0, -reg); |
| 3624 | 3781 | } |
| 3625 | 3782 | |
| 3626 | | /***************************************************************************** |
| 3627 | | DEVICE INTERFACE |
| 3628 | | *****************************************************************************/ |
| 3629 | 3783 | |
| 3630 | | static DEVICE_START( tc0480scp ) |
| 3784 | |
| 3785 | const device_type TC0480SCP = &device_creator<tc0480scp_device>; |
| 3786 | |
| 3787 | tc0480scp_device::tc0480scp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 3788 | : device_t(mconfig, TC0480SCP, "Taito TC0480SCP", tag, owner, clock) |
| 3631 | 3789 | { |
| 3632 | | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); |
| 3633 | | const tc0480scp_interface *intf = tc0480scp_get_interface(device); |
| 3790 | m_token = global_alloc_array_clear(UINT8, sizeof(tc0480scp_state)); |
| 3791 | } |
| 3792 | |
| 3793 | //------------------------------------------------- |
| 3794 | // device_config_complete - perform any |
| 3795 | // operations now that the configuration is |
| 3796 | // complete |
| 3797 | //------------------------------------------------- |
| 3798 | |
| 3799 | void tc0480scp_device::device_config_complete() |
| 3800 | { |
| 3801 | } |
| 3802 | |
| 3803 | //------------------------------------------------- |
| 3804 | // device_start - device-specific startup |
| 3805 | //------------------------------------------------- |
| 3806 | |
| 3807 | void tc0480scp_device::device_start() |
| 3808 | { |
| 3809 | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(this); |
| 3810 | const tc0480scp_interface *intf = tc0480scp_get_interface(this); |
| 3634 | 3811 | int i, xd, yd; |
| 3635 | 3812 | |
| 3636 | 3813 | /* use the given gfx set for bg/tx tiles */ |
| r17691 | r17692 | |
| 3646 | 3823 | tc0480scp->y_offs = intf->y_offset; |
| 3647 | 3824 | |
| 3648 | 3825 | /* Single width versions */ |
| 3649 | | tc0480scp->tilemap[0][0] = tilemap_create_device(device, tc0480scp_get_bg0_tile_info, TILEMAP_SCAN_ROWS, 16, 16, 32, 32); |
| 3650 | | tc0480scp->tilemap[1][0] = tilemap_create_device(device, tc0480scp_get_bg1_tile_info, TILEMAP_SCAN_ROWS, 16, 16, 32, 32); |
| 3651 | | tc0480scp->tilemap[2][0] = tilemap_create_device(device, tc0480scp_get_bg2_tile_info, TILEMAP_SCAN_ROWS, 16, 16, 32, 32); |
| 3652 | | tc0480scp->tilemap[3][0] = tilemap_create_device(device, tc0480scp_get_bg3_tile_info, TILEMAP_SCAN_ROWS, 16, 16, 32, 32); |
| 3653 | | tc0480scp->tilemap[4][0] = tilemap_create_device(device, tc0480scp_get_tx_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 3826 | tc0480scp->tilemap[0][0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0480scp_device::tc0480scp_get_bg0_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); |
| 3827 | tc0480scp->tilemap[1][0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0480scp_device::tc0480scp_get_bg1_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); |
| 3828 | tc0480scp->tilemap[2][0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0480scp_device::tc0480scp_get_bg2_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); |
| 3829 | tc0480scp->tilemap[3][0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0480scp_device::tc0480scp_get_bg3_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); |
| 3830 | tc0480scp->tilemap[4][0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0480scp_device::tc0480scp_get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 3654 | 3831 | |
| 3655 | 3832 | /* Double width versions */ |
| 3656 | | tc0480scp->tilemap[0][1] = tilemap_create_device(device, tc0480scp_get_bg0_tile_info, TILEMAP_SCAN_ROWS, 16, 16, 64, 32); |
| 3657 | | tc0480scp->tilemap[1][1] = tilemap_create_device(device, tc0480scp_get_bg1_tile_info, TILEMAP_SCAN_ROWS, 16, 16, 64, 32); |
| 3658 | | tc0480scp->tilemap[2][1] = tilemap_create_device(device, tc0480scp_get_bg2_tile_info, TILEMAP_SCAN_ROWS, 16, 16, 64, 32); |
| 3659 | | tc0480scp->tilemap[3][1] = tilemap_create_device(device, tc0480scp_get_bg3_tile_info, TILEMAP_SCAN_ROWS, 16, 16, 64, 32); |
| 3660 | | tc0480scp->tilemap[4][1] = tilemap_create_device(device, tc0480scp_get_tx_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 3833 | tc0480scp->tilemap[0][1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0480scp_device::tc0480scp_get_bg0_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 32); |
| 3834 | tc0480scp->tilemap[1][1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0480scp_device::tc0480scp_get_bg1_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 32); |
| 3835 | tc0480scp->tilemap[2][1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0480scp_device::tc0480scp_get_bg2_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 32); |
| 3836 | tc0480scp->tilemap[3][1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0480scp_device::tc0480scp_get_bg3_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 32); |
| 3837 | tc0480scp->tilemap[4][1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0480scp_device::tc0480scp_get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); |
| 3661 | 3838 | |
| 3662 | 3839 | for (i = 0; i < 2; i++) |
| 3663 | 3840 | { |
| r17691 | r17692 | |
| 3712 | 3889 | tc0480scp->tilemap[3][i]->set_scroll_rows(512); |
| 3713 | 3890 | } |
| 3714 | 3891 | |
| 3715 | | tc0480scp->ram = auto_alloc_array_clear(device->machine(), UINT16, TC0480SCP_RAM_SIZE / 2); |
| 3892 | tc0480scp->ram = auto_alloc_array_clear(machine(), UINT16, TC0480SCP_RAM_SIZE / 2); |
| 3716 | 3893 | |
| 3717 | 3894 | tc0480scp_set_layer_ptrs(tc0480scp); |
| 3718 | 3895 | |
| 3719 | 3896 | /* create the char set (gfx will then be updated dynamically from RAM) */ |
| 3720 | | device->machine().gfx[tc0480scp->tx_gfx] = auto_alloc(device->machine(), gfx_element(device->machine(), tc0480scp_charlayout, (UINT8 *)tc0480scp->char_ram, 64, 0)); |
| 3897 | machine().gfx[tc0480scp->tx_gfx] = auto_alloc(machine(), gfx_element(machine(), tc0480scp_charlayout, (UINT8 *)tc0480scp->char_ram, 64, 0)); |
| 3721 | 3898 | |
| 3722 | | device->save_pointer(NAME(tc0480scp->ram), TC0480SCP_RAM_SIZE / 2); |
| 3723 | | device->save_item(NAME(tc0480scp->ctrl)); |
| 3724 | | device->save_item(NAME(tc0480scp->dblwidth)); |
| 3725 | | device->machine().save().register_postload(save_prepost_delegate(FUNC(tc0480scp_postload), tc0480scp)); |
| 3899 | save_pointer(NAME(tc0480scp->ram), TC0480SCP_RAM_SIZE / 2); |
| 3900 | save_item(NAME(tc0480scp->ctrl)); |
| 3901 | save_item(NAME(tc0480scp->dblwidth)); |
| 3902 | machine().save().register_postload(save_prepost_delegate(FUNC(tc0480scp_postload), tc0480scp)); |
| 3726 | 3903 | } |
| 3727 | 3904 | |
| 3728 | | static DEVICE_RESET( tc0480scp ) |
| 3905 | //------------------------------------------------- |
| 3906 | // device_reset - device-specific reset |
| 3907 | //------------------------------------------------- |
| 3908 | |
| 3909 | void tc0480scp_device::device_reset() |
| 3729 | 3910 | { |
| 3730 | | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(device); |
| 3911 | tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(this); |
| 3731 | 3912 | int i; |
| 3732 | 3913 | |
| 3733 | 3914 | tc0480scp->dblwidth = 0; |
| r17691 | r17692 | |
| 3737 | 3918 | |
| 3738 | 3919 | } |
| 3739 | 3920 | |
| 3921 | |
| 3740 | 3922 | /***************************************************************************/ |
| 3741 | 3923 | /* */ |
| 3742 | 3924 | /* TC0150ROD */ |
| r17691 | r17692 | |
| 4545 | 4727 | |
| 4546 | 4728 | } |
| 4547 | 4729 | |
| 4730 | const device_type TC0150ROD = &device_creator<tc0150rod_device>; |
| 4548 | 4731 | |
| 4732 | tc0150rod_device::tc0150rod_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 4733 | : device_t(mconfig, TC0150ROD, "Taito TC0150ROD", tag, owner, clock) |
| 4734 | { |
| 4735 | m_token = global_alloc_array_clear(UINT8, sizeof(tc0150rod_state)); |
| 4736 | } |
| 4737 | |
| 4738 | //------------------------------------------------- |
| 4739 | // device_config_complete - perform any |
| 4740 | // operations now that the configuration is |
| 4741 | // complete |
| 4742 | //------------------------------------------------- |
| 4743 | |
| 4744 | void tc0150rod_device::device_config_complete() |
| 4745 | { |
| 4746 | } |
| 4747 | |
| 4748 | //------------------------------------------------- |
| 4749 | // device_start - device-specific startup |
| 4750 | //------------------------------------------------- |
| 4751 | |
| 4752 | void tc0150rod_device::device_start() |
| 4753 | { |
| 4754 | DEVICE_START_NAME( tc0150rod )(this); |
| 4755 | } |
| 4756 | |
| 4757 | |
| 4549 | 4758 | /***************************************************************************/ |
| 4550 | 4759 | /* */ |
| 4551 | 4760 | /* TC0110PCR */ |
| r17691 | r17692 | |
| 4767 | 4976 | tc0110pcr->type = 0; /* default, xBBBBBGGGGGRRRRR */ |
| 4768 | 4977 | } |
| 4769 | 4978 | |
| 4979 | const device_type TC0110PCR = &device_creator<tc0110pcr_device>; |
| 4770 | 4980 | |
| 4981 | tc0110pcr_device::tc0110pcr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 4982 | : device_t(mconfig, TC0110PCR, "Taito TC0110PCR", tag, owner, clock) |
| 4983 | { |
| 4984 | m_token = global_alloc_array_clear(UINT8, sizeof(tc0110pcr_state)); |
| 4985 | } |
| 4986 | |
| 4987 | //------------------------------------------------- |
| 4988 | // device_config_complete - perform any |
| 4989 | // operations now that the configuration is |
| 4990 | // complete |
| 4991 | //------------------------------------------------- |
| 4992 | |
| 4993 | void tc0110pcr_device::device_config_complete() |
| 4994 | { |
| 4995 | } |
| 4996 | |
| 4997 | //------------------------------------------------- |
| 4998 | // device_start - device-specific startup |
| 4999 | //------------------------------------------------- |
| 5000 | |
| 5001 | void tc0110pcr_device::device_start() |
| 5002 | { |
| 5003 | DEVICE_START_NAME( tc0110pcr )(this); |
| 5004 | } |
| 5005 | |
| 5006 | //------------------------------------------------- |
| 5007 | // device_reset - device-specific reset |
| 5008 | //------------------------------------------------- |
| 5009 | |
| 5010 | void tc0110pcr_device::device_reset() |
| 5011 | { |
| 5012 | DEVICE_RESET_NAME( tc0110pcr )(this); |
| 5013 | } |
| 5014 | |
| 5015 | |
| 4771 | 5016 | /***************************************************************************/ |
| 4772 | 5017 | /* */ |
| 4773 | 5018 | /* TC0180VCU */ |
| r17691 | r17692 | |
| 4943 | 5188 | } |
| 4944 | 5189 | } |
| 4945 | 5190 | |
| 4946 | | static TILE_GET_INFO_DEVICE( get_bg_tile_info ) |
| 5191 | TILE_GET_INFO_MEMBER(tc0180vcu_device::get_bg_tile_info) |
| 4947 | 5192 | { |
| 4948 | | tc0180vcu_state *tc0180vcu = tc0180vcu_get_safe_token(device); |
| 5193 | tc0180vcu_state *tc0180vcu = tc0180vcu_get_safe_token(this); |
| 4949 | 5194 | int tile = tc0180vcu->ram[tile_index + tc0180vcu->bg_rambank[0]]; |
| 4950 | 5195 | int color = tc0180vcu->ram[tile_index + tc0180vcu->bg_rambank[1]]; |
| 4951 | 5196 | |
| 4952 | | SET_TILE_INFO_DEVICE( |
| 5197 | SET_TILE_INFO_MEMBER( |
| 4953 | 5198 | 1, |
| 4954 | 5199 | tile, |
| 4955 | 5200 | tc0180vcu->bg_color_base + (color & 0x3f), |
| 4956 | 5201 | TILE_FLIPYX((color & 0x00c0) >> 6)); |
| 4957 | 5202 | } |
| 4958 | 5203 | |
| 4959 | | static TILE_GET_INFO_DEVICE( get_fg_tile_info ) |
| 5204 | TILE_GET_INFO_MEMBER(tc0180vcu_device::get_fg_tile_info) |
| 4960 | 5205 | { |
| 4961 | | tc0180vcu_state *tc0180vcu = tc0180vcu_get_safe_token(device); |
| 5206 | tc0180vcu_state *tc0180vcu = tc0180vcu_get_safe_token(this); |
| 4962 | 5207 | int tile = tc0180vcu->ram[tile_index + tc0180vcu->fg_rambank[0]]; |
| 4963 | 5208 | int color = tc0180vcu->ram[tile_index + tc0180vcu->fg_rambank[1]]; |
| 4964 | 5209 | |
| 4965 | | SET_TILE_INFO_DEVICE( |
| 5210 | SET_TILE_INFO_MEMBER( |
| 4966 | 5211 | 1, |
| 4967 | 5212 | tile, |
| 4968 | 5213 | tc0180vcu->fg_color_base + (color & 0x3f), |
| 4969 | 5214 | TILE_FLIPYX((color & 0x00c0) >> 6)); |
| 4970 | 5215 | } |
| 4971 | 5216 | |
| 4972 | | static TILE_GET_INFO_DEVICE( get_tx_tile_info ) |
| 5217 | TILE_GET_INFO_MEMBER(tc0180vcu_device::get_tx_tile_info) |
| 4973 | 5218 | { |
| 4974 | | tc0180vcu_state *tc0180vcu = tc0180vcu_get_safe_token(device); |
| 5219 | tc0180vcu_state *tc0180vcu = tc0180vcu_get_safe_token(this); |
| 4975 | 5220 | int tile = tc0180vcu->ram[tile_index + tc0180vcu->tx_rambank]; |
| 4976 | 5221 | |
| 4977 | | SET_TILE_INFO_DEVICE( |
| 5222 | SET_TILE_INFO_MEMBER( |
| 4978 | 5223 | 0, |
| 4979 | 5224 | (tile & 0x07ff) | ((tc0180vcu->ctrl[4 + ((tile & 0x800) >> 11)]>>8) << 11), |
| 4980 | 5225 | tc0180vcu->tx_color_base + ((tile >> 12) & 0x0f), |
| r17691 | r17692 | |
| 5064 | 5309 | } |
| 5065 | 5310 | } |
| 5066 | 5311 | |
| 5067 | | /***************************************************************************** |
| 5068 | | DEVICE INTERFACE |
| 5069 | | *****************************************************************************/ |
| 5312 | const device_type TC0180VCU = &device_creator<tc0180vcu_device>; |
| 5070 | 5313 | |
| 5071 | | static DEVICE_START( tc0180vcu ) |
| 5314 | tc0180vcu_device::tc0180vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5315 | : device_t(mconfig, TC0180VCU, "Taito TC0180VCU", tag, owner, clock) |
| 5072 | 5316 | { |
| 5073 | | tc0180vcu_state *tc0180vcu = tc0180vcu_get_safe_token(device); |
| 5074 | | const tc0180vcu_interface *intf = tc0180vcu_get_interface(device); |
| 5075 | | |
| 5076 | | tc0180vcu->bg_color_base = intf->bg_color_base; |
| 5077 | | tc0180vcu->fg_color_base = intf->fg_color_base; |
| 5078 | | tc0180vcu->tx_color_base = intf->tx_color_base; |
| 5079 | | |
| 5080 | | tc0180vcu->tilemap[0] = tilemap_create_device(device, get_bg_tile_info, TILEMAP_SCAN_ROWS, 16, 16, 64, 64); |
| 5081 | | tc0180vcu->tilemap[1] = tilemap_create_device(device, get_fg_tile_info, TILEMAP_SCAN_ROWS, 16, 16, 64, 64); |
| 5082 | | tc0180vcu->tilemap[2] = tilemap_create_device(device, get_tx_tile_info, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 5083 | | |
| 5084 | | tc0180vcu->tilemap[1]->set_transparent_pen(0); |
| 5085 | | tc0180vcu->tilemap[2]->set_transparent_pen(0); |
| 5086 | | |
| 5087 | | tc0180vcu->tilemap[0]->set_scrolldx(0, 24 * 8); |
| 5088 | | tc0180vcu->tilemap[1]->set_scrolldx(0, 24 * 8); |
| 5089 | | tc0180vcu->tilemap[2]->set_scrolldx(0, 24 * 8); |
| 5090 | | |
| 5091 | | tc0180vcu->ram = auto_alloc_array_clear(device->machine(), UINT16, TC0180VCU_RAM_SIZE / 2); |
| 5092 | | tc0180vcu->scrollram = auto_alloc_array_clear(device->machine(), UINT16, TC0180VCU_SCROLLRAM_SIZE / 2); |
| 5093 | | |
| 5094 | | device->save_pointer(NAME(tc0180vcu->ram), TC0180VCU_RAM_SIZE / 2); |
| 5095 | | device->save_pointer(NAME(tc0180vcu->scrollram), TC0180VCU_SCROLLRAM_SIZE / 2); |
| 5096 | | |
| 5097 | | device->save_item(NAME(tc0180vcu->bg_rambank)); |
| 5098 | | device->save_item(NAME(tc0180vcu->fg_rambank)); |
| 5099 | | device->save_item(NAME(tc0180vcu->tx_rambank)); |
| 5100 | | |
| 5101 | | device->save_item(NAME(tc0180vcu->framebuffer_page)); |
| 5102 | | |
| 5103 | | device->save_item(NAME(tc0180vcu->video_control)); |
| 5104 | | device->save_item(NAME(tc0180vcu->ctrl)); |
| 5317 | m_token = global_alloc_array_clear(UINT8, sizeof(tc0180vcu_state)); |
| 5105 | 5318 | } |
| 5106 | 5319 | |
| 5107 | | static DEVICE_RESET( tc0180vcu ) |
| 5108 | | { |
| 5109 | | tc0180vcu_state *tc0180vcu = tc0180vcu_get_safe_token(device); |
| 5110 | | int i; |
| 5111 | | |
| 5112 | | for (i = 0; i < 0x10; i++) |
| 5113 | | tc0180vcu->ctrl[i] = 0; |
| 5114 | | |
| 5115 | | tc0180vcu->bg_rambank[0] = 0; |
| 5116 | | tc0180vcu->bg_rambank[1] = 0; |
| 5117 | | tc0180vcu->fg_rambank[0] = 0; |
| 5118 | | tc0180vcu->fg_rambank[1] = 0; |
| 5119 | | tc0180vcu->tx_rambank = 0; |
| 5120 | | |
| 5121 | | tc0180vcu->framebuffer_page = 0; |
| 5122 | | tc0180vcu->video_control = 0; |
| 5123 | | } |
| 5124 | | |
| 5125 | | const device_type PC080SN = &device_creator<pc080sn_device>; |
| 5126 | | |
| 5127 | | pc080sn_device::pc080sn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5128 | | : device_t(mconfig, PC080SN, "Taito PC080SN", tag, owner, clock) |
| 5129 | | { |
| 5130 | | m_token = global_alloc_array_clear(UINT8, sizeof(pc080sn_state)); |
| 5131 | | } |
| 5132 | | |
| 5133 | 5320 | //------------------------------------------------- |
| 5134 | 5321 | // device_config_complete - perform any |
| 5135 | 5322 | // operations now that the configuration is |
| 5136 | 5323 | // complete |
| 5137 | 5324 | //------------------------------------------------- |
| 5138 | 5325 | |
| 5139 | | void pc080sn_device::device_config_complete() |
| 5326 | void tc0180vcu_device::device_config_complete() |
| 5140 | 5327 | { |
| 5141 | 5328 | } |
| 5142 | 5329 | |
| r17691 | r17692 | |
| 5144 | 5331 | // device_start - device-specific startup |
| 5145 | 5332 | //------------------------------------------------- |
| 5146 | 5333 | |
| 5147 | | void pc080sn_device::device_start() |
| 5334 | void tc0180vcu_device::device_start() |
| 5148 | 5335 | { |
| 5149 | | DEVICE_START_NAME( pc080sn )(this); |
| 5150 | | } |
| 5151 | 5336 | |
| 5337 | tc0180vcu_state *tc0180vcu = tc0180vcu_get_safe_token(this); |
| 5338 | const tc0180vcu_interface *intf = tc0180vcu_get_interface(this); |
| 5152 | 5339 | |
| 5153 | | const device_type PC090OJ = &device_creator<pc090oj_device>; |
| 5340 | tc0180vcu->bg_color_base = intf->bg_color_base; |
| 5341 | tc0180vcu->fg_color_base = intf->fg_color_base; |
| 5342 | tc0180vcu->tx_color_base = intf->tx_color_base; |
| 5154 | 5343 | |
| 5155 | | pc090oj_device::pc090oj_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5156 | | : device_t(mconfig, PC090OJ, "Taito PC090OJ", tag, owner, clock) |
| 5157 | | { |
| 5158 | | m_token = global_alloc_array_clear(UINT8, sizeof(pc090oj_state)); |
| 5159 | | } |
| 5344 | tc0180vcu->tilemap[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0180vcu_device::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 64); |
| 5345 | tc0180vcu->tilemap[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0180vcu_device::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 64, 64); |
| 5346 | tc0180vcu->tilemap[2] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0180vcu_device::get_tx_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 5160 | 5347 | |
| 5161 | | //------------------------------------------------- |
| 5162 | | // device_config_complete - perform any |
| 5163 | | // operations now that the configuration is |
| 5164 | | // complete |
| 5165 | | //------------------------------------------------- |
| 5348 | tc0180vcu->tilemap[1]->set_transparent_pen(0); |
| 5349 | tc0180vcu->tilemap[2]->set_transparent_pen(0); |
| 5166 | 5350 | |
| 5167 | | void pc090oj_device::device_config_complete() |
| 5168 | | { |
| 5169 | | } |
| 5351 | tc0180vcu->tilemap[0]->set_scrolldx(0, 24 * 8); |
| 5352 | tc0180vcu->tilemap[1]->set_scrolldx(0, 24 * 8); |
| 5353 | tc0180vcu->tilemap[2]->set_scrolldx(0, 24 * 8); |
| 5170 | 5354 | |
| 5171 | | //------------------------------------------------- |
| 5172 | | // device_start - device-specific startup |
| 5173 | | //------------------------------------------------- |
| 5355 | tc0180vcu->ram = auto_alloc_array_clear(machine(), UINT16, TC0180VCU_RAM_SIZE / 2); |
| 5356 | tc0180vcu->scrollram = auto_alloc_array_clear(machine(), UINT16, TC0180VCU_SCROLLRAM_SIZE / 2); |
| 5174 | 5357 | |
| 5175 | | void pc090oj_device::device_start() |
| 5176 | | { |
| 5177 | | DEVICE_START_NAME( pc090oj )(this); |
| 5178 | | } |
| 5358 | save_pointer(NAME(tc0180vcu->ram), TC0180VCU_RAM_SIZE / 2); |
| 5359 | save_pointer(NAME(tc0180vcu->scrollram), TC0180VCU_SCROLLRAM_SIZE / 2); |
| 5179 | 5360 | |
| 5180 | | //------------------------------------------------- |
| 5181 | | // device_reset - device-specific reset |
| 5182 | | //------------------------------------------------- |
| 5361 | save_item(NAME(tc0180vcu->bg_rambank)); |
| 5362 | save_item(NAME(tc0180vcu->fg_rambank)); |
| 5363 | save_item(NAME(tc0180vcu->tx_rambank)); |
| 5183 | 5364 | |
| 5184 | | void pc090oj_device::device_reset() |
| 5185 | | { |
| 5186 | | DEVICE_RESET_NAME( pc090oj )(this); |
| 5187 | | } |
| 5365 | save_item(NAME(tc0180vcu->framebuffer_page)); |
| 5188 | 5366 | |
| 5189 | | |
| 5190 | | const device_type TC0080VCO = &device_creator<tc0080vco_device>; |
| 5191 | | |
| 5192 | | tc0080vco_device::tc0080vco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5193 | | : device_t(mconfig, TC0080VCO, "Taito TC0080VCO", tag, owner, clock) |
| 5194 | | { |
| 5195 | | m_token = global_alloc_array_clear(UINT8, sizeof(tc0080vco_state)); |
| 5367 | save_item(NAME(tc0180vcu->video_control)); |
| 5368 | save_item(NAME(tc0180vcu->ctrl)); |
| 5196 | 5369 | } |
| 5197 | 5370 | |
| 5198 | 5371 | //------------------------------------------------- |
| 5199 | | // device_config_complete - perform any |
| 5200 | | // operations now that the configuration is |
| 5201 | | // complete |
| 5202 | | //------------------------------------------------- |
| 5203 | | |
| 5204 | | void tc0080vco_device::device_config_complete() |
| 5205 | | { |
| 5206 | | } |
| 5207 | | |
| 5208 | | //------------------------------------------------- |
| 5209 | | // device_start - device-specific startup |
| 5210 | | //------------------------------------------------- |
| 5211 | | |
| 5212 | | void tc0080vco_device::device_start() |
| 5213 | | { |
| 5214 | | DEVICE_START_NAME( tc0080vco )(this); |
| 5215 | | } |
| 5216 | | |
| 5217 | | |
| 5218 | | const device_type TC0100SCN = &device_creator<tc0100scn_device>; |
| 5219 | | |
| 5220 | | tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5221 | | : device_t(mconfig, TC0100SCN, "Taito TC0100SCN", tag, owner, clock) |
| 5222 | | { |
| 5223 | | m_token = global_alloc_array_clear(UINT8, sizeof(tc0100scn_state)); |
| 5224 | | } |
| 5225 | | |
| 5226 | | //------------------------------------------------- |
| 5227 | | // device_config_complete - perform any |
| 5228 | | // operations now that the configuration is |
| 5229 | | // complete |
| 5230 | | //------------------------------------------------- |
| 5231 | | |
| 5232 | | void tc0100scn_device::device_config_complete() |
| 5233 | | { |
| 5234 | | } |
| 5235 | | |
| 5236 | | //------------------------------------------------- |
| 5237 | | // device_start - device-specific startup |
| 5238 | | //------------------------------------------------- |
| 5239 | | |
| 5240 | | void tc0100scn_device::device_start() |
| 5241 | | { |
| 5242 | | DEVICE_START_NAME( tc0100scn )(this); |
| 5243 | | } |
| 5244 | | |
| 5245 | | //------------------------------------------------- |
| 5246 | 5372 | // device_reset - device-specific reset |
| 5247 | 5373 | //------------------------------------------------- |
| 5248 | 5374 | |
| 5249 | | void tc0100scn_device::device_reset() |
| 5375 | void tc0180vcu_device::device_reset() |
| 5250 | 5376 | { |
| 5251 | | DEVICE_RESET_NAME( tc0100scn )(this); |
| 5252 | | } |
| 5377 | tc0180vcu_state *tc0180vcu = tc0180vcu_get_safe_token(this); |
| 5378 | int i; |
| 5253 | 5379 | |
| 5380 | for (i = 0; i < 0x10; i++) |
| 5381 | tc0180vcu->ctrl[i] = 0; |
| 5254 | 5382 | |
| 5255 | | const device_type TC0280GRD = &device_creator<tc0280grd_device>; |
| 5383 | tc0180vcu->bg_rambank[0] = 0; |
| 5384 | tc0180vcu->bg_rambank[1] = 0; |
| 5385 | tc0180vcu->fg_rambank[0] = 0; |
| 5386 | tc0180vcu->fg_rambank[1] = 0; |
| 5387 | tc0180vcu->tx_rambank = 0; |
| 5256 | 5388 | |
| 5257 | | tc0280grd_device::tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5258 | | : device_t(mconfig, TC0280GRD, "Taito TC0280GRD & TC0430GRW", tag, owner, clock) |
| 5259 | | { |
| 5260 | | m_token = global_alloc_array_clear(UINT8, sizeof(tc0280grd_state)); |
| 5389 | tc0180vcu->framebuffer_page = 0; |
| 5390 | tc0180vcu->video_control = 0; |
| 5261 | 5391 | } |
| 5262 | 5392 | |
| 5263 | | //------------------------------------------------- |
| 5264 | | // device_config_complete - perform any |
| 5265 | | // operations now that the configuration is |
| 5266 | | // complete |
| 5267 | | //------------------------------------------------- |
| 5268 | 5393 | |
| 5269 | | void tc0280grd_device::device_config_complete() |
| 5270 | | { |
| 5271 | | } |
| 5272 | | |
| 5273 | | //------------------------------------------------- |
| 5274 | | // device_start - device-specific startup |
| 5275 | | //------------------------------------------------- |
| 5276 | | |
| 5277 | | void tc0280grd_device::device_start() |
| 5278 | | { |
| 5279 | | DEVICE_START_NAME( tc0280grd )(this); |
| 5280 | | } |
| 5281 | | |
| 5282 | | //------------------------------------------------- |
| 5283 | | // device_reset - device-specific reset |
| 5284 | | //------------------------------------------------- |
| 5285 | | |
| 5286 | | void tc0280grd_device::device_reset() |
| 5287 | | { |
| 5288 | | DEVICE_RESET_NAME( tc0280grd )(this); |
| 5289 | | } |
| 5290 | | |
| 5291 | | |
| 5292 | | const device_type TC0360PRI = &device_creator<tc0360pri_device>; |
| 5293 | | |
| 5294 | | tc0360pri_device::tc0360pri_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5295 | | : device_t(mconfig, TC0360PRI, "Taito TC0360PRI", tag, owner, clock) |
| 5296 | | { |
| 5297 | | m_token = global_alloc_array_clear(UINT8, sizeof(tc0360pri_state)); |
| 5298 | | } |
| 5299 | | |
| 5300 | | //------------------------------------------------- |
| 5301 | | // device_config_complete - perform any |
| 5302 | | // operations now that the configuration is |
| 5303 | | // complete |
| 5304 | | //------------------------------------------------- |
| 5305 | | |
| 5306 | | void tc0360pri_device::device_config_complete() |
| 5307 | | { |
| 5308 | | } |
| 5309 | | |
| 5310 | | //------------------------------------------------- |
| 5311 | | // device_start - device-specific startup |
| 5312 | | //------------------------------------------------- |
| 5313 | | |
| 5314 | | void tc0360pri_device::device_start() |
| 5315 | | { |
| 5316 | | DEVICE_START_NAME( tc0360pri )(this); |
| 5317 | | } |
| 5318 | | |
| 5319 | | //------------------------------------------------- |
| 5320 | | // device_reset - device-specific reset |
| 5321 | | //------------------------------------------------- |
| 5322 | | |
| 5323 | | void tc0360pri_device::device_reset() |
| 5324 | | { |
| 5325 | | DEVICE_RESET_NAME( tc0360pri )(this); |
| 5326 | | } |
| 5327 | | |
| 5328 | | |
| 5329 | | const device_type TC0480SCP = &device_creator<tc0480scp_device>; |
| 5330 | | |
| 5331 | | tc0480scp_device::tc0480scp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5332 | | : device_t(mconfig, TC0480SCP, "Taito TC0480SCP", tag, owner, clock) |
| 5333 | | { |
| 5334 | | m_token = global_alloc_array_clear(UINT8, sizeof(tc0480scp_state)); |
| 5335 | | } |
| 5336 | | |
| 5337 | | //------------------------------------------------- |
| 5338 | | // device_config_complete - perform any |
| 5339 | | // operations now that the configuration is |
| 5340 | | // complete |
| 5341 | | //------------------------------------------------- |
| 5342 | | |
| 5343 | | void tc0480scp_device::device_config_complete() |
| 5344 | | { |
| 5345 | | } |
| 5346 | | |
| 5347 | | //------------------------------------------------- |
| 5348 | | // device_start - device-specific startup |
| 5349 | | //------------------------------------------------- |
| 5350 | | |
| 5351 | | void tc0480scp_device::device_start() |
| 5352 | | { |
| 5353 | | DEVICE_START_NAME( tc0480scp )(this); |
| 5354 | | } |
| 5355 | | |
| 5356 | | //------------------------------------------------- |
| 5357 | | // device_reset - device-specific reset |
| 5358 | | //------------------------------------------------- |
| 5359 | | |
| 5360 | | void tc0480scp_device::device_reset() |
| 5361 | | { |
| 5362 | | DEVICE_RESET_NAME( tc0480scp )(this); |
| 5363 | | } |
| 5364 | | |
| 5365 | | |
| 5366 | | const device_type TC0150ROD = &device_creator<tc0150rod_device>; |
| 5367 | | |
| 5368 | | tc0150rod_device::tc0150rod_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5369 | | : device_t(mconfig, TC0150ROD, "Taito TC0150ROD", tag, owner, clock) |
| 5370 | | { |
| 5371 | | m_token = global_alloc_array_clear(UINT8, sizeof(tc0150rod_state)); |
| 5372 | | } |
| 5373 | | |
| 5374 | | //------------------------------------------------- |
| 5375 | | // device_config_complete - perform any |
| 5376 | | // operations now that the configuration is |
| 5377 | | // complete |
| 5378 | | //------------------------------------------------- |
| 5379 | | |
| 5380 | | void tc0150rod_device::device_config_complete() |
| 5381 | | { |
| 5382 | | } |
| 5383 | | |
| 5384 | | //------------------------------------------------- |
| 5385 | | // device_start - device-specific startup |
| 5386 | | //------------------------------------------------- |
| 5387 | | |
| 5388 | | void tc0150rod_device::device_start() |
| 5389 | | { |
| 5390 | | DEVICE_START_NAME( tc0150rod )(this); |
| 5391 | | } |
| 5392 | | |
| 5393 | | |
| 5394 | | const device_type TC0110PCR = &device_creator<tc0110pcr_device>; |
| 5395 | | |
| 5396 | | tc0110pcr_device::tc0110pcr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5397 | | : device_t(mconfig, TC0110PCR, "Taito TC0110PCR", tag, owner, clock) |
| 5398 | | { |
| 5399 | | m_token = global_alloc_array_clear(UINT8, sizeof(tc0110pcr_state)); |
| 5400 | | } |
| 5401 | | |
| 5402 | | //------------------------------------------------- |
| 5403 | | // device_config_complete - perform any |
| 5404 | | // operations now that the configuration is |
| 5405 | | // complete |
| 5406 | | //------------------------------------------------- |
| 5407 | | |
| 5408 | | void tc0110pcr_device::device_config_complete() |
| 5409 | | { |
| 5410 | | } |
| 5411 | | |
| 5412 | | //------------------------------------------------- |
| 5413 | | // device_start - device-specific startup |
| 5414 | | //------------------------------------------------- |
| 5415 | | |
| 5416 | | void tc0110pcr_device::device_start() |
| 5417 | | { |
| 5418 | | DEVICE_START_NAME( tc0110pcr )(this); |
| 5419 | | } |
| 5420 | | |
| 5421 | | //------------------------------------------------- |
| 5422 | | // device_reset - device-specific reset |
| 5423 | | //------------------------------------------------- |
| 5424 | | |
| 5425 | | void tc0110pcr_device::device_reset() |
| 5426 | | { |
| 5427 | | DEVICE_RESET_NAME( tc0110pcr )(this); |
| 5428 | | } |
| 5429 | | |
| 5430 | | |
| 5431 | | const device_type TC0180VCU = &device_creator<tc0180vcu_device>; |
| 5432 | | |
| 5433 | | tc0180vcu_device::tc0180vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5434 | | : device_t(mconfig, TC0180VCU, "Taito TC0180VCU", tag, owner, clock) |
| 5435 | | { |
| 5436 | | m_token = global_alloc_array_clear(UINT8, sizeof(tc0180vcu_state)); |
| 5437 | | } |
| 5438 | | |
| 5439 | | //------------------------------------------------- |
| 5440 | | // device_config_complete - perform any |
| 5441 | | // operations now that the configuration is |
| 5442 | | // complete |
| 5443 | | //------------------------------------------------- |
| 5444 | | |
| 5445 | | void tc0180vcu_device::device_config_complete() |
| 5446 | | { |
| 5447 | | } |
| 5448 | | |
| 5449 | | //------------------------------------------------- |
| 5450 | | // device_start - device-specific startup |
| 5451 | | //------------------------------------------------- |
| 5452 | | |
| 5453 | | void tc0180vcu_device::device_start() |
| 5454 | | { |
| 5455 | | DEVICE_START_NAME( tc0180vcu )(this); |
| 5456 | | } |
| 5457 | | |
| 5458 | | //------------------------------------------------- |
| 5459 | | // device_reset - device-specific reset |
| 5460 | | //------------------------------------------------- |
| 5461 | | |
| 5462 | | void tc0180vcu_device::device_reset() |
| 5463 | | { |
| 5464 | | DEVICE_RESET_NAME( tc0180vcu )(this); |
| 5465 | | } |
| 5466 | | |
| 5467 | | |
trunk/src/mame/video/konicdev.c
| r17691 | r17692 | |
| 1577 | 1577 | k007121->ctrlram[i] = 0; |
| 1578 | 1578 | } |
| 1579 | 1579 | |
| 1580 | const device_type K007121 = &device_creator<k007121_device>; |
| 1580 | 1581 | |
| 1582 | k007121_device::k007121_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1583 | : device_t(mconfig, K007121, "Konami 007121", tag, owner, clock) |
| 1584 | { |
| 1585 | m_token = global_alloc_array_clear(UINT8, sizeof(k007121_state)); |
| 1586 | } |
| 1587 | |
| 1588 | //------------------------------------------------- |
| 1589 | // device_config_complete - perform any |
| 1590 | // operations now that the configuration is |
| 1591 | // complete |
| 1592 | //------------------------------------------------- |
| 1593 | |
| 1594 | void k007121_device::device_config_complete() |
| 1595 | { |
| 1596 | } |
| 1597 | |
| 1598 | //------------------------------------------------- |
| 1599 | // device_start - device-specific startup |
| 1600 | //------------------------------------------------- |
| 1601 | |
| 1602 | void k007121_device::device_start() |
| 1603 | { |
| 1604 | DEVICE_START_NAME( k007121 )(this); |
| 1605 | } |
| 1606 | |
| 1607 | //------------------------------------------------- |
| 1608 | // device_reset - device-specific reset |
| 1609 | //------------------------------------------------- |
| 1610 | |
| 1611 | void k007121_device::device_reset() |
| 1612 | { |
| 1613 | DEVICE_RESET_NAME( k007121 )(this); |
| 1614 | } |
| 1615 | |
| 1581 | 1616 | /***************************************************************************/ |
| 1582 | 1617 | /* */ |
| 1583 | 1618 | /* 007342 */ |
| r17691 | r17692 | |
| 1778 | 1813 | color RAM ----xxxx depends on external connections (usually color and banking) |
| 1779 | 1814 | */ |
| 1780 | 1815 | |
| 1781 | | static TILEMAP_MAPPER( k007342_scan ) |
| 1816 | TILEMAP_MAPPER_MEMBER(k007342_device::k007342_scan) |
| 1782 | 1817 | { |
| 1783 | 1818 | /* logical (col,row) -> memory offset */ |
| 1784 | 1819 | return (col & 0x1f) + ((row & 0x1f) << 5) + ((col & 0x20) << 5); |
| 1785 | 1820 | } |
| 1786 | 1821 | |
| 1787 | | INLINE void k007342_get_tile_info( device_t *device, tile_data &tileinfo, int tile_index, int layer, UINT8 *cram, UINT8 *vram ) |
| 1822 | INLINE void k007342_get_tile_info( running_machine &machine, device_t *device, tile_data &tileinfo, int tile_index, int layer, UINT8 *cram, UINT8 *vram ) |
| 1788 | 1823 | { |
| 1789 | 1824 | k007342_state *k007342 = k007342_get_safe_token(device); |
| 1790 | 1825 | int color, code, flags; |
| r17691 | r17692 | |
| 1797 | 1832 | |
| 1798 | 1833 | k007342->callback(device->machine(), layer, k007342->regs[1], &code, &color, &flags); |
| 1799 | 1834 | |
| 1800 | | SET_TILE_INFO_DEVICE( |
| 1835 | SET_TILE_INFO( |
| 1801 | 1836 | k007342->gfxnum, |
| 1802 | 1837 | code, |
| 1803 | 1838 | color, |
| 1804 | 1839 | flags); |
| 1805 | 1840 | } |
| 1806 | 1841 | |
| 1807 | | static TILE_GET_INFO_DEVICE( k007342_get_tile_info0 ) |
| 1842 | TILE_GET_INFO_MEMBER(k007342_device::k007342_get_tile_info0) |
| 1808 | 1843 | { |
| 1809 | | k007342_state *k007342 = k007342_get_safe_token(device); |
| 1810 | | k007342_get_tile_info(device, tileinfo, tile_index, 0, k007342->colorram_0, k007342->videoram_0); |
| 1844 | k007342_state *k007342 = k007342_get_safe_token(this); |
| 1845 | k007342_get_tile_info(machine(), this, tileinfo, tile_index, 0, k007342->colorram_0, k007342->videoram_0); |
| 1811 | 1846 | } |
| 1812 | 1847 | |
| 1813 | | static TILE_GET_INFO_DEVICE( k007342_get_tile_info1 ) |
| 1848 | TILE_GET_INFO_MEMBER(k007342_device::k007342_get_tile_info1) |
| 1814 | 1849 | { |
| 1815 | | k007342_state *k007342 = k007342_get_safe_token(device); |
| 1816 | | k007342_get_tile_info(device, tileinfo, tile_index, 1, k007342->colorram_1, k007342->videoram_1); |
| 1850 | k007342_state *k007342 = k007342_get_safe_token(this); |
| 1851 | k007342_get_tile_info(machine(), this, tileinfo, tile_index, 1, k007342->colorram_1, k007342->videoram_1); |
| 1817 | 1852 | } |
| 1818 | 1853 | |
| 1854 | const device_type K007342 = &device_creator<k007342_device>; |
| 1819 | 1855 | |
| 1820 | | /***************************************************************************** |
| 1821 | | DEVICE INTERFACE |
| 1822 | | *****************************************************************************/ |
| 1856 | k007342_device::k007342_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1857 | : device_t(mconfig, K007342, "Konami 007342", tag, owner, clock) |
| 1858 | { |
| 1859 | m_token = global_alloc_array_clear(UINT8, sizeof(k007342_state)); |
| 1860 | } |
| 1823 | 1861 | |
| 1824 | | static DEVICE_START( k007342 ) |
| 1862 | //------------------------------------------------- |
| 1863 | // device_config_complete - perform any |
| 1864 | // operations now that the configuration is |
| 1865 | // complete |
| 1866 | //------------------------------------------------- |
| 1867 | |
| 1868 | void k007342_device::device_config_complete() |
| 1825 | 1869 | { |
| 1826 | | k007342_state *k007342 = k007342_get_safe_token(device); |
| 1827 | | const k007342_interface *intf = k007342_get_interface(device); |
| 1870 | } |
| 1828 | 1871 | |
| 1872 | //------------------------------------------------- |
| 1873 | // device_start - device-specific startup |
| 1874 | //------------------------------------------------- |
| 1875 | |
| 1876 | void k007342_device::device_start() |
| 1877 | { |
| 1878 | k007342_state *k007342 = k007342_get_safe_token(this); |
| 1879 | const k007342_interface *intf = k007342_get_interface(this); |
| 1880 | |
| 1829 | 1881 | k007342->gfxnum = intf->gfxnum; |
| 1830 | 1882 | k007342->callback = intf->callback; |
| 1831 | 1883 | |
| 1832 | | k007342->tilemap[0] = tilemap_create_device(device, k007342_get_tile_info0, k007342_scan, 8, 8, 64, 32); |
| 1833 | | k007342->tilemap[1] = tilemap_create_device(device, k007342_get_tile_info1, k007342_scan, 8, 8, 64, 32); |
| 1884 | k007342->tilemap[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k007342_device::k007342_get_tile_info0),this), tilemap_mapper_delegate(FUNC(k007342_device::k007342_scan),this), 8, 8, 64, 32); |
| 1885 | k007342->tilemap[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k007342_device::k007342_get_tile_info1),this), tilemap_mapper_delegate(FUNC(k007342_device::k007342_scan),this), 8, 8, 64, 32); |
| 1834 | 1886 | |
| 1835 | | k007342->ram = auto_alloc_array(device->machine(), UINT8, 0x2000); |
| 1836 | | k007342->scroll_ram = auto_alloc_array(device->machine(), UINT8, 0x0200); |
| 1887 | k007342->ram = auto_alloc_array(machine(), UINT8, 0x2000); |
| 1888 | k007342->scroll_ram = auto_alloc_array(machine(), UINT8, 0x0200); |
| 1837 | 1889 | |
| 1838 | 1890 | k007342->colorram_0 = &k007342->ram[0x0000]; |
| 1839 | 1891 | k007342->colorram_1 = &k007342->ram[0x1000]; |
| r17691 | r17692 | |
| 1843 | 1895 | k007342->tilemap[0]->set_transparent_pen(0); |
| 1844 | 1896 | k007342->tilemap[1]->set_transparent_pen(0); |
| 1845 | 1897 | |
| 1846 | | device->save_pointer(NAME(k007342->ram), 0x2000); |
| 1847 | | device->save_pointer(NAME(k007342->scroll_ram), 0x0200); |
| 1848 | | device->save_item(NAME(k007342->int_enabled)); |
| 1849 | | device->save_item(NAME(k007342->flipscreen)); |
| 1850 | | device->save_item(NAME(k007342->scrollx)); |
| 1851 | | device->save_item(NAME(k007342->scrolly)); |
| 1852 | | device->save_item(NAME(k007342->regs)); |
| 1898 | save_pointer(NAME(k007342->ram), 0x2000); |
| 1899 | save_pointer(NAME(k007342->scroll_ram), 0x0200); |
| 1900 | save_item(NAME(k007342->int_enabled)); |
| 1901 | save_item(NAME(k007342->flipscreen)); |
| 1902 | save_item(NAME(k007342->scrollx)); |
| 1903 | save_item(NAME(k007342->scrolly)); |
| 1904 | save_item(NAME(k007342->regs)); |
| 1853 | 1905 | } |
| 1854 | 1906 | |
| 1855 | | static DEVICE_RESET( k007342 ) |
| 1907 | //------------------------------------------------- |
| 1908 | // device_reset - device-specific reset |
| 1909 | //------------------------------------------------- |
| 1910 | |
| 1911 | void k007342_device::device_reset() |
| 1856 | 1912 | { |
| 1857 | | k007342_state *k007342 = k007342_get_safe_token(device); |
| 1913 | k007342_state *k007342 = k007342_get_safe_token(this); |
| 1858 | 1914 | int i; |
| 1859 | 1915 | |
| 1860 | 1916 | k007342->int_enabled = 0; |
| r17691 | r17692 | |
| 1869 | 1925 | } |
| 1870 | 1926 | |
| 1871 | 1927 | |
| 1928 | |
| 1872 | 1929 | /***************************************************************************/ |
| 1873 | 1930 | /* */ |
| 1874 | 1931 | /* 007420 */ |
| r17691 | r17692 | |
| 2128 | 2185 | } |
| 2129 | 2186 | |
| 2130 | 2187 | |
| 2188 | const device_type K007420 = &device_creator<k007420_device>; |
| 2189 | |
| 2190 | k007420_device::k007420_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 2191 | : device_t(mconfig, K007420, "Konami 007420", tag, owner, clock) |
| 2192 | { |
| 2193 | m_token = global_alloc_array_clear(UINT8, sizeof(k007420_state)); |
| 2194 | } |
| 2195 | |
| 2196 | //------------------------------------------------- |
| 2197 | // device_config_complete - perform any |
| 2198 | // operations now that the configuration is |
| 2199 | // complete |
| 2200 | //------------------------------------------------- |
| 2201 | |
| 2202 | void k007420_device::device_config_complete() |
| 2203 | { |
| 2204 | } |
| 2205 | |
| 2206 | //------------------------------------------------- |
| 2207 | // device_start - device-specific startup |
| 2208 | //------------------------------------------------- |
| 2209 | |
| 2210 | void k007420_device::device_start() |
| 2211 | { |
| 2212 | DEVICE_START_NAME( k007420 )(this); |
| 2213 | } |
| 2214 | |
| 2215 | //------------------------------------------------- |
| 2216 | // device_reset - device-specific reset |
| 2217 | //------------------------------------------------- |
| 2218 | |
| 2219 | void k007420_device::device_reset() |
| 2220 | { |
| 2221 | DEVICE_RESET_NAME( k007420 )(this); |
| 2222 | } |
| 2223 | |
| 2131 | 2224 | /***************************************************************************/ |
| 2132 | 2225 | /* */ |
| 2133 | 2226 | /* 052109 */ |
| r17691 | r17692 | |
| 2600 | 2693 | color RAM ------xx depends on external connections (usually banking, flip) |
| 2601 | 2694 | */ |
| 2602 | 2695 | |
| 2603 | | INLINE void k052109_get_tile_info( device_t *device, tile_data &tileinfo, int tile_index, int layer, UINT8 *cram, UINT8 *vram1, UINT8 *vram2 ) |
| 2696 | INLINE void k052109_get_tile_info( running_machine &machine, device_t *device, tile_data &tileinfo, int tile_index, int layer, UINT8 *cram, UINT8 *vram1, UINT8 *vram2 ) |
| 2604 | 2697 | { |
| 2605 | 2698 | k052109_state *k052109 = k052109_get_safe_token(device); |
| 2606 | 2699 | int flipy = 0; |
| r17691 | r17692 | |
| 2627 | 2720 | if (flipy && (k052109->tileflip_enable & 2)) |
| 2628 | 2721 | flags |= TILE_FLIPY; |
| 2629 | 2722 | |
| 2630 | | SET_TILE_INFO_DEVICE( |
| 2723 | SET_TILE_INFO( |
| 2631 | 2724 | k052109->gfxnum, |
| 2632 | 2725 | code, |
| 2633 | 2726 | color, |
| r17691 | r17692 | |
| 2636 | 2729 | tileinfo.category = priority; |
| 2637 | 2730 | } |
| 2638 | 2731 | |
| 2639 | | static TILE_GET_INFO_DEVICE( k052109_get_tile_info0 ) |
| 2732 | TILE_GET_INFO_MEMBER(k052109_device::k052109_get_tile_info0) |
| 2640 | 2733 | { |
| 2641 | | k052109_state *k052109 = k052109_get_safe_token(device); |
| 2642 | | k052109_get_tile_info(device, tileinfo, tile_index, 0, k052109->colorram_F, k052109->videoram_F, k052109->videoram2_F); |
| 2734 | k052109_state *k052109 = k052109_get_safe_token(this); |
| 2735 | k052109_get_tile_info(machine(), this, tileinfo, tile_index, 0, k052109->colorram_F, k052109->videoram_F, k052109->videoram2_F); |
| 2643 | 2736 | } |
| 2644 | 2737 | |
| 2645 | | static TILE_GET_INFO_DEVICE( k052109_get_tile_info1 ) |
| 2738 | TILE_GET_INFO_MEMBER(k052109_device::k052109_get_tile_info1) |
| 2646 | 2739 | { |
| 2647 | | k052109_state *k052109 = k052109_get_safe_token(device); |
| 2648 | | k052109_get_tile_info(device, tileinfo, tile_index, 1, k052109->colorram_A, k052109->videoram_A, k052109->videoram2_A); |
| 2740 | k052109_state *k052109 = k052109_get_safe_token(this); |
| 2741 | k052109_get_tile_info(machine(), this, tileinfo, tile_index, 1, k052109->colorram_A, k052109->videoram_A, k052109->videoram2_A); |
| 2649 | 2742 | } |
| 2650 | 2743 | |
| 2651 | | static TILE_GET_INFO_DEVICE( k052109_get_tile_info2 ) |
| 2744 | TILE_GET_INFO_MEMBER(k052109_device::k052109_get_tile_info2) |
| 2652 | 2745 | { |
| 2653 | | k052109_state *k052109 = k052109_get_safe_token(device); |
| 2654 | | k052109_get_tile_info(device, tileinfo, tile_index, 2, k052109->colorram_B, k052109->videoram_B, k052109->videoram2_B); |
| 2746 | k052109_state *k052109 = k052109_get_safe_token(this); |
| 2747 | k052109_get_tile_info(machine(), this, tileinfo, tile_index, 2, k052109->colorram_B, k052109->videoram_B, k052109->videoram2_B); |
| 2655 | 2748 | } |
| 2656 | 2749 | |
| 2657 | 2750 | |
| r17691 | r17692 | |
| 2664 | 2757 | k052109->tileflip_enable = ((data & 0x06) >> 1); |
| 2665 | 2758 | } |
| 2666 | 2759 | |
| 2667 | | static DEVICE_START( k052109 ) |
| 2760 | const device_type K052109 = &device_creator<k052109_device>; |
| 2761 | |
| 2762 | k052109_device::k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 2763 | : device_t(mconfig, K052109, "Konami 052109", tag, owner, clock) |
| 2668 | 2764 | { |
| 2669 | | k052109_state *k052109 = k052109_get_safe_token(device); |
| 2670 | | const k052109_interface *intf = k052109_get_interface(device); |
| 2671 | | running_machine &machine = device->machine(); |
| 2765 | m_token = global_alloc_array_clear(UINT8, sizeof(k052109_state)); |
| 2766 | } |
| 2767 | |
| 2768 | //------------------------------------------------- |
| 2769 | // device_config_complete - perform any |
| 2770 | // operations now that the configuration is |
| 2771 | // complete |
| 2772 | //------------------------------------------------- |
| 2773 | |
| 2774 | void k052109_device::device_config_complete() |
| 2775 | { |
| 2776 | } |
| 2777 | |
| 2778 | //------------------------------------------------- |
| 2779 | // device_start - device-specific startup |
| 2780 | //------------------------------------------------- |
| 2781 | |
| 2782 | void k052109_device::device_start() |
| 2783 | { |
| 2784 | k052109_state *k052109 = k052109_get_safe_token(this); |
| 2785 | const k052109_interface *intf = k052109_get_interface(this); |
| 2672 | 2786 | UINT32 total; |
| 2673 | 2787 | static const gfx_layout charlayout = |
| 2674 | 2788 | { |
| r17691 | r17692 | |
| 2696 | 2810 | switch (intf->plane_order) |
| 2697 | 2811 | { |
| 2698 | 2812 | case NORMAL_PLANE_ORDER: |
| 2699 | | total = machine.root_device().memregion(intf->gfx_memory_region)->bytes() / 32; |
| 2700 | | decode_gfx(machine, intf->gfx_num, machine.root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout, 4); |
| 2813 | total = machine().root_device().memregion(intf->gfx_memory_region)->bytes() / 32; |
| 2814 | decode_gfx(machine(), intf->gfx_num, machine().root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout, 4); |
| 2701 | 2815 | break; |
| 2702 | 2816 | |
| 2703 | 2817 | case GRADIUS3_PLANE_ORDER: |
| 2704 | 2818 | total = 0x1000; |
| 2705 | | decode_gfx(machine, intf->gfx_num, machine.root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout_gradius3, 4); |
| 2819 | decode_gfx(machine(), intf->gfx_num, machine().root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout_gradius3, 4); |
| 2706 | 2820 | break; |
| 2707 | 2821 | |
| 2708 | 2822 | default: |
| r17691 | r17692 | |
| 2710 | 2824 | } |
| 2711 | 2825 | |
| 2712 | 2826 | /* deinterleave the graphics, if needed */ |
| 2713 | | deinterleave_gfx(machine, intf->gfx_memory_region, intf->deinterleave); |
| 2827 | deinterleave_gfx(machine(), intf->gfx_memory_region, intf->deinterleave); |
| 2714 | 2828 | |
| 2715 | 2829 | k052109->memory_region = intf->gfx_memory_region; |
| 2716 | 2830 | k052109->gfxnum = intf->gfx_num; |
| 2717 | 2831 | k052109->callback = intf->callback; |
| 2718 | 2832 | |
| 2719 | | k052109->tilemap[0] = tilemap_create_device(device, k052109_get_tile_info0, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 2720 | | k052109->tilemap[1] = tilemap_create_device(device, k052109_get_tile_info1, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 2721 | | k052109->tilemap[2] = tilemap_create_device(device, k052109_get_tile_info2, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 2833 | k052109->tilemap[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k052109_device::k052109_get_tile_info0),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 2834 | k052109->tilemap[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k052109_device::k052109_get_tile_info1),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 2835 | k052109->tilemap[2] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k052109_device::k052109_get_tile_info2),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 2722 | 2836 | |
| 2723 | | k052109->ram = auto_alloc_array_clear(machine, UINT8, 0x6000); |
| 2837 | k052109->ram = auto_alloc_array_clear(machine(), UINT8, 0x6000); |
| 2724 | 2838 | |
| 2725 | 2839 | k052109->colorram_F = &k052109->ram[0x0000]; |
| 2726 | 2840 | k052109->colorram_A = &k052109->ram[0x0800]; |
| r17691 | r17692 | |
| 2736 | 2850 | k052109->tilemap[1]->set_transparent_pen(0); |
| 2737 | 2851 | k052109->tilemap[2]->set_transparent_pen(0); |
| 2738 | 2852 | |
| 2739 | | device->save_pointer(NAME(k052109->ram), 0x6000); |
| 2740 | | device->save_item(NAME(k052109->rmrd_line)); |
| 2741 | | device->save_item(NAME(k052109->romsubbank)); |
| 2742 | | device->save_item(NAME(k052109->scrollctrl)); |
| 2743 | | device->save_item(NAME(k052109->irq_enabled)); |
| 2744 | | device->save_item(NAME(k052109->charrombank)); |
| 2745 | | device->save_item(NAME(k052109->charrombank_2)); |
| 2746 | | device->save_item(NAME(k052109->dx)); |
| 2747 | | device->save_item(NAME(k052109->dy)); |
| 2748 | | device->save_item(NAME(k052109->has_extra_video_ram)); |
| 2749 | | device->machine().save().register_postload(save_prepost_delegate(FUNC(k052109_tileflip_reset), k052109)); |
| 2853 | save_pointer(NAME(k052109->ram), 0x6000); |
| 2854 | save_item(NAME(k052109->rmrd_line)); |
| 2855 | save_item(NAME(k052109->romsubbank)); |
| 2856 | save_item(NAME(k052109->scrollctrl)); |
| 2857 | save_item(NAME(k052109->irq_enabled)); |
| 2858 | save_item(NAME(k052109->charrombank)); |
| 2859 | save_item(NAME(k052109->charrombank_2)); |
| 2860 | save_item(NAME(k052109->dx)); |
| 2861 | save_item(NAME(k052109->dy)); |
| 2862 | save_item(NAME(k052109->has_extra_video_ram)); |
| 2863 | machine().save().register_postload(save_prepost_delegate(FUNC(k052109_tileflip_reset), k052109)); |
| 2750 | 2864 | } |
| 2751 | 2865 | |
| 2752 | | static DEVICE_RESET( k052109 ) |
| 2866 | //------------------------------------------------- |
| 2867 | // device_reset - device-specific reset |
| 2868 | //------------------------------------------------- |
| 2869 | |
| 2870 | void k052109_device::device_reset() |
| 2753 | 2871 | { |
| 2754 | | k052109_state *k052109 = k052109_get_safe_token(device); |
| 2872 | k052109_state *k052109 = k052109_get_safe_token(this); |
| 2755 | 2873 | int i; |
| 2756 | 2874 | |
| 2757 | 2875 | k052109->rmrd_line = CLEAR_LINE; |
| r17691 | r17692 | |
| 2771 | 2889 | } |
| 2772 | 2890 | } |
| 2773 | 2891 | |
| 2892 | |
| 2893 | |
| 2774 | 2894 | /***************************************************************************/ |
| 2775 | 2895 | /* */ |
| 2776 | 2896 | /* 051960 */ |
| r17691 | r17692 | |
| 3308 | 3428 | k051960->spriterombank[2] = 0; |
| 3309 | 3429 | } |
| 3310 | 3430 | |
| 3431 | |
| 3432 | const device_type K051960 = &device_creator<k051960_device>; |
| 3433 | |
| 3434 | k051960_device::k051960_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 3435 | : device_t(mconfig, K051960, "Konami 051960", tag, owner, clock) |
| 3436 | { |
| 3437 | m_token = global_alloc_array_clear(UINT8, sizeof(k051960_state)); |
| 3438 | } |
| 3439 | |
| 3440 | //------------------------------------------------- |
| 3441 | // device_config_complete - perform any |
| 3442 | // operations now that the configuration is |
| 3443 | // complete |
| 3444 | //------------------------------------------------- |
| 3445 | |
| 3446 | void k051960_device::device_config_complete() |
| 3447 | { |
| 3448 | } |
| 3449 | |
| 3450 | //------------------------------------------------- |
| 3451 | // device_start - device-specific startup |
| 3452 | //------------------------------------------------- |
| 3453 | |
| 3454 | void k051960_device::device_start() |
| 3455 | { |
| 3456 | DEVICE_START_NAME( k051960 )(this); |
| 3457 | } |
| 3458 | |
| 3459 | //------------------------------------------------- |
| 3460 | // device_reset - device-specific reset |
| 3461 | //------------------------------------------------- |
| 3462 | |
| 3463 | void k051960_device::device_reset() |
| 3464 | { |
| 3465 | DEVICE_RESET_NAME( k051960 )(this); |
| 3466 | } |
| 3467 | |
| 3311 | 3468 | /***************************************************************************/ |
| 3312 | 3469 | /* */ |
| 3313 | 3470 | /* 05324x Family Sprite Generators */ |
| r17691 | r17692 | |
| 4103 | 4260 | k05324x->regs[i] = 0; |
| 4104 | 4261 | } |
| 4105 | 4262 | |
| 4263 | |
| 4264 | const device_type K053244 = &device_creator<k05324x_device>; |
| 4265 | |
| 4266 | k05324x_device::k05324x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 4267 | : device_t(mconfig, K053244, "Konami 053244 & 053245", tag, owner, clock) |
| 4268 | { |
| 4269 | m_token = global_alloc_array_clear(UINT8, sizeof(k05324x_state)); |
| 4270 | } |
| 4271 | |
| 4272 | //------------------------------------------------- |
| 4273 | // device_config_complete - perform any |
| 4274 | // operations now that the configuration is |
| 4275 | // complete |
| 4276 | //------------------------------------------------- |
| 4277 | |
| 4278 | void k05324x_device::device_config_complete() |
| 4279 | { |
| 4280 | } |
| 4281 | |
| 4282 | //------------------------------------------------- |
| 4283 | // device_start - device-specific startup |
| 4284 | //------------------------------------------------- |
| 4285 | |
| 4286 | void k05324x_device::device_start() |
| 4287 | { |
| 4288 | DEVICE_START_NAME( k05324x )(this); |
| 4289 | } |
| 4290 | |
| 4291 | //------------------------------------------------- |
| 4292 | // device_reset - device-specific reset |
| 4293 | //------------------------------------------------- |
| 4294 | |
| 4295 | void k05324x_device::device_reset() |
| 4296 | { |
| 4297 | DEVICE_RESET_NAME( k05324x )(this); |
| 4298 | } |
| 4299 | |
| 4106 | 4300 | /***************************************************************************/ |
| 4107 | 4301 | /* */ |
| 4108 | 4302 | /* 053246/053247 */ |
| r17691 | r17692 | |
| 5076 | 5270 | memset(k053247->kx47_regs, 0, 32); |
| 5077 | 5271 | } |
| 5078 | 5272 | |
| 5273 | |
| 5274 | const device_type K055673 = &device_creator<k055673_device>; |
| 5275 | |
| 5276 | k055673_device::k055673_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5277 | : device_t(mconfig, K055673, "Konami 055673", tag, owner, clock) |
| 5278 | { |
| 5279 | m_token = global_alloc_array_clear(UINT8, sizeof(k053247_state)); |
| 5280 | } |
| 5281 | |
| 5282 | //------------------------------------------------- |
| 5283 | // device_config_complete - perform any |
| 5284 | // operations now that the configuration is |
| 5285 | // complete |
| 5286 | //------------------------------------------------- |
| 5287 | |
| 5288 | void k055673_device::device_config_complete() |
| 5289 | { |
| 5290 | } |
| 5291 | |
| 5292 | //------------------------------------------------- |
| 5293 | // device_start - device-specific startup |
| 5294 | //------------------------------------------------- |
| 5295 | |
| 5296 | void k055673_device::device_start() |
| 5297 | { |
| 5298 | DEVICE_START_NAME( k055673 )(this); |
| 5299 | } |
| 5300 | |
| 5301 | //------------------------------------------------- |
| 5302 | // device_reset - device-specific reset |
| 5303 | //------------------------------------------------- |
| 5304 | |
| 5305 | void k055673_device::device_reset() |
| 5306 | { |
| 5307 | DEVICE_RESET_NAME( k053247 )(this); |
| 5308 | } |
| 5309 | |
| 5310 | const device_type K053246 = &device_creator<k053247_device>; |
| 5311 | |
| 5312 | k053247_device::k053247_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5313 | : device_t(mconfig, K053246, "Konami 053246 & 053247", tag, owner, clock) |
| 5314 | { |
| 5315 | m_token = global_alloc_array_clear(UINT8, sizeof(k053247_state)); |
| 5316 | } |
| 5317 | |
| 5318 | //------------------------------------------------- |
| 5319 | // device_config_complete - perform any |
| 5320 | // operations now that the configuration is |
| 5321 | // complete |
| 5322 | //------------------------------------------------- |
| 5323 | |
| 5324 | void k053247_device::device_config_complete() |
| 5325 | { |
| 5326 | } |
| 5327 | |
| 5328 | //------------------------------------------------- |
| 5329 | // device_start - device-specific startup |
| 5330 | //------------------------------------------------- |
| 5331 | |
| 5332 | void k053247_device::device_start() |
| 5333 | { |
| 5334 | DEVICE_START_NAME( k053247 )(this); |
| 5335 | } |
| 5336 | |
| 5337 | //------------------------------------------------- |
| 5338 | // device_reset - device-specific reset |
| 5339 | //------------------------------------------------- |
| 5340 | |
| 5341 | void k053247_device::device_reset() |
| 5342 | { |
| 5343 | DEVICE_RESET_NAME( k053247 )(this); |
| 5344 | } |
| 5345 | |
| 5346 | |
| 5079 | 5347 | /* |
| 5080 | 5348 | In a K053247+K055555 setup objects with Z-code 0x00 should be ignored |
| 5081 | 5349 | when PRFLIP is cleared, while objects with Z-code 0xff should be |
| r17691 | r17692 | |
| 5208 | 5476 | |
| 5209 | 5477 | ***************************************************************************/ |
| 5210 | 5478 | |
| 5211 | | INLINE void k051316_get_tile_info( device_t *device, tile_data &tileinfo, int tile_index ) |
| 5479 | INLINE void k051316_get_tile_info( running_machine &machine, device_t *device, tile_data &tileinfo, int tile_index ) |
| 5212 | 5480 | { |
| 5213 | 5481 | k051316_state *k051316 = k051316_get_safe_token(device); |
| 5214 | 5482 | int code = k051316->ram[tile_index]; |
| r17691 | r17692 | |
| 5217 | 5485 | |
| 5218 | 5486 | k051316->callback(device->machine(), &code, &color, &flags); |
| 5219 | 5487 | |
| 5220 | | SET_TILE_INFO_DEVICE( |
| 5488 | SET_TILE_INFO( |
| 5221 | 5489 | k051316->gfxnum, |
| 5222 | 5490 | code, |
| 5223 | 5491 | color, |
| r17691 | r17692 | |
| 5225 | 5493 | } |
| 5226 | 5494 | |
| 5227 | 5495 | |
| 5228 | | static TILE_GET_INFO_DEVICE( k051316_get_tile_info0 ) { k051316_get_tile_info(device, tileinfo, tile_index); } |
| 5496 | TILE_GET_INFO_MEMBER(k051316_device::k051316_get_tile_info0) { k051316_get_tile_info(machine(), this, tileinfo, tile_index); } |
| 5229 | 5497 | |
| 5230 | 5498 | |
| 5231 | 5499 | void k051316_zoom_draw( device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect, int flags, UINT32 priority ) |
| r17691 | r17692 | |
| 5273 | 5541 | #endif |
| 5274 | 5542 | } |
| 5275 | 5543 | |
| 5544 | const device_type K051316 = &device_creator<k051316_device>; |
| 5276 | 5545 | |
| 5277 | | /***************************************************************************** |
| 5278 | | DEVICE INTERFACE |
| 5279 | | *****************************************************************************/ |
| 5546 | k051316_device::k051316_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5547 | : device_t(mconfig, K051316, "Konami 051316", tag, owner, clock) |
| 5548 | { |
| 5549 | m_token = global_alloc_array_clear(UINT8, sizeof(k051316_state)); |
| 5550 | } |
| 5280 | 5551 | |
| 5281 | | static DEVICE_START( k051316 ) |
| 5552 | //------------------------------------------------- |
| 5553 | // device_config_complete - perform any |
| 5554 | // operations now that the configuration is |
| 5555 | // complete |
| 5556 | //------------------------------------------------- |
| 5557 | |
| 5558 | void k051316_device::device_config_complete() |
| 5282 | 5559 | { |
| 5283 | | k051316_state *k051316 = k051316_get_safe_token(device); |
| 5284 | | const k051316_interface *intf = k051316_get_interface(device); |
| 5285 | | running_machine &machine = device->machine(); |
| 5560 | } |
| 5286 | 5561 | |
| 5562 | //------------------------------------------------- |
| 5563 | // device_start - device-specific startup |
| 5564 | //------------------------------------------------- |
| 5565 | |
| 5566 | void k051316_device::device_start() |
| 5567 | { |
| 5568 | k051316_state *k051316 = k051316_get_safe_token(this); |
| 5569 | const k051316_interface *intf = k051316_get_interface(this); |
| 5570 | |
| 5287 | 5571 | int is_tail2nos = 0; |
| 5288 | 5572 | UINT32 total; |
| 5289 | 5573 | |
| r17691 | r17692 | |
| 5345 | 5629 | case -4: |
| 5346 | 5630 | total = 0x400; |
| 5347 | 5631 | is_tail2nos = 1; |
| 5348 | | decode_gfx(machine, intf->gfx_num, machine.root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout_tail2nos, 4); |
| 5632 | decode_gfx(machine(), intf->gfx_num, machine().root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout_tail2nos, 4); |
| 5349 | 5633 | break; |
| 5350 | 5634 | |
| 5351 | 5635 | case 4: |
| 5352 | | total = machine.root_device().memregion(intf->gfx_memory_region)->bytes() / 128; |
| 5353 | | decode_gfx(machine, intf->gfx_num, machine.root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout4, 4); |
| 5636 | total = machine().root_device().memregion(intf->gfx_memory_region)->bytes() / 128; |
| 5637 | decode_gfx(machine(), intf->gfx_num, machine().root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout4, 4); |
| 5354 | 5638 | break; |
| 5355 | 5639 | |
| 5356 | 5640 | case 7: |
| 5357 | | total = machine.root_device().memregion(intf->gfx_memory_region)->bytes() / 256; |
| 5358 | | decode_gfx(machine, intf->gfx_num, machine.root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout7, 7); |
| 5641 | total = machine().root_device().memregion(intf->gfx_memory_region)->bytes() / 256; |
| 5642 | decode_gfx(machine(), intf->gfx_num, machine().root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout7, 7); |
| 5359 | 5643 | break; |
| 5360 | 5644 | |
| 5361 | 5645 | case 8: |
| 5362 | | total = machine.root_device().memregion(intf->gfx_memory_region)->bytes() / 256; |
| 5363 | | decode_gfx(machine, intf->gfx_num, machine.root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout8, 8); |
| 5646 | total = machine().root_device().memregion(intf->gfx_memory_region)->bytes() / 256; |
| 5647 | decode_gfx(machine(), intf->gfx_num, machine().root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout8, 8); |
| 5364 | 5648 | break; |
| 5365 | 5649 | |
| 5366 | 5650 | default: |
| r17691 | r17692 | |
| 5372 | 5656 | k051316->bpp = is_tail2nos ? 4 : intf->bpp; // tail2nos is passed with bpp = -4 to setup the custom charlayout! |
| 5373 | 5657 | k051316->callback = intf->callback; |
| 5374 | 5658 | |
| 5375 | | k051316->tmap = tilemap_create_device(device, k051316_get_tile_info0, TILEMAP_SCAN_ROWS, 16, 16, 32, 32); |
| 5659 | k051316->tmap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k051316_device::k051316_get_tile_info0),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); |
| 5376 | 5660 | |
| 5377 | | k051316->ram = auto_alloc_array(machine, UINT8, 0x800); |
| 5661 | k051316->ram = auto_alloc_array(machine(), UINT8, 0x800); |
| 5378 | 5662 | |
| 5379 | 5663 | if (!intf->pen_is_mask) |
| 5380 | 5664 | k051316->tmap->set_transparent_pen(intf->transparent_pen); |
| r17691 | r17692 | |
| 5388 | 5672 | k051316->offset[0] = intf->xoffs; |
| 5389 | 5673 | k051316->offset[1] = intf->yoffs; |
| 5390 | 5674 | |
| 5391 | | device->save_pointer(NAME(k051316->ram), 0x800); |
| 5392 | | device->save_item(NAME(k051316->ctrlram)); |
| 5393 | | device->save_item(NAME(k051316->wraparound)); |
| 5675 | save_pointer(NAME(k051316->ram), 0x800); |
| 5676 | save_item(NAME(k051316->ctrlram)); |
| 5677 | save_item(NAME(k051316->wraparound)); |
| 5678 | |
| 5394 | 5679 | } |
| 5395 | 5680 | |
| 5396 | | static DEVICE_RESET( k051316 ) |
| 5681 | //------------------------------------------------- |
| 5682 | // device_reset - device-specific reset |
| 5683 | //------------------------------------------------- |
| 5684 | |
| 5685 | void k051316_device::device_reset() |
| 5397 | 5686 | { |
| 5398 | | k051316_state *k051316 = k051316_get_safe_token(device); |
| 5687 | k051316_state *k051316 = k051316_get_safe_token(this); |
| 5399 | 5688 | |
| 5400 | 5689 | memset(k051316->ctrlram, 0, 0x10); |
| 5401 | 5690 | } |
| 5402 | 5691 | |
| 5692 | |
| 5403 | 5693 | /***************************************************************************/ |
| 5404 | 5694 | /* */ |
| 5405 | 5695 | /* 053936 */ |
| r17691 | r17692 | |
| 5625 | 5915 | memset(k053936->ctrl, 0, 0x20); |
| 5626 | 5916 | } |
| 5627 | 5917 | |
| 5918 | const device_type K053936 = &device_creator<k053936_device>; |
| 5919 | |
| 5920 | k053936_device::k053936_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 5921 | : device_t(mconfig, K053936, "Konami 053936", tag, owner, clock) |
| 5922 | { |
| 5923 | m_token = global_alloc_array_clear(UINT8, sizeof(k053936_state)); |
| 5924 | } |
| 5925 | |
| 5926 | //------------------------------------------------- |
| 5927 | // device_config_complete - perform any |
| 5928 | // operations now that the configuration is |
| 5929 | // complete |
| 5930 | //------------------------------------------------- |
| 5931 | |
| 5932 | void k053936_device::device_config_complete() |
| 5933 | { |
| 5934 | } |
| 5935 | |
| 5936 | //------------------------------------------------- |
| 5937 | // device_start - device-specific startup |
| 5938 | //------------------------------------------------- |
| 5939 | |
| 5940 | void k053936_device::device_start() |
| 5941 | { |
| 5942 | DEVICE_START_NAME( k053936 )(this); |
| 5943 | } |
| 5944 | |
| 5945 | //------------------------------------------------- |
| 5946 | // device_reset - device-specific reset |
| 5947 | //------------------------------------------------- |
| 5948 | |
| 5949 | void k053936_device::device_reset() |
| 5950 | { |
| 5951 | DEVICE_RESET_NAME( k053936 )(this); |
| 5952 | } |
| 5953 | |
| 5954 | |
| 5955 | |
| 5628 | 5956 | /***************************************************************************/ |
| 5629 | 5957 | /* */ |
| 5630 | 5958 | /* 053251 */ |
| r17691 | r17692 | |
| 5779 | 6107 | k053251->dirty_tmap[i] = 0; |
| 5780 | 6108 | } |
| 5781 | 6109 | |
| 6110 | const device_type K053251 = &device_creator<k053251_device>; |
| 5782 | 6111 | |
| 6112 | k053251_device::k053251_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 6113 | : device_t(mconfig, K053251, "Konami 053251", tag, owner, clock) |
| 6114 | { |
| 6115 | m_token = global_alloc_array_clear(UINT8, sizeof(k053251_state)); |
| 6116 | } |
| 6117 | |
| 6118 | //------------------------------------------------- |
| 6119 | // device_config_complete - perform any |
| 6120 | // operations now that the configuration is |
| 6121 | // complete |
| 6122 | //------------------------------------------------- |
| 6123 | |
| 6124 | void k053251_device::device_config_complete() |
| 6125 | { |
| 6126 | } |
| 6127 | |
| 6128 | //------------------------------------------------- |
| 6129 | // device_start - device-specific startup |
| 6130 | //------------------------------------------------- |
| 6131 | |
| 6132 | void k053251_device::device_start() |
| 6133 | { |
| 6134 | DEVICE_START_NAME( k053251 )(this); |
| 6135 | } |
| 6136 | |
| 6137 | //------------------------------------------------- |
| 6138 | // device_reset - device-specific reset |
| 6139 | //------------------------------------------------- |
| 6140 | |
| 6141 | void k053251_device::device_reset() |
| 6142 | { |
| 6143 | DEVICE_RESET_NAME( k053251 )(this); |
| 6144 | } |
| 6145 | |
| 5783 | 6146 | /***************************************************************************/ |
| 5784 | 6147 | /* */ |
| 5785 | 6148 | /* 054000 */ |
| r17691 | r17692 | |
| 5890 | 6253 | k054000->regs[i] = 0; |
| 5891 | 6254 | } |
| 5892 | 6255 | |
| 6256 | const device_type K054000 = &device_creator<k054000_device>; |
| 5893 | 6257 | |
| 6258 | k054000_device::k054000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 6259 | : device_t(mconfig, K054000, "Konami 054000", tag, owner, clock) |
| 6260 | { |
| 6261 | m_token = global_alloc_array_clear(UINT8, sizeof(k054000_state)); |
| 6262 | } |
| 6263 | |
| 6264 | //------------------------------------------------- |
| 6265 | // device_config_complete - perform any |
| 6266 | // operations now that the configuration is |
| 6267 | // complete |
| 6268 | //------------------------------------------------- |
| 6269 | |
| 6270 | void k054000_device::device_config_complete() |
| 6271 | { |
| 6272 | } |
| 6273 | |
| 6274 | //------------------------------------------------- |
| 6275 | // device_start - device-specific startup |
| 6276 | //------------------------------------------------- |
| 6277 | |
| 6278 | void k054000_device::device_start() |
| 6279 | { |
| 6280 | DEVICE_START_NAME( k054000 )(this); |
| 6281 | } |
| 6282 | |
| 6283 | //------------------------------------------------- |
| 6284 | // device_reset - device-specific reset |
| 6285 | //------------------------------------------------- |
| 6286 | |
| 6287 | void k054000_device::device_reset() |
| 6288 | { |
| 6289 | DEVICE_RESET_NAME( k054000 )(this); |
| 6290 | } |
| 6291 | |
| 6292 | |
| 5894 | 6293 | /***************************************************************************/ |
| 5895 | 6294 | /* */ |
| 5896 | 6295 | /* 051733 */ |
| r17691 | r17692 | |
| 6043 | 6442 | k051733->rng = 0; |
| 6044 | 6443 | } |
| 6045 | 6444 | |
| 6445 | const device_type K051733 = &device_creator<k051733_device>; |
| 6046 | 6446 | |
| 6447 | k051733_device::k051733_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 6448 | : device_t(mconfig, K051733, "Konami 051733", tag, owner, clock) |
| 6449 | { |
| 6450 | m_token = global_alloc_array_clear(UINT8, sizeof(k051733_state)); |
| 6451 | } |
| 6452 | |
| 6453 | //------------------------------------------------- |
| 6454 | // device_config_complete - perform any |
| 6455 | // operations now that the configuration is |
| 6456 | // complete |
| 6457 | //------------------------------------------------- |
| 6458 | |
| 6459 | void k051733_device::device_config_complete() |
| 6460 | { |
| 6461 | } |
| 6462 | |
| 6463 | //------------------------------------------------- |
| 6464 | // device_start - device-specific startup |
| 6465 | //------------------------------------------------- |
| 6466 | |
| 6467 | void k051733_device::device_start() |
| 6468 | { |
| 6469 | DEVICE_START_NAME( k051733 )(this); |
| 6470 | } |
| 6471 | |
| 6472 | //------------------------------------------------- |
| 6473 | // device_reset - device-specific reset |
| 6474 | //------------------------------------------------- |
| 6475 | |
| 6476 | void k051733_device::device_reset() |
| 6477 | { |
| 6478 | DEVICE_RESET_NAME( k051733 )(this); |
| 6479 | } |
| 6480 | |
| 6481 | |
| 6047 | 6482 | /***************************************************************************/ |
| 6048 | 6483 | /* */ |
| 6049 | 6484 | /* 054157 / 056832 */ |
| r17691 | r17692 | |
| 6248 | 6683 | return res; |
| 6249 | 6684 | } |
| 6250 | 6685 | |
| 6251 | | INLINE void k056832_get_tile_info( device_t *device, tile_data &tileinfo, int tile_index, int pageIndex ) |
| 6686 | INLINE void k056832_get_tile_info( running_machine &machine, device_t *device, tile_data &tileinfo, int tile_index, int pageIndex ) |
| 6252 | 6687 | { |
| 6253 | 6688 | k056832_state *k056832 = k056832_get_safe_token(device); |
| 6254 | 6689 | static const struct K056832_SHIFTMASKS |
| r17691 | r17692 | |
| 6287 | 6722 | |
| 6288 | 6723 | k056832->callback(device->machine(), layer, &code, &color, &flags); |
| 6289 | 6724 | |
| 6290 | | SET_TILE_INFO_DEVICE( |
| 6725 | SET_TILE_INFO( |
| 6291 | 6726 | k056832->gfxnum, |
| 6292 | 6727 | code, |
| 6293 | 6728 | color, |
| 6294 | 6729 | flags); |
| 6295 | 6730 | } |
| 6296 | 6731 | |
| 6297 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_info0 ) { k056832_get_tile_info(device, tileinfo, tile_index, 0x0); } |
| 6298 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_info1 ) { k056832_get_tile_info(device, tileinfo, tile_index, 0x1); } |
| 6299 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_info2 ) { k056832_get_tile_info(device, tileinfo, tile_index, 0x2); } |
| 6300 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_info3 ) { k056832_get_tile_info(device, tileinfo, tile_index, 0x3); } |
| 6301 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_info4 ) { k056832_get_tile_info(device, tileinfo, tile_index, 0x4); } |
| 6302 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_info5 ) { k056832_get_tile_info(device, tileinfo, tile_index, 0x5); } |
| 6303 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_info6 ) { k056832_get_tile_info(device, tileinfo, tile_index, 0x6); } |
| 6304 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_info7 ) { k056832_get_tile_info(device, tileinfo, tile_index, 0x7); } |
| 6305 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_info8 ) { k056832_get_tile_info(device, tileinfo, tile_index, 0x8); } |
| 6306 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_info9 ) { k056832_get_tile_info(device, tileinfo, tile_index, 0x9); } |
| 6307 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_infoa ) { k056832_get_tile_info(device, tileinfo, tile_index, 0xa); } |
| 6308 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_infob ) { k056832_get_tile_info(device, tileinfo, tile_index, 0xb); } |
| 6309 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_infoc ) { k056832_get_tile_info(device, tileinfo, tile_index, 0xc); } |
| 6310 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_infod ) { k056832_get_tile_info(device, tileinfo, tile_index, 0xd); } |
| 6311 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_infoe ) { k056832_get_tile_info(device, tileinfo, tile_index, 0xe); } |
| 6312 | | static TILE_GET_INFO_DEVICE( k056832_get_tile_infof ) { k056832_get_tile_info(device, tileinfo, tile_index, 0xf); } |
| 6732 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_info0) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0x0); } |
| 6733 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_info1) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0x1); } |
| 6734 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_info2) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0x2); } |
| 6735 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_info3) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0x3); } |
| 6736 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_info4) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0x4); } |
| 6737 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_info5) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0x5); } |
| 6738 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_info6) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0x6); } |
| 6739 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_info7) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0x7); } |
| 6740 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_info8) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0x8); } |
| 6741 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_info9) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0x9); } |
| 6742 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_infoa) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0xa); } |
| 6743 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_infob) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0xb); } |
| 6744 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_infoc) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0xc); } |
| 6745 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_infod) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0xd); } |
| 6746 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_infoe) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0xe); } |
| 6747 | TILE_GET_INFO_MEMBER(k056832_device::k056832_get_tile_infof) { k056832_get_tile_info(machine(), this, tileinfo, tile_index, 0xf); } |
| 6313 | 6748 | |
| 6314 | 6749 | static void k056832_change_rambank( k056832_state *k056832 ) |
| 6315 | 6750 | { |
| r17691 | r17692 | |
| 7754 | 8189 | k056832_change_rombank(k056832); |
| 7755 | 8190 | } |
| 7756 | 8191 | |
| 7757 | | /***************************************************************************** |
| 7758 | | DEVICE INTERFACE |
| 7759 | | *****************************************************************************/ |
| 7760 | 8192 | |
| 8193 | |
| 8194 | const device_type K056832 = &device_creator<k056832_device>; |
| 8195 | |
| 8196 | k056832_device::k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 8197 | : device_t(mconfig, K056832, "Konami 056832", tag, owner, clock) |
| 8198 | { |
| 8199 | m_token = global_alloc_array_clear(UINT8, sizeof(k056832_state)); |
| 8200 | } |
| 8201 | |
| 8202 | //------------------------------------------------- |
| 8203 | // device_config_complete - perform any |
| 8204 | // operations now that the configuration is |
| 8205 | // complete |
| 8206 | //------------------------------------------------- |
| 8207 | |
| 8208 | void k056832_device::device_config_complete() |
| 8209 | { |
| 8210 | } |
| 8211 | |
| 8212 | //------------------------------------------------- |
| 8213 | // device_start - device-specific startup |
| 8214 | //------------------------------------------------- |
| 8215 | |
| 8216 | void k056832_device::device_start() |
| 8217 | { |
| 8218 | |
| 7761 | 8219 | /* TODO: understand which elements MUST be init here (to keep correct layer |
| 7762 | 8220 | associations) and which ones can can be init at RESET, if any */ |
| 7763 | | static DEVICE_START( k056832 ) |
| 7764 | | { |
| 7765 | | k056832_state *k056832 = k056832_get_safe_token(device); |
| 7766 | | const k056832_interface *intf = k056832_get_interface(device); |
| 7767 | | running_machine &machine = device->machine(); |
| 8221 | k056832_state *k056832 = k056832_get_safe_token(this); |
| 8222 | const k056832_interface *intf = k056832_get_interface(this); |
| 7768 | 8223 | tilemap_t *tmap; |
| 7769 | 8224 | int i; |
| 7770 | 8225 | UINT32 total; |
| r17691 | r17692 | |
| 7849 | 8304 | switch (intf->bpp) |
| 7850 | 8305 | { |
| 7851 | 8306 | case K056832_BPP_4: |
| 7852 | | total = machine.root_device().memregion(intf->gfx_memory_region)->bytes() / (i * 4); |
| 7853 | | decode_gfx(machine, intf->gfx_num, machine.root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout4, 4); |
| 8307 | total = machine().root_device().memregion(intf->gfx_memory_region)->bytes() / (i * 4); |
| 8308 | decode_gfx(machine(), intf->gfx_num, machine().root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout4, 4); |
| 7854 | 8309 | break; |
| 7855 | 8310 | |
| 7856 | 8311 | case K056832_BPP_5: |
| 7857 | | total = machine.root_device().memregion(intf->gfx_memory_region)->bytes() / (i * 5); |
| 7858 | | decode_gfx(machine, intf->gfx_num, machine.root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout5, 4); |
| 8312 | total = machine().root_device().memregion(intf->gfx_memory_region)->bytes() / (i * 5); |
| 8313 | decode_gfx(machine(), intf->gfx_num, machine().root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout5, 4); |
| 7859 | 8314 | break; |
| 7860 | 8315 | |
| 7861 | 8316 | case K056832_BPP_6: |
| 7862 | | total = machine.root_device().memregion(intf->gfx_memory_region)->bytes() / (i * 6); |
| 7863 | | decode_gfx(machine, intf->gfx_num, machine.root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout6, 4); |
| 8317 | total = machine().root_device().memregion(intf->gfx_memory_region)->bytes() / (i * 6); |
| 8318 | decode_gfx(machine(), intf->gfx_num, machine().root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout6, 4); |
| 7864 | 8319 | break; |
| 7865 | 8320 | |
| 7866 | 8321 | case K056832_BPP_8: |
| 7867 | | total = machine.root_device().memregion(intf->gfx_memory_region)->bytes() / (i * 8); |
| 7868 | | decode_gfx(machine, intf->gfx_num, machine.root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout8, 4); |
| 8322 | total = machine().root_device().memregion(intf->gfx_memory_region)->bytes() / (i * 8); |
| 8323 | decode_gfx(machine(), intf->gfx_num, machine().root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout8, 4); |
| 7869 | 8324 | break; |
| 7870 | 8325 | |
| 7871 | 8326 | case K056832_BPP_8LE: |
| 7872 | | total = machine.root_device().memregion(intf->gfx_memory_region)->bytes() / (i * 8); |
| 7873 | | decode_gfx(machine, intf->gfx_num, machine.root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout8le, 4); |
| 8327 | total = machine().root_device().memregion(intf->gfx_memory_region)->bytes() / (i * 8); |
| 8328 | decode_gfx(machine(), intf->gfx_num, machine().root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout8le, 4); |
| 7874 | 8329 | break; |
| 7875 | 8330 | |
| 7876 | 8331 | case K056832_BPP_8TASMAN: |
| 7877 | | total = machine.root_device().memregion(intf->gfx_memory_region)->bytes() / (i * 8); |
| 7878 | | decode_gfx(machine, intf->gfx_num, machine.root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout8_tasman, 4); |
| 8332 | total = machine().root_device().memregion(intf->gfx_memory_region)->bytes() / (i * 8); |
| 8333 | decode_gfx(machine(), intf->gfx_num, machine().root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout8_tasman, 4); |
| 7879 | 8334 | break; |
| 7880 | 8335 | |
| 7881 | 8336 | case K056832_BPP_4dj: |
| 7882 | | total = machine.root_device().memregion(intf->gfx_memory_region)->bytes() / (i * 4); |
| 7883 | | decode_gfx(machine, intf->gfx_num, machine.root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout4dj, 4); |
| 8337 | total = machine().root_device().memregion(intf->gfx_memory_region)->bytes() / (i * 4); |
| 8338 | decode_gfx(machine(), intf->gfx_num, machine().root_device().memregion(intf->gfx_memory_region)->base(), total, &charlayout4dj, 4); |
| 7884 | 8339 | break; |
| 7885 | 8340 | |
| 7886 | 8341 | default: |
| 7887 | 8342 | fatalerror("Unsupported bpp"); |
| 7888 | 8343 | } |
| 7889 | 8344 | |
| 7890 | | machine.gfx[intf->gfx_num]->set_granularity(16); /* override */ |
| 8345 | machine().gfx[intf->gfx_num]->set_granularity(16); /* override */ |
| 7891 | 8346 | |
| 7892 | 8347 | /* deinterleave the graphics, if needed */ |
| 7893 | | deinterleave_gfx(machine, intf->gfx_memory_region, intf->deinterleave); |
| 8348 | deinterleave_gfx(machine(), intf->gfx_memory_region, intf->deinterleave); |
| 7894 | 8349 | |
| 7895 | 8350 | k056832->memory_region = intf->gfx_memory_region; |
| 7896 | 8351 | k056832->gfxnum = intf->gfx_num; |
| 7897 | 8352 | k056832->callback = intf->callback; |
| 7898 | 8353 | |
| 7899 | | k056832->rombase = machine.root_device().memregion(intf->gfx_memory_region)->base(); |
| 7900 | | k056832->num_gfx_banks = machine.root_device().memregion(intf->gfx_memory_region)->bytes() / 0x2000; |
| 8354 | k056832->rombase = machine().root_device().memregion(intf->gfx_memory_region)->base(); |
| 8355 | k056832->num_gfx_banks = machine().root_device().memregion(intf->gfx_memory_region)->bytes() / 0x2000; |
| 7901 | 8356 | k056832->djmain_hack = intf->djmain_hack; |
| 7902 | 8357 | |
| 7903 | 8358 | k056832->cur_gfx_banks = 0; |
| r17691 | r17692 | |
| 7923 | 8378 | k056832->active_layer = 0; |
| 7924 | 8379 | k056832->linemap_enabled = 0; |
| 7925 | 8380 | |
| 7926 | | k056832->k055555 = device->machine().device(intf->k055555); |
| 8381 | k056832->k055555 = machine().device(intf->k055555); |
| 7927 | 8382 | |
| 7928 | 8383 | memset(k056832->line_dirty, 0, sizeof(UINT32) * K056832_PAGE_COUNT * 8); |
| 7929 | 8384 | |
| r17691 | r17692 | |
| 7933 | 8388 | k056832->page_tile_mode[i] = 1; |
| 7934 | 8389 | } |
| 7935 | 8390 | |
| 7936 | | k056832->videoram = auto_alloc_array(machine, UINT16, 0x2000 * (K056832_PAGE_COUNT + 1) / 2); |
| 8391 | k056832->videoram = auto_alloc_array(machine(), UINT16, 0x2000 * (K056832_PAGE_COUNT + 1) / 2); |
| 7937 | 8392 | |
| 7938 | | k056832->tilemap[0x0] = tilemap_create_device(device, k056832_get_tile_info0, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7939 | | k056832->tilemap[0x1] = tilemap_create_device(device, k056832_get_tile_info1, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7940 | | k056832->tilemap[0x2] = tilemap_create_device(device, k056832_get_tile_info2, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7941 | | k056832->tilemap[0x3] = tilemap_create_device(device, k056832_get_tile_info3, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7942 | | k056832->tilemap[0x4] = tilemap_create_device(device, k056832_get_tile_info4, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7943 | | k056832->tilemap[0x5] = tilemap_create_device(device, k056832_get_tile_info5, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7944 | | k056832->tilemap[0x6] = tilemap_create_device(device, k056832_get_tile_info6, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7945 | | k056832->tilemap[0x7] = tilemap_create_device(device, k056832_get_tile_info7, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7946 | | k056832->tilemap[0x8] = tilemap_create_device(device, k056832_get_tile_info8, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7947 | | k056832->tilemap[0x9] = tilemap_create_device(device, k056832_get_tile_info9, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7948 | | k056832->tilemap[0xa] = tilemap_create_device(device, k056832_get_tile_infoa, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7949 | | k056832->tilemap[0xb] = tilemap_create_device(device, k056832_get_tile_infob, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7950 | | k056832->tilemap[0xc] = tilemap_create_device(device, k056832_get_tile_infoc, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7951 | | k056832->tilemap[0xd] = tilemap_create_device(device, k056832_get_tile_infod, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7952 | | k056832->tilemap[0xe] = tilemap_create_device(device, k056832_get_tile_infoe, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7953 | | k056832->tilemap[0xf] = tilemap_create_device(device, k056832_get_tile_infof, TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8393 | k056832->tilemap[0x0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_info0),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8394 | k056832->tilemap[0x1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_info1),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8395 | k056832->tilemap[0x2] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_info2),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8396 | k056832->tilemap[0x3] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_info3),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8397 | k056832->tilemap[0x4] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_info4),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8398 | k056832->tilemap[0x5] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_info5),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8399 | k056832->tilemap[0x6] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_info6),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8400 | k056832->tilemap[0x7] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_info7),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8401 | k056832->tilemap[0x8] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_info8),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8402 | k056832->tilemap[0x9] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_info9),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8403 | k056832->tilemap[0xa] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_infoa),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8404 | k056832->tilemap[0xb] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_infob),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8405 | k056832->tilemap[0xc] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_infoc),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8406 | k056832->tilemap[0xd] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_infod),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8407 | k056832->tilemap[0xe] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_infoe),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 8408 | k056832->tilemap[0xf] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k056832_device::k056832_get_tile_infof),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 7954 | 8409 | |
| 7955 | 8410 | for (i = 0; i < K056832_PAGE_COUNT; i++) |
| 7956 | 8411 | { |
| r17691 | r17692 | |
| 7970 | 8425 | k056832_change_rambank(k056832); |
| 7971 | 8426 | k056832_change_rombank(k056832); |
| 7972 | 8427 | |
| 7973 | | device->save_pointer(NAME(k056832->videoram), 0x10000); |
| 7974 | | device->save_item(NAME(k056832->regs)); |
| 7975 | | device->save_item(NAME(k056832->regsb)); |
| 7976 | | device->save_item(NAME(k056832->x)); |
| 7977 | | device->save_item(NAME(k056832->y)); |
| 7978 | | device->save_item(NAME(k056832->w)); |
| 7979 | | device->save_item(NAME(k056832->h)); |
| 7980 | | device->save_item(NAME(k056832->dx)); |
| 7981 | | device->save_item(NAME(k056832->dy)); |
| 7982 | | device->save_item(NAME(k056832->layer_tile_mode)); |
| 8428 | save_pointer(NAME(k056832->videoram), 0x10000); |
| 8429 | save_item(NAME(k056832->regs)); |
| 8430 | save_item(NAME(k056832->regsb)); |
| 8431 | save_item(NAME(k056832->x)); |
| 8432 | save_item(NAME(k056832->y)); |
| 8433 | save_item(NAME(k056832->w)); |
| 8434 | save_item(NAME(k056832->h)); |
| 8435 | save_item(NAME(k056832->dx)); |
| 8436 | save_item(NAME(k056832->dy)); |
| 8437 | save_item(NAME(k056832->layer_tile_mode)); |
| 7983 | 8438 | |
| 7984 | | device->save_item(NAME(k056832->default_layer_association)); |
| 7985 | | device->save_item(NAME(k056832->active_layer)); |
| 7986 | | device->save_item(NAME(k056832->linemap_enabled)); |
| 7987 | | device->save_item(NAME(k056832->use_ext_linescroll)); |
| 7988 | | device->save_item(NAME(k056832->uses_tile_banks)); |
| 7989 | | device->save_item(NAME(k056832->cur_tile_bank)); |
| 7990 | | device->save_item(NAME(k056832->rom_half)); |
| 7991 | | device->save_item(NAME(k056832->all_lines_dirty)); |
| 7992 | | device->save_item(NAME(k056832->page_tile_mode)); |
| 8439 | save_item(NAME(k056832->default_layer_association)); |
| 8440 | save_item(NAME(k056832->active_layer)); |
| 8441 | save_item(NAME(k056832->linemap_enabled)); |
| 8442 | save_item(NAME(k056832->use_ext_linescroll)); |
| 8443 | save_item(NAME(k056832->uses_tile_banks)); |
| 8444 | save_item(NAME(k056832->cur_tile_bank)); |
| 8445 | save_item(NAME(k056832->rom_half)); |
| 8446 | save_item(NAME(k056832->all_lines_dirty)); |
| 8447 | save_item(NAME(k056832->page_tile_mode)); |
| 7993 | 8448 | |
| 7994 | 8449 | for (i = 0; i < 8; i++) |
| 7995 | 8450 | { |
| 7996 | | device->save_item(NAME(k056832->layer_offs[i]), i); |
| 7997 | | device->save_item(NAME(k056832->lsram_page[i]), i); |
| 8451 | save_item(NAME(k056832->layer_offs[i]), i); |
| 8452 | save_item(NAME(k056832->lsram_page[i]), i); |
| 7998 | 8453 | } |
| 7999 | 8454 | |
| 8000 | 8455 | for (i = 0; i < K056832_PAGE_COUNT; i++) |
| 8001 | 8456 | { |
| 8002 | | device->save_item(NAME(k056832->line_dirty[i]), i); |
| 8003 | | device->save_item(NAME(k056832->all_lines_dirty[i]), i); |
| 8004 | | device->save_item(NAME(k056832->page_tile_mode[i]), i); |
| 8005 | | device->save_item(NAME(k056832->last_colorbase[i]), i); |
| 8457 | save_item(NAME(k056832->line_dirty[i]), i); |
| 8458 | save_item(NAME(k056832->all_lines_dirty[i]), i); |
| 8459 | save_item(NAME(k056832->page_tile_mode[i]), i); |
| 8460 | save_item(NAME(k056832->last_colorbase[i]), i); |
| 8006 | 8461 | } |
| 8007 | 8462 | |
| 8008 | | device->machine().save().register_postload(save_prepost_delegate(FUNC(k056832_postload), k056832)); |
| 8463 | machine().save().register_postload(save_prepost_delegate(FUNC(k056832_postload), k056832)); |
| 8009 | 8464 | } |
| 8010 | 8465 | |
| 8466 | |
| 8011 | 8467 | /***************************************************************************/ |
| 8012 | 8468 | /* */ |
| 8013 | 8469 | /* 055555 */ |
| r17691 | r17692 | |
| 8127 | 8583 | memset(k055555->regs, 0, 64 * sizeof(UINT8)); |
| 8128 | 8584 | } |
| 8129 | 8585 | |
| 8586 | const device_type K055555 = &device_creator<k055555_device>; |
| 8130 | 8587 | |
| 8588 | k055555_device::k055555_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 8589 | : device_t(mconfig, K055555, "Konami 055555", tag, owner, clock) |
| 8590 | { |
| 8591 | m_token = global_alloc_array_clear(UINT8, sizeof(k055555_state)); |
| 8592 | } |
| 8593 | |
| 8594 | //------------------------------------------------- |
| 8595 | // device_config_complete - perform any |
| 8596 | // operations now that the configuration is |
| 8597 | // complete |
| 8598 | //------------------------------------------------- |
| 8599 | |
| 8600 | void k055555_device::device_config_complete() |
| 8601 | { |
| 8602 | } |
| 8603 | |
| 8604 | //------------------------------------------------- |
| 8605 | // device_start - device-specific startup |
| 8606 | //------------------------------------------------- |
| 8607 | |
| 8608 | void k055555_device::device_start() |
| 8609 | { |
| 8610 | DEVICE_START_NAME( k055555 )(this); |
| 8611 | } |
| 8612 | |
| 8613 | //------------------------------------------------- |
| 8614 | // device_reset - device-specific reset |
| 8615 | //------------------------------------------------- |
| 8616 | |
| 8617 | void k055555_device::device_reset() |
| 8618 | { |
| 8619 | DEVICE_RESET_NAME( k055555 )(this); |
| 8620 | } |
| 8621 | |
| 8131 | 8622 | /***************************************************************************/ |
| 8132 | 8623 | /* */ |
| 8133 | 8624 | /* 054338 */ |
| r17691 | r17692 | |
| 8431 | 8922 | memset(k054338->shd_rgb, 0, sizeof(int)*9); |
| 8432 | 8923 | } |
| 8433 | 8924 | |
| 8925 | const device_type K054338 = &device_creator<k054338_device>; |
| 8434 | 8926 | |
| 8927 | k054338_device::k054338_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 8928 | : device_t(mconfig, K054338, "Konami 054338", tag, owner, clock) |
| 8929 | { |
| 8930 | m_token = global_alloc_array_clear(UINT8, sizeof(k054338_state)); |
| 8931 | } |
| 8932 | |
| 8933 | //------------------------------------------------- |
| 8934 | // device_config_complete - perform any |
| 8935 | // operations now that the configuration is |
| 8936 | // complete |
| 8937 | //------------------------------------------------- |
| 8938 | |
| 8939 | void k054338_device::device_config_complete() |
| 8940 | { |
| 8941 | } |
| 8942 | |
| 8943 | //------------------------------------------------- |
| 8944 | // device_start - device-specific startup |
| 8945 | //------------------------------------------------- |
| 8946 | |
| 8947 | void k054338_device::device_start() |
| 8948 | { |
| 8949 | DEVICE_START_NAME( k054338 )(this); |
| 8950 | } |
| 8951 | |
| 8952 | //------------------------------------------------- |
| 8953 | // device_reset - device-specific reset |
| 8954 | //------------------------------------------------- |
| 8955 | |
| 8956 | void k054338_device::device_reset() |
| 8957 | { |
| 8958 | DEVICE_RESET_NAME( k054338 )(this); |
| 8959 | } |
| 8960 | |
| 8961 | |
| 8435 | 8962 | // Newer Konami devices |
| 8436 | 8963 | |
| 8437 | 8964 | // from video/gticlub.c |
| r17691 | r17692 | |
| 8607 | 9134 | memset(k001006->palette, 0, 0x800*sizeof(UINT32)); |
| 8608 | 9135 | } |
| 8609 | 9136 | |
| 9137 | const device_type K001006 = &device_creator<k001006_device>; |
| 8610 | 9138 | |
| 9139 | k001006_device::k001006_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 9140 | : device_t(mconfig, K001006, "Konami 001006", tag, owner, clock) |
| 9141 | { |
| 9142 | m_token = global_alloc_array_clear(UINT8, sizeof(k001006_state)); |
| 9143 | } |
| 9144 | |
| 9145 | //------------------------------------------------- |
| 9146 | // device_config_complete - perform any |
| 9147 | // operations now that the configuration is |
| 9148 | // complete |
| 9149 | //------------------------------------------------- |
| 9150 | |
| 9151 | void k001006_device::device_config_complete() |
| 9152 | { |
| 9153 | } |
| 9154 | |
| 9155 | //------------------------------------------------- |
| 9156 | // device_start - device-specific startup |
| 9157 | //------------------------------------------------- |
| 9158 | |
| 9159 | void k001006_device::device_start() |
| 9160 | { |
| 9161 | DEVICE_START_NAME( k001006 )(this); |
| 9162 | } |
| 9163 | |
| 9164 | //------------------------------------------------- |
| 9165 | // device_reset - device-specific reset |
| 9166 | //------------------------------------------------- |
| 9167 | |
| 9168 | void k001006_device::device_reset() |
| 9169 | { |
| 9170 | DEVICE_RESET_NAME( k001006 )(this); |
| 9171 | } |
| 9172 | |
| 8611 | 9173 | /*****************************************************************************/ |
| 8612 | 9174 | /* Konami K001005 Custom 3D Pixel Renderer chip (KS10071) */ |
| 8613 | 9175 | |
| r17691 | r17692 | |
| 9537 | 10099 | poly_free(k001005->poly); |
| 9538 | 10100 | } |
| 9539 | 10101 | |
| 10102 | const device_type K001005 = &device_creator<k001005_device>; |
| 9540 | 10103 | |
| 10104 | k001005_device::k001005_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10105 | : device_t(mconfig, K001005, "Konami 001005", tag, owner, clock) |
| 10106 | { |
| 10107 | m_token = global_alloc_array_clear(UINT8, sizeof(k001005_state)); |
| 10108 | } |
| 10109 | |
| 10110 | //------------------------------------------------- |
| 10111 | // device_config_complete - perform any |
| 10112 | // operations now that the configuration is |
| 10113 | // complete |
| 10114 | //------------------------------------------------- |
| 10115 | |
| 10116 | void k001005_device::device_config_complete() |
| 10117 | { |
| 10118 | } |
| 10119 | |
| 10120 | //------------------------------------------------- |
| 10121 | // device_start - device-specific startup |
| 10122 | //------------------------------------------------- |
| 10123 | |
| 10124 | void k001005_device::device_start() |
| 10125 | { |
| 10126 | DEVICE_START_NAME( k001005 )(this); |
| 10127 | } |
| 10128 | |
| 10129 | //------------------------------------------------- |
| 10130 | // device_reset - device-specific reset |
| 10131 | //------------------------------------------------- |
| 10132 | |
| 10133 | void k001005_device::device_reset() |
| 10134 | { |
| 10135 | DEVICE_RESET_NAME( k001005 )(this); |
| 10136 | } |
| 10137 | |
| 10138 | //------------------------------------------------- |
| 10139 | // device_stop - device-specific stop |
| 10140 | //------------------------------------------------- |
| 10141 | |
| 10142 | void k001005_device::device_stop() |
| 10143 | { |
| 10144 | DEVICE_STOP_NAME( k001005 )(this); |
| 10145 | } |
| 10146 | |
| 9541 | 10147 | /***************************************************************************/ |
| 9542 | 10148 | /* */ |
| 9543 | 10149 | /* 001604 */ |
| r17691 | r17692 | |
| 9614 | 10220 | /* FIXME: The TILEMAP_MAPPER below depends on parameters passed by the device interface (being game dependent). |
| 9615 | 10221 | we might simplify the code, by passing the whole TILEMAP_MAPPER as a callback in the interface, but is it really worth? */ |
| 9616 | 10222 | |
| 9617 | | static TILEMAP_MAPPER( k001604_scan_layer_8x8_0_size0 ) |
| 10223 | TILEMAP_MAPPER_MEMBER(k001604_device::k001604_scan_layer_8x8_0_size0) |
| 9618 | 10224 | { |
| 9619 | 10225 | /* logical (col,row) -> memory offset */ |
| 9620 | 10226 | return (row * 128) + col; |
| 9621 | 10227 | } |
| 9622 | 10228 | |
| 9623 | | static TILEMAP_MAPPER( k001604_scan_layer_8x8_0_size1 ) |
| 10229 | TILEMAP_MAPPER_MEMBER(k001604_device::k001604_scan_layer_8x8_0_size1) |
| 9624 | 10230 | { |
| 9625 | 10231 | /* logical (col,row) -> memory offset */ |
| 9626 | 10232 | return (row * 256) + col; |
| 9627 | 10233 | } |
| 9628 | 10234 | |
| 9629 | | static TILEMAP_MAPPER( k001604_scan_layer_8x8_1_size0 ) |
| 10235 | TILEMAP_MAPPER_MEMBER(k001604_device::k001604_scan_layer_8x8_1_size0) |
| 9630 | 10236 | { |
| 9631 | 10237 | /* logical (col,row) -> memory offset */ |
| 9632 | 10238 | return (row * 128) + col + 64; |
| 9633 | 10239 | } |
| 9634 | 10240 | |
| 9635 | | static TILEMAP_MAPPER( k001604_scan_layer_8x8_1_size1 ) |
| 10241 | TILEMAP_MAPPER_MEMBER(k001604_device::k001604_scan_layer_8x8_1_size1) |
| 9636 | 10242 | { |
| 9637 | 10243 | /* logical (col,row) -> memory offset */ |
| 9638 | 10244 | return (row * 256) + col + 64; |
| 9639 | 10245 | } |
| 9640 | 10246 | |
| 9641 | | static TILEMAP_MAPPER( slrasslt_scan_layer_8x8_0_size0 ) |
| 10247 | TILEMAP_MAPPER_MEMBER(k001604_device::slrasslt_scan_layer_8x8_0_size0) |
| 9642 | 10248 | { |
| 9643 | 10249 | /* logical (col,row) -> memory offset */ |
| 9644 | 10250 | return (row * 128) + col + 16384; |
| 9645 | 10251 | } |
| 9646 | 10252 | |
| 9647 | | static TILEMAP_MAPPER( slrasslt_scan_layer_8x8_1_size0 ) |
| 10253 | TILEMAP_MAPPER_MEMBER(k001604_device::slrasslt_scan_layer_8x8_1_size0) |
| 9648 | 10254 | { |
| 9649 | 10255 | /* logical (col,row) -> memory offset */ |
| 9650 | 10256 | return (row * 128) + col + 64 + 16384; |
| 9651 | 10257 | } |
| 9652 | 10258 | |
| 9653 | | static TILEMAP_MAPPER( k001604_scan_layer_roz_0_size0 ) |
| 10259 | TILEMAP_MAPPER_MEMBER(k001604_device::k001604_scan_layer_roz_0_size0) |
| 9654 | 10260 | { |
| 9655 | 10261 | /* logical (col,row) -> memory offset */ |
| 9656 | 10262 | return (row * 128) + col; |
| 9657 | 10263 | } |
| 9658 | 10264 | |
| 9659 | | static TILEMAP_MAPPER( k001604_scan_layer_roz_0_size1 ) |
| 10265 | TILEMAP_MAPPER_MEMBER(k001604_device::k001604_scan_layer_roz_0_size1) |
| 9660 | 10266 | { |
| 9661 | 10267 | /* logical (col,row) -> memory offset */ |
| 9662 | 10268 | return (row * 256) + col + 128; |
| 9663 | 10269 | } |
| 9664 | 10270 | |
| 9665 | | static TILEMAP_MAPPER( k001604_scan_layer_roz_1_size0 ) |
| 10271 | TILEMAP_MAPPER_MEMBER(k001604_device::k001604_scan_layer_roz_1_size0) |
| 9666 | 10272 | { |
| 9667 | 10273 | /* logical (col,row) -> memory offset */ |
| 9668 | 10274 | return (row * 128) + col + 64; |
| 9669 | 10275 | } |
| 9670 | 10276 | |
| 9671 | | static TILEMAP_MAPPER( k001604_scan_layer_roz_1_size1 ) |
| 10277 | TILEMAP_MAPPER_MEMBER(k001604_device::k001604_scan_layer_roz_1_size1) |
| 9672 | 10278 | { |
| 9673 | 10279 | /* logical (col,row) -> memory offset */ |
| 9674 | 10280 | return (row * 256) + col + 128 + 64; |
| 9675 | 10281 | } |
| 9676 | 10282 | |
| 9677 | | static TILE_GET_INFO_DEVICE( k001604_tile_info_layer_8x8 ) |
| 10283 | TILE_GET_INFO_MEMBER(k001604_device::k001604_tile_info_layer_8x8) |
| 9678 | 10284 | { |
| 9679 | | k001604_state *k001604 = k001604_get_safe_token(device); |
| 10285 | k001604_state *k001604 = k001604_get_safe_token(this); |
| 9680 | 10286 | UINT32 val = k001604->tile_ram[tile_index]; |
| 9681 | 10287 | int color = (val >> 17) & 0x1f; |
| 9682 | 10288 | int tile = (val & 0x7fff); |
| r17691 | r17692 | |
| 9687 | 10293 | if (val & 0x800000) |
| 9688 | 10294 | flags |= TILE_FLIPY; |
| 9689 | 10295 | |
| 9690 | | SET_TILE_INFO_DEVICE(k001604->gfx_index[0], tile, color, flags); |
| 10296 | SET_TILE_INFO_MEMBER(k001604->gfx_index[0], tile, color, flags); |
| 9691 | 10297 | } |
| 9692 | 10298 | |
| 9693 | | static TILE_GET_INFO_DEVICE( k001604_tile_info_layer_roz ) |
| 10299 | TILE_GET_INFO_MEMBER(k001604_device::k001604_tile_info_layer_roz) |
| 9694 | 10300 | { |
| 9695 | | k001604_state *k001604 = k001604_get_safe_token(device); |
| 10301 | k001604_state *k001604 = k001604_get_safe_token(this); |
| 9696 | 10302 | UINT32 val = k001604->tile_ram[tile_index]; |
| 9697 | 10303 | int flags = 0; |
| 9698 | 10304 | int color = (val >> 17) & 0x1f; |
| r17691 | r17692 | |
| 9705 | 10311 | |
| 9706 | 10312 | tile += k001604->roz_size ? 0x800 : 0x2000; |
| 9707 | 10313 | |
| 9708 | | SET_TILE_INFO_DEVICE(k001604->gfx_index[k001604->roz_size], tile, color, flags); |
| 10314 | SET_TILE_INFO_MEMBER(k001604->gfx_index[k001604->roz_size], tile, color, flags); |
| 9709 | 10315 | } |
| 9710 | 10316 | |
| 9711 | 10317 | |
| r17691 | r17692 | |
| 9886 | 10492 | } |
| 9887 | 10493 | } |
| 9888 | 10494 | |
| 10495 | const device_type K001604 = &device_creator<k001604_device>; |
| 9889 | 10496 | |
| 9890 | | /***************************************************************************** |
| 9891 | | DEVICE INTERFACE |
| 9892 | | *****************************************************************************/ |
| 10497 | k001604_device::k001604_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10498 | : device_t(mconfig, K001604, "Konami 001604", tag, owner, clock) |
| 10499 | { |
| 10500 | m_token = global_alloc_array_clear(UINT8, sizeof(k001604_state)); |
| 10501 | } |
| 9893 | 10502 | |
| 9894 | | static DEVICE_START( k001604 ) |
| 10503 | //------------------------------------------------- |
| 10504 | // device_config_complete - perform any |
| 10505 | // operations now that the configuration is |
| 10506 | // complete |
| 10507 | //------------------------------------------------- |
| 10508 | |
| 10509 | void k001604_device::device_config_complete() |
| 9895 | 10510 | { |
| 9896 | | k001604_state *k001604 = k001604_get_safe_token(device); |
| 9897 | | const k001604_interface *intf = k001604_get_interface(device); |
| 10511 | } |
| 10512 | |
| 10513 | //------------------------------------------------- |
| 10514 | // device_start - device-specific startup |
| 10515 | //------------------------------------------------- |
| 10516 | |
| 10517 | void k001604_device::device_start() |
| 10518 | { |
| 10519 | k001604_state *k001604 = k001604_get_safe_token(this); |
| 10520 | const k001604_interface *intf = k001604_get_interface(this); |
| 9898 | 10521 | int roz_tile_size; |
| 9899 | 10522 | |
| 9900 | 10523 | k001604->layer_size = intf->layer_size; // 0 -> width = 128 tiles, 1 -> width = 256 tiles |
| r17691 | r17692 | |
| 9903 | 10526 | k001604->gfx_index[0] = intf->gfx_index_1; |
| 9904 | 10527 | k001604->gfx_index[1] = intf->gfx_index_2; |
| 9905 | 10528 | |
| 9906 | | k001604->char_ram = auto_alloc_array(device->machine(), UINT32, 0x200000 / 4); |
| 9907 | | k001604->tile_ram = auto_alloc_array(device->machine(), UINT32, 0x20000 / 4); |
| 9908 | | k001604->reg = auto_alloc_array(device->machine(), UINT32, 0x400 / 4); |
| 10529 | k001604->char_ram = auto_alloc_array(machine(), UINT32, 0x200000 / 4); |
| 10530 | k001604->tile_ram = auto_alloc_array(machine(), UINT32, 0x20000 / 4); |
| 10531 | k001604->reg = auto_alloc_array(machine(), UINT32, 0x400 / 4); |
| 9909 | 10532 | |
| 9910 | 10533 | /* create tilemaps */ |
| 9911 | 10534 | roz_tile_size = k001604->roz_size ? 16 : 8; |
| r17691 | r17692 | |
| 9913 | 10536 | { |
| 9914 | 10537 | if (k001604->layer_size) |
| 9915 | 10538 | { |
| 9916 | | k001604->layer_8x8[0] = tilemap_create_device(device, k001604_tile_info_layer_8x8, k001604_scan_layer_8x8_0_size1, 8, 8, 64, 64); |
| 9917 | | k001604->layer_8x8[1] = tilemap_create_device(device, k001604_tile_info_layer_8x8, k001604_scan_layer_8x8_1_size1, 8, 8, 64, 64); |
| 9918 | | k001604->layer_roz[0] = tilemap_create_device(device, k001604_tile_info_layer_roz, k001604_scan_layer_roz_0_size1, roz_tile_size, roz_tile_size, 64, 64); |
| 9919 | | k001604->layer_roz[1] = tilemap_create_device(device, k001604_tile_info_layer_roz, k001604_scan_layer_roz_1_size1, roz_tile_size, roz_tile_size, 64, 64); |
| 10539 | k001604->layer_8x8[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k001604_device::k001604_tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::k001604_scan_layer_8x8_0_size1),this), 8, 8, 64, 64); |
| 10540 | k001604->layer_8x8[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k001604_device::k001604_tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::k001604_scan_layer_8x8_1_size1),this), 8, 8, 64, 64); |
| 10541 | k001604->layer_roz[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k001604_device::k001604_tile_info_layer_roz),this), tilemap_mapper_delegate(FUNC(k001604_device::k001604_scan_layer_roz_0_size1),this), roz_tile_size, roz_tile_size, 64, 64); |
| 10542 | k001604->layer_roz[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k001604_device::k001604_tile_info_layer_roz),this), tilemap_mapper_delegate(FUNC(k001604_device::k001604_scan_layer_roz_1_size1),this), roz_tile_size, roz_tile_size, 64, 64); |
| 9920 | 10543 | } |
| 9921 | 10544 | else |
| 9922 | 10545 | { |
| 9923 | | k001604->layer_8x8[0] = tilemap_create_device(device, k001604_tile_info_layer_8x8, k001604_scan_layer_8x8_0_size0, 8, 8, 64, 64); |
| 9924 | | k001604->layer_8x8[1] = tilemap_create_device(device, k001604_tile_info_layer_8x8, k001604_scan_layer_8x8_1_size0, 8, 8, 64, 64); |
| 9925 | | k001604->layer_roz[0] = tilemap_create_device(device, k001604_tile_info_layer_roz, k001604_scan_layer_roz_0_size0, roz_tile_size, roz_tile_size, 128, 64); |
| 9926 | | k001604->layer_roz[1] = tilemap_create_device(device, k001604_tile_info_layer_roz, k001604_scan_layer_roz_1_size0, roz_tile_size, roz_tile_size, 64, 64); |
| 10546 | k001604->layer_8x8[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k001604_device::k001604_tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::k001604_scan_layer_8x8_0_size0),this), 8, 8, 64, 64); |
| 10547 | k001604->layer_8x8[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k001604_device::k001604_tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::k001604_scan_layer_8x8_1_size0),this), 8, 8, 64, 64); |
| 10548 | k001604->layer_roz[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k001604_device::k001604_tile_info_layer_roz),this), tilemap_mapper_delegate(FUNC(k001604_device::k001604_scan_layer_roz_0_size0),this), roz_tile_size, roz_tile_size, 128, 64); |
| 10549 | k001604->layer_roz[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k001604_device::k001604_tile_info_layer_roz),this), tilemap_mapper_delegate(FUNC(k001604_device::k001604_scan_layer_roz_1_size0),this), roz_tile_size, roz_tile_size, 64, 64); |
| 9927 | 10550 | } |
| 9928 | 10551 | } |
| 9929 | 10552 | else /* slrasslt has shifted tilemaps (but only has k001604->layer_size = 0) */ |
| 9930 | 10553 | { |
| 9931 | | k001604->layer_8x8[0] = tilemap_create_device(device, k001604_tile_info_layer_8x8, slrasslt_scan_layer_8x8_0_size0, 8, 8, 64, 64); |
| 9932 | | k001604->layer_8x8[1] = tilemap_create_device(device, k001604_tile_info_layer_8x8, slrasslt_scan_layer_8x8_1_size0, 8, 8, 64, 64); |
| 9933 | | k001604->layer_roz[0] = tilemap_create_device(device, k001604_tile_info_layer_roz, k001604_scan_layer_roz_0_size0, roz_tile_size, roz_tile_size, 128, 64); |
| 9934 | | k001604->layer_roz[1] = tilemap_create_device(device, k001604_tile_info_layer_roz, k001604_scan_layer_roz_1_size0, roz_tile_size, roz_tile_size, 64, 64); |
| 10554 | k001604->layer_8x8[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k001604_device::k001604_tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::slrasslt_scan_layer_8x8_0_size0),this), 8, 8, 64, 64); |
| 10555 | k001604->layer_8x8[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k001604_device::k001604_tile_info_layer_8x8),this), tilemap_mapper_delegate(FUNC(k001604_device::slrasslt_scan_layer_8x8_1_size0),this), 8, 8, 64, 64); |
| 10556 | k001604->layer_roz[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k001604_device::k001604_tile_info_layer_roz),this), tilemap_mapper_delegate(FUNC(k001604_device::k001604_scan_layer_roz_0_size0),this), roz_tile_size, roz_tile_size, 128, 64); |
| 10557 | k001604->layer_roz[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k001604_device::k001604_tile_info_layer_roz),this), tilemap_mapper_delegate(FUNC(k001604_device::k001604_scan_layer_roz_1_size0),this), roz_tile_size, roz_tile_size, 64, 64); |
| 9935 | 10558 | } |
| 9936 | 10559 | |
| 9937 | 10560 | k001604->layer_8x8[0]->set_transparent_pen(0); |
| 9938 | 10561 | k001604->layer_8x8[1]->set_transparent_pen(0); |
| 9939 | 10562 | |
| 9940 | | device->machine().gfx[k001604->gfx_index[0]] = auto_alloc(device->machine(), gfx_element(device->machine(), k001604_char_layout_layer_8x8, (UINT8*)&k001604->char_ram[0], device->machine().total_colors() / 16, 0)); |
| 9941 | | device->machine().gfx[k001604->gfx_index[1]] = auto_alloc(device->machine(), gfx_element(device->machine(), k001604_char_layout_layer_16x16, (UINT8*)&k001604->char_ram[0], device->machine().total_colors() / 16, 0)); |
| 10563 | machine().gfx[k001604->gfx_index[0]] = auto_alloc(machine(), gfx_element(machine(), k001604_char_layout_layer_8x8, (UINT8*)&k001604->char_ram[0], machine().total_colors() / 16, 0)); |
| 10564 | machine().gfx[k001604->gfx_index[1]] = auto_alloc(machine(), gfx_element(machine(), k001604_char_layout_layer_16x16, (UINT8*)&k001604->char_ram[0], machine().total_colors() / 16, 0)); |
| 9942 | 10565 | |
| 9943 | | device->save_pointer(NAME(k001604->reg), 0x400 / 4); |
| 9944 | | device->save_pointer(NAME(k001604->char_ram), 0x200000 / 4); |
| 9945 | | device->save_pointer(NAME(k001604->tile_ram), 0x20000 / 4); |
| 10566 | save_pointer(NAME(k001604->reg), 0x400 / 4); |
| 10567 | save_pointer(NAME(k001604->char_ram), 0x200000 / 4); |
| 10568 | save_pointer(NAME(k001604->tile_ram), 0x20000 / 4); |
| 10569 | |
| 9946 | 10570 | } |
| 9947 | 10571 | |
| 9948 | | static DEVICE_RESET( k001604 ) |
| 10572 | //------------------------------------------------- |
| 10573 | // device_reset - device-specific reset |
| 10574 | //------------------------------------------------- |
| 10575 | |
| 10576 | void k001604_device::device_reset() |
| 9949 | 10577 | { |
| 9950 | | k001604_state *k001604 = k001604_get_safe_token(device); |
| 10578 | k001604_state *k001604 = k001604_get_safe_token(this); |
| 9951 | 10579 | |
| 9952 | 10580 | memset(k001604->char_ram, 0, 0x200000); |
| 9953 | 10581 | memset(k001604->tile_ram, 0, 0x10000); |
| r17691 | r17692 | |
| 10012 | 10640 | 8*128 |
| 10013 | 10641 | }; |
| 10014 | 10642 | |
| 10015 | | static TILE_GET_INFO_DEVICE( k037122_tile_info_layer0 ) |
| 10643 | TILE_GET_INFO_MEMBER(k037122_device::k037122_tile_info_layer0) |
| 10016 | 10644 | { |
| 10017 | | k037122_state *k037122 = k037122_get_safe_token(device); |
| 10645 | k037122_state *k037122 = k037122_get_safe_token(this); |
| 10018 | 10646 | UINT32 val = k037122->tile_ram[tile_index + (0x8000/4)]; |
| 10019 | 10647 | int color = (val >> 17) & 0x1f; |
| 10020 | 10648 | int tile = val & 0x3fff; |
| r17691 | r17692 | |
| 10025 | 10653 | if (val & 0x800000) |
| 10026 | 10654 | flags |= TILE_FLIPY; |
| 10027 | 10655 | |
| 10028 | | SET_TILE_INFO_DEVICE(k037122->gfx_index, tile, color, flags); |
| 10656 | SET_TILE_INFO_MEMBER(k037122->gfx_index, tile, color, flags); |
| 10029 | 10657 | } |
| 10030 | 10658 | |
| 10031 | | static TILE_GET_INFO_DEVICE( k037122_tile_info_layer1 ) |
| 10659 | TILE_GET_INFO_MEMBER(k037122_device::k037122_tile_info_layer1) |
| 10032 | 10660 | { |
| 10033 | | k037122_state *k037122 = k037122_get_safe_token(device); |
| 10661 | k037122_state *k037122 = k037122_get_safe_token(this); |
| 10034 | 10662 | UINT32 val = k037122->tile_ram[tile_index]; |
| 10035 | 10663 | int color = (val >> 17) & 0x1f; |
| 10036 | 10664 | int tile = val & 0x3fff; |
| r17691 | r17692 | |
| 10041 | 10669 | if (val & 0x800000) |
| 10042 | 10670 | flags |= TILE_FLIPY; |
| 10043 | 10671 | |
| 10044 | | SET_TILE_INFO_DEVICE(k037122->gfx_index, tile, color, flags); |
| 10672 | SET_TILE_INFO_MEMBER(k037122->gfx_index, tile, color, flags); |
| 10045 | 10673 | } |
| 10046 | 10674 | |
| 10047 | 10675 | |
| r17691 | r17692 | |
| 10161 | 10789 | DEVICE INTERFACE |
| 10162 | 10790 | *****************************************************************************/ |
| 10163 | 10791 | |
| 10164 | | static DEVICE_START( k037122 ) |
| 10792 | const device_type K037122 = &device_creator<k037122_device>; |
| 10793 | |
| 10794 | k037122_device::k037122_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10795 | : device_t(mconfig, K037122, "Konami 0371222", tag, owner, clock) |
| 10165 | 10796 | { |
| 10166 | | k037122_state *k037122 = k037122_get_safe_token(device); |
| 10167 | | const k037122_interface *intf = k037122_get_interface(device); |
| 10797 | m_token = global_alloc_array_clear(UINT8, sizeof(k037122_state)); |
| 10798 | } |
| 10168 | 10799 | |
| 10169 | | k037122->screen = device->machine().device<screen_device>(intf->screen); |
| 10800 | //------------------------------------------------- |
| 10801 | // device_config_complete - perform any |
| 10802 | // operations now that the configuration is |
| 10803 | // complete |
| 10804 | //------------------------------------------------- |
| 10805 | |
| 10806 | void k037122_device::device_config_complete() |
| 10807 | { |
| 10808 | } |
| 10809 | |
| 10810 | //------------------------------------------------- |
| 10811 | // device_start - device-specific startup |
| 10812 | //------------------------------------------------- |
| 10813 | |
| 10814 | void k037122_device::device_start() |
| 10815 | { |
| 10816 | k037122_state *k037122 = k037122_get_safe_token(this); |
| 10817 | const k037122_interface *intf = k037122_get_interface(this); |
| 10818 | |
| 10819 | k037122->screen = machine().device<screen_device>(intf->screen); |
| 10170 | 10820 | k037122->gfx_index = intf->gfx_index; |
| 10171 | 10821 | |
| 10172 | | k037122->char_ram = auto_alloc_array(device->machine(), UINT32, 0x200000 / 4); |
| 10173 | | k037122->tile_ram = auto_alloc_array(device->machine(), UINT32, 0x20000 / 4); |
| 10174 | | k037122->reg = auto_alloc_array(device->machine(), UINT32, 0x400 / 4); |
| 10822 | k037122->char_ram = auto_alloc_array(machine(), UINT32, 0x200000 / 4); |
| 10823 | k037122->tile_ram = auto_alloc_array(machine(), UINT32, 0x20000 / 4); |
| 10824 | k037122->reg = auto_alloc_array(machine(), UINT32, 0x400 / 4); |
| 10175 | 10825 | |
| 10176 | | k037122->layer[0] = tilemap_create_device(device, k037122_tile_info_layer0, TILEMAP_SCAN_ROWS, 8, 8, 256, 64); |
| 10177 | | k037122->layer[1] = tilemap_create_device(device, k037122_tile_info_layer1, TILEMAP_SCAN_ROWS, 8, 8, 128, 64); |
| 10826 | k037122->layer[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k037122_device::k037122_tile_info_layer0),this), TILEMAP_SCAN_ROWS, 8, 8, 256, 64); |
| 10827 | k037122->layer[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(k037122_device::k037122_tile_info_layer1),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64); |
| 10178 | 10828 | |
| 10179 | 10829 | k037122->layer[0]->set_transparent_pen(0); |
| 10180 | 10830 | k037122->layer[1]->set_transparent_pen(0); |
| 10181 | 10831 | |
| 10182 | | device->machine().gfx[k037122->gfx_index] = auto_alloc(device->machine(), gfx_element(device->machine(), k037122_char_layout, (UINT8*)k037122->char_ram, device->machine().total_colors() / 16, 0)); |
| 10832 | machine().gfx[k037122->gfx_index] = auto_alloc(machine(), gfx_element(machine(), k037122_char_layout, (UINT8*)k037122->char_ram, machine().total_colors() / 16, 0)); |
| 10183 | 10833 | |
| 10184 | | device->save_pointer(NAME(k037122->reg), 0x400 / 4); |
| 10185 | | device->save_pointer(NAME(k037122->char_ram), 0x200000 / 4); |
| 10186 | | device->save_pointer(NAME(k037122->tile_ram), 0x20000 / 4); |
| 10834 | save_pointer(NAME(k037122->reg), 0x400 / 4); |
| 10835 | save_pointer(NAME(k037122->char_ram), 0x200000 / 4); |
| 10836 | save_pointer(NAME(k037122->tile_ram), 0x20000 / 4); |
| 10837 | |
| 10187 | 10838 | } |
| 10188 | 10839 | |
| 10189 | | static DEVICE_RESET( k037122 ) |
| 10840 | //------------------------------------------------- |
| 10841 | // device_reset - device-specific reset |
| 10842 | //------------------------------------------------- |
| 10843 | |
| 10844 | void k037122_device::device_reset() |
| 10190 | 10845 | { |
| 10191 | | k037122_state *k037122 = k037122_get_safe_token(device); |
| 10846 | k037122_state *k037122 = k037122_get_safe_token(this); |
| 10192 | 10847 | |
| 10193 | 10848 | memset(k037122->char_ram, 0, 0x200000); |
| 10194 | 10849 | memset(k037122->tile_ram, 0, 0x20000); |
| r17691 | r17692 | |
| 10274 | 10929 | return(k053244->regs[offset * 2] << 8 | k053244->regs[offset * 2 + 1]); |
| 10275 | 10930 | } |
| 10276 | 10931 | |
| 10277 | | const device_type K007121 = &device_creator<k007121_device>; |
| 10278 | | |
| 10279 | | k007121_device::k007121_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10280 | | : device_t(mconfig, K007121, "Konami 007121", tag, owner, clock) |
| 10281 | | { |
| 10282 | | m_token = global_alloc_array_clear(UINT8, sizeof(k007121_state)); |
| 10283 | | } |
| 10284 | | |
| 10285 | | //------------------------------------------------- |
| 10286 | | // device_config_complete - perform any |
| 10287 | | // operations now that the configuration is |
| 10288 | | // complete |
| 10289 | | //------------------------------------------------- |
| 10290 | | |
| 10291 | | void k007121_device::device_config_complete() |
| 10292 | | { |
| 10293 | | } |
| 10294 | | |
| 10295 | | //------------------------------------------------- |
| 10296 | | // device_start - device-specific startup |
| 10297 | | //------------------------------------------------- |
| 10298 | | |
| 10299 | | void k007121_device::device_start() |
| 10300 | | { |
| 10301 | | DEVICE_START_NAME( k007121 )(this); |
| 10302 | | } |
| 10303 | | |
| 10304 | | //------------------------------------------------- |
| 10305 | | // device_reset - device-specific reset |
| 10306 | | //------------------------------------------------- |
| 10307 | | |
| 10308 | | void k007121_device::device_reset() |
| 10309 | | { |
| 10310 | | DEVICE_RESET_NAME( k007121 )(this); |
| 10311 | | } |
| 10312 | | |
| 10313 | | |
| 10314 | | const device_type K007342 = &device_creator<k007342_device>; |
| 10315 | | |
| 10316 | | k007342_device::k007342_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10317 | | : device_t(mconfig, K007342, "Konami 007342", tag, owner, clock) |
| 10318 | | { |
| 10319 | | m_token = global_alloc_array_clear(UINT8, sizeof(k007342_state)); |
| 10320 | | } |
| 10321 | | |
| 10322 | | //------------------------------------------------- |
| 10323 | | // device_config_complete - perform any |
| 10324 | | // operations now that the configuration is |
| 10325 | | // complete |
| 10326 | | //------------------------------------------------- |
| 10327 | | |
| 10328 | | void k007342_device::device_config_complete() |
| 10329 | | { |
| 10330 | | } |
| 10331 | | |
| 10332 | | //------------------------------------------------- |
| 10333 | | // device_start - device-specific startup |
| 10334 | | //------------------------------------------------- |
| 10335 | | |
| 10336 | | void k007342_device::device_start() |
| 10337 | | { |
| 10338 | | DEVICE_START_NAME( k007342 )(this); |
| 10339 | | } |
| 10340 | | |
| 10341 | | //------------------------------------------------- |
| 10342 | | // device_reset - device-specific reset |
| 10343 | | //------------------------------------------------- |
| 10344 | | |
| 10345 | | void k007342_device::device_reset() |
| 10346 | | { |
| 10347 | | DEVICE_RESET_NAME( k007342 )(this); |
| 10348 | | } |
| 10349 | | |
| 10350 | | |
| 10351 | | const device_type K007420 = &device_creator<k007420_device>; |
| 10352 | | |
| 10353 | | k007420_device::k007420_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10354 | | : device_t(mconfig, K007420, "Konami 007420", tag, owner, clock) |
| 10355 | | { |
| 10356 | | m_token = global_alloc_array_clear(UINT8, sizeof(k007420_state)); |
| 10357 | | } |
| 10358 | | |
| 10359 | | //------------------------------------------------- |
| 10360 | | // device_config_complete - perform any |
| 10361 | | // operations now that the configuration is |
| 10362 | | // complete |
| 10363 | | //------------------------------------------------- |
| 10364 | | |
| 10365 | | void k007420_device::device_config_complete() |
| 10366 | | { |
| 10367 | | } |
| 10368 | | |
| 10369 | | //------------------------------------------------- |
| 10370 | | // device_start - device-specific startup |
| 10371 | | //------------------------------------------------- |
| 10372 | | |
| 10373 | | void k007420_device::device_start() |
| 10374 | | { |
| 10375 | | DEVICE_START_NAME( k007420 )(this); |
| 10376 | | } |
| 10377 | | |
| 10378 | | //------------------------------------------------- |
| 10379 | | // device_reset - device-specific reset |
| 10380 | | //------------------------------------------------- |
| 10381 | | |
| 10382 | | void k007420_device::device_reset() |
| 10383 | | { |
| 10384 | | DEVICE_RESET_NAME( k007420 )(this); |
| 10385 | | } |
| 10386 | | |
| 10387 | | |
| 10388 | | const device_type K052109 = &device_creator<k052109_device>; |
| 10389 | | |
| 10390 | | k052109_device::k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10391 | | : device_t(mconfig, K052109, "Konami 052109", tag, owner, clock) |
| 10392 | | { |
| 10393 | | m_token = global_alloc_array_clear(UINT8, sizeof(k052109_state)); |
| 10394 | | } |
| 10395 | | |
| 10396 | | //------------------------------------------------- |
| 10397 | | // device_config_complete - perform any |
| 10398 | | // operations now that the configuration is |
| 10399 | | // complete |
| 10400 | | //------------------------------------------------- |
| 10401 | | |
| 10402 | | void k052109_device::device_config_complete() |
| 10403 | | { |
| 10404 | | } |
| 10405 | | |
| 10406 | | //------------------------------------------------- |
| 10407 | | // device_start - device-specific startup |
| 10408 | | //------------------------------------------------- |
| 10409 | | |
| 10410 | | void k052109_device::device_start() |
| 10411 | | { |
| 10412 | | DEVICE_START_NAME( k052109 )(this); |
| 10413 | | } |
| 10414 | | |
| 10415 | | //------------------------------------------------- |
| 10416 | | // device_reset - device-specific reset |
| 10417 | | //------------------------------------------------- |
| 10418 | | |
| 10419 | | void k052109_device::device_reset() |
| 10420 | | { |
| 10421 | | DEVICE_RESET_NAME( k052109 )(this); |
| 10422 | | } |
| 10423 | | |
| 10424 | | |
| 10425 | | const device_type K051960 = &device_creator<k051960_device>; |
| 10426 | | |
| 10427 | | k051960_device::k051960_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10428 | | : device_t(mconfig, K051960, "Konami 051960", tag, owner, clock) |
| 10429 | | { |
| 10430 | | m_token = global_alloc_array_clear(UINT8, sizeof(k051960_state)); |
| 10431 | | } |
| 10432 | | |
| 10433 | | //------------------------------------------------- |
| 10434 | | // device_config_complete - perform any |
| 10435 | | // operations now that the configuration is |
| 10436 | | // complete |
| 10437 | | //------------------------------------------------- |
| 10438 | | |
| 10439 | | void k051960_device::device_config_complete() |
| 10440 | | { |
| 10441 | | } |
| 10442 | | |
| 10443 | | //------------------------------------------------- |
| 10444 | | // device_start - device-specific startup |
| 10445 | | //------------------------------------------------- |
| 10446 | | |
| 10447 | | void k051960_device::device_start() |
| 10448 | | { |
| 10449 | | DEVICE_START_NAME( k051960 )(this); |
| 10450 | | } |
| 10451 | | |
| 10452 | | //------------------------------------------------- |
| 10453 | | // device_reset - device-specific reset |
| 10454 | | //------------------------------------------------- |
| 10455 | | |
| 10456 | | void k051960_device::device_reset() |
| 10457 | | { |
| 10458 | | DEVICE_RESET_NAME( k051960 )(this); |
| 10459 | | } |
| 10460 | | |
| 10461 | | |
| 10462 | | const device_type K053244 = &device_creator<k05324x_device>; |
| 10463 | | |
| 10464 | | k05324x_device::k05324x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10465 | | : device_t(mconfig, K053244, "Konami 053244 & 053245", tag, owner, clock) |
| 10466 | | { |
| 10467 | | m_token = global_alloc_array_clear(UINT8, sizeof(k05324x_state)); |
| 10468 | | } |
| 10469 | | |
| 10470 | | //------------------------------------------------- |
| 10471 | | // device_config_complete - perform any |
| 10472 | | // operations now that the configuration is |
| 10473 | | // complete |
| 10474 | | //------------------------------------------------- |
| 10475 | | |
| 10476 | | void k05324x_device::device_config_complete() |
| 10477 | | { |
| 10478 | | } |
| 10479 | | |
| 10480 | | //------------------------------------------------- |
| 10481 | | // device_start - device-specific startup |
| 10482 | | //------------------------------------------------- |
| 10483 | | |
| 10484 | | void k05324x_device::device_start() |
| 10485 | | { |
| 10486 | | DEVICE_START_NAME( k05324x )(this); |
| 10487 | | } |
| 10488 | | |
| 10489 | | //------------------------------------------------- |
| 10490 | | // device_reset - device-specific reset |
| 10491 | | //------------------------------------------------- |
| 10492 | | |
| 10493 | | void k05324x_device::device_reset() |
| 10494 | | { |
| 10495 | | DEVICE_RESET_NAME( k05324x )(this); |
| 10496 | | } |
| 10497 | | |
| 10498 | | |
| 10499 | | const device_type K053246 = &device_creator<k053247_device>; |
| 10500 | | |
| 10501 | | k053247_device::k053247_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10502 | | : device_t(mconfig, K053246, "Konami 053246 & 053247", tag, owner, clock) |
| 10503 | | { |
| 10504 | | m_token = global_alloc_array_clear(UINT8, sizeof(k053247_state)); |
| 10505 | | } |
| 10506 | | |
| 10507 | | //------------------------------------------------- |
| 10508 | | // device_config_complete - perform any |
| 10509 | | // operations now that the configuration is |
| 10510 | | // complete |
| 10511 | | //------------------------------------------------- |
| 10512 | | |
| 10513 | | void k053247_device::device_config_complete() |
| 10514 | | { |
| 10515 | | } |
| 10516 | | |
| 10517 | | //------------------------------------------------- |
| 10518 | | // device_start - device-specific startup |
| 10519 | | //------------------------------------------------- |
| 10520 | | |
| 10521 | | void k053247_device::device_start() |
| 10522 | | { |
| 10523 | | DEVICE_START_NAME( k053247 )(this); |
| 10524 | | } |
| 10525 | | |
| 10526 | | //------------------------------------------------- |
| 10527 | | // device_reset - device-specific reset |
| 10528 | | //------------------------------------------------- |
| 10529 | | |
| 10530 | | void k053247_device::device_reset() |
| 10531 | | { |
| 10532 | | DEVICE_RESET_NAME( k053247 )(this); |
| 10533 | | } |
| 10534 | | |
| 10535 | | |
| 10536 | | const device_type K055673 = &device_creator<k055673_device>; |
| 10537 | | |
| 10538 | | k055673_device::k055673_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10539 | | : device_t(mconfig, K055673, "Konami 055673", tag, owner, clock) |
| 10540 | | { |
| 10541 | | m_token = global_alloc_array_clear(UINT8, sizeof(k053247_state)); |
| 10542 | | } |
| 10543 | | |
| 10544 | | //------------------------------------------------- |
| 10545 | | // device_config_complete - perform any |
| 10546 | | // operations now that the configuration is |
| 10547 | | // complete |
| 10548 | | //------------------------------------------------- |
| 10549 | | |
| 10550 | | void k055673_device::device_config_complete() |
| 10551 | | { |
| 10552 | | } |
| 10553 | | |
| 10554 | | //------------------------------------------------- |
| 10555 | | // device_start - device-specific startup |
| 10556 | | //------------------------------------------------- |
| 10557 | | |
| 10558 | | void k055673_device::device_start() |
| 10559 | | { |
| 10560 | | DEVICE_START_NAME( k055673 )(this); |
| 10561 | | } |
| 10562 | | |
| 10563 | | //------------------------------------------------- |
| 10564 | | // device_reset - device-specific reset |
| 10565 | | //------------------------------------------------- |
| 10566 | | |
| 10567 | | void k055673_device::device_reset() |
| 10568 | | { |
| 10569 | | DEVICE_RESET_NAME( k053247 )(this); |
| 10570 | | } |
| 10571 | | |
| 10572 | | |
| 10573 | | const device_type K051316 = &device_creator<k051316_device>; |
| 10574 | | |
| 10575 | | k051316_device::k051316_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10576 | | : device_t(mconfig, K051316, "Konami 051316", tag, owner, clock) |
| 10577 | | { |
| 10578 | | m_token = global_alloc_array_clear(UINT8, sizeof(k051316_state)); |
| 10579 | | } |
| 10580 | | |
| 10581 | | //------------------------------------------------- |
| 10582 | | // device_config_complete - perform any |
| 10583 | | // operations now that the configuration is |
| 10584 | | // complete |
| 10585 | | //------------------------------------------------- |
| 10586 | | |
| 10587 | | void k051316_device::device_config_complete() |
| 10588 | | { |
| 10589 | | } |
| 10590 | | |
| 10591 | | //------------------------------------------------- |
| 10592 | | // device_start - device-specific startup |
| 10593 | | //------------------------------------------------- |
| 10594 | | |
| 10595 | | void k051316_device::device_start() |
| 10596 | | { |
| 10597 | | DEVICE_START_NAME( k051316 )(this); |
| 10598 | | } |
| 10599 | | |
| 10600 | | //------------------------------------------------- |
| 10601 | | // device_reset - device-specific reset |
| 10602 | | //------------------------------------------------- |
| 10603 | | |
| 10604 | | void k051316_device::device_reset() |
| 10605 | | { |
| 10606 | | DEVICE_RESET_NAME( k051316 )(this); |
| 10607 | | } |
| 10608 | | |
| 10609 | | |
| 10610 | | const device_type K053936 = &device_creator<k053936_device>; |
| 10611 | | |
| 10612 | | k053936_device::k053936_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10613 | | : device_t(mconfig, K053936, "Konami 053936", tag, owner, clock) |
| 10614 | | { |
| 10615 | | m_token = global_alloc_array_clear(UINT8, sizeof(k053936_state)); |
| 10616 | | } |
| 10617 | | |
| 10618 | | //------------------------------------------------- |
| 10619 | | // device_config_complete - perform any |
| 10620 | | // operations now that the configuration is |
| 10621 | | // complete |
| 10622 | | //------------------------------------------------- |
| 10623 | | |
| 10624 | | void k053936_device::device_config_complete() |
| 10625 | | { |
| 10626 | | } |
| 10627 | | |
| 10628 | | //------------------------------------------------- |
| 10629 | | // device_start - device-specific startup |
| 10630 | | //------------------------------------------------- |
| 10631 | | |
| 10632 | | void k053936_device::device_start() |
| 10633 | | { |
| 10634 | | DEVICE_START_NAME( k053936 )(this); |
| 10635 | | } |
| 10636 | | |
| 10637 | | //------------------------------------------------- |
| 10638 | | // device_reset - device-specific reset |
| 10639 | | //------------------------------------------------- |
| 10640 | | |
| 10641 | | void k053936_device::device_reset() |
| 10642 | | { |
| 10643 | | DEVICE_RESET_NAME( k053936 )(this); |
| 10644 | | } |
| 10645 | | |
| 10646 | | |
| 10647 | | const device_type K053251 = &device_creator<k053251_device>; |
| 10648 | | |
| 10649 | | k053251_device::k053251_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10650 | | : device_t(mconfig, K053251, "Konami 053251", tag, owner, clock) |
| 10651 | | { |
| 10652 | | m_token = global_alloc_array_clear(UINT8, sizeof(k053251_state)); |
| 10653 | | } |
| 10654 | | |
| 10655 | | //------------------------------------------------- |
| 10656 | | // device_config_complete - perform any |
| 10657 | | // operations now that the configuration is |
| 10658 | | // complete |
| 10659 | | //------------------------------------------------- |
| 10660 | | |
| 10661 | | void k053251_device::device_config_complete() |
| 10662 | | { |
| 10663 | | } |
| 10664 | | |
| 10665 | | //------------------------------------------------- |
| 10666 | | // device_start - device-specific startup |
| 10667 | | //------------------------------------------------- |
| 10668 | | |
| 10669 | | void k053251_device::device_start() |
| 10670 | | { |
| 10671 | | DEVICE_START_NAME( k053251 )(this); |
| 10672 | | } |
| 10673 | | |
| 10674 | | //------------------------------------------------- |
| 10675 | | // device_reset - device-specific reset |
| 10676 | | //------------------------------------------------- |
| 10677 | | |
| 10678 | | void k053251_device::device_reset() |
| 10679 | | { |
| 10680 | | DEVICE_RESET_NAME( k053251 )(this); |
| 10681 | | } |
| 10682 | | |
| 10683 | | |
| 10684 | | const device_type K054000 = &device_creator<k054000_device>; |
| 10685 | | |
| 10686 | | k054000_device::k054000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10687 | | : device_t(mconfig, K054000, "Konami 054000", tag, owner, clock) |
| 10688 | | { |
| 10689 | | m_token = global_alloc_array_clear(UINT8, sizeof(k054000_state)); |
| 10690 | | } |
| 10691 | | |
| 10692 | | //------------------------------------------------- |
| 10693 | | // device_config_complete - perform any |
| 10694 | | // operations now that the configuration is |
| 10695 | | // complete |
| 10696 | | //------------------------------------------------- |
| 10697 | | |
| 10698 | | void k054000_device::device_config_complete() |
| 10699 | | { |
| 10700 | | } |
| 10701 | | |
| 10702 | | //------------------------------------------------- |
| 10703 | | // device_start - device-specific startup |
| 10704 | | //------------------------------------------------- |
| 10705 | | |
| 10706 | | void k054000_device::device_start() |
| 10707 | | { |
| 10708 | | DEVICE_START_NAME( k054000 )(this); |
| 10709 | | } |
| 10710 | | |
| 10711 | | //------------------------------------------------- |
| 10712 | | // device_reset - device-specific reset |
| 10713 | | //------------------------------------------------- |
| 10714 | | |
| 10715 | | void k054000_device::device_reset() |
| 10716 | | { |
| 10717 | | DEVICE_RESET_NAME( k054000 )(this); |
| 10718 | | } |
| 10719 | | |
| 10720 | | |
| 10721 | | const device_type K051733 = &device_creator<k051733_device>; |
| 10722 | | |
| 10723 | | k051733_device::k051733_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10724 | | : device_t(mconfig, K051733, "Konami 051733", tag, owner, clock) |
| 10725 | | { |
| 10726 | | m_token = global_alloc_array_clear(UINT8, sizeof(k051733_state)); |
| 10727 | | } |
| 10728 | | |
| 10729 | | //------------------------------------------------- |
| 10730 | | // device_config_complete - perform any |
| 10731 | | // operations now that the configuration is |
| 10732 | | // complete |
| 10733 | | //------------------------------------------------- |
| 10734 | | |
| 10735 | | void k051733_device::device_config_complete() |
| 10736 | | { |
| 10737 | | } |
| 10738 | | |
| 10739 | | //------------------------------------------------- |
| 10740 | | // device_start - device-specific startup |
| 10741 | | //------------------------------------------------- |
| 10742 | | |
| 10743 | | void k051733_device::device_start() |
| 10744 | | { |
| 10745 | | DEVICE_START_NAME( k051733 )(this); |
| 10746 | | } |
| 10747 | | |
| 10748 | | //------------------------------------------------- |
| 10749 | | // device_reset - device-specific reset |
| 10750 | | //------------------------------------------------- |
| 10751 | | |
| 10752 | | void k051733_device::device_reset() |
| 10753 | | { |
| 10754 | | DEVICE_RESET_NAME( k051733 )(this); |
| 10755 | | } |
| 10756 | | |
| 10757 | | |
| 10758 | | const device_type K056832 = &device_creator<k056832_device>; |
| 10759 | | |
| 10760 | | k056832_device::k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10761 | | : device_t(mconfig, K056832, "Konami 056832", tag, owner, clock) |
| 10762 | | { |
| 10763 | | m_token = global_alloc_array_clear(UINT8, sizeof(k056832_state)); |
| 10764 | | } |
| 10765 | | |
| 10766 | | //------------------------------------------------- |
| 10767 | | // device_config_complete - perform any |
| 10768 | | // operations now that the configuration is |
| 10769 | | // complete |
| 10770 | | //------------------------------------------------- |
| 10771 | | |
| 10772 | | void k056832_device::device_config_complete() |
| 10773 | | { |
| 10774 | | } |
| 10775 | | |
| 10776 | | //------------------------------------------------- |
| 10777 | | // device_start - device-specific startup |
| 10778 | | //------------------------------------------------- |
| 10779 | | |
| 10780 | | void k056832_device::device_start() |
| 10781 | | { |
| 10782 | | DEVICE_START_NAME( k056832 )(this); |
| 10783 | | } |
| 10784 | | |
| 10785 | | |
| 10786 | | const device_type K055555 = &device_creator<k055555_device>; |
| 10787 | | |
| 10788 | | k055555_device::k055555_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10789 | | : device_t(mconfig, K055555, "Konami 055555", tag, owner, clock) |
| 10790 | | { |
| 10791 | | m_token = global_alloc_array_clear(UINT8, sizeof(k055555_state)); |
| 10792 | | } |
| 10793 | | |
| 10794 | | //------------------------------------------------- |
| 10795 | | // device_config_complete - perform any |
| 10796 | | // operations now that the configuration is |
| 10797 | | // complete |
| 10798 | | //------------------------------------------------- |
| 10799 | | |
| 10800 | | void k055555_device::device_config_complete() |
| 10801 | | { |
| 10802 | | } |
| 10803 | | |
| 10804 | | //------------------------------------------------- |
| 10805 | | // device_start - device-specific startup |
| 10806 | | //------------------------------------------------- |
| 10807 | | |
| 10808 | | void k055555_device::device_start() |
| 10809 | | { |
| 10810 | | DEVICE_START_NAME( k055555 )(this); |
| 10811 | | } |
| 10812 | | |
| 10813 | | //------------------------------------------------- |
| 10814 | | // device_reset - device-specific reset |
| 10815 | | //------------------------------------------------- |
| 10816 | | |
| 10817 | | void k055555_device::device_reset() |
| 10818 | | { |
| 10819 | | DEVICE_RESET_NAME( k055555 )(this); |
| 10820 | | } |
| 10821 | | |
| 10822 | | |
| 10823 | | const device_type K054338 = &device_creator<k054338_device>; |
| 10824 | | |
| 10825 | | k054338_device::k054338_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10826 | | : device_t(mconfig, K054338, "Konami 054338", tag, owner, clock) |
| 10827 | | { |
| 10828 | | m_token = global_alloc_array_clear(UINT8, sizeof(k054338_state)); |
| 10829 | | } |
| 10830 | | |
| 10831 | | //------------------------------------------------- |
| 10832 | | // device_config_complete - perform any |
| 10833 | | // operations now that the configuration is |
| 10834 | | // complete |
| 10835 | | //------------------------------------------------- |
| 10836 | | |
| 10837 | | void k054338_device::device_config_complete() |
| 10838 | | { |
| 10839 | | } |
| 10840 | | |
| 10841 | | //------------------------------------------------- |
| 10842 | | // device_start - device-specific startup |
| 10843 | | //------------------------------------------------- |
| 10844 | | |
| 10845 | | void k054338_device::device_start() |
| 10846 | | { |
| 10847 | | DEVICE_START_NAME( k054338 )(this); |
| 10848 | | } |
| 10849 | | |
| 10850 | | //------------------------------------------------- |
| 10851 | | // device_reset - device-specific reset |
| 10852 | | //------------------------------------------------- |
| 10853 | | |
| 10854 | | void k054338_device::device_reset() |
| 10855 | | { |
| 10856 | | DEVICE_RESET_NAME( k054338 )(this); |
| 10857 | | } |
| 10858 | | |
| 10859 | | |
| 10860 | | const device_type K001006 = &device_creator<k001006_device>; |
| 10861 | | |
| 10862 | | k001006_device::k001006_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10863 | | : device_t(mconfig, K001006, "Konami 001006", tag, owner, clock) |
| 10864 | | { |
| 10865 | | m_token = global_alloc_array_clear(UINT8, sizeof(k001006_state)); |
| 10866 | | } |
| 10867 | | |
| 10868 | | //------------------------------------------------- |
| 10869 | | // device_config_complete - perform any |
| 10870 | | // operations now that the configuration is |
| 10871 | | // complete |
| 10872 | | //------------------------------------------------- |
| 10873 | | |
| 10874 | | void k001006_device::device_config_complete() |
| 10875 | | { |
| 10876 | | } |
| 10877 | | |
| 10878 | | //------------------------------------------------- |
| 10879 | | // device_start - device-specific startup |
| 10880 | | //------------------------------------------------- |
| 10881 | | |
| 10882 | | void k001006_device::device_start() |
| 10883 | | { |
| 10884 | | DEVICE_START_NAME( k001006 )(this); |
| 10885 | | } |
| 10886 | | |
| 10887 | | //------------------------------------------------- |
| 10888 | | // device_reset - device-specific reset |
| 10889 | | //------------------------------------------------- |
| 10890 | | |
| 10891 | | void k001006_device::device_reset() |
| 10892 | | { |
| 10893 | | DEVICE_RESET_NAME( k001006 )(this); |
| 10894 | | } |
| 10895 | | |
| 10896 | | |
| 10897 | | const device_type K001005 = &device_creator<k001005_device>; |
| 10898 | | |
| 10899 | | k001005_device::k001005_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10900 | | : device_t(mconfig, K001005, "Konami 001005", tag, owner, clock) |
| 10901 | | { |
| 10902 | | m_token = global_alloc_array_clear(UINT8, sizeof(k001005_state)); |
| 10903 | | } |
| 10904 | | |
| 10905 | | //------------------------------------------------- |
| 10906 | | // device_config_complete - perform any |
| 10907 | | // operations now that the configuration is |
| 10908 | | // complete |
| 10909 | | //------------------------------------------------- |
| 10910 | | |
| 10911 | | void k001005_device::device_config_complete() |
| 10912 | | { |
| 10913 | | } |
| 10914 | | |
| 10915 | | //------------------------------------------------- |
| 10916 | | // device_start - device-specific startup |
| 10917 | | //------------------------------------------------- |
| 10918 | | |
| 10919 | | void k001005_device::device_start() |
| 10920 | | { |
| 10921 | | DEVICE_START_NAME( k001005 )(this); |
| 10922 | | } |
| 10923 | | |
| 10924 | | //------------------------------------------------- |
| 10925 | | // device_reset - device-specific reset |
| 10926 | | //------------------------------------------------- |
| 10927 | | |
| 10928 | | void k001005_device::device_reset() |
| 10929 | | { |
| 10930 | | DEVICE_RESET_NAME( k001005 )(this); |
| 10931 | | } |
| 10932 | | |
| 10933 | | //------------------------------------------------- |
| 10934 | | // device_stop - device-specific stop |
| 10935 | | //------------------------------------------------- |
| 10936 | | |
| 10937 | | void k001005_device::device_stop() |
| 10938 | | { |
| 10939 | | DEVICE_STOP_NAME( k001005 )(this); |
| 10940 | | } |
| 10941 | | |
| 10942 | | |
| 10943 | | const device_type K001604 = &device_creator<k001604_device>; |
| 10944 | | |
| 10945 | | k001604_device::k001604_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10946 | | : device_t(mconfig, K001604, "Konami 001604", tag, owner, clock) |
| 10947 | | { |
| 10948 | | m_token = global_alloc_array_clear(UINT8, sizeof(k001604_state)); |
| 10949 | | } |
| 10950 | | |
| 10951 | | //------------------------------------------------- |
| 10952 | | // device_config_complete - perform any |
| 10953 | | // operations now that the configuration is |
| 10954 | | // complete |
| 10955 | | //------------------------------------------------- |
| 10956 | | |
| 10957 | | void k001604_device::device_config_complete() |
| 10958 | | { |
| 10959 | | } |
| 10960 | | |
| 10961 | | //------------------------------------------------- |
| 10962 | | // device_start - device-specific startup |
| 10963 | | //------------------------------------------------- |
| 10964 | | |
| 10965 | | void k001604_device::device_start() |
| 10966 | | { |
| 10967 | | DEVICE_START_NAME( k001604 )(this); |
| 10968 | | } |
| 10969 | | |
| 10970 | | //------------------------------------------------- |
| 10971 | | // device_reset - device-specific reset |
| 10972 | | //------------------------------------------------- |
| 10973 | | |
| 10974 | | void k001604_device::device_reset() |
| 10975 | | { |
| 10976 | | DEVICE_RESET_NAME( k001604 )(this); |
| 10977 | | } |
| 10978 | | |
| 10979 | | |
| 10980 | | const device_type K037122 = &device_creator<k037122_device>; |
| 10981 | | |
| 10982 | | k037122_device::k037122_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 10983 | | : device_t(mconfig, K037122, "Konami 0371222", tag, owner, clock) |
| 10984 | | { |
| 10985 | | m_token = global_alloc_array_clear(UINT8, sizeof(k037122_state)); |
| 10986 | | } |
| 10987 | | |
| 10988 | | //------------------------------------------------- |
| 10989 | | // device_config_complete - perform any |
| 10990 | | // operations now that the configuration is |
| 10991 | | // complete |
| 10992 | | //------------------------------------------------- |
| 10993 | | |
| 10994 | | void k037122_device::device_config_complete() |
| 10995 | | { |
| 10996 | | } |
| 10997 | | |
| 10998 | | //------------------------------------------------- |
| 10999 | | // device_start - device-specific startup |
| 11000 | | //------------------------------------------------- |
| 11001 | | |
| 11002 | | void k037122_device::device_start() |
| 11003 | | { |
| 11004 | | DEVICE_START_NAME( k037122 )(this); |
| 11005 | | } |
| 11006 | | |
| 11007 | | //------------------------------------------------- |
| 11008 | | // device_reset - device-specific reset |
| 11009 | | //------------------------------------------------- |
| 11010 | | |
| 11011 | | void k037122_device::device_reset() |
| 11012 | | { |
| 11013 | | DEVICE_RESET_NAME( k037122 )(this); |
| 11014 | | } |
| 11015 | | |
| 11016 | | |