| Previous | 199869 Revisions | Next |
| r20975 Tuesday 12th February, 2013 at 10:06:05 UTC by Miodrag Milanović |
|---|
| Modernization of drivers part 16 (no whatsnew) |
| [src/mame/drivers] | qix.c |
| [src/mame/includes] | qix.h quizdna.h |
| [src/mame/video] | qix.c quizdna.c |
| r20974 | r20975 | |
|---|---|---|
| 1195 | 1195 | 99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,11, 6,99, |
| 1196 | 1196 | }; |
| 1197 | 1197 | |
| 1198 | ||
| 1198 | int qix_state::kram3_permut1(int idx, int value) | |
| 1199 | 1199 | { |
| 1200 | 1200 | switch (idx) |
| 1201 | 1201 | { |
| r20974 | r20975 | |
| 1207 | 1207 | } |
| 1208 | 1208 | } |
| 1209 | 1209 | |
| 1210 | ||
| 1210 | int qix_state::kram3_permut2(int tbl_index, int idx, const UINT8 *xor_table) | |
| 1211 | 1211 | { |
| 1212 | 1212 | int xorval = 0; |
| 1213 | 1213 | |
| r20974 | r20975 | |
| 1228 | 1228 | return xorval; |
| 1229 | 1229 | } |
| 1230 | 1230 | |
| 1231 | ||
| 1231 | int qix_state::kram3_decrypt(int address, int value) | |
| 1232 | 1232 | { |
| 1233 | 1233 | int indx1 = (BIT(address,1) << 1) | BIT(address,5); |
| 1234 | 1234 | int indx2 = (BIT(address,7) << 1) | BIT(address,3); |
| r20974 | r20975 | |
|---|---|---|
| 130 | 130 | palette_set_color_rgb(machine(),offs/2,pal5bit(r),pal5bit(g),pal5bit(b)); |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | ||
| 133 | void quizdna_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) | |
| 134 | 134 | { |
| 135 | quizdna_state *state = machine.driver_data<quizdna_state>(); | |
| 136 | UINT8 *spriteram = state->m_spriteram; | |
| 135 | //OBRISI.ME | |
| 136 | UINT8 *spriteram = m_spriteram; | |
| 137 | 137 | int offs; |
| 138 | 138 | |
| 139 | for (offs = 0; offs< | |
| 139 | for (offs = 0; offs<m_spriteram.bytes(); offs+=8) | |
| 140 | 140 | { |
| 141 | 141 | int i; |
| 142 | 142 | |
| r20974 | r20975 | |
| 150 | 150 | int dy = 0x10; |
| 151 | 151 | col &= 0x1f; |
| 152 | 152 | |
| 153 | if ( | |
| 153 | if (m_flipscreen) | |
| 154 | 154 | { |
| 155 | 155 | x -= 7; |
| 156 | 156 | y += 1; |
| r20974 | r20975 | |
| 173 | 173 | { |
| 174 | 174 | y &= 0x1ff; |
| 175 | 175 | |
| 176 | drawgfx_transpen(bitmap,cliprect,machine.gfx[2], | |
| 176 | drawgfx_transpen(bitmap,cliprect,machine().gfx[2], | |
| 177 | 177 | code ^ i, |
| 178 | 178 | col, |
| 179 | 179 | fx,fy, |
| r20974 | r20975 | |
| 189 | 189 | if (m_video_enable) |
| 190 | 190 | { |
| 191 | 191 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
| 192 | draw_sprites( | |
| 192 | draw_sprites(bitmap, cliprect); | |
| 193 | 193 | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
| 194 | 194 | } |
| 195 | 195 | else |
| r20974 | r20975 | |
|---|---|---|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | |
| 228 | ||
| 228 | void qix_state::get_pens( pen_t *pens) | |
| 229 | 229 | { |
| 230 | 230 | offs_t offs; |
| 231 | 231 | |
| r20974 | r20975 | |
| 252 | 252 | 0xff /* value = 3, intensity = 3 */ |
| 253 | 253 | }; |
| 254 | 254 | |
| 255 | for (offs = | |
| 255 | for (offs = m_palette_bank << 8; offs < (m_palette_bank << 8) + NUM_PENS; offs++) | |
| 256 | 256 | { |
| 257 | 257 | int bits, intensity, r, g, b; |
| 258 | 258 | |
| 259 | UINT8 data = | |
| 259 | UINT8 data = m_paletteram[offs]; | |
| 260 | 260 | |
| 261 | 261 | /* compute R, G, B from the table */ |
| 262 | 262 | intensity = (data >> 0) & 0x03; |
| r20974 | r20975 | |
| 291 | 291 | #endif |
| 292 | 292 | |
| 293 | 293 | /* create the pens */ |
| 294 | get_pens( | |
| 294 | state->get_pens(state->m_pens); | |
| 295 | 295 | |
| 296 | 296 | return state->m_pens; |
| 297 | 297 | } |
| r20974 | r20975 | |
|---|---|---|
| 25 | 25 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 26 | 26 | virtual void video_start(); |
| 27 | 27 | UINT32 screen_update_quizdna(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 28 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); | |
| 28 | 29 | }; |
| r20974 | r20975 | |
|---|---|---|
| 124 | 124 | DECLARE_WRITE8_MEMBER(slither_coinctl_w); |
| 125 | 125 | DECLARE_WRITE_LINE_MEMBER(qix_pia_dint); |
| 126 | 126 | DECLARE_WRITE_LINE_MEMBER(qix_pia_sint); |
| 127 | void get_pens(pen_t *pens); | |
| 128 | int kram3_permut1(int idx, int value); | |
| 129 | int kram3_permut2(int tbl_index, int idx, const UINT8 *xor_table); | |
| 130 | int kram3_decrypt(int address, int value); | |
| 127 | 131 | }; |
| 128 | 132 | |
| 129 | 133 |
| Previous | 199869 Revisions | Next |