trunk/hash/tutor.xml
| r249126 | r249127 | |
| 15 | 15 | 005E Frogger ~ フロッガー [dumped] |
| 16 | 16 | 006E Scramble ~ スクランブル [dumped] |
| 17 | 17 | 007E NightFlight ~ ナイトフライト [dumped] |
| 18 | | 008E Marine Adventure ~ マリン アドベンチャー [dumped] |
| 18 | 008E Marine Adventure ~ マリン アドベンチーャ [dumped] |
| 19 | 19 | 009E Mission Attack ~ ミッション アタック [dumped] |
| 20 | | 010E Traffic Jam ~ トラフィック ジャム |
| 21 | | 011E Mystery Gold ~ ミステリー ゴールド |
| 20 | 010E Traffic Jam ~ トラフィック ジャム [dumped] |
| 21 | 011E Mystery Gold ~ ミステリー ゴールド [dumped] |
| 22 | 22 | 012E DonPan ~ ドンバン [dumped] |
| 23 | 23 | 013E Mickey Athletic Land ~ ミッキー アスレチックランド [dumped] |
| 24 | 24 | 014E Pooyan ~ プーヤン |
| 25 | 25 | 015E Jungler ~ ジャングラー |
| 26 | 26 | 016E Guttang Gottong ~ ガッタンゴットン |
| 27 | | 017E Maze Patrol ~ メイズ パトロール |
| 27 | 017E Maze Patrol ~ メイズ パトロール [dumped] |
| 28 | 28 | 018E Tron ~ トロン |
| 29 | | 019E Mr. Do! ~ Mr.DO! |
| 29 | 019E Mr. Do! ~ Mr.DO! [dumped] |
| 30 | 30 | 020E Bermuda Triangle ~ バミューダ・ トライアングル |
| 31 | 31 | 021E 4-nin Mahjan ~ 四人麻雀 |
| 32 | 32 | 022E Triplecommand ~ トリプルコマンド |
| r249126 | r249127 | |
| 218 | 218 | </dataarea> |
| 219 | 219 | </part> |
| 220 | 220 | </software> |
| 221 | |
| 222 | <software name="mazeptrl"> |
| 223 | <description>Maze Patrol (Jpn)</description> |
| 224 | <year>1983</year> |
| 225 | <publisher>Tomy</publisher> |
| 226 | <info name="alt_title" value="メイズ パトロール"/> |
| 227 | <info name="serial" value="017E"/> |
| 228 | <part name="cart" interface="tutor_cart"> |
| 229 | <dataarea name="rom" size="8192"> |
| 230 | <rom name="tomy 36.7.u1" size="8192" crc="f3059779" sha1="fd51c445f0356ed3796bdbbd4a7f6086d7bb5331" offset="0" /> |
| 231 | </dataarea> |
| 232 | </part> |
| 233 | </software> |
| 221 | 234 | |
| 222 | 235 | <software name="athland"> |
| 223 | 236 | <description>Mickey Athletic Land (Jpn)</description> |
| r249126 | r249127 | |
| 257 | 270 | </dataarea> |
| 258 | 271 | </part> |
| 259 | 272 | </software> |
| 273 | |
| 274 | <software name="mysteryg"> |
| 275 | <description>Mystery Gold (Jpn)</description> |
| 276 | <year>1983</year> |
| 277 | <publisher>Tomy</publisher> |
| 278 | <info name="alt_title" value="ミステリー ゴールド"/> |
| 279 | <info name="serial" value="011E"/> |
| 280 | <part name="cart" interface="tutor_cart"> |
| 281 | <dataarea name="rom" size="8192"> |
| 282 | <rom name="mysteryg.bin" size="8192" crc="2c4f30b8" sha1="8d1fcb8e86f4e2d5557a7c39e7859811311a966a" offset="0" /> |
| 283 | </dataarea> |
| 284 | </part> |
| 285 | </software> |
| 286 | |
| 287 | <software name="mrdo"> |
| 288 | <description>Mr. Do! (Jpn)</description> |
| 289 | <year>1983</year> |
| 290 | <publisher>Tomy</publisher> |
| 291 | <info name="alt_title" value="Mr.DO!"/> |
| 292 | <info name="serial" value="019E"/> |
| 293 | <part name="cart" interface="tutor_cart"> |
| 294 | <dataarea name="rom" size="8192"> |
| 295 | <rom name="tomy 3l1.ic1.bin" size="8192" crc="1dfa3f4b" sha1="93d1c17c5edd44f27c28cde88a68f609b77feb0c" offset="0" /> |
| 296 | </dataarea> |
| 297 | </part> |
| 298 | </software> |
| 260 | 299 | |
| 261 | 300 | <software name="nflight"> |
| 262 | 301 | <description>Night Flight (Jpn)</description> |
| r249126 | r249127 | |
| 336 | 375 | |
| 337 | 376 | <software name="trafjam"> |
| 338 | 377 | <!-- Stock No: 8103, (Japanese 010E)--> |
| 339 | | <description>Traffic Jam</description> |
| 340 | | <year>1983</year> |
| 378 | <description>Traffic Jam (Jpn)</description> |
| 379 | <year>1982</year> |
| 341 | 380 | <publisher>Tomy</publisher> |
| 342 | 381 | <part name="cart" interface="tutor_cart"> |
| 343 | 382 | <dataarea name="rom" size="8192"> |
| 344 | | <rom name="trafjam.bin" size="8192" crc="c0c78141" sha1="2ba074955a1507ca9f6cde8987695f495e81aeab" offset="0" /> |
| 383 | <rom name="tomy 33.5.ic1" size="8192" crc="c970f2c3" sha1="086825470d349f3bbd598bbb8b8c9e13aa2458b6" offset="0" /> |
| 345 | 384 | </dataarea> |
| 346 | 385 | </part> |
| 347 | 386 | </software> |
| 348 | 387 | |
| 349 | 388 | <software name="trafjama" cloneof="trafjam"> |
| 350 | 389 | <!-- Stock No: 8103, (Japanese 010E)--> |
| 351 | | <description>Traffic Jam (Alt)</description> |
| 352 | | <year>1982</year> |
| 390 | <description>Traffic Jam (USA)</description> |
| 391 | <year>1983</year> |
| 353 | 392 | <publisher>Tomy</publisher> |
| 354 | 393 | <part name="cart" interface="tutor_cart"> |
| 355 | 394 | <dataarea name="rom" size="8192"> |
| 356 | | <rom name="trafjama.bin" size="8192" crc="c970f2c3" sha1="086825470d349f3bbd598bbb8b8c9e13aa2458b6" offset="0" /> |
| 395 | <rom name="trafjama.bin" size="8192" crc="c0c78141" sha1="2ba074955a1507ca9f6cde8987695f495e81aeab" offset="0" /> |
| 357 | 396 | </dataarea> |
| 358 | 397 | </part> |
| 359 | 398 | </software> |
trunk/src/mame/drivers/goldstar.c
| r249126 | r249127 | |
| 1741 | 1741 | PORT_INCLUDE( cmv4_service ) |
| 1742 | 1742 | |
| 1743 | 1743 | PORT_START("DSW1") |
| 1744 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW1:1") /* OK */ |
| 1744 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW1:1") /* OK */ |
| 1745 | 1745 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1746 | 1746 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1747 | | PORT_DIPNAME( 0x02, 0x02, "Hopper Out Switch" ) PORT_DIPLOCATION("DSW1:2") /* OK */ |
| 1747 | PORT_DIPNAME( 0x02, 0x02, "Hopper Out Switch" ) PORT_DIPLOCATION("DSW1:2") /* OK */ |
| 1748 | 1748 | PORT_DIPSETTING( 0x02, "Active Low" ) |
| 1749 | 1749 | PORT_DIPSETTING( 0x00, "Active High" ) |
| 1750 | | PORT_DIPNAME( 0x04, 0x00, "Payout Mode" ) PORT_DIPLOCATION("DSW1:3") /* OK */ |
| 1750 | PORT_DIPNAME( 0x04, 0x00, "Payout Mode" ) PORT_DIPLOCATION("DSW1:3") /* OK */ |
| 1751 | 1751 | PORT_DIPSETTING( 0x04, "Payout Switch" ) |
| 1752 | 1752 | PORT_DIPSETTING( 0x00, "Automatic" ) |
| 1753 | | PORT_DIPNAME( 0x08, 0x00, "W-UP '7'" ) PORT_DIPLOCATION("DSW1:4") /* not checked */ |
| 1754 | | PORT_DIPSETTING( 0x08, "Loss" ) |
| 1755 | | PORT_DIPSETTING( 0x00, "Even" ) |
| 1756 | | PORT_DIPNAME( 0x10, 0x00, "W-UP Pay Rate" ) PORT_DIPLOCATION("DSW1:5") /* OK */ |
| 1753 | PORT_DIPNAME( 0x08, 0x00, "'7' In Double Up Game" ) PORT_DIPLOCATION("DSW1:4") /* OK */ |
| 1754 | PORT_DIPSETTING( 0x08, "Even" ) |
| 1755 | PORT_DIPSETTING( 0x00, "Loss" ) |
| 1756 | PORT_DIPNAME( 0x10, 0x00, "Double Up Game Pay Rate" ) PORT_DIPLOCATION("DSW1:5") /* OK */ |
| 1757 | 1757 | PORT_DIPSETTING( 0x00, "80%" ) |
| 1758 | 1758 | PORT_DIPSETTING( 0x10, "90%" ) |
| 1759 | | PORT_DIPNAME( 0x20, 0x00, "W-UP Game" ) PORT_DIPLOCATION("DSW1:6") /* OK */ |
| 1759 | PORT_DIPNAME( 0x20, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DSW1:6") /* OK */ |
| 1760 | 1760 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1761 | 1761 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1762 | | PORT_DIPNAME( 0xc0, 0xc0, "Bet Max" ) PORT_DIPLOCATION("DSW1:7,8") /* OK */ |
| 1762 | PORT_DIPNAME( 0xc0, 0xc0, "Bet Max" ) PORT_DIPLOCATION("DSW1:7,8") /* OK */ |
| 1763 | 1763 | PORT_DIPSETTING( 0x00, "8" ) |
| 1764 | 1764 | PORT_DIPSETTING( 0x40, "16" ) |
| 1765 | 1765 | PORT_DIPSETTING( 0x80, "32" ) |
| r249126 | r249127 | |
| 1787 | 1787 | |
| 1788 | 1788 | PORT_INCLUDE( cmv4_dsw5 ) |
| 1789 | 1789 | PORT_MODIFY("DSW5") |
| 1790 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:1") /* normally Display of Doll On Demo, but no whores in this set */ |
| 1790 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:1") /* normally Display of Doll On Demo, but no whores in this set */ |
| 1791 | 1791 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1792 | 1792 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1793 | 1793 | /* Coin In Limit OK */ |
| 1794 | 1794 | /* Condition For 3 Kind Of Bonus not checked */ |
| 1795 | | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:6") /* normally Display Of Doll At All Fr. Bonus, but no whores in this set */ |
| 1796 | | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1797 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1798 | | PORT_DIPNAME( 0x40, 0x40, "Skill Stop" ) PORT_DIPLOCATION("DSW5:7") /* OK */ |
| 1795 | PORT_DIPNAME( 0x20, 0x20, "Show Odds In Double Up Game" ) PORT_DIPLOCATION("DSW5:6") /* OK */ |
| 1796 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1797 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) |
| 1798 | PORT_DIPNAME( 0x40, 0x40, "Skill Stop" ) PORT_DIPLOCATION("DSW5:7") /* OK */ |
| 1799 | 1799 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 1800 | 1800 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1801 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:8") /* normally Test Mode For Disp. Of Doll, but no whores in this set */ |
| 1801 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:8") /* normally Test Mode For Disp. Of Doll, but no whores in this set */ |
| 1802 | 1802 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1803 | 1803 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1804 | 1804 | INPUT_PORTS_END |
trunk/src/mame/drivers/suna8.c
| r249126 | r249127 | |
| 27 | 27 | |
| 28 | 28 | - hardhea2: in test mode press P1&P2 button 2 to see a picture of each level |
| 29 | 29 | - Rough Ranger default dipswitch settings are based on the settings listed in |
| 30 | | the Sharp Image licensed Rough Ranger manaul / NOTICE sheet dated 8-5-88 |
| 31 | | - starfigh video: http://youtu.be/SIwV7wjvnHM -> missing starfield effect! |
| 30 | the Sharp Image licensed Rough Ranger manual / NOTICE sheet dated 8-5-88 |
| 31 | - rranger video: http://www.nicovideo.jp/watch/sm15788808 (not perfect: fireball masking, lev. 5; masking/missing legs, lev. 10) |
| 32 | - hardhead video: https://youtu.be/zamQvXr9_xs |
| 33 | - starfigh video: http://youtu.be/SIwV7wjvnHM (missing starfield effect!) |
| 32 | 34 | - brickzn video: http://youtu.be/yfU1C7A3iZI (recorded from v6.0, Joystick version) |
| 33 | 35 | |
| 34 | 36 | ***************************************************************************/ |
| r249126 | r249127 | |
| 1885 | 1887 | MCFG_PALETTE_FORMAT(RRRRGGGGBBBBxxxx) |
| 1886 | 1888 | MCFG_PALETTE_ENDIANNESS(ENDIANNESS_BIG) |
| 1887 | 1889 | |
| 1888 | | MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_textdim12) |
| 1890 | MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_text) |
| 1889 | 1891 | |
| 1890 | 1892 | /* sound hardware */ |
| 1891 | 1893 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r249126 | r249127 | |
| 1939 | 1941 | MCFG_PALETTE_FORMAT(RRRRGGGGBBBBxxxx) |
| 1940 | 1942 | MCFG_PALETTE_ENDIANNESS(ENDIANNESS_BIG) |
| 1941 | 1943 | |
| 1942 | | MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_textdim8) |
| 1944 | MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_text) |
| 1943 | 1945 | |
| 1944 | 1946 | /* sound hardware */ |
| 1945 | 1947 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r249126 | r249127 | |
| 2921 | 2923 | m_bank1->configure_entries(0, 16, memregion("maincpu")->base() + 0x10000, 0x4000); |
| 2922 | 2924 | } |
| 2923 | 2925 | |
| 2924 | | GAME( 1988, sranger, 0, rranger, rranger, suna8_state, suna8, ROT0, "SunA", "Super Ranger (v2.0)", 0 ) |
| 2925 | | GAME( 1988, rranger, sranger, rranger, rranger, suna8_state, suna8, ROT0, "SunA (Sharp Image license)", "Rough Ranger (v2.0)", 0 ) |
| 2926 | | GAME( 1988, rrangerb, sranger, rranger, rranger, suna8_state, suna8, ROT0, "bootleg", "Rough Ranger (v2.0, bootleg)", 0 ) |
| 2927 | | GAME( 1988, srangero, sranger, rranger, rranger, suna8_state, suna8, ROT0, "SunA", "Super Ranger (older)", 0 ) |
| 2928 | | GAME( 1988, srangern, sranger, rranger, rranger, suna8_state, suna8, ROT0, "SunA (NOVA license)", "Super Ranger (older, NOVA license)", 0 ) |
| 2929 | | GAME( 1988, srangerw, sranger, rranger, rranger, suna8_state, suna8, ROT0, "SunA (WDK license)", "Super Ranger (older, WDK license)", 0 ) |
| 2930 | | GAME( 1988, srangerb, sranger, rranger, rranger, suna8_state, suna8, ROT0, "bootleg (NYWA)", "Super Ranger (older, bootleg)", 0 ) |
| 2926 | GAME( 1988, sranger, 0, rranger, rranger, suna8_state, suna8, ROT0, "SunA", "Super Ranger (v2.0)", MACHINE_IMPERFECT_GRAPHICS ) |
| 2927 | GAME( 1988, rranger, sranger, rranger, rranger, suna8_state, suna8, ROT0, "SunA (Sharp Image license)", "Rough Ranger (v2.0)", MACHINE_IMPERFECT_GRAPHICS ) |
| 2928 | GAME( 1988, rrangerb, sranger, rranger, rranger, suna8_state, suna8, ROT0, "bootleg", "Rough Ranger (v2.0, bootleg)", MACHINE_IMPERFECT_GRAPHICS ) |
| 2929 | GAME( 1988, srangero, sranger, rranger, rranger, suna8_state, suna8, ROT0, "SunA", "Super Ranger (older)", MACHINE_IMPERFECT_GRAPHICS ) |
| 2930 | GAME( 1988, srangern, sranger, rranger, rranger, suna8_state, suna8, ROT0, "SunA (NOVA license)", "Super Ranger (older, NOVA license)", MACHINE_IMPERFECT_GRAPHICS ) |
| 2931 | GAME( 1988, srangerw, sranger, rranger, rranger, suna8_state, suna8, ROT0, "SunA (WDK license)", "Super Ranger (older, WDK license)", MACHINE_IMPERFECT_GRAPHICS ) |
| 2932 | GAME( 1988, srangerb, sranger, rranger, rranger, suna8_state, suna8, ROT0, "bootleg (NYWA)", "Super Ranger (older, bootleg)", MACHINE_IMPERFECT_GRAPHICS ) |
| 2931 | 2933 | |
| 2932 | 2934 | GAME( 1988, hardhead, 0, hardhead, hardhead, suna8_state, hardhead, ROT0, "SunA", "Hard Head", 0 ) |
| 2933 | 2935 | GAME( 1988, hardheadb, hardhead, hardhead, hardhead, suna8_state, hardhedb, ROT0, "bootleg", "Hard Head (bootleg)", 0 ) |
trunk/src/mame/video/suna8.c
| r249126 | r249127 | |
| 17 | 17 | sent to the screen. Each sprite uses 4 bytes, held within the last |
| 18 | 18 | page of tiles. |
| 19 | 19 | |
| 20 | | * Note: later games use a more complex format than the following, |
| 21 | | which is yet to be completely understood. |
| 22 | | |
| 23 | | [ Sprites Format ] |
| 24 | | |
| 25 | | Offset: Bits: Value: |
| 26 | | |
| 27 | | 0.b Y (Bottom up) |
| 28 | | |
| 29 | | 1.b 7--- ---- Sprite Size (1 = 2x32 tiles; 0 = 2x2) |
| 30 | | |
| 31 | | 2x2 Sprites: |
| 32 | | -65- ---- Tiles Row (height = 8 tiles) |
| 33 | | ---4 ---- Page |
| 34 | | |
| 35 | | 2x32 Sprites: |
| 36 | | -6-- ---- Ignore X (Multisprite) |
| 37 | | --54 ---- Page |
| 38 | | |
| 39 | | ---- 3210 Tiles Column (width = 2 tiles) |
| 40 | | |
| 41 | | 2.b X |
| 42 | | |
| 43 | | 3.b 7--- ---- |
| 44 | | -6-- ---- X (Sign Bit) |
| 45 | | --54 3--- |
| 46 | | ---- -210 Tiles Bank |
| 47 | | |
| 48 | | |
| 49 | | [ Sprite's Tiles Format ] |
| 50 | | |
| 51 | | |
| 52 | | Offset: Bits: Value: |
| 53 | | |
| 54 | | 0.b Code (Low Bits) |
| 55 | | |
| 56 | | 1.b 7--- ---- Flip Y |
| 57 | | -6-- ---- Flip X |
| 58 | | --54 32-- Color |
| 59 | | ---- --10 Code (High Bits) |
| 60 | | |
| 61 | | |
| 62 | | |
| 63 | 20 | Set TILEMAPS to 1 to debug. |
| 64 | 21 | Press Z (you see the "tilemaps" in RAM) or |
| 65 | 22 | Press X (you see the "tilemaps" in ROM) then |
| r249126 | r249127 | |
| 72 | 29 | |
| 73 | 30 | #include "emu.h" |
| 74 | 31 | #include "includes/suna8.h" |
| 32 | #include "drawgfxm.h" |
| 75 | 33 | |
| 76 | 34 | /*************************************************************************** |
| 77 | 35 | For Debug: there's no tilemap, just sprites. |
| r249126 | r249127 | |
| 180 | 138 | |
| 181 | 139 | |
| 182 | 140 | |
| 183 | | void suna8_state::suna8_vh_start_common(int text_dim, GFXBANK_TYPE_T gfxbank_type) |
| 141 | void suna8_state::suna8_vh_start_common(bool has_text, GFXBANK_TYPE_T gfxbank_type) |
| 184 | 142 | { |
| 185 | | m_text_dim = text_dim; |
| 143 | m_has_text = has_text; |
| 186 | 144 | m_spritebank = 0; |
| 187 | 145 | m_gfxbank = 0; |
| 188 | 146 | m_gfxbank_type = gfxbank_type; |
| 189 | 147 | m_palettebank = 0; |
| 190 | 148 | |
| 191 | | if (!m_text_dim) |
| 149 | if (!m_has_text) |
| 192 | 150 | { |
| 193 | 151 | m_banked_paletteram.allocate(0x200 * 2); |
| 194 | 152 | |
| r249126 | r249127 | |
| 199 | 157 | #if TILEMAPS |
| 200 | 158 | m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(suna8_state::get_tile_info),this), TILEMAP_SCAN_COLS, |
| 201 | 159 | |
| 202 | | 8, 8, 0x20*(m_text_dim ? 4 : 16), 0x20); |
| 160 | 8, 8, 0x20*(m_has_text ? 4 : 16), 0x20); |
| 203 | 161 | |
| 204 | 162 | m_bg_tilemap->set_transparent_pen(15); |
| 205 | 163 | #endif |
| 206 | 164 | } |
| 207 | 165 | |
| 208 | | VIDEO_START_MEMBER(suna8_state,suna8_textdim8) { suna8_vh_start_common( 8, GFXBANK_TYPE_SPARKMAN); } |
| 209 | | VIDEO_START_MEMBER(suna8_state,suna8_textdim12) { suna8_vh_start_common( 12, GFXBANK_TYPE_SPARKMAN); } |
| 210 | | VIDEO_START_MEMBER(suna8_state,suna8_sparkman) { suna8_vh_start_common( 0, GFXBANK_TYPE_SPARKMAN); } |
| 211 | | VIDEO_START_MEMBER(suna8_state,suna8_brickzn) { suna8_vh_start_common( 0, GFXBANK_TYPE_BRICKZN); } |
| 212 | | VIDEO_START_MEMBER(suna8_state,suna8_starfigh) { suna8_vh_start_common( 0, GFXBANK_TYPE_STARFIGH); } |
| 166 | VIDEO_START_MEMBER(suna8_state,suna8_text) { suna8_vh_start_common( true, GFXBANK_TYPE_SPARKMAN); } |
| 167 | VIDEO_START_MEMBER(suna8_state,suna8_sparkman) { suna8_vh_start_common( false, GFXBANK_TYPE_SPARKMAN); } |
| 168 | VIDEO_START_MEMBER(suna8_state,suna8_brickzn) { suna8_vh_start_common( false, GFXBANK_TYPE_BRICKZN); } |
| 169 | VIDEO_START_MEMBER(suna8_state,suna8_starfigh) { suna8_vh_start_common( false, GFXBANK_TYPE_STARFIGH); } |
| 213 | 170 | |
| 214 | 171 | /*************************************************************************** |
| 215 | 172 | |
| r249126 | r249127 | |
| 219 | 176 | |
| 220 | 177 | ***************************************************************************/ |
| 221 | 178 | |
| 222 | | void suna8_state::draw_normal_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect, int which) |
| 179 | #define PIXEL_OP_REBASE_TRANSPEN_PRIORITY_MASK(DEST, PRIORITY, SOURCE) \ |
| 180 | do \ |
| 181 | { \ |
| 182 | UINT32 srcdata = (SOURCE); \ |
| 183 | if (srcdata != trans_pen) \ |
| 184 | { \ |
| 185 | if ((PRIORITY) == 0) \ |
| 186 | (DEST) = color + srcdata; \ |
| 187 | } \ |
| 188 | } \ |
| 189 | while (0) |
| 190 | |
| 191 | class mygfx_element : public gfx_element |
| 223 | 192 | { |
| 193 | public: |
| 194 | void prio_mask_transpen(bitmap_ind16 &dest, const rectangle &cliprect, |
| 195 | UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, |
| 196 | bitmap_ind8 &priority, UINT32 trans_pen) |
| 197 | { |
| 198 | color = colorbase() + granularity() * (color % colors()); |
| 199 | code %= elements(); |
| 200 | DRAWGFX_CORE(UINT16, PIXEL_OP_REBASE_TRANSPEN_PRIORITY_MASK, UINT8); |
| 201 | } |
| 202 | }; |
| 203 | |
| 204 | /*************************************************************************** |
| 205 | |
| 206 | [ Sprites Format ] |
| 207 | |
| 208 | * Note: later games use a more complex format than the following |
| 209 | |
| 210 | Offset: Bits: Value: |
| 211 | |
| 212 | 0.b Y (Bottom up) |
| 213 | |
| 214 | 1.b 7--- ---- Sprite Size (1 = 2x32 tiles; 0 = 2x2) |
| 215 | |
| 216 | 2x2 Sprites: |
| 217 | -65- ---- Tiles Row (height = 8 tiles) |
| 218 | ---4 ---- Page |
| 219 | |
| 220 | 2x32 Sprites: |
| 221 | -6-- ---- Ignore X (Multisprite) |
| 222 | --54 ---- Page |
| 223 | |
| 224 | ---- 3210 Tiles Column (width = 2 tiles) |
| 225 | |
| 226 | 2.b X |
| 227 | |
| 228 | 3.b 7--- ---- Text Sprite |
| 229 | -6-- ---- X (Sign Bit) <- Also Set For Text Sprites |
| 230 | --54 3210 Tiles Bank ($400 tiles each) |
| 231 | |
| 232 | |
| 233 | [ Sprite's Tiles Format ] |
| 234 | |
| 235 | |
| 236 | Offset: Bits: Value: |
| 237 | |
| 238 | 0.b Code (Low Bits) |
| 239 | |
| 240 | 1.b 7--- ---- Flip Y |
| 241 | -6-- ---- Flip X |
| 242 | --54 32-- Color |
| 243 | ---- --10 Code (High Bits) |
| 244 | |
| 245 | ***************************************************************************/ |
| 246 | |
| 247 | void suna8_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end, int which) |
| 248 | { |
| 224 | 249 | UINT8 *spriteram = m_spriteram + which * 0x2000 * 2; |
| 225 | 250 | |
| 226 | | int i; |
| 227 | 251 | int mx = 0; // multisprite x counter |
| 228 | 252 | |
| 229 | 253 | int max_x = m_screen->width() - 8; |
| 230 | 254 | int max_y = m_screen->height() - 8; |
| 231 | 255 | |
| 232 | | for (i = 0x1d00; i < 0x2000; i += 4) |
| 256 | if (m_has_text) |
| 257 | screen.priority().fill(0, cliprect); |
| 258 | |
| 259 | for (int i = start; i < end; i += 4) |
| 233 | 260 | { |
| 234 | 261 | int srcpg, srcx,srcy, dimx,dimy, tx, ty; |
| 235 | 262 | int gfxbank, colorbank = 0, flipx,flipy, multisprite; |
| r249126 | r249127 | |
| 239 | 266 | int x = spriteram[i + 2]; |
| 240 | 267 | int bank = spriteram[i + 3]; |
| 241 | 268 | |
| 242 | | if (m_text_dim) |
| 269 | bool read_mask = false; |
| 270 | |
| 271 | if (m_has_text) |
| 243 | 272 | { |
| 244 | 273 | // Older, simpler hardware: hardhead, rranger |
| 274 | |
| 275 | // rranger (20:18): |
| 276 | // fireball (fe00: 19 00 28 07) not masked by text (fd48: e0 00 00 c0, fd4c: 10 00 00 c0), fire (fdb0: 30 00 00 c0, fdb4: 20 00 00 c0) |
| 277 | // fireball (fe00: 20 00 ba 07) is masked!? But only by fire? |
| 278 | // rranger (33:04, 35:17): |
| 279 | // generally no masking by fire, but there are missing legs on some enemies. |
| 280 | // Could be a sprite limit hit, as there are many sprites on that line, and it's affected by the horizontal (dead) player |
| 281 | read_mask = true; |
| 282 | |
| 283 | if ((bank & 0xc0) == 0xc0) |
| 284 | { |
| 285 | // hardhead: fd88/8c/90 -> f994..f9c0 |
| 286 | // rranger: fd48/4c -> f980..f9ac |
| 287 | // fdb0/b4 -> f9c0..f9fc |
| 288 | // note: fireballs in level 5 (fe20/40) should go above flames and score (text sprites) |
| 289 | int text_list = (i - start) & 0x20; |
| 290 | int text_start = text_list ? 0x19c0 : 0x1980; |
| 291 | bool write_mask = (text_list == 0); // hack? |
| 292 | draw_text_sprites(screen, bitmap, cliprect, text_start, text_start + 0x80, y, write_mask); |
| 293 | continue; |
| 294 | } |
| 295 | |
| 245 | 296 | flipx = 0; |
| 246 | 297 | flipy = 0; |
| 247 | 298 | gfxbank = bank & 0x3f; |
| r249126 | r249127 | |
| 263 | 314 | } |
| 264 | 315 | else |
| 265 | 316 | { |
| 266 | | // Newer, more complex hardware: brickzn, hardhea2, sparkman?, starfigh |
| 317 | // Newer, more complex hardware: brickzn, hardhea2, sparkman, starfigh |
| 267 | 318 | switch( code & 0xc0 ) |
| 268 | 319 | { |
| 269 | 320 | case 0xc0: |
| r249126 | r249127 | |
| 282 | 333 | gfxbank = bank & 0x1f; |
| 283 | 334 | srcpg = (code >> 4) & 3; |
| 284 | 335 | break; |
| 285 | | // hardhea2: fire code=52/54 bank=a4; player code=02/04/06 bank=08; arrow:code=16 bank=27 |
| 286 | 336 | case 0x40: |
| 337 | // hardhea2: fire code=52/54 bank=a4; player code=02/04/06 bank=08; arrow:code=16 bank=27 |
| 287 | 338 | dimx = 4; dimy = 4; |
| 288 | 339 | srcx = (code & 0xe) * 2; |
| 289 | 340 | flipx = code & 0x01; |
| r249126 | r249127 | |
| 347 | 398 | x = x - ((bank & 0x40) ? 0x100 : 0); |
| 348 | 399 | y = (0x100 - y - dimy*8 ) & 0xff; |
| 349 | 400 | |
| 350 | | /* Multi Sprite */ |
| 401 | // Multi Sprite |
| 351 | 402 | if ( multisprite ) { mx += dimx*8; x = mx; } |
| 352 | 403 | else mx = x; |
| 353 | 404 | |
| r249126 | r249127 | |
| 379 | 430 | sy = max_y - sy; tile_flipy = !tile_flipy; |
| 380 | 431 | } |
| 381 | 432 | |
| 382 | | m_gfxdecode->gfx(which)->transpen(bitmap,cliprect, |
| 383 | | tile + (attr & 0x3)*0x100 + gfxbank, |
| 384 | | (((attr >> 2) & 0xf) ^ colorbank) + 0x10 * m_palettebank, // player2 in hardhea2 and sparkman |
| 385 | | tile_flipx, tile_flipy, |
| 386 | | sx, sy, 0xf); |
| 433 | int code = tile + (attr & 0x3)*0x100 + gfxbank; |
| 434 | int color = (((attr >> 2) & 0xf) ^ colorbank) + 0x10 * m_palettebank; // player2 in hardhea2 and sparkman |
| 435 | |
| 436 | if (read_mask) |
| 437 | ((mygfx_element*)(m_gfxdecode->gfx(which)))->prio_mask_transpen(bitmap, cliprect, |
| 438 | code, color, tile_flipx, tile_flipy, sx, sy, screen.priority(), 0xf); |
| 439 | else |
| 440 | m_gfxdecode->gfx(which)->transpen(bitmap, cliprect, |
| 441 | code, color, tile_flipx, tile_flipy, sx, sy, 0xf); |
| 387 | 442 | } |
| 388 | 443 | } |
| 389 | | |
| 390 | 444 | } |
| 391 | 445 | } |
| 392 | 446 | |
| 393 | | void suna8_state::draw_text_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect) |
| 447 | /*************************************************************************** |
| 448 | |
| 449 | [ Text Sprites Format ] |
| 450 | |
| 451 | Offset: Bits: Value: |
| 452 | |
| 453 | 0.b Tiles Y (height = 2 tiles) |
| 454 | |
| 455 | 1.b 7--- ---- 0 = Skip Sprite |
| 456 | -6-- ---- |
| 457 | --54 ---- Page |
| 458 | ---- 3210 Tiles Column (width = 2 tiles) |
| 459 | |
| 460 | 2.b X |
| 461 | |
| 462 | 3.b 7--- ---- 0 = Last Sprite |
| 463 | -6-- ---- X (Sign Bit) |
| 464 | --54 3210 Tiles Bank ($400 tiles each) |
| 465 | |
| 466 | Each text sprite is 2x2 tiles |
| 467 | |
| 468 | ***************************************************************************/ |
| 469 | |
| 470 | void suna8_state::draw_text_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end, int ypos, bool write_mask) |
| 394 | 471 | { |
| 395 | 472 | UINT8 *spriteram = m_spriteram; |
| 396 | | int i; |
| 397 | 473 | |
| 398 | 474 | int max_x = m_screen->width() - 8; |
| 399 | 475 | int max_y = m_screen->height() - 8; |
| 400 | 476 | |
| 401 | | for (i = 0x1900; i < 0x19ff; i += 4) |
| 477 | bool last = false; |
| 478 | for (int i = start; i < end && !last; i += 4) |
| 402 | 479 | { |
| 403 | 480 | int srcpg, srcx,srcy, dimx,dimy, tx, ty; |
| 404 | 481 | |
| r249126 | r249127 | |
| 408 | 485 | int bank = spriteram[i + 3]; |
| 409 | 486 | |
| 410 | 487 | if (~code & 0x80) continue; |
| 488 | last = !(bank & 0x80); |
| 411 | 489 | |
| 412 | | dimx = 2; dimy = m_text_dim; |
| 413 | | srcx = (code & 0xf) * 2; srcy = (y & 0xf0) / 8; |
| 490 | dimx = 2; dimy = 2; |
| 491 | srcx = (code & 0xf) * 2; srcy = ((y & 0xf8) - (ypos & 0xf8) - 0x10) / 8; |
| 414 | 492 | srcpg = (code >> 4) & 3; |
| 415 | 493 | |
| 416 | 494 | x = x - ((bank & 0x40) ? 0x100 : 0); |
| 417 | | y = 0; |
| 418 | 495 | |
| 419 | 496 | bank = (bank & 0x3f) * 0x400; |
| 420 | 497 | |
| r249126 | r249127 | |
| 422 | 499 | { |
| 423 | 500 | for (tx = 0; tx < dimx; tx ++) |
| 424 | 501 | { |
| 425 | | int real_ty = (ty < (dimy/2)) ? ty : (ty + 0x20 - dimy); |
| 426 | | |
| 427 | 502 | int addr = (srcpg * 0x20 * 0x20) + |
| 428 | 503 | ((srcx + tx) & 0x1f) * 0x20 + |
| 429 | | ((srcy + real_ty) & 0x1f); |
| 504 | ((srcy + ty) & 0x1f); |
| 430 | 505 | |
| 431 | 506 | int tile = spriteram[addr*2 + 0]; |
| 432 | 507 | int attr = spriteram[addr*2 + 1]; |
| r249126 | r249127 | |
| 435 | 510 | int flipy = attr & 0x80; |
| 436 | 511 | |
| 437 | 512 | int sx = x + tx * 8; |
| 438 | | int sy = (y + real_ty * 8) & 0xff; |
| 513 | int sy = (0xf0 - ypos + ty * 8) & 0xff; |
| 439 | 514 | |
| 440 | 515 | if (flip_screen()) |
| 441 | 516 | { |
| r249126 | r249127 | |
| 443 | 518 | sy = max_y - sy; flipy = !flipy; |
| 444 | 519 | } |
| 445 | 520 | |
| 446 | | m_gfxdecode->gfx(0)->transpen(bitmap,cliprect, |
| 521 | m_gfxdecode->gfx(0)->transpen(bitmap, cliprect, |
| 447 | 522 | tile + (attr & 0x3)*0x100 + bank, |
| 448 | 523 | (attr >> 2) & 0xf, |
| 449 | 524 | flipx, flipy, |
| 450 | | sx, sy, 0xf); |
| 525 | sx, sy, 0xf ); |
| 451 | 526 | } |
| 452 | 527 | } |
| 528 | } |
| 453 | 529 | |
| 530 | if (write_mask) |
| 531 | { |
| 532 | // Fill the text sprites row with high priority for masking |
| 533 | int sy = (0xf0 - ypos) & 0xff; |
| 534 | if (flip_screen()) |
| 535 | sy = max_y - sy - 8; |
| 536 | rectangle text_clip(cliprect.min_x, cliprect.max_x, sy, sy + 0x10 - 1); |
| 537 | text_clip &= cliprect; |
| 538 | screen.priority().fill(1, text_clip); |
| 454 | 539 | } |
| 455 | 540 | } |
| 456 | 541 | |
| r249126 | r249127 | |
| 464 | 549 | |
| 465 | 550 | UINT32 suna8_state::screen_update_suna8(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 466 | 551 | { |
| 467 | | /* see hardhead, hardhea2 test mode (press button 2 for both players) */ |
| 552 | // see hardhead, hardhea2 test mode (press button 2 for both players) |
| 468 | 553 | bitmap.fill(0xff, cliprect); |
| 469 | 554 | |
| 470 | 555 | #ifdef MAME_DEBUG |
| r249126 | r249127 | |
| 481 | 566 | if (machine().input().code_pressed_once(KEYCODE_S)) { m_trombank++; machine().tilemap().mark_all_dirty(); } |
| 482 | 567 | |
| 483 | 568 | m_trombank &= 0xf; |
| 484 | | m_page &= m_text_dim ? 3 : (m_gfxdecode->gfx(1) ? 15 : 7); |
| 569 | m_page &= m_has_text ? 3 : (m_gfxdecode->gfx(1) ? 15 : 7); |
| 485 | 570 | m_tiles %= max_tiles; |
| 486 | 571 | if (m_tiles < 0) m_tiles += max_tiles; |
| 487 | 572 | |
| r249126 | r249127 | |
| 493 | 578 | m_rombank, m_palettebank, m_spritebank, |
| 494 | 579 | m_page, m_tiles, m_trombank); |
| 495 | 580 | #endif |
| 581 | return 0; |
| 496 | 582 | } |
| 497 | | else |
| 498 | 583 | #endif |
| 499 | 584 | #endif |
| 500 | | { |
| 501 | | // Normal sprites |
| 502 | | draw_normal_sprites(bitmap,cliprect, 0); |
| 503 | 585 | |
| 504 | | // More normal sprites (second sprite "chip" in sparkman) |
| 505 | | if (m_gfxdecode->gfx(1)) |
| 506 | | draw_normal_sprites(bitmap,cliprect, 1); |
| 586 | // Sprites |
| 587 | draw_sprites(screen, bitmap, cliprect, 0x1d00, 0x2000, 0); |
| 507 | 588 | |
| 508 | | // Text sprites (earlier games only) |
| 509 | | if (m_text_dim) |
| 510 | | draw_text_sprites(bitmap,cliprect); |
| 511 | | } |
| 589 | // More sprites (second sprite "chip" in sparkman) |
| 590 | if (m_gfxdecode->gfx(1)) |
| 591 | draw_sprites(screen, bitmap, cliprect, 0x1d00, 0x2000, 1); |
| 592 | |
| 512 | 593 | return 0; |
| 513 | 594 | } |