trunk/src/mame/drivers/moo.c
| r21809 | r21810 | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | |
| 94 | | static void moo_objdma( running_machine &machine, int type ) |
| 94 | void moo_state::moo_objdma() |
| 95 | 95 | { |
| 96 | | moo_state *state = machine.driver_data<moo_state>(); |
| 97 | 96 | int num_inactive; |
| 98 | | UINT16 *src, *dst, zmask; |
| 99 | | int counter = k053247_get_dy(state->m_k053246); |
| 97 | UINT16 *src, *dst; |
| 98 | int counter = k053247_get_dy(m_k053246); |
| 100 | 99 | |
| 101 | | k053247_get_ram(state->m_k053246, &dst); |
| 102 | | src = state->m_spriteram; |
| 100 | k053247_get_ram(m_k053246, &dst); |
| 101 | src = m_spriteram; |
| 103 | 102 | num_inactive = counter = 256; |
| 104 | 103 | |
| 105 | | zmask = (type) ? 0x00ff : 0xffff; |
| 106 | | |
| 107 | | do { |
| 108 | | if ((*src & 0x8000) && (*src & zmask)) |
| 104 | do |
| 105 | { |
| 106 | if ((*src & 0x8000) && (*src & m_zmask)) |
| 109 | 107 | { |
| 110 | 108 | memcpy(dst, src, 0x10); |
| 111 | 109 | dst += 8; |
| r21809 | r21810 | |
| 115 | 113 | } |
| 116 | 114 | while (--counter); |
| 117 | 115 | |
| 118 | | if (num_inactive) do { *dst = 0; dst += 8; } while (--num_inactive); |
| 116 | if (num_inactive) |
| 117 | { |
| 118 | do |
| 119 | { |
| 120 | *dst = 0; |
| 121 | dst += 8; |
| 122 | } |
| 123 | while (--num_inactive); |
| 124 | } |
| 119 | 125 | } |
| 120 | 126 | |
| 121 | 127 | TIMER_CALLBACK_MEMBER(moo_state::dmaend_callback) |
| r21809 | r21810 | |
| 128 | 134 | { |
| 129 | 135 | if (k053246_is_irq_enabled(m_k053246)) |
| 130 | 136 | { |
| 131 | | moo_objdma(machine(), m_game_type); |
| 137 | moo_objdma(); |
| 132 | 138 | |
| 133 | 139 | // schedule DMA end interrupt (delay shortened to catch up with V-blank) |
| 134 | 140 | m_dmaend_timer->adjust(attotime::from_usec(MOO_DMADELAY)); |
| r21809 | r21810 | |
| 141 | 147 | |
| 142 | 148 | INTERRUPT_GEN_MEMBER(moo_state::moobl_interrupt) |
| 143 | 149 | { |
| 144 | | moo_objdma(machine(), m_game_type); |
| 150 | moo_objdma(); |
| 145 | 151 | |
| 146 | 152 | // schedule DMA end interrupt (delay shortened to catch up with V-blank) |
| 147 | 153 | m_dmaend_timer->adjust(attotime::from_usec(MOO_DMADELAY)); |
| r21809 | r21810 | |
| 603 | 609 | |
| 604 | 610 | /* video hardware */ |
| 605 | 611 | MCFG_PALETTE_LENGTH(4096) |
| 612 | |
| 613 | MCFG_VIDEO_START_OVERRIDE(moo_state,bucky) |
| 606 | 614 | MACHINE_CONFIG_END |
| 607 | 615 | |
| 608 | 616 | |
| r21809 | r21810 | |
| 909 | 917 | ROM_LOAD( "moo.nv", 0x0000, 0x080, CRC(7bd904a8) SHA1(8747c5c62d1832e290be8ace73c61b1f228c0bec) ) |
| 910 | 918 | ROM_END |
| 911 | 919 | |
| 912 | | DRIVER_INIT_MEMBER(moo_state,moo) |
| 913 | | { |
| 914 | | m_game_type = (!strcmp(machine().system().name, "bucky") || !strcmp(machine().system().name, "buckyua")); |
| 915 | | } |
| 916 | 920 | |
| 917 | | |
| 918 | | GAME( 1992, moomesa, 0, moo, moo, moo_state, moo, ROT0, "Konami", "Wild West C.O.W.-Boys of Moo Mesa (ver EAB)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 919 | | GAME( 1992, moomesauac, moomesa, moo, moo, moo_state, moo, ROT0, "Konami", "Wild West C.O.W.-Boys of Moo Mesa (ver UAC)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 920 | | GAME( 1992, moomesauab, moomesa, moo, moo, moo_state, moo, ROT0, "Konami", "Wild West C.O.W.-Boys of Moo Mesa (ver UAB)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 921 | | GAME( 1992, moomesaaab, moomesa, moo, moo, moo_state, moo, ROT0, "Konami", "Wild West C.O.W.-Boys of Moo Mesa (ver AAB)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 922 | | GAME( 1992, moomesabl, moomesa, moobl, moo, moo_state, moo, ROT0, "bootleg", "Wild West C.O.W.-Boys of Moo Mesa (bootleg)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // based on Version AA |
| 923 | | GAME( 1992, bucky, 0, bucky, bucky, moo_state, moo, ROT0, "Konami", "Bucky O'Hare (ver EAB)", GAME_SUPPORTS_SAVE ) |
| 924 | | GAME( 1992, buckyuab, bucky, bucky, bucky, moo_state, moo, ROT0, "Konami", "Bucky O'Hare (ver UAB)", GAME_SUPPORTS_SAVE ) |
| 925 | | GAME( 1992, buckyaab, bucky, bucky, bucky, moo_state, moo, ROT0, "Konami", "Bucky O'Hare (ver AAB)", GAME_SUPPORTS_SAVE ) |
| 921 | GAME( 1992, moomesa, 0, moo, moo, driver_device, 0, ROT0, "Konami", "Wild West C.O.W.-Boys of Moo Mesa (ver EAB)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 922 | GAME( 1992, moomesauac, moomesa, moo, moo, driver_device, 0, ROT0, "Konami", "Wild West C.O.W.-Boys of Moo Mesa (ver UAC)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 923 | GAME( 1992, moomesauab, moomesa, moo, moo, driver_device, 0, ROT0, "Konami", "Wild West C.O.W.-Boys of Moo Mesa (ver UAB)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 924 | GAME( 1992, moomesaaab, moomesa, moo, moo, driver_device, 0, ROT0, "Konami", "Wild West C.O.W.-Boys of Moo Mesa (ver AAB)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 925 | GAME( 1992, moomesabl, moomesa, moobl, moo, driver_device, 0, ROT0, "bootleg", "Wild West C.O.W.-Boys of Moo Mesa (bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // based on Version AA |
| 926 | GAME( 1992, bucky, 0, bucky, bucky, driver_device, 0, ROT0, "Konami", "Bucky O'Hare (ver EAB)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 927 | GAME( 1992, buckyuab, bucky, bucky, bucky, driver_device, 0, ROT0, "Konami", "Bucky O'Hare (ver UAB)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 928 | GAME( 1992, buckyaab, bucky, bucky, bucky, driver_device, 0, ROT0, "Konami", "Bucky O'Hare (ver AAB)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
trunk/src/mame/video/moo.c
| r21809 | r21810 | |
| 40 | 40 | assert(machine().primary_screen->format() == BITMAP_FORMAT_RGB32); |
| 41 | 41 | |
| 42 | 42 | m_alpha_enabled = 0; |
| 43 | m_zmask = 0xffff; |
| 43 | 44 | |
| 44 | | if (!strcmp(machine().system().name, "bucky") || !strcmp(machine().system().name, "buckyua") || !strcmp(machine().system().name, "buckyaa")) |
| 45 | | { |
| 46 | | // Bucky doesn't chain tilemaps |
| 47 | | k056832_set_layer_association(m_k056832, 0); |
| 45 | // other than the intro showing one blank line alignment is good through the game |
| 46 | k056832_set_layer_offs(m_k056832, 0, -2 + 1, 0); |
| 47 | k056832_set_layer_offs(m_k056832, 1, 2 + 1, 0); |
| 48 | k056832_set_layer_offs(m_k056832, 2, 4 + 1, 0); |
| 49 | k056832_set_layer_offs(m_k056832, 3, 6 + 1, 0); |
| 50 | } |
| 48 | 51 | |
| 49 | | k056832_set_layer_offs(m_k056832, 0, -2, 0); |
| 50 | | k056832_set_layer_offs(m_k056832, 1, 2, 0); |
| 51 | | k056832_set_layer_offs(m_k056832, 2, 4, 0); |
| 52 | | k056832_set_layer_offs(m_k056832, 3, 6, 0); |
| 53 | | } |
| 54 | | else |
| 55 | | { |
| 56 | | // other than the intro showing one blank line alignment is good through the game |
| 57 | | k056832_set_layer_offs(m_k056832, 0, -2 + 1, 0); |
| 58 | | k056832_set_layer_offs(m_k056832, 1, 2 + 1, 0); |
| 59 | | k056832_set_layer_offs(m_k056832, 2, 4 + 1, 0); |
| 60 | | k056832_set_layer_offs(m_k056832, 3, 6 + 1, 0); |
| 61 | | } |
| 52 | VIDEO_START_MEMBER(moo_state,bucky) |
| 53 | { |
| 54 | assert(machine().primary_screen->format() == BITMAP_FORMAT_RGB32); |
| 55 | |
| 56 | m_alpha_enabled = 0; |
| 57 | m_zmask = 0x00ff; |
| 58 | |
| 59 | // Bucky doesn't chain tilemaps |
| 60 | k056832_set_layer_association(m_k056832, 0); |
| 61 | |
| 62 | k056832_set_layer_offs(m_k056832, 0, -2, 0); |
| 63 | k056832_set_layer_offs(m_k056832, 1, 2, 0); |
| 64 | k056832_set_layer_offs(m_k056832, 2, 4, 0); |
| 65 | k056832_set_layer_offs(m_k056832, 3, 6, 0); |
| 62 | 66 | } |
| 63 | 67 | |
| 64 | 68 | UINT32 moo_state::screen_update_moo(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |