trunk/src/mame/drivers/gaiden.c
| r30607 | r30608 | |
| 771 | 771 | MCFG_TECMO_SPRITE_GFX_REGION(3) |
| 772 | 772 | |
| 773 | 773 | MCFG_DEVICE_ADD("mixer", TECMO_MIXER, 0) |
| 774 | | MCFG_TECMO_MIXER_SHIFTS(8,10,4) // wrong |
| 774 | MCFG_TECMO_MIXER_SHIFTS(10,9,4) // wrong |
| 775 | 775 | MCFG_TECMO_MIXER_BLENDCOLS( 0x0400 + 0x300, 0x0400 + 0x200, 0x0400 + 0x100, 0x0400 + 0x000 ) |
| 776 | 776 | MCFG_TECMO_MIXER_REGULARCOLS( 0x0000 + 0x300, 0x0000 + 0x200, 0x0000 + 0x100, 0x0000 + 0x000 ) |
| 777 | 777 | MCFG_TECMO_MIXER_BLENDSOUCE( 0x0800 + 0x000, 0x0800 + 0x200) |
| 778 | MCFG_TECMO_MIXER_REVSPRITETILE |
| 778 | 779 | |
| 779 | | |
| 780 | 780 | MCFG_VIDEO_START_OVERRIDE(gaiden_state,gaiden) |
| 781 | 781 | |
| 782 | 782 | /* sound hardware */ |
trunk/src/mame/video/tecmo_mix.c
| r30607 | r30608 | |
| 23 | 23 | m_bgregular_comp(0), |
| 24 | 24 | m_fgregular_comp(0), |
| 25 | 25 | m_txregular_comp(0), |
| 26 | | m_spregular_comp(0) |
| 26 | m_spregular_comp(0), |
| 27 | 27 | |
| 28 | m_revspritetile(0) |
| 29 | |
| 28 | 30 | { |
| 29 | 31 | } |
| 30 | 32 | |
| r30607 | r30608 | |
| 78 | 80 | dev.m_fgblend_source = fgblend_source; |
| 79 | 81 | } |
| 80 | 82 | |
| 83 | void tecmo_mix_device::set_revspritetile(device_t &device) |
| 84 | { |
| 85 | tecmo_mix_device &dev = downcast<tecmo_mix_device &>(device); |
| 86 | dev.m_revspritetile = 3; |
| 87 | } |
| 88 | |
| 81 | 89 | void tecmo_mix_device::mix_bitmaps(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, palette_device* palette, bitmap_ind16* bitmap_bg, bitmap_ind16* bitmap_fg, bitmap_ind16* bitmap_tx, bitmap_ind16* bitmap_sp) |
| 82 | 90 | { |
| 83 | 91 | //int frame = (screen.frame_number()) & 1; |
| r30607 | r30608 | |
| 115 | 123 | |
| 116 | 124 | if (sprpixel&0xf) |
| 117 | 125 | { |
| 118 | | switch (m_sprpri) |
| 126 | if (m_sprpri == (0 ^ m_revspritetile)) // behind all |
| 119 | 127 | { |
| 120 | | case 0: // behind all |
| 121 | | |
| 122 | 128 | |
| 123 | 129 | if (fgpixel & 0xf) // is the fg used? |
| 124 | 130 | { |
| r30607 | r30608 | |
| 150 | 156 | } |
| 151 | 157 | |
| 152 | 158 | } |
| 153 | | |
| 154 | | break; |
| 155 | | |
| 156 | | case 1: // above bg, behind tx, fg |
| 157 | | |
| 159 | } |
| 160 | else if (m_sprpri == (1 ^ m_revspritetile)) // above bg, behind tx, fg |
| 161 | { |
| 158 | 162 | if (fgpixel & 0xf) // is the fg used? |
| 159 | 163 | { |
| 160 | 164 | if (fgbln) |
| r30607 | r30608 | |
| 194 | 198 | dd[x] = paldata[sprpixel + m_spregular_comp]; |
| 195 | 199 | } |
| 196 | 200 | } |
| 197 | | |
| 198 | | |
| 199 | | break; |
| 200 | 201 | |
| 201 | | case 2: // above bg,fg, behind tx |
| 202 | | |
| 202 | |
| 203 | } |
| 204 | else if (m_sprpri == (2 ^ m_revspritetile)) // above bg,fg, behind tx |
| 205 | { |
| 203 | 206 | if (m_sprbln) |
| 204 | 207 | { |
| 205 | 208 | // unusued by this game? |
| r30607 | r30608 | |
| 211 | 214 | dd[x] = paldata[sprpixel + m_spregular_comp]; |
| 212 | 215 | //dd[x] = rand(); |
| 213 | 216 | } |
| 214 | | break; |
| 217 | } |
| 215 | 218 | |
| 216 | | case 3: // above all? |
| 217 | | |
| 219 | else if (m_sprpri == (3 ^ m_revspritetile)) // above all? |
| 220 | { |
| 218 | 221 | if (m_sprbln) |
| 219 | 222 | { |
| 220 | 223 | // unusued by this game? |
| r30607 | r30608 | |
| 224 | 227 | { |
| 225 | 228 | dd[x] = paldata[sprpixel + m_spregular_comp]; |
| 226 | 229 | } |
| 227 | | |
| 228 | | break; |
| 229 | 230 | |
| 230 | 231 | } |
| 231 | 232 | } |
trunk/src/mame/video/tecmo_mix.h
| r30607 | r30608 | |
| 13 | 13 | static void set_blendcols(device_t &device, int bgblend_comp, int fgblend_comp, int txblend_comp, int spblend_comp); |
| 14 | 14 | static void set_regularcols(device_t &device, int bgregular_comp, int fgregular_comp, int txregular_comp, int spregular_comp); |
| 15 | 15 | static void set_blendsource(device_t &device, int spblend_source, int fgblend_source); |
| 16 | static void set_revspritetile(device_t &device); |
| 16 | 17 | |
| 17 | 18 | protected: |
| 18 | 19 | virtual void device_start(); |
| r30607 | r30608 | |
| 38 | 39 | int m_txregular_comp; |
| 39 | 40 | int m_spregular_comp; |
| 40 | 41 | |
| 42 | int m_revspritetile; |
| 41 | 43 | |
| 42 | 44 | private: |
| 43 | 45 | |
| r30607 | r30608 | |
| 61 | 63 | #define MCFG_TECMO_MIXER_BLENDSOUCE(_spblend_source, _fgblend_source) \ |
| 62 | 64 | tecmo_mix_device::set_blendsource(*device, _spblend_source, _fgblend_source); |
| 63 | 65 | |
| 66 | #define MCFG_TECMO_MIXER_REVSPRITETILE \ |
| 67 | tecmo_mix_device::set_revspritetile(*device); |
| 64 | 68 | |
| 65 | 69 | |
| 66 | 70 | |
| 71 | |