trunk/src/mame/drivers/argus.c
| r244639 | r244640 | |
| 107 | 107 | =============== |
| 108 | 108 | - Half transparent color (50% alpha blending) is not emulated. |
| 109 | 109 | - Sprite priority switch of Butasan is shown in test mode. What will be |
| 110 | | happened when set it ? JFF is not implemented this mistery switch too. |
| 110 | happened when set it ? JFF is not implemented this mystery switch too. |
| 111 | 111 | - Data proms of Butasan does exist. But I don't know what is used for. |
| 112 | 112 | - Though clock speed of Argus is actually 4 MHz, major sprite problems |
| 113 | 113 | are broken out in the middle of slowdown. So, it is set 5 MHz now. |
| r244639 | r244640 | |
| 123 | 123 | #include "includes/argus.h" |
| 124 | 124 | |
| 125 | 125 | |
| 126 | void argus_state::machine_start() |
| 127 | { |
| 128 | membank("mainbank")->configure_entries(0, 8, memregion("maincpu")->base() + 0x10000, 0x4000); |
| 129 | } |
| 130 | |
| 126 | 131 | /*************************************************************************** |
| 127 | 132 | |
| 128 | 133 | Interrupt(s) |
| 129 | 134 | |
| 130 | 135 | ***************************************************************************/ |
| 131 | 136 | |
| 132 | | TIMER_DEVICE_CALLBACK_MEMBER(argus_state::argus_scanline) |
| 137 | TIMER_DEVICE_CALLBACK_MEMBER(argus_state::scanline) |
| 133 | 138 | { |
| 134 | 139 | int scanline = param; |
| 135 | 140 | |
| r244639 | r244640 | |
| 151 | 156 | m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */ |
| 152 | 157 | } |
| 153 | 158 | |
| 154 | | /* Handler called by the YM2203 emulator when the internal timers cause an IRQ */ |
| 155 | | WRITE_LINE_MEMBER(argus_state::irqhandler) |
| 156 | | { |
| 157 | | m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); |
| 158 | | } |
| 159 | 159 | |
| 160 | 160 | /*************************************************************************** |
| 161 | 161 | |
| r244639 | r244640 | |
| 163 | 163 | |
| 164 | 164 | ***************************************************************************/ |
| 165 | 165 | |
| 166 | | WRITE8_MEMBER(argus_state::argus_bankselect_w) |
| 166 | WRITE8_MEMBER(argus_state::bankselect_w) |
| 167 | 167 | { |
| 168 | | UINT8 *RAM = memregion("maincpu")->base(); |
| 169 | | int bankaddress; |
| 170 | | |
| 171 | | bankaddress = 0x10000 + ((data & 7) * 0x4000); |
| 172 | | membank("bank1")->set_base(&RAM[bankaddress]); /* Select 8 banks of 16k */ |
| 168 | membank("mainbank")->set_entry(data & 7); /* Select 8 banks of 16k */ |
| 173 | 169 | } |
| 174 | 170 | |
| 175 | 171 | |
| r244639 | r244640 | |
| 181 | 177 | |
| 182 | 178 | static ADDRESS_MAP_START( argus_map, AS_PROGRAM, 8, argus_state ) |
| 183 | 179 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 184 | | AM_RANGE(0x8000, 0xbfff) AM_RAMBANK("bank1") |
| 180 | AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("mainbank") |
| 185 | 181 | AM_RANGE(0xc000, 0xc000) AM_READ_PORT("SYSTEM") |
| 186 | 182 | AM_RANGE(0xc001, 0xc001) AM_READ_PORT("P1") |
| 187 | 183 | AM_RANGE(0xc002, 0xc002) AM_READ_PORT("P2") |
| 188 | 184 | AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW1") |
| 189 | 185 | AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW2") |
| 190 | 186 | AM_RANGE(0xc200, 0xc200) AM_WRITE(soundlatch_byte_w) |
| 191 | | AM_RANGE(0xc201, 0xc201) AM_WRITE(argus_flipscreen_w) |
| 192 | | AM_RANGE(0xc202, 0xc202) AM_WRITE(argus_bankselect_w) |
| 187 | AM_RANGE(0xc201, 0xc201) AM_WRITE(flipscreen_w) |
| 188 | AM_RANGE(0xc202, 0xc202) AM_WRITE(bankselect_w) |
| 193 | 189 | AM_RANGE(0xc300, 0xc301) AM_RAM AM_SHARE("bg0_scrollx") |
| 194 | 190 | AM_RANGE(0xc302, 0xc303) AM_RAM AM_SHARE("bg0_scrolly") |
| 195 | 191 | AM_RANGE(0xc308, 0xc309) AM_RAM AM_SHARE("bg1_scrollx") |
| 196 | 192 | AM_RANGE(0xc30a, 0xc30b) AM_RAM AM_SHARE("bg1_scrolly") |
| 197 | 193 | AM_RANGE(0xc30c, 0xc30c) AM_WRITE(argus_bg_status_w) |
| 198 | | AM_RANGE(0xc400, 0xcfff) AM_READWRITE(argus_paletteram_r, argus_paletteram_w) AM_SHARE("paletteram") |
| 199 | | AM_RANGE(0xd000, 0xd7ff) AM_READWRITE(argus_txram_r, argus_txram_w) AM_SHARE("txram") |
| 200 | | AM_RANGE(0xd800, 0xdfff) AM_READWRITE(argus_bg1ram_r, argus_bg1ram_w) AM_SHARE("bg1ram") |
| 194 | AM_RANGE(0xc400, 0xcfff) AM_RAM_WRITE(argus_paletteram_w) AM_SHARE("paletteram") |
| 195 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(txram_w) AM_SHARE("txram") |
| 196 | AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(bg1ram_w) AM_SHARE("bg1ram") |
| 201 | 197 | AM_RANGE(0xe000, 0xf1ff) AM_RAM |
| 202 | 198 | AM_RANGE(0xf200, 0xf7ff) AM_RAM AM_SHARE("spriteram") |
| 203 | 199 | AM_RANGE(0xf800, 0xffff) AM_RAM |
| r244639 | r244640 | |
| 205 | 201 | |
| 206 | 202 | static ADDRESS_MAP_START( valtric_map, AS_PROGRAM, 8, argus_state ) |
| 207 | 203 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 208 | | AM_RANGE(0x8000, 0xbfff) AM_RAMBANK("bank1") |
| 204 | AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("mainbank") |
| 209 | 205 | AM_RANGE(0xc000, 0xc000) AM_READ_PORT("SYSTEM") |
| 210 | 206 | AM_RANGE(0xc001, 0xc001) AM_READ_PORT("P1") |
| 211 | 207 | AM_RANGE(0xc002, 0xc002) AM_READ_PORT("P2") |
| 212 | 208 | AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW1") |
| 213 | 209 | AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW2") |
| 214 | 210 | AM_RANGE(0xc200, 0xc200) AM_WRITE(soundlatch_byte_w) |
| 215 | | AM_RANGE(0xc201, 0xc201) AM_WRITE(argus_flipscreen_w) |
| 216 | | AM_RANGE(0xc202, 0xc202) AM_WRITE(argus_bankselect_w) |
| 211 | AM_RANGE(0xc201, 0xc201) AM_WRITE(flipscreen_w) |
| 212 | AM_RANGE(0xc202, 0xc202) AM_WRITE(bankselect_w) |
| 217 | 213 | AM_RANGE(0xc300, 0xc300) AM_WRITE(valtric_unknown_w) |
| 218 | 214 | AM_RANGE(0xc308, 0xc309) AM_RAM AM_SHARE("bg1_scrollx") |
| 219 | 215 | AM_RANGE(0xc30a, 0xc30b) AM_RAM AM_SHARE("bg1_scrolly") |
| 220 | 216 | AM_RANGE(0xc30c, 0xc30c) AM_WRITE(valtric_bg_status_w) |
| 221 | 217 | AM_RANGE(0xc30d, 0xc30d) AM_WRITE(valtric_mosaic_w) |
| 222 | | AM_RANGE(0xc400, 0xcfff) AM_READWRITE(argus_paletteram_r, valtric_paletteram_w) AM_SHARE("paletteram") |
| 223 | | AM_RANGE(0xd000, 0xd7ff) AM_READWRITE(argus_txram_r, argus_txram_w) AM_SHARE("txram") |
| 224 | | AM_RANGE(0xd800, 0xdfff) AM_READWRITE(argus_bg1ram_r, argus_bg1ram_w) AM_SHARE("bg1ram") |
| 218 | AM_RANGE(0xc400, 0xcfff) AM_RAM_WRITE(valtric_paletteram_w) AM_SHARE("paletteram") |
| 219 | AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(txram_w) AM_SHARE("txram") |
| 220 | AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(bg1ram_w) AM_SHARE("bg1ram") |
| 225 | 221 | AM_RANGE(0xe000, 0xf1ff) AM_RAM |
| 226 | 222 | AM_RANGE(0xf200, 0xf7ff) AM_RAM AM_SHARE("spriteram") |
| 227 | 223 | AM_RANGE(0xf800, 0xffff) AM_RAM |
| r244639 | r244640 | |
| 229 | 225 | |
| 230 | 226 | static ADDRESS_MAP_START( butasan_map, AS_PROGRAM, 8, argus_state ) |
| 231 | 227 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 232 | | AM_RANGE(0x8000, 0xbfff) AM_RAMBANK("bank1") |
| 228 | AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("mainbank") |
| 233 | 229 | AM_RANGE(0xc000, 0xc000) AM_READ_PORT("SYSTEM") |
| 234 | 230 | AM_RANGE(0xc001, 0xc001) AM_READ_PORT("P1") |
| 235 | 231 | AM_RANGE(0xc002, 0xc002) AM_READ_PORT("P2") |
| r244639 | r244640 | |
| 237 | 233 | AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW2") |
| 238 | 234 | AM_RANGE(0xc100, 0xc100) AM_WRITE(butasan_unknown_w) |
| 239 | 235 | AM_RANGE(0xc200, 0xc200) AM_WRITE(soundlatch_byte_w) |
| 240 | | AM_RANGE(0xc201, 0xc201) AM_WRITE(argus_flipscreen_w) |
| 241 | | AM_RANGE(0xc202, 0xc202) AM_WRITE(argus_bankselect_w) |
| 236 | AM_RANGE(0xc201, 0xc201) AM_WRITE(flipscreen_w) |
| 237 | AM_RANGE(0xc202, 0xc202) AM_WRITE(bankselect_w) |
| 242 | 238 | AM_RANGE(0xc203, 0xc203) AM_WRITE(butasan_pageselect_w) |
| 243 | 239 | AM_RANGE(0xc300, 0xc301) AM_RAM AM_SHARE("bg0_scrollx") |
| 244 | 240 | AM_RANGE(0xc302, 0xc303) AM_RAM AM_SHARE("bg0_scrolly") |
| r244639 | r244640 | |
| 246 | 242 | AM_RANGE(0xc308, 0xc309) AM_RAM AM_SHARE("bg1_scrollx") |
| 247 | 243 | AM_RANGE(0xc30a, 0xc30b) AM_RAM AM_SHARE("bg1_scrolly") |
| 248 | 244 | AM_RANGE(0xc30c, 0xc30c) AM_WRITE(butasan_bg1_status_w) |
| 249 | | AM_RANGE(0xc400, 0xc7ff) AM_READWRITE(butasan_bg1ram_r, butasan_bg1ram_w) AM_SHARE("butasan_bg1ram") |
| 250 | | AM_RANGE(0xc800, 0xcfff) AM_READWRITE(argus_paletteram_r, butasan_paletteram_w) AM_SHARE("paletteram") |
| 245 | AM_RANGE(0xc400, 0xc7ff) AM_RAM_WRITE(butasan_bg1ram_w) AM_SHARE("butasan_bg1ram") |
| 246 | AM_RANGE(0xc800, 0xcfff) AM_RAM_WRITE(butasan_paletteram_w) AM_SHARE("paletteram") |
| 251 | 247 | AM_RANGE(0xd000, 0xdfff) AM_READWRITE(butasan_pagedram_r, butasan_pagedram_w) |
| 252 | 248 | AM_RANGE(0xe000, 0xefff) AM_RAM |
| 253 | 249 | AM_RANGE(0xf000, 0xf67f) AM_RAM AM_SHARE("spriteram") |
| r244639 | r244640 | |
| 534 | 530 | /* basic machine hardware */ |
| 535 | 531 | MCFG_CPU_ADD("maincpu", Z80, 5000000) /* 4 MHz */ |
| 536 | 532 | MCFG_CPU_PROGRAM_MAP(argus_map) |
| 537 | | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", argus_state, argus_scanline, "screen", 0, 1) |
| 533 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", argus_state, scanline, "screen", 0, 1) |
| 538 | 534 | |
| 539 | 535 | MCFG_CPU_ADD("audiocpu", Z80, 5000000) |
| 540 | 536 | MCFG_CPU_PROGRAM_MAP(sound_map_a) |
| r244639 | r244640 | |
| 560 | 556 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 561 | 557 | |
| 562 | 558 | MCFG_SOUND_ADD("ym1", YM2203, 6000000 / 4) |
| 563 | | MCFG_YM2203_IRQ_HANDLER(WRITELINE(argus_state, irqhandler)) |
| 559 | MCFG_YM2203_IRQ_HANDLER(INPUTLINE("audiocpu", 0)) |
| 564 | 560 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 565 | 561 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 566 | 562 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
| r244639 | r244640 | |
| 578 | 574 | /* basic machine hardware */ |
| 579 | 575 | MCFG_CPU_ADD("maincpu", Z80, 5000000) /* 5 MHz */ |
| 580 | 576 | MCFG_CPU_PROGRAM_MAP(valtric_map) |
| 581 | | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", argus_state, argus_scanline, "screen", 0, 1) |
| 577 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", argus_state, scanline, "screen", 0, 1) |
| 582 | 578 | |
| 583 | 579 | MCFG_CPU_ADD("audiocpu", Z80, 5000000) |
| 584 | 580 | MCFG_CPU_PROGRAM_MAP(sound_map_a) |
| r244639 | r244640 | |
| 604 | 600 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 605 | 601 | |
| 606 | 602 | MCFG_SOUND_ADD("ym1", YM2203, 6000000 / 4) |
| 607 | | MCFG_YM2203_IRQ_HANDLER(WRITELINE(argus_state, irqhandler)) |
| 603 | MCFG_YM2203_IRQ_HANDLER(INPUTLINE("audiocpu", 0)) |
| 608 | 604 | MCFG_SOUND_ROUTE(0, "mono", 0.15) |
| 609 | 605 | MCFG_SOUND_ROUTE(1, "mono", 0.15) |
| 610 | 606 | MCFG_SOUND_ROUTE(2, "mono", 0.15) |
| r244639 | r244640 | |
| 648 | 644 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 649 | 645 | |
| 650 | 646 | MCFG_SOUND_ADD("ym1", YM2203, 6000000 / 4) |
| 651 | | MCFG_YM2203_IRQ_HANDLER(WRITELINE(argus_state, irqhandler)) |
| 647 | MCFG_YM2203_IRQ_HANDLER(INPUTLINE("audiocpu", 0)) |
| 652 | 648 | MCFG_SOUND_ROUTE(0, "mono", 0.30) |
| 653 | 649 | MCFG_SOUND_ROUTE(1, "mono", 0.30) |
| 654 | 650 | MCFG_SOUND_ROUTE(2, "mono", 0.30) |
| r244639 | r244640 | |
| 796 | 792 | |
| 797 | 793 | |
| 798 | 794 | /* ( YEAR NAME PARENT MACHINE INPUT INIT MONITOR COMPANY FULLNAME ) */ |
| 799 | | GAME( 1986, argus, 0, argus, argus, driver_device, 0, ROT270, "NMK (Jaleco license)", "Argus", GAME_IMPERFECT_GRAPHICS ) |
| 800 | | GAME( 1986, valtric, 0, valtric, valtric, driver_device, 0, ROT270, "NMK (Jaleco license)", "Valtric", GAME_IMPERFECT_GRAPHICS ) |
| 801 | | GAME( 1987, butasan, 0, butasan, butasan, driver_device, 0, ROT0, "NMK (Jaleco license)", "Butasan - Pig's & Bomber's (Japan, English)", GAME_IMPERFECT_GRAPHICS ) |
| 802 | | GAME( 1987, butasanj, butasan,butasan, butasan, driver_device, 0, ROT0, "NMK (Jaleco license)", "Butasan (Japan, Japanese)", GAME_IMPERFECT_GRAPHICS ) |
| 795 | GAME( 1986, argus, 0, argus, argus, driver_device, 0, ROT270, "NMK (Jaleco license)", "Argus", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 796 | GAME( 1986, valtric, 0, valtric, valtric, driver_device, 0, ROT270, "NMK (Jaleco license)", "Valtric", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 797 | GAME( 1987, butasan, 0, butasan, butasan, driver_device, 0, ROT0, "NMK (Jaleco license)", "Butasan - Pig's & Bomber's (Japan, English)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 798 | GAME( 1987, butasanj, butasan,butasan, butasan, driver_device, 0, ROT0, "NMK (Jaleco license)", "Butasan (Japan, Japanese)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
trunk/src/mame/includes/argus.h
| r244639 | r244640 | |
| 3 | 3 | public: |
| 4 | 4 | argus_state(const machine_config &mconfig, device_type type, const char *tag) |
| 5 | 5 | : driver_device(mconfig, type, tag), |
| 6 | m_maincpu(*this, "maincpu"), |
| 7 | m_audiocpu(*this, "audiocpu"), |
| 8 | m_gfxdecode(*this, "gfxdecode"), |
| 9 | m_screen(*this, "screen"), |
| 10 | m_palette(*this, "palette"), |
| 6 | 11 | m_bg0_scrollx(*this, "bg0_scrollx"), |
| 7 | 12 | m_bg0_scrolly(*this, "bg0_scrolly"), |
| 8 | 13 | m_bg1_scrollx(*this, "bg1_scrollx"), |
| r244639 | r244640 | |
| 11 | 16 | m_txram(*this, "txram"), |
| 12 | 17 | m_bg1ram(*this, "bg1ram"), |
| 13 | 18 | m_spriteram(*this, "spriteram"), |
| 14 | | m_butasan_bg1ram(*this, "butasan_bg1ram"), |
| 15 | | m_maincpu(*this, "maincpu"), |
| 16 | | m_audiocpu(*this, "audiocpu"), |
| 17 | | m_gfxdecode(*this, "gfxdecode"), |
| 18 | | m_screen(*this, "screen"), |
| 19 | | m_palette(*this, "palette") { } |
| 19 | m_butasan_bg1ram(*this, "butasan_bg1ram") { } |
| 20 | 20 | |
| 21 | required_device<cpu_device> m_maincpu; |
| 22 | required_device<cpu_device> m_audiocpu; |
| 23 | required_device<gfxdecode_device> m_gfxdecode; |
| 24 | required_device<screen_device> m_screen; |
| 25 | required_device<palette_device> m_palette; |
| 26 | |
| 21 | 27 | optional_shared_ptr<UINT8> m_bg0_scrollx; |
| 22 | 28 | optional_shared_ptr<UINT8> m_bg0_scrolly; |
| 23 | 29 | required_shared_ptr<UINT8> m_bg1_scrollx; |
| r244639 | r244640 | |
| 28 | 34 | required_shared_ptr<UINT8> m_spriteram; |
| 29 | 35 | optional_shared_ptr<UINT8> m_butasan_bg1ram; |
| 30 | 36 | |
| 37 | // common |
| 38 | UINT8 m_bg_status; |
| 39 | UINT8 m_flipscreen; |
| 40 | UINT16 m_palette_intensity; |
| 41 | |
| 42 | // argus specific |
| 31 | 43 | UINT8 *m_dummy_bg0ram; |
| 44 | int m_lowbitscroll; |
| 45 | int m_prvscrollx; |
| 46 | |
| 47 | // butasan specific |
| 32 | 48 | UINT8 *m_butasan_txram; |
| 33 | 49 | UINT8 *m_butasan_bg0ram; |
| 34 | 50 | UINT8 *m_butasan_bg0backram; |
| 35 | 51 | UINT8 *m_butasan_txbackram; |
| 36 | 52 | UINT8 *m_butasan_pagedram[2]; |
| 37 | 53 | UINT8 m_butasan_page_latch; |
| 38 | | tilemap_t *m_tx_tilemap; |
| 39 | | tilemap_t *m_bg0_tilemap; |
| 40 | | tilemap_t *m_bg1_tilemap; |
| 41 | | UINT8 m_bg_status; |
| 42 | 54 | UINT8 m_butasan_bg1_status; |
| 43 | | UINT8 m_flipscreen; |
| 44 | | UINT16 m_palette_intensity; |
| 45 | | int m_lowbitscroll; |
| 46 | | int m_prvscrollx; |
| 55 | UINT8 m_butasan_unknown; |
| 56 | |
| 57 | // valtric specific |
| 47 | 58 | UINT8 m_valtric_mosaic; |
| 48 | 59 | bitmap_rgb32 m_mosaicbitmap; |
| 49 | 60 | UINT8 m_valtric_unknown; |
| 50 | | UINT8 m_butasan_unknown; |
| 51 | 61 | int m_mosaic; |
| 52 | | DECLARE_WRITE8_MEMBER(argus_bankselect_w); |
| 62 | |
| 63 | tilemap_t *m_tx_tilemap; |
| 64 | tilemap_t *m_bg0_tilemap; |
| 65 | tilemap_t *m_bg1_tilemap; |
| 66 | |
| 67 | // common |
| 68 | DECLARE_WRITE8_MEMBER(bankselect_w); |
| 53 | 69 | DECLARE_WRITE8_MEMBER(valtric_mosaic_w); |
| 54 | | DECLARE_READ8_MEMBER(argus_txram_r); |
| 55 | | DECLARE_WRITE8_MEMBER(argus_txram_w); |
| 56 | | DECLARE_READ8_MEMBER(argus_bg1ram_r); |
| 57 | | DECLARE_WRITE8_MEMBER(argus_bg1ram_w); |
| 70 | DECLARE_WRITE8_MEMBER(txram_w); |
| 71 | DECLARE_WRITE8_MEMBER(bg1ram_w); |
| 72 | DECLARE_WRITE8_MEMBER(flipscreen_w); |
| 73 | |
| 74 | // argus specific |
| 58 | 75 | DECLARE_WRITE8_MEMBER(argus_bg_status_w); |
| 59 | | DECLARE_WRITE8_MEMBER(valtric_bg_status_w); |
| 76 | DECLARE_WRITE8_MEMBER(argus_paletteram_w); |
| 77 | |
| 78 | // butasan specific |
| 60 | 79 | DECLARE_WRITE8_MEMBER(butasan_bg0_status_w); |
| 61 | 80 | DECLARE_WRITE8_MEMBER(butasan_bg1_status_w); |
| 62 | | DECLARE_WRITE8_MEMBER(argus_flipscreen_w); |
| 63 | | DECLARE_READ8_MEMBER(argus_paletteram_r); |
| 64 | | DECLARE_WRITE8_MEMBER(argus_paletteram_w); |
| 65 | | DECLARE_WRITE8_MEMBER(valtric_paletteram_w); |
| 66 | 81 | DECLARE_WRITE8_MEMBER(butasan_paletteram_w); |
| 67 | 82 | DECLARE_READ8_MEMBER(butasan_bg1ram_r); |
| 68 | 83 | DECLARE_WRITE8_MEMBER(butasan_bg1ram_w); |
| 69 | 84 | DECLARE_WRITE8_MEMBER(butasan_pageselect_w); |
| 70 | 85 | DECLARE_READ8_MEMBER(butasan_pagedram_r); |
| 71 | 86 | DECLARE_WRITE8_MEMBER(butasan_pagedram_w); |
| 87 | DECLARE_WRITE8_MEMBER(butasan_unknown_w); |
| 88 | |
| 89 | // valtric specific |
| 90 | DECLARE_WRITE8_MEMBER(valtric_bg_status_w); |
| 91 | DECLARE_WRITE8_MEMBER(valtric_paletteram_w); |
| 72 | 92 | DECLARE_WRITE8_MEMBER(valtric_unknown_w); |
| 73 | | DECLARE_WRITE8_MEMBER(butasan_unknown_w); |
| 93 | |
| 74 | 94 | TILE_GET_INFO_MEMBER(argus_get_tx_tile_info); |
| 75 | 95 | TILE_GET_INFO_MEMBER(argus_get_bg0_tile_info); |
| 76 | 96 | TILE_GET_INFO_MEMBER(argus_get_bg1_tile_info); |
| r244639 | r244640 | |
| 79 | 99 | TILE_GET_INFO_MEMBER(butasan_get_tx_tile_info); |
| 80 | 100 | TILE_GET_INFO_MEMBER(butasan_get_bg0_tile_info); |
| 81 | 101 | TILE_GET_INFO_MEMBER(butasan_get_bg1_tile_info); |
| 102 | |
| 103 | virtual void machine_start(); |
| 82 | 104 | DECLARE_VIDEO_START(argus); |
| 83 | 105 | DECLARE_VIDEO_RESET(argus); |
| 84 | 106 | DECLARE_VIDEO_START(valtric); |
| 85 | 107 | DECLARE_VIDEO_RESET(valtric); |
| 86 | 108 | DECLARE_VIDEO_START(butasan); |
| 87 | 109 | DECLARE_VIDEO_RESET(butasan); |
| 110 | |
| 88 | 111 | UINT32 screen_update_argus(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 89 | 112 | UINT32 screen_update_valtric(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 90 | 113 | UINT32 screen_update_butasan(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 91 | | TIMER_DEVICE_CALLBACK_MEMBER(argus_scanline); |
| 114 | |
| 115 | TIMER_DEVICE_CALLBACK_MEMBER(scanline); |
| 92 | 116 | TIMER_DEVICE_CALLBACK_MEMBER(butasan_scanline); |
| 117 | |
| 93 | 118 | void reset_common(); |
| 94 | | void argus_write_dummy_rams(int dramoffs, int vromoffs); |
| 95 | | void argus_change_palette(int color, int lo_offs, int hi_offs); |
| 96 | | void argus_change_bg_palette(int color, int lo_offs, int hi_offs); |
| 119 | void change_palette(int color, int lo_offs, int hi_offs); |
| 120 | void change_bg_palette(int color, int lo_offs, int hi_offs); |
| 97 | 121 | void bg_setting(); |
| 122 | |
| 123 | // argus specific |
| 98 | 124 | void argus_bg0_scroll_handle(); |
| 125 | void argus_write_dummy_rams(int dramoffs, int vromoffs); |
| 99 | 126 | void argus_draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect, int priority); |
| 127 | |
| 128 | // butasan specific |
| 129 | void butasan_draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 130 | void butasan_log_vram(); |
| 131 | |
| 132 | // valtric specific |
| 100 | 133 | void valtric_draw_mosaic(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 101 | 134 | void valtric_draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 102 | | void butasan_draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 103 | | void butasan_log_vram(); |
| 104 | | DECLARE_WRITE_LINE_MEMBER(irqhandler); |
| 105 | | required_device<cpu_device> m_maincpu; |
| 106 | | required_device<cpu_device> m_audiocpu; |
| 107 | | required_device<gfxdecode_device> m_gfxdecode; |
| 108 | | required_device<screen_device> m_screen; |
| 109 | | required_device<palette_device> m_palette; |
| 110 | 135 | }; |
trunk/src/mame/video/argus.c
| r244639 | r244640 | |
| 89 | 89 | ----------------------------------------------------------------------------- |
| 90 | 90 | +0 |
| 91 | 91 | ---- ---x = BG enable bit |
| 92 | | ---- --x- = gray scale effect or tile bank select. |
| 92 | ---- --x- = grey scale effect or tile bank select. |
| 93 | 93 | |
| 94 | 94 | |
| 95 | 95 | Flip screen controller |
| r244639 | r244640 | |
| 109 | 109 | (*) Things which are not emulated. |
| 110 | 110 | - Color $000 - 00f, $01e, $02e ... are half transparent color. |
| 111 | 111 | - Sprite priority bit may be present in Butasan. But I don't know |
| 112 | | what is happened when it is set. |
| 112 | what happens when it is set. |
| 113 | 113 | |
| 114 | 114 | ***************************************************************************/ |
| 115 | 115 | |
| r244639 | r244640 | |
| 272 | 272 | m_dummy_bg0ram = auto_alloc_array(machine(), UINT8, 0x800); |
| 273 | 273 | |
| 274 | 274 | jal_blend_init(machine(), 1); |
| 275 | |
| 276 | save_item(NAME(m_bg_status)); |
| 277 | save_item(NAME(m_flipscreen)); |
| 278 | save_item(NAME(m_palette_intensity)); |
| 279 | save_pointer(NAME(m_dummy_bg0ram), 0x800); |
| 280 | save_item(NAME(m_lowbitscroll)); |
| 281 | save_item(NAME(m_prvscrollx)); |
| 275 | 282 | } |
| 276 | 283 | |
| 277 | 284 | VIDEO_RESET_MEMBER(argus_state,argus) |
| r244639 | r244640 | |
| 295 | 302 | m_screen->register_screen_bitmap(m_mosaicbitmap); |
| 296 | 303 | |
| 297 | 304 | jal_blend_init(machine(), 1); |
| 305 | |
| 306 | save_item(NAME(m_bg_status)); |
| 307 | save_item(NAME(m_flipscreen)); |
| 308 | save_item(NAME(m_palette_intensity)); |
| 309 | save_item(NAME(m_valtric_mosaic)); |
| 310 | save_item(NAME(m_valtric_unknown)); |
| 311 | save_item(NAME(m_mosaic)); |
| 298 | 312 | } |
| 299 | 313 | |
| 300 | 314 | VIDEO_RESET_MEMBER(argus_state,valtric) |
| r244639 | r244640 | |
| 322 | 336 | m_butasan_txbackram = &m_butasan_pagedram[1][0x800]; |
| 323 | 337 | |
| 324 | 338 | jal_blend_init(machine(), 1); |
| 339 | |
| 340 | save_item(NAME(m_bg_status)); |
| 341 | save_item(NAME(m_flipscreen)); |
| 342 | save_item(NAME(m_palette_intensity)); |
| 343 | save_pointer(NAME(m_butasan_pagedram[0]), 0x1000); |
| 344 | save_pointer(NAME(m_butasan_pagedram[1]), 0x1000); |
| 345 | save_item(NAME(m_butasan_page_latch)); |
| 346 | save_item(NAME(m_butasan_bg1_status)); |
| 347 | save_item(NAME(m_butasan_unknown)); |
| 325 | 348 | } |
| 326 | 349 | |
| 327 | 350 | VIDEO_RESET_MEMBER(argus_state,butasan) |
| r244639 | r244640 | |
| 363 | 386 | } |
| 364 | 387 | } |
| 365 | 388 | |
| 366 | | void argus_state::argus_change_palette(int color, int lo_offs, int hi_offs) |
| 389 | void argus_state::change_palette(int color, int lo_offs, int hi_offs) |
| 367 | 390 | { |
| 368 | 391 | UINT8 lo = m_paletteram[lo_offs]; |
| 369 | 392 | UINT8 hi = m_paletteram[hi_offs]; |
| r244639 | r244640 | |
| 371 | 394 | m_palette->set_pen_color(color, pal4bit(lo >> 4), pal4bit(lo), pal4bit(hi >> 4)); |
| 372 | 395 | } |
| 373 | 396 | |
| 374 | | void argus_state::argus_change_bg_palette(int color, int lo_offs, int hi_offs) |
| 397 | void argus_state::change_bg_palette(int color, int lo_offs, int hi_offs) |
| 375 | 398 | { |
| 376 | 399 | UINT8 r,g,b,lo,hi,ir,ig,ib,ix; |
| 377 | 400 | rgb_t rgb,irgb; |
| r244639 | r244640 | |
| 418 | 441 | m_valtric_mosaic = data; |
| 419 | 442 | } |
| 420 | 443 | |
| 421 | | READ8_MEMBER(argus_state::argus_txram_r) |
| 444 | WRITE8_MEMBER(argus_state::txram_w) |
| 422 | 445 | { |
| 423 | | return m_txram[offset]; |
| 424 | | } |
| 425 | | |
| 426 | | WRITE8_MEMBER(argus_state::argus_txram_w) |
| 427 | | { |
| 428 | 446 | m_txram[offset] = data; |
| 429 | 447 | m_tx_tilemap->mark_tile_dirty(offset >> 1); |
| 430 | 448 | } |
| 431 | 449 | |
| 432 | | READ8_MEMBER(argus_state::argus_bg1ram_r) |
| 450 | WRITE8_MEMBER(argus_state::bg1ram_w) |
| 433 | 451 | { |
| 434 | | return m_bg1ram[offset]; |
| 435 | | } |
| 436 | | |
| 437 | | WRITE8_MEMBER(argus_state::argus_bg1ram_w) |
| 438 | | { |
| 439 | 452 | m_bg1ram[offset] = data; |
| 440 | 453 | m_bg1_tilemap->mark_tile_dirty(offset >> 1); |
| 441 | 454 | } |
| r244639 | r244640 | |
| 453 | 466 | |
| 454 | 467 | for (offs = 0x400; offs < 0x500; offs++) |
| 455 | 468 | { |
| 456 | | argus_change_bg_palette((offs - 0x400) + 0x080, offs, offs + 0x400); |
| 469 | change_bg_palette((offs - 0x400) + 0x080, offs, offs + 0x400); |
| 457 | 470 | } |
| 458 | 471 | } |
| 459 | 472 | } |
| r244639 | r244640 | |
| 472 | 485 | |
| 473 | 486 | for (offs = 0x400; offs < 0x600; offs += 2) |
| 474 | 487 | { |
| 475 | | argus_change_bg_palette(((offs - 0x400) >> 1) + 0x100, offs & ~1, offs | 1); |
| 488 | change_bg_palette(((offs - 0x400) >> 1) + 0x100, offs & ~1, offs | 1); |
| 476 | 489 | } |
| 477 | 490 | } |
| 478 | 491 | } |
| r244639 | r244640 | |
| 494 | 507 | } |
| 495 | 508 | } |
| 496 | 509 | |
| 497 | | WRITE8_MEMBER(argus_state::argus_flipscreen_w) |
| 510 | WRITE8_MEMBER(argus_state::flipscreen_w) |
| 498 | 511 | { |
| 499 | 512 | m_flipscreen = data & 0x80; |
| 500 | 513 | } |
| 501 | 514 | |
| 502 | | READ8_MEMBER(argus_state::argus_paletteram_r) |
| 503 | | { |
| 504 | | return m_paletteram[offset]; |
| 505 | | } |
| 506 | | |
| 507 | 515 | WRITE8_MEMBER(argus_state::argus_paletteram_w) |
| 508 | 516 | { |
| 509 | 517 | int offs; |
| r244639 | r244640 | |
| 514 | 522 | { |
| 515 | 523 | offset &= 0x07f; |
| 516 | 524 | |
| 517 | | argus_change_palette(offset, offset, offset + 0x080); |
| 525 | change_palette(offset, offset, offset + 0x080); |
| 518 | 526 | |
| 519 | 527 | if (offset == 0x07f || offset == 0x0ff) |
| 520 | 528 | { |
| 521 | 529 | m_palette_intensity = m_paletteram[0x0ff] | (m_paletteram[0x07f] << 8); |
| 522 | 530 | |
| 523 | 531 | for (offs = 0x400; offs < 0x500; offs++) |
| 524 | | argus_change_bg_palette((offs & 0xff) + 0x080, offs, offs + 0x400); |
| 532 | change_bg_palette((offs & 0xff) + 0x080, offs, offs + 0x400); |
| 525 | 533 | } |
| 526 | 534 | } |
| 527 | 535 | else if ((offset >= 0x400 && offset <= 0x4ff) || |
| r244639 | r244640 | |
| 530 | 538 | offs = offset & 0xff; |
| 531 | 539 | offset = offs | 0x400; |
| 532 | 540 | |
| 533 | | argus_change_bg_palette(offs + 0x080, offset, offset + 0x400); |
| 541 | change_bg_palette(offs + 0x080, offset, offset + 0x400); |
| 534 | 542 | } |
| 535 | 543 | else if ((offset >= 0x500 && offset <= 0x5ff) || |
| 536 | 544 | (offset >= 0x900 && offset <= 0x9ff)) /* BG1 color */ |
| r244639 | r244640 | |
| 538 | 546 | offs = offset & 0xff; |
| 539 | 547 | offset = offs | 0x500; |
| 540 | 548 | |
| 541 | | argus_change_palette(offs + 0x180, offset, offset + 0x400); |
| 549 | change_palette(offs + 0x180, offset, offset + 0x400); |
| 542 | 550 | } |
| 543 | 551 | else if ((offset >= 0x700 && offset <= 0x7ff) || |
| 544 | 552 | (offset >= 0xb00 && offset <= 0xbff)) /* text color */ |
| r244639 | r244640 | |
| 546 | 554 | offs = offset & 0xff; |
| 547 | 555 | offset = offs | 0x700; |
| 548 | 556 | |
| 549 | | argus_change_palette(offs + 0x280, offset, offset + 0x400); |
| 557 | change_palette(offs + 0x280, offset, offset + 0x400); |
| 550 | 558 | } |
| 551 | 559 | } |
| 552 | 560 | |
| r244639 | r244640 | |
| 556 | 564 | |
| 557 | 565 | if (offset <= 0x1ff) /* Sprite color */ |
| 558 | 566 | { |
| 559 | | argus_change_palette(offset >> 1, offset & ~1, offset | 1); |
| 567 | change_palette(offset >> 1, offset & ~1, offset | 1); |
| 560 | 568 | |
| 561 | 569 | if (offset == 0x1fe || offset == 0x1ff) |
| 562 | 570 | { |
| r244639 | r244640 | |
| 565 | 573 | m_palette_intensity = m_paletteram[0x1ff] | (m_paletteram[0x1fe] << 8); |
| 566 | 574 | |
| 567 | 575 | for (offs = 0x400; offs < 0x600; offs += 2) |
| 568 | | argus_change_bg_palette(((offs & 0x1ff) >> 1) + 0x100, offs & ~1, offs | 1); |
| 576 | change_bg_palette(((offs & 0x1ff) >> 1) + 0x100, offs & ~1, offs | 1); |
| 569 | 577 | } |
| 570 | 578 | } |
| 571 | 579 | else if (offset >= 0x400 && offset <= 0x5ff) /* BG color */ |
| 572 | 580 | { |
| 573 | | argus_change_bg_palette(((offset & 0x1ff) >> 1) + 0x100, offset & ~1, offset | 1); |
| 581 | change_bg_palette(((offset & 0x1ff) >> 1) + 0x100, offset & ~1, offset | 1); |
| 574 | 582 | } |
| 575 | 583 | else if (offset >= 0x600 && offset <= 0x7ff) /* Text color */ |
| 576 | 584 | { |
| 577 | | argus_change_palette(((offset & 0x1ff) >> 1) + 0x200, offset & ~1, offset | 1); |
| 585 | change_palette(((offset & 0x1ff) >> 1) + 0x200, offset & ~1, offset | 1); |
| 578 | 586 | } |
| 579 | 587 | } |
| 580 | 588 | |
| r244639 | r244640 | |
| 584 | 592 | |
| 585 | 593 | if (offset <= 0x1ff) /* BG0 color */ |
| 586 | 594 | { |
| 587 | | argus_change_palette((offset >> 1) + 0x100, offset & ~1, offset | 1); |
| 595 | change_palette((offset >> 1) + 0x100, offset & ~1, offset | 1); |
| 588 | 596 | } |
| 589 | 597 | else if (offset <= 0x23f) /* BG1 color */ |
| 590 | 598 | { |
| 591 | | argus_change_palette(((offset & 0x3f) >> 1) + 0x0c0, offset & ~1, offset | 1); |
| 599 | change_palette(((offset & 0x3f) >> 1) + 0x0c0, offset & ~1, offset | 1); |
| 592 | 600 | } |
| 593 | 601 | else if (offset >= 0x400 && offset <= 0x47f) /* Sprite color */ |
| 594 | 602 | { /* 16 colors */ |
| 595 | | argus_change_palette((offset & 0x7f) >> 1, offset & ~1, offset | 1); |
| 603 | change_palette((offset & 0x7f) >> 1, offset & ~1, offset | 1); |
| 596 | 604 | } |
| 597 | 605 | else if (offset >= 0x480 && offset <= 0x4ff) /* Sprite color */ |
| 598 | 606 | { /* 8 colors */ |
| 599 | 607 | int offs = (offset & 0x070) | ((offset & 0x00f) >> 1); |
| 600 | 608 | |
| 601 | | argus_change_palette(offs + 0x040, offset & ~1, offset | 1); |
| 602 | | argus_change_palette(offs + 0x048, offset & ~1, offset | 1); |
| 609 | change_palette(offs + 0x040, offset & ~1, offset | 1); |
| 610 | change_palette(offs + 0x048, offset & ~1, offset | 1); |
| 603 | 611 | } |
| 604 | 612 | else if (offset >= 0x600 && offset <= 0x7ff) /* Text color */ |
| 605 | 613 | { |
| 606 | | argus_change_palette(((offset & 0x1ff) >> 1) + 0x200, offset & ~1, offset | 1); |
| 614 | change_palette(((offset & 0x1ff) >> 1) + 0x200, offset & ~1, offset | 1); |
| 607 | 615 | } |
| 608 | 616 | else if (offset >= 0x240 && offset <= 0x25f) // dummy |
| 609 | | argus_change_palette(((offset & 0x1f) >> 1) + 0xe0, offset & ~1, offset | 1); |
| 617 | change_palette(((offset & 0x1f) >> 1) + 0xe0, offset & ~1, offset | 1); |
| 610 | 618 | else if (offset >= 0x500 && offset <= 0x51f) // dummy |
| 611 | | argus_change_palette(((offset & 0x1f) >> 1) + 0xf0, offset & ~1, offset | 1); |
| 619 | change_palette(((offset & 0x1f) >> 1) + 0xf0, offset & ~1, offset | 1); |
| 612 | 620 | } |
| 613 | 621 | |
| 614 | | READ8_MEMBER(argus_state::butasan_bg1ram_r) |
| 615 | | { |
| 616 | | return m_butasan_bg1ram[offset]; |
| 617 | | } |
| 618 | | |
| 619 | 622 | WRITE8_MEMBER(argus_state::butasan_bg1ram_w) |
| 620 | 623 | { |
| 621 | 624 | int idx; |
| r244639 | r244640 | |
| 804 | 807 | |
| 805 | 808 | void argus_state::argus_draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect, int priority) |
| 806 | 809 | { |
| 807 | | UINT8 *spriteram = m_spriteram; |
| 808 | | int offs; |
| 809 | | |
| 810 | 810 | /* Draw the sprites */ |
| 811 | | for (offs = 0; offs < m_spriteram.bytes(); offs += 16) |
| 811 | for (int offs = 0; offs < m_spriteram.bytes(); offs += 16) |
| 812 | 812 | { |
| 813 | | if (!(spriteram[offs+15] == 0 && spriteram[offs+11] == 0xf0)) |
| 813 | if (!(m_spriteram[offs+15] == 0 && m_spriteram[offs+11] == 0xf0)) |
| 814 | 814 | { |
| 815 | 815 | int sx, sy, tile, flipx, flipy, color, pri; |
| 816 | 816 | |
| 817 | | sx = spriteram[offs+12]; if (spriteram[offs+13] & 0x01) sx -= 256; |
| 818 | | sy = spriteram[offs+11]; if (!(spriteram[offs+13] & 0x02)) sy -= 256; |
| 817 | sx = m_spriteram[offs+12]; if (m_spriteram[offs+13] & 0x01) sx -= 256; |
| 818 | sy = m_spriteram[offs+11]; if (!(m_spriteram[offs+13] & 0x02)) sy -= 256; |
| 819 | 819 | |
| 820 | | tile = spriteram[offs+14] | ((spriteram[offs+13] & 0xc0) << 2); |
| 821 | | flipx = spriteram[offs+13] & 0x10; |
| 822 | | flipy = spriteram[offs+13] & 0x20; |
| 823 | | color = spriteram[offs+15] & 0x07; |
| 824 | | pri = (spriteram[offs+15] & 0x08) >> 3; |
| 820 | tile = m_spriteram[offs+14] | ((m_spriteram[offs+13] & 0xc0) << 2); |
| 821 | flipx = m_spriteram[offs+13] & 0x10; |
| 822 | flipy = m_spriteram[offs+13] & 0x20; |
| 823 | color = m_spriteram[offs+15] & 0x07; |
| 824 | pri = (m_spriteram[offs+15] & 0x08) >> 3; |
| 825 | 825 | |
| 826 | 826 | if (m_flipscreen) |
| 827 | 827 | { |
| r244639 | r244640 | |
| 933 | 933 | |
| 934 | 934 | void argus_state::valtric_draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 935 | 935 | { |
| 936 | | UINT8 *spriteram = m_spriteram; |
| 937 | | int offs; |
| 938 | | |
| 939 | 936 | /* Draw the sprites */ |
| 940 | | for (offs = 0; offs < m_spriteram.bytes(); offs += 16) |
| 937 | for (int offs = 0; offs < m_spriteram.bytes(); offs += 16) |
| 941 | 938 | { |
| 942 | | if (!(spriteram[offs+15] == 0 && spriteram[offs+11] == 0xf0)) |
| 939 | if (!(m_spriteram[offs+15] == 0 && m_spriteram[offs+11] == 0xf0)) |
| 943 | 940 | { |
| 944 | 941 | int sx, sy, tile, flipx, flipy, color; |
| 945 | 942 | |
| 946 | | sx = spriteram[offs+12]; if (spriteram[offs+13] & 0x01) sx -= 256; |
| 947 | | sy = spriteram[offs+11]; if (!(spriteram[offs+13] & 0x02)) sy -= 256; |
| 943 | sx = m_spriteram[offs+12]; if (m_spriteram[offs+13] & 0x01) sx -= 256; |
| 944 | sy = m_spriteram[offs+11]; if (!(m_spriteram[offs+13] & 0x02)) sy -= 256; |
| 948 | 945 | |
| 949 | | tile = spriteram[offs+14] | ((spriteram[offs+13] & 0xc0) << 2); |
| 950 | | flipx = spriteram[offs+13] & 0x10; |
| 951 | | flipy = spriteram[offs+13] & 0x20; |
| 952 | | color = spriteram[offs+15] & 0x0f; |
| 946 | tile = m_spriteram[offs+14] | ((m_spriteram[offs+13] & 0xc0) << 2); |
| 947 | flipx = m_spriteram[offs+13] & 0x10; |
| 948 | flipy = m_spriteram[offs+13] & 0x20; |
| 949 | color = m_spriteram[offs+15] & 0x0f; |
| 953 | 950 | |
| 954 | 951 | if (m_flipscreen) |
| 955 | 952 | { |
| r244639 | r244640 | |
| 972 | 969 | |
| 973 | 970 | void argus_state::butasan_draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 974 | 971 | { |
| 975 | | UINT8 *spriteram = m_spriteram; |
| 976 | | int offs; |
| 977 | | |
| 978 | 972 | /* Draw the sprites */ |
| 979 | | for (offs = 0; offs < m_spriteram.bytes(); offs += 16) |
| 973 | for (int offs = 0; offs < m_spriteram.bytes(); offs += 16) |
| 980 | 974 | { |
| 981 | 975 | int sx, sy, tile, flipx, flipy, color; |
| 982 | 976 | int fx, fy; |
| 983 | 977 | |
| 984 | | tile = spriteram[offs+14] | ((spriteram[offs+15] & 0x0f) << 8); |
| 985 | | flipx = spriteram[offs+8] & 0x01; |
| 986 | | flipy = spriteram[offs+8] & 0x04; |
| 987 | | color = spriteram[offs+9] & 0x0f; |
| 978 | tile = m_spriteram[offs+14] | ((m_spriteram[offs+15] & 0x0f) << 8); |
| 979 | flipx = m_spriteram[offs+8] & 0x01; |
| 980 | flipy = m_spriteram[offs+8] & 0x04; |
| 981 | color = m_spriteram[offs+9] & 0x0f; |
| 988 | 982 | |
| 989 | | sx = spriteram[offs+10]; |
| 990 | | sy = spriteram[offs+12]; |
| 983 | sx = m_spriteram[offs+10]; |
| 984 | sy = m_spriteram[offs+12]; |
| 991 | 985 | |
| 992 | | if (spriteram[offs+11] & 0x01) sx-=256; |
| 993 | | if (spriteram[offs+13] & 0x01) sy-=256; |
| 986 | if (m_spriteram[offs+11] & 0x01) sx-=256; |
| 987 | if (m_spriteram[offs+13] & 0x01) sy-=256; |
| 994 | 988 | |
| 995 | 989 | sy = 240 - sy; |
| 996 | 990 | |