trunk/src/mame/drivers/sfbonus.c
r32773 | r32774 | |
283 | 283 | public: |
284 | 284 | sfbonus_state(const machine_config &mconfig, device_type type, const char *tag) |
285 | 285 | : driver_device(mconfig, type, tag), |
| 286 | m_maincpu(*this, "maincpu"), |
| 287 | m_gfxdecode(*this, "gfxdecode"), |
| 288 | m_palette(*this, "palette"), |
286 | 289 | m_nvram(*this, "nvram"), |
287 | 290 | m_1800_regs(*this, "1800_regs"), |
288 | 291 | m_vregs(*this, "vregs"), |
289 | 292 | m_2801_regs(*this, "2801_regs"), |
290 | 293 | m_2c01_regs(*this, "2c01_regs"), |
291 | 294 | m_3000_regs(*this, "3000_regs"), |
292 | | m_3800_regs(*this, "3800_regs"), |
293 | | m_maincpu(*this, "maincpu"), |
294 | | m_gfxdecode(*this, "gfxdecode"), |
295 | | m_palette(*this, "palette") { } |
| 295 | m_3800_regs(*this, "3800_regs") { } |
296 | 296 | |
| 297 | required_device<cpu_device> m_maincpu; |
| 298 | required_device<gfxdecode_device> m_gfxdecode; |
| 299 | required_device<palette_device> m_palette; |
| 300 | |
| 301 | required_shared_ptr<UINT8> m_nvram; |
| 302 | required_shared_ptr<UINT8> m_1800_regs; |
| 303 | required_shared_ptr<UINT8> m_vregs; |
| 304 | required_shared_ptr<UINT8> m_2801_regs; |
| 305 | required_shared_ptr<UINT8> m_2c01_regs; |
| 306 | required_shared_ptr<UINT8> m_3000_regs; |
| 307 | required_shared_ptr<UINT8> m_3800_regs; |
| 308 | |
297 | 309 | bitmap_ind16 *m_temp_reel_bitmap; |
298 | 310 | tilemap_t *m_tilemap; |
299 | 311 | tilemap_t *m_reel_tilemap; |
r32773 | r32774 | |
306 | 318 | UINT8 *m_reel3_ram; |
307 | 319 | UINT8 *m_reel4_ram; |
308 | 320 | UINT8* m_videoram; |
309 | | required_shared_ptr<UINT8> m_nvram; |
310 | | required_shared_ptr<UINT8> m_1800_regs; |
311 | | required_shared_ptr<UINT8> m_vregs; |
312 | | required_shared_ptr<UINT8> m_2801_regs; |
313 | | required_shared_ptr<UINT8> m_2c01_regs; |
314 | | required_shared_ptr<UINT8> m_3000_regs; |
315 | | required_shared_ptr<UINT8> m_3800_regs; |
| 321 | |
316 | 322 | DECLARE_WRITE8_MEMBER(sfbonus_videoram_w); |
317 | 323 | DECLARE_WRITE8_MEMBER(sfbonus_bank_w); |
318 | 324 | DECLARE_READ8_MEMBER(sfbonus_2800_r); |
r32773 | r32774 | |
456 | 462 | TILE_GET_INFO_MEMBER(get_sfbonus_reel4_tile_info); |
457 | 463 | virtual void machine_reset(); |
458 | 464 | virtual void video_start(); |
| 465 | void draw_reel_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int catagory); |
459 | 466 | UINT32 screen_update_sfbonus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
460 | | required_device<cpu_device> m_maincpu; |
461 | | required_device<gfxdecode_device> m_gfxdecode; |
462 | | required_device<palette_device> m_palette; |
463 | 467 | }; |
464 | 468 | |
465 | 469 | |
r32773 | r32774 | |
925 | 929 | |
926 | 930 | } |
927 | 931 | |
928 | | static void sfbonus_draw_reel_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int catagory) |
| 932 | void sfbonus_state::draw_reel_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int catagory) |
929 | 933 | { |
930 | | sfbonus_state *state = screen.machine().driver_data<sfbonus_state>(); |
931 | 934 | int zz; |
932 | 935 | int i; |
933 | 936 | int startclipmin; |
934 | 937 | const rectangle &visarea = screen.visible_area(); |
935 | | UINT8* selectbase = &state->m_videoram[0x600]; |
936 | | UINT8* bg_scroll = &state->m_videoram[0x000]; |
937 | | UINT8* reels_rowscroll = &state->m_videoram[0x400]; |
938 | | int globalyscrollreels = (state->m_vregs[6] | state->m_vregs[7]<<8); |
939 | | int globalxscrollreels = (state->m_vregs[4] | state->m_vregs[5]<<8); |
| 938 | UINT8* selectbase = &m_videoram[0x600]; |
| 939 | UINT8* bg_scroll = &m_videoram[0x000]; |
| 940 | UINT8* reels_rowscroll = &m_videoram[0x400]; |
| 941 | int globalyscrollreels = (m_vregs[6] | m_vregs[7]<<8); |
| 942 | int globalxscrollreels = (m_vregs[4] | m_vregs[5]<<8); |
940 | 943 | globalyscrollreels += 8; |
941 | 944 | globalxscrollreels += 8; |
942 | 945 | |
r32773 | r32774 | |
946 | 949 | { |
947 | 950 | int scroll; |
948 | 951 | scroll = bg_scroll[(i*2)+0x000] | (bg_scroll[(i*2)+0x001]<<8); |
949 | | state->m_reel_tilemap->set_scrolly(i, scroll + globalyscrollreels ); |
| 952 | m_reel_tilemap->set_scrolly(i, scroll + globalyscrollreels ); |
950 | 953 | |
951 | 954 | scroll = bg_scroll[(i*2)+0x080] | (bg_scroll[(i*2)+0x081]<<8); |
952 | | state->m_reel2_tilemap->set_scrolly(i, scroll + globalyscrollreels); |
| 955 | m_reel2_tilemap->set_scrolly(i, scroll + globalyscrollreels); |
953 | 956 | |
954 | 957 | scroll = bg_scroll[(i*2)+0x100] | (bg_scroll[(i*2)+0x101]<<8); |
955 | | state->m_reel3_tilemap->set_scrolly(i, scroll + globalyscrollreels); |
| 958 | m_reel3_tilemap->set_scrolly(i, scroll + globalyscrollreels); |
956 | 959 | |
957 | 960 | scroll = bg_scroll[(i*2)+0x180] | (bg_scroll[(i*2)+0x181]<<8); |
958 | | state->m_reel4_tilemap->set_scrolly(i, scroll + globalyscrollreels); |
| 961 | m_reel4_tilemap->set_scrolly(i, scroll + globalyscrollreels); |
959 | 962 | } |
960 | 963 | |
961 | 964 | // printf("------------\n"); |
r32773 | r32774 | |
983 | 986 | { |
984 | 987 | rowscroll = reels_rowscroll[((line/8)*2)+0x000] | (reels_rowscroll[((line/8)*2)+0x001]<<8); |
985 | 988 | xxxscroll = globalxscrollreels + rowscroll; |
986 | | state->m_reel_tilemap->set_scrollx(0, xxxscroll ); |
987 | | state->m_reel2_tilemap->set_scrollx(0, xxxscroll ); |
988 | | state->m_reel3_tilemap->set_scrollx(0, xxxscroll ); |
989 | | state->m_reel4_tilemap->set_scrollx(0, xxxscroll ); |
| 989 | m_reel_tilemap->set_scrollx(0, xxxscroll ); |
| 990 | m_reel2_tilemap->set_scrollx(0, xxxscroll ); |
| 991 | m_reel3_tilemap->set_scrollx(0, xxxscroll ); |
| 992 | m_reel4_tilemap->set_scrollx(0, xxxscroll ); |
990 | 993 | } |
991 | 994 | else if (rowenable==0x1) |
992 | 995 | { |
993 | 996 | rowscroll = reels_rowscroll[((line/8)*2)+0x080] | (reels_rowscroll[((line/8)*2)+0x081]<<8); |
994 | 997 | xxxscroll = globalxscrollreels + rowscroll; |
995 | | state->m_reel_tilemap->set_scrollx(0, xxxscroll ); |
996 | | state->m_reel2_tilemap->set_scrollx(0, xxxscroll ); |
997 | | state->m_reel3_tilemap->set_scrollx(0, xxxscroll ); |
998 | | state->m_reel4_tilemap->set_scrollx(0, xxxscroll ); |
| 998 | m_reel_tilemap->set_scrollx(0, xxxscroll ); |
| 999 | m_reel2_tilemap->set_scrollx(0, xxxscroll ); |
| 1000 | m_reel3_tilemap->set_scrollx(0, xxxscroll ); |
| 1001 | m_reel4_tilemap->set_scrollx(0, xxxscroll ); |
999 | 1002 | } |
1000 | 1003 | else if (rowenable==0x2) |
1001 | 1004 | { |
1002 | 1005 | rowscroll = reels_rowscroll[((line/8)*2)+0x100] | (reels_rowscroll[((line/8)*2)+0x101]<<8); |
1003 | 1006 | xxxscroll = globalxscrollreels + rowscroll; |
1004 | | state->m_reel_tilemap->set_scrollx(0, xxxscroll ); |
1005 | | state->m_reel2_tilemap->set_scrollx(0, xxxscroll ); |
1006 | | state->m_reel3_tilemap->set_scrollx(0, xxxscroll ); |
1007 | | state->m_reel4_tilemap->set_scrollx(0, xxxscroll ); |
| 1007 | m_reel_tilemap->set_scrollx(0, xxxscroll ); |
| 1008 | m_reel2_tilemap->set_scrollx(0, xxxscroll ); |
| 1009 | m_reel3_tilemap->set_scrollx(0, xxxscroll ); |
| 1010 | m_reel4_tilemap->set_scrollx(0, xxxscroll ); |
1008 | 1011 | } |
1009 | 1012 | else if (rowenable==0x3) |
1010 | 1013 | { |
1011 | 1014 | rowscroll = reels_rowscroll[((line/8)*2)+0x180] | (reels_rowscroll[((line/8)*2)+0x181]<<8); |
1012 | 1015 | xxxscroll = globalxscrollreels + rowscroll; |
1013 | | state->m_reel_tilemap->set_scrollx(0, xxxscroll ); |
1014 | | state->m_reel2_tilemap->set_scrollx(0, xxxscroll ); |
1015 | | state->m_reel3_tilemap->set_scrollx(0, xxxscroll ); |
1016 | | state->m_reel4_tilemap->set_scrollx(0, xxxscroll ); |
| 1016 | m_reel_tilemap->set_scrollx(0, xxxscroll ); |
| 1017 | m_reel2_tilemap->set_scrollx(0, xxxscroll ); |
| 1018 | m_reel3_tilemap->set_scrollx(0, xxxscroll ); |
| 1019 | m_reel4_tilemap->set_scrollx(0, xxxscroll ); |
1017 | 1020 | } |
1018 | 1021 | |
1019 | 1022 | if (rowenable2==0) |
1020 | 1023 | { |
1021 | | state->m_reel_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),3); |
| 1024 | m_reel_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),3); |
1022 | 1025 | } |
1023 | 1026 | if (rowenable==0) |
1024 | 1027 | { |
1025 | | state->m_reel_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),3); |
| 1028 | m_reel_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),3); |
1026 | 1029 | } |
1027 | 1030 | |
1028 | 1031 | if (rowenable2==0x1) |
1029 | 1032 | { |
1030 | | state->m_reel2_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),2); |
| 1033 | m_reel2_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),2); |
1031 | 1034 | } |
1032 | 1035 | if (rowenable==0x1) |
1033 | 1036 | { |
1034 | | state->m_reel2_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),2); |
| 1037 | m_reel2_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),2); |
1035 | 1038 | } |
1036 | 1039 | |
1037 | 1040 | if (rowenable2==0x2) |
1038 | 1041 | { |
1039 | | state->m_reel3_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),1); |
| 1042 | m_reel3_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),1); |
1040 | 1043 | } |
1041 | 1044 | if (rowenable==0x2) |
1042 | 1045 | { |
1043 | | state->m_reel3_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),1); |
| 1046 | m_reel3_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),1); |
1044 | 1047 | } |
1045 | 1048 | |
1046 | 1049 | if (rowenable2==0x3) |
1047 | 1050 | { |
1048 | | state->m_reel4_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),4); |
| 1051 | m_reel4_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),4); |
1049 | 1052 | } |
1050 | 1053 | if (rowenable==0x3) |
1051 | 1054 | { |
1052 | | state->m_reel4_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),4); |
| 1055 | m_reel4_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),4); |
1053 | 1056 | } |
1054 | 1057 | |
1055 | 1058 | |
r32773 | r32774 | |
1077 | 1080 | m_temp_reel_bitmap->fill(m_palette->pen(0), cliprect); |
1078 | 1081 | |
1079 | 1082 | /* render reels to bitmap */ |
1080 | | sfbonus_draw_reel_layer(screen,*m_temp_reel_bitmap,cliprect,0); |
| 1083 | draw_reel_layer(screen,*m_temp_reel_bitmap,cliprect,0); |
1081 | 1084 | |
1082 | 1085 | { |
1083 | 1086 | int y,x; |
trunk/src/mame/drivers/cybertnk.c
r32773 | r32774 | |
181 | 181 | public: |
182 | 182 | cybertnk_state(const machine_config &mconfig, device_type type, const char *tag) |
183 | 183 | : driver_device(mconfig, type, tag), |
| 184 | m_maincpu(*this, "maincpu"), |
| 185 | m_audiocpu(*this, "audiocpu"), |
| 186 | m_gfxdecode(*this, "gfxdecode"), |
| 187 | m_palette(*this, "palette"), |
184 | 188 | m_spr_ram(*this, "spr_ram"), |
185 | 189 | m_tilemap0_vram(*this, "tilemap0_vram"), |
186 | 190 | m_tilemap1_vram(*this, "tilemap1_vram"), |
r32773 | r32774 | |
188 | 192 | m_tilemap0scroll(*this, "tilemap1_scroll"), |
189 | 193 | m_tilemap1scroll(*this, "tilemap1_scroll"), |
190 | 194 | m_tilemap2scroll(*this, "tilemap2_scroll"), |
191 | | m_roadram(*this, "roadram"), |
192 | | m_maincpu(*this, "maincpu"), |
193 | | m_audiocpu(*this, "audiocpu"), |
194 | | m_gfxdecode(*this, "gfxdecode"), |
195 | | m_palette(*this, "palette") { } |
| 195 | m_roadram(*this, "roadram") { } |
196 | 196 | |
197 | | tilemap_t *m_tilemap0_tilemap; |
198 | | tilemap_t *m_tilemap1_tilemap; |
199 | | tilemap_t *m_tilemap2_tilemap; |
| 197 | required_device<cpu_device> m_maincpu; |
| 198 | required_device<cpu_device> m_audiocpu; |
| 199 | required_device<gfxdecode_device> m_gfxdecode; |
| 200 | required_device<palette_device> m_palette; |
200 | 201 | |
201 | | DECLARE_WRITE16_MEMBER(tilemap0_vram_w); |
202 | | DECLARE_WRITE16_MEMBER(tilemap1_vram_w); |
203 | | DECLARE_WRITE16_MEMBER(tilemap2_vram_w); |
204 | | |
205 | | |
206 | 202 | required_shared_ptr<UINT16> m_spr_ram; |
207 | 203 | required_shared_ptr<UINT16> m_tilemap0_vram; |
208 | 204 | required_shared_ptr<UINT16> m_tilemap1_vram; |
r32773 | r32774 | |
211 | 207 | required_shared_ptr<UINT16> m_tilemap1scroll; |
212 | 208 | required_shared_ptr<UINT16> m_tilemap2scroll; |
213 | 209 | required_shared_ptr<UINT16> m_roadram; |
| 210 | |
| 211 | tilemap_t *m_tilemap0_tilemap; |
| 212 | tilemap_t *m_tilemap1_tilemap; |
| 213 | tilemap_t *m_tilemap2_tilemap; |
214 | 214 | |
| 215 | DECLARE_WRITE16_MEMBER(tilemap0_vram_w); |
| 216 | DECLARE_WRITE16_MEMBER(tilemap1_vram_w); |
| 217 | DECLARE_WRITE16_MEMBER(tilemap2_vram_w); |
| 218 | |
215 | 219 | UINT8 m_mux_data; |
216 | 220 | DECLARE_WRITE8_MEMBER(cybertnk_sound_cmd_w); |
217 | 221 | DECLARE_WRITE8_MEMBER(cybertnk_mux_w); |
r32773 | r32774 | |
224 | 228 | TILE_GET_INFO_MEMBER(get_tilemap1_tile_info); |
225 | 229 | TILE_GET_INFO_MEMBER(get_tilemap2_tile_info); |
226 | 230 | virtual void video_start(); |
| 231 | void draw_road(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift, int pri); |
| 232 | void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift); |
| 233 | UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift); |
227 | 234 | UINT32 screen_update_cybertnk_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
228 | 235 | UINT32 screen_update_cybertnk_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
229 | | required_device<cpu_device> m_maincpu; |
230 | | required_device<cpu_device> m_audiocpu; |
231 | | required_device<gfxdecode_device> m_gfxdecode; |
232 | | required_device<palette_device> m_palette; |
233 | 236 | }; |
234 | 237 | |
235 | 238 | /* tile format |
r32773 | r32774 | |
293 | 296 | |
294 | 297 | |
295 | 298 | |
296 | | static void draw_road(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift, int pri) |
| 299 | void cybertnk_state::draw_road(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift, int pri) |
297 | 300 | { |
298 | | cybertnk_state *state = screen.machine().driver_data<cybertnk_state>(); |
299 | | int i; |
300 | | gfx_element *gfx = state->m_gfxdecode->gfx(3); |
| 301 | gfx_element *gfx = m_gfxdecode->gfx(3); |
301 | 302 | |
302 | 303 | |
303 | | for (i=0;i<0x1000/4;i+=4) |
| 304 | for (int i = 0; i < 0x1000/4; i+=4) |
304 | 305 | { |
305 | | UINT16 param1 = state->m_roadram[i+2]; |
306 | | UINT16 param2 = state->m_roadram[i+1]; |
307 | | UINT16 param3 = state->m_roadram[i+0]; |
| 306 | UINT16 param1 = m_roadram[i+2]; |
| 307 | UINT16 param2 = m_roadram[i+1]; |
| 308 | UINT16 param3 = m_roadram[i+0]; |
308 | 309 | |
309 | 310 | int col = (param2 & 0x3f); |
310 | 311 | |
r32773 | r32774 | |
319 | 320 | } |
320 | 321 | |
321 | 322 | // check if these are similar / the same as weclemans |
322 | | static void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift) |
| 323 | void cybertnk_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift) |
323 | 324 | { |
324 | | cybertnk_state *state = screen.machine().driver_data<cybertnk_state>(); |
325 | | const UINT32 *sprrom = (UINT32*)screen.memregion(":spr_gfx")->base(); |
326 | | const pen_t *paldata = state->m_palette->pens(); |
| 325 | const UINT32 *sprrom = (UINT32*)memregion("spr_gfx")->base(); |
| 326 | const pen_t *paldata = m_palette->pens(); |
327 | 327 | |
328 | 328 | int miny = cliprect.min_y; |
329 | 329 | int maxy = cliprect.max_y; |
r32773 | r32774 | |
355 | 355 | |
356 | 356 | for(int offs=0;offs<0x1000/2;offs+=8) |
357 | 357 | { |
358 | | if ((state->m_spr_ram[offs+0x0] & 8) == 0) |
| 358 | if ((m_spr_ram[offs+0x0] & 8) == 0) |
359 | 359 | continue; |
360 | 360 | |
361 | | int x = (state->m_spr_ram[offs+0x5] & 0x3ff); |
| 361 | int x = (m_spr_ram[offs+0x5] & 0x3ff); |
362 | 362 | if (x&0x200) x-=0x400; |
363 | 363 | |
364 | | int y = (state->m_spr_ram[offs+0x2] & 0x1ff); |
| 364 | int y = (m_spr_ram[offs+0x2] & 0x1ff); |
365 | 365 | if (y&0x100) y-=0x200; |
366 | 366 | |
367 | 367 | |
368 | | UINT32 spr_offs = (((state->m_spr_ram[offs+0x0] & 7) << 16) | (state->m_spr_ram[offs+0x1])); |
369 | | int xsize = ((state->m_spr_ram[offs+0x6] & 0x000f)+1) << 3; |
370 | | int ysize = (state->m_spr_ram[offs+0x4] & 0x00ff)+1; |
371 | | int fx = (state->m_spr_ram[offs+0x5] & 0x8000) >> 15; |
372 | | int zoom = (state->m_spr_ram[offs+0x6] & 0xff00) >> 8; |
| 368 | UINT32 spr_offs = (((m_spr_ram[offs+0x0] & 7) << 16) | (m_spr_ram[offs+0x1])); |
| 369 | int xsize = ((m_spr_ram[offs+0x6] & 0x000f)+1) << 3; |
| 370 | int ysize = (m_spr_ram[offs+0x4] & 0x00ff)+1; |
| 371 | int fx = (m_spr_ram[offs+0x5] & 0x8000) >> 15; |
| 372 | int zoom = (m_spr_ram[offs+0x6] & 0xff00) >> 8; |
373 | 373 | |
374 | 374 | |
375 | | int col_bank = (state->m_spr_ram[offs+0x0] & 0xff00) >> 8; |
| 375 | int col_bank = (m_spr_ram[offs+0x0] & 0xff00) >> 8; |
376 | 376 | |
377 | 377 | int xf = 0; |
378 | 378 | int yf = 0; |
r32773 | r32774 | |
472 | 472 | } |
473 | 473 | |
474 | 474 | |
475 | | static UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift) |
| 475 | UINT32 cybertnk_state::update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift) |
476 | 476 | { |
477 | | cybertnk_state *state = screen.machine().driver_data<cybertnk_state>(); |
| 477 | m_tilemap0_tilemap->set_scrolldx(screen_shift, screen_shift); |
| 478 | m_tilemap1_tilemap->set_scrolldx(screen_shift, screen_shift); |
| 479 | m_tilemap2_tilemap->set_scrolldx(screen_shift, screen_shift); |
478 | 480 | |
479 | | state->m_tilemap0_tilemap->set_scrolldx(screen_shift, screen_shift); |
480 | | state->m_tilemap1_tilemap->set_scrolldx(screen_shift, screen_shift); |
481 | | state->m_tilemap2_tilemap->set_scrolldx(screen_shift, screen_shift); |
| 481 | m_tilemap1_tilemap->set_scrolly(m_tilemap1scroll[2]); |
| 482 | m_tilemap2_tilemap->set_scrolly(m_tilemap2scroll[2]); |
482 | 483 | |
483 | | state->m_tilemap1_tilemap->set_scrolly(state->m_tilemap1scroll[2]); |
484 | | state->m_tilemap2_tilemap->set_scrolly(state->m_tilemap2scroll[2]); |
| 484 | m_tilemap1_tilemap->set_scrollx(m_tilemap1scroll[0]); |
| 485 | m_tilemap2_tilemap->set_scrollx(m_tilemap2scroll[0]); |
485 | 486 | |
486 | | state->m_tilemap1_tilemap->set_scrollx(state->m_tilemap1scroll[0]); |
487 | | state->m_tilemap2_tilemap->set_scrollx(state->m_tilemap2scroll[0]); |
488 | 487 | |
489 | 488 | |
| 489 | bitmap.fill(m_palette->black_pen(), cliprect); |
490 | 490 | |
491 | | bitmap.fill(state->m_palette->black_pen(), cliprect); |
492 | 491 | |
493 | | |
494 | 492 | draw_road(screen,bitmap,cliprect,screen_shift, 0x00); |
495 | 493 | |
496 | | state->m_tilemap2_tilemap->draw(screen, bitmap, cliprect, 0,0); |
497 | | state->m_tilemap1_tilemap->draw(screen, bitmap, cliprect, 0,0); |
| 494 | m_tilemap2_tilemap->draw(screen, bitmap, cliprect, 0,0); |
| 495 | m_tilemap1_tilemap->draw(screen, bitmap, cliprect, 0,0); |
498 | 496 | |
499 | 497 | draw_road(screen,bitmap,cliprect,screen_shift, 0x80); |
500 | 498 | |
501 | 499 | draw_sprites(screen,bitmap,cliprect,screen_shift); |
502 | 500 | |
503 | | state->m_tilemap0_tilemap->draw(screen, bitmap, cliprect, 0,0); |
| 501 | m_tilemap0_tilemap->draw(screen, bitmap, cliprect, 0,0); |
504 | 502 | |
505 | 503 | |
506 | 504 | return 0; |
trunk/src/mame/machine/midyunit.c
r32773 | r32774 | |
241 | 241 | } |
242 | 242 | |
243 | 243 | |
244 | | static void init_generic(running_machine &machine, int bpp, int sound, int prot_start, int prot_end) |
| 244 | void midyunit_state::init_generic(int bpp, int sound, int prot_start, int prot_end) |
245 | 245 | { |
246 | | midyunit_state *state = machine.driver_data<midyunit_state>(); |
247 | | offs_t gfx_chunk = state->m_gfx_rom.bytes() / 4; |
| 246 | offs_t gfx_chunk = m_gfx_rom.bytes() / 4; |
248 | 247 | UINT8 d1, d2, d3, d4, d5, d6; |
249 | 248 | UINT8 *base; |
250 | 249 | int i; |
251 | 250 | |
252 | 251 | /* load graphics ROMs */ |
253 | | base = state->memregion("gfx1")->base(); |
| 252 | base = memregion("gfx1")->base(); |
254 | 253 | switch (bpp) |
255 | 254 | { |
256 | 255 | case 4: |
257 | | for (i = 0; i < state->m_gfx_rom.bytes(); i += 2) |
| 256 | for (i = 0; i < m_gfx_rom.bytes(); i += 2) |
258 | 257 | { |
259 | 258 | d1 = ((base[0 * gfx_chunk + (i + 0) / 4]) >> (2 * ((i + 0) % 4))) & 3; |
260 | 259 | d2 = ((base[1 * gfx_chunk + (i + 0) / 4]) >> (2 * ((i + 0) % 4))) & 3; |
261 | 260 | d3 = ((base[0 * gfx_chunk + (i + 1) / 4]) >> (2 * ((i + 1) % 4))) & 3; |
262 | 261 | d4 = ((base[1 * gfx_chunk + (i + 1) / 4]) >> (2 * ((i + 1) % 4))) & 3; |
263 | 262 | |
264 | | state->m_gfx_rom[i + 0] = d1 | (d2 << 2); |
265 | | state->m_gfx_rom[i + 1] = d3 | (d4 << 2); |
| 263 | m_gfx_rom[i + 0] = d1 | (d2 << 2); |
| 264 | m_gfx_rom[i + 1] = d3 | (d4 << 2); |
266 | 265 | } |
267 | 266 | break; |
268 | 267 | |
269 | 268 | case 6: |
270 | | for (i = 0; i < state->m_gfx_rom.bytes(); i += 2) |
| 269 | for (i = 0; i < m_gfx_rom.bytes(); i += 2) |
271 | 270 | { |
272 | 271 | d1 = ((base[0 * gfx_chunk + (i + 0) / 4]) >> (2 * ((i + 0) % 4))) & 3; |
273 | 272 | d2 = ((base[1 * gfx_chunk + (i + 0) / 4]) >> (2 * ((i + 0) % 4))) & 3; |
r32773 | r32774 | |
276 | 275 | d5 = ((base[1 * gfx_chunk + (i + 1) / 4]) >> (2 * ((i + 1) % 4))) & 3; |
277 | 276 | d6 = ((base[2 * gfx_chunk + (i + 1) / 4]) >> (2 * ((i + 1) % 4))) & 3; |
278 | 277 | |
279 | | state->m_gfx_rom[i + 0] = d1 | (d2 << 2) | (d3 << 4); |
280 | | state->m_gfx_rom[i + 1] = d4 | (d5 << 2) | (d6 << 4); |
| 278 | m_gfx_rom[i + 0] = d1 | (d2 << 2) | (d3 << 4); |
| 279 | m_gfx_rom[i + 1] = d4 | (d5 << 2) | (d6 << 4); |
281 | 280 | } |
282 | 281 | break; |
283 | 282 | |
284 | 283 | case 8: |
285 | | for (i = 0; i < state->m_gfx_rom.bytes(); i += 4) |
| 284 | for (i = 0; i < m_gfx_rom.bytes(); i += 4) |
286 | 285 | { |
287 | | state->m_gfx_rom[i + 0] = base[0 * gfx_chunk + i / 4]; |
288 | | state->m_gfx_rom[i + 1] = base[1 * gfx_chunk + i / 4]; |
289 | | state->m_gfx_rom[i + 2] = base[2 * gfx_chunk + i / 4]; |
290 | | state->m_gfx_rom[i + 3] = base[3 * gfx_chunk + i / 4]; |
| 286 | m_gfx_rom[i + 0] = base[0 * gfx_chunk + i / 4]; |
| 287 | m_gfx_rom[i + 1] = base[1 * gfx_chunk + i / 4]; |
| 288 | m_gfx_rom[i + 2] = base[2 * gfx_chunk + i / 4]; |
| 289 | m_gfx_rom[i + 3] = base[3 * gfx_chunk + i / 4]; |
291 | 290 | } |
292 | 291 | break; |
293 | 292 | } |
294 | 293 | |
295 | 294 | /* load sound ROMs and set up sound handlers */ |
296 | | state->m_chip_type = sound; |
| 295 | m_chip_type = sound; |
297 | 296 | switch (sound) |
298 | 297 | { |
299 | 298 | case SOUND_CVSD_SMALL: |
300 | | machine.device("cvsd:cpu")->memory().space(AS_PROGRAM).install_write_handler(prot_start, prot_end, write8_delegate(FUNC(midyunit_state::cvsd_protection_w),state)); |
301 | | state->m_cvsd_protection_base = machine.root_device().memregion("cvsd:cpu")->base() + 0x10000 + (prot_start - 0x8000); |
| 299 | machine().device("cvsd:cpu")->memory().space(AS_PROGRAM).install_write_handler(prot_start, prot_end, write8_delegate(FUNC(midyunit_state::cvsd_protection_w), this)); |
| 300 | m_cvsd_protection_base = memregion("cvsd:cpu")->base() + 0x10000 + (prot_start - 0x8000); |
302 | 301 | break; |
303 | 302 | |
304 | 303 | case SOUND_CVSD: |
305 | | machine.device("cvsd:cpu")->memory().space(AS_PROGRAM).install_ram(prot_start, prot_end); |
| 304 | machine().device("cvsd:cpu")->memory().space(AS_PROGRAM).install_ram(prot_start, prot_end); |
306 | 305 | break; |
307 | 306 | |
308 | 307 | case SOUND_ADPCM: |
309 | | machine.device("adpcm:cpu")->memory().space(AS_PROGRAM).install_ram(prot_start, prot_end); |
| 308 | machine().device("adpcm:cpu")->memory().space(AS_PROGRAM).install_ram(prot_start, prot_end); |
310 | 309 | break; |
311 | 310 | |
312 | 311 | case SOUND_NARC: |
313 | | machine.device("narcsnd:cpu0")->memory().space(AS_PROGRAM).install_ram(prot_start, prot_end); |
| 312 | machine().device("narcsnd:cpu0")->memory().space(AS_PROGRAM).install_ram(prot_start, prot_end); |
314 | 313 | break; |
315 | 314 | |
316 | 315 | case SOUND_YAWDIM: |
r32773 | r32774 | |
332 | 331 | DRIVER_INIT_MEMBER(midyunit_state,narc) |
333 | 332 | { |
334 | 333 | /* common init */ |
335 | | init_generic(machine(), 8, SOUND_NARC, 0xcdff, 0xce29); |
| 334 | init_generic(8, SOUND_NARC, 0xcdff, 0xce29); |
336 | 335 | } |
337 | 336 | |
338 | 337 | |
r32773 | r32774 | |
362 | 361 | m_prot_data = &trog_protection_data; |
363 | 362 | |
364 | 363 | /* common init */ |
365 | | init_generic(machine(), 4, SOUND_CVSD_SMALL, 0x9eaf, 0x9ed9); |
| 364 | init_generic(4, SOUND_CVSD_SMALL, 0x9eaf, 0x9ed9); |
366 | 365 | } |
367 | 366 | |
368 | 367 | |
r32773 | r32774 | |
371 | 370 | DRIVER_INIT_MEMBER(midyunit_state,smashtv) |
372 | 371 | { |
373 | 372 | /* common init */ |
374 | | init_generic(machine(), 6, SOUND_CVSD_SMALL, 0x9cf6, 0x9d21); |
| 373 | init_generic(6, SOUND_CVSD_SMALL, 0x9cf6, 0x9d21); |
375 | 374 | } |
376 | 375 | |
377 | 376 | |
r32773 | r32774 | |
389 | 388 | m_prot_data = &hiimpact_protection_data; |
390 | 389 | |
391 | 390 | /* common init */ |
392 | | init_generic(machine(), 6, SOUND_CVSD, 0x9b79, 0x9ba3); |
| 391 | init_generic(6, SOUND_CVSD, 0x9b79, 0x9ba3); |
393 | 392 | } |
394 | 393 | |
395 | 394 | |
r32773 | r32774 | |
407 | 406 | m_prot_data = &shimpact_protection_data; |
408 | 407 | |
409 | 408 | /* common init */ |
410 | | init_generic(machine(), 6, SOUND_CVSD, 0x9c06, 0x9c15); |
| 409 | init_generic(6, SOUND_CVSD, 0x9c06, 0x9c15); |
411 | 410 | } |
412 | 411 | |
413 | 412 | |
r32773 | r32774 | |
423 | 422 | m_prot_data = &strkforc_protection_data; |
424 | 423 | |
425 | 424 | /* common init */ |
426 | | init_generic(machine(), 4, SOUND_CVSD_SMALL, 0x9f7d, 0x9fa7); |
| 425 | init_generic(4, SOUND_CVSD_SMALL, 0x9f7d, 0x9fa7); |
427 | 426 | } |
428 | 427 | |
429 | 428 | |
r32773 | r32774 | |
452 | 451 | m_prot_data = &mk_protection_data; |
453 | 452 | |
454 | 453 | /* common init */ |
455 | | init_generic(machine(), 6, SOUND_ADPCM, 0xfb9c, 0xfbc6); |
| 454 | init_generic(6, SOUND_ADPCM, 0xfb9c, 0xfbc6); |
456 | 455 | } |
457 | 456 | |
458 | 457 | DRIVER_INIT_MEMBER(midyunit_state,mkyawdim) |
459 | 458 | { |
460 | 459 | /* common init */ |
461 | | init_generic(machine(), 6, SOUND_YAWDIM, 0, 0); |
| 460 | init_generic(6, SOUND_YAWDIM, 0, 0); |
462 | 461 | } |
463 | 462 | |
464 | 463 | |
r32773 | r32774 | |
485 | 484 | |
486 | 485 | /********************** Terminator 2 **********************/ |
487 | 486 | |
488 | | static void term2_init_common(running_machine &machine, write16_delegate hack_w) |
| 487 | void midyunit_state::term2_init_common(write16_delegate hack_w) |
489 | 488 | { |
490 | | midyunit_state *state = machine.driver_data<midyunit_state>(); |
491 | 489 | /* protection */ |
492 | 490 | static const struct protection_data term2_protection_data = |
493 | 491 | { |
494 | 492 | { 0x0f00, 0x0f00, 0x0f00 }, |
495 | 493 | { 0x4000, 0xf000, 0xa000 } |
496 | 494 | }; |
497 | | state->m_prot_data = &term2_protection_data; |
| 495 | m_prot_data = &term2_protection_data; |
498 | 496 | |
499 | 497 | /* common init */ |
500 | | init_generic(machine, 6, SOUND_ADPCM, 0xfa8d, 0xfa9c); |
| 498 | init_generic(6, SOUND_ADPCM, 0xfa8d, 0xfa9c); |
501 | 499 | |
502 | 500 | /* special inputs */ |
503 | | state->m_maincpu->space(AS_PROGRAM).install_read_handler(0x01c00000, 0x01c0005f, read16_delegate(FUNC(midyunit_state::term2_input_r),state)); |
504 | | state->m_maincpu->space(AS_PROGRAM).install_write_handler(0x01e00000, 0x01e0001f, write16_delegate(FUNC(midyunit_state::term2_sound_w),state)); |
| 501 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x01c00000, 0x01c0005f, read16_delegate(FUNC(midyunit_state::term2_input_r), this)); |
| 502 | m_maincpu->space(AS_PROGRAM).install_write_handler(0x01e00000, 0x01e0001f, write16_delegate(FUNC(midyunit_state::term2_sound_w), this)); |
505 | 503 | |
506 | 504 | /* HACK: this prevents the freeze on the movies */ |
507 | 505 | /* until we figure whats causing it, this is better than nothing */ |
508 | | state->m_t2_hack_mem = state->m_maincpu->space(AS_PROGRAM).install_write_handler(0x010aa0e0, 0x010aa0ff, hack_w); |
| 506 | m_t2_hack_mem = m_maincpu->space(AS_PROGRAM).install_write_handler(0x010aa0e0, 0x010aa0ff, hack_w); |
509 | 507 | } |
510 | 508 | |
511 | | DRIVER_INIT_MEMBER(midyunit_state,term2) { term2_init_common(machine(), write16_delegate(FUNC(midyunit_state::term2_hack_w),this)); } |
512 | | DRIVER_INIT_MEMBER(midyunit_state,term2la3) { term2_init_common(machine(), write16_delegate(FUNC(midyunit_state::term2la3_hack_w),this)); } |
513 | | DRIVER_INIT_MEMBER(midyunit_state,term2la2) { term2_init_common(machine(), write16_delegate(FUNC(midyunit_state::term2la2_hack_w),this)); } |
514 | | DRIVER_INIT_MEMBER(midyunit_state,term2la1) { term2_init_common(machine(), write16_delegate(FUNC(midyunit_state::term2la1_hack_w),this)); } |
| 509 | DRIVER_INIT_MEMBER(midyunit_state,term2) { term2_init_common(write16_delegate(FUNC(midyunit_state::term2_hack_w),this)); } |
| 510 | DRIVER_INIT_MEMBER(midyunit_state,term2la3) { term2_init_common(write16_delegate(FUNC(midyunit_state::term2la3_hack_w),this)); } |
| 511 | DRIVER_INIT_MEMBER(midyunit_state,term2la2) { term2_init_common(write16_delegate(FUNC(midyunit_state::term2la2_hack_w),this)); } |
| 512 | DRIVER_INIT_MEMBER(midyunit_state,term2la1) { term2_init_common(write16_delegate(FUNC(midyunit_state::term2la1_hack_w),this)); } |
515 | 513 | |
516 | 514 | |
517 | 515 | |
r32773 | r32774 | |
529 | 527 | m_prot_data = &totcarn_protection_data; |
530 | 528 | |
531 | 529 | /* common init */ |
532 | | init_generic(machine(), 6, SOUND_ADPCM, 0xfc04, 0xfc2e); |
| 530 | init_generic(6, SOUND_ADPCM, 0xfc04, 0xfc2e); |
533 | 531 | } |
534 | 532 | |
535 | 533 | |
trunk/src/mame/video/exidy440.c
r32773 | r32774 | |
284 | 284 | * |
285 | 285 | *************************************/ |
286 | 286 | |
287 | | static void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, |
288 | | int scroll_offset, int check_collision) |
| 287 | void exidy440_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int scroll_offset, int check_collision) |
289 | 288 | { |
290 | | exidy440_state *state = screen.machine().driver_data<exidy440_state>(); |
291 | | int i; |
292 | | |
293 | 289 | /* get a pointer to the palette to look for collision flags */ |
294 | | UINT8 *palette = &state->m_local_paletteram[state->m_palettebank_vis * 512]; |
| 290 | UINT8 *palette = &m_local_paletteram[m_palettebank_vis * 512]; |
295 | 291 | int count = 0; |
296 | 292 | |
297 | 293 | /* draw the sprite images, checking for collisions along the way */ |
298 | | UINT8 *sprite = state->m_spriteram + (SPRITE_COUNT - 1) * 4; |
| 294 | UINT8 *sprite = m_spriteram + (SPRITE_COUNT - 1) * 4; |
299 | 295 | |
300 | | for (i = 0; i < SPRITE_COUNT; i++, sprite -= 4) |
| 296 | for (int i = 0; i < SPRITE_COUNT; i++, sprite -= 4) |
301 | 297 | { |
302 | 298 | int image = (~sprite[3] & 0x3f); |
303 | 299 | int xoffs = (~((sprite[1] << 8) | sprite[2]) & 0x1ff); |
r32773 | r32774 | |
310 | 306 | continue; |
311 | 307 | |
312 | 308 | /* get a pointer to the source image */ |
313 | | src = &state->m_imageram[image * 128]; |
| 309 | src = &m_imageram[image * 128]; |
314 | 310 | |
315 | 311 | /* account for large positive offsets meaning small negative values */ |
316 | 312 | if (xoffs >= 0x1ff - 16) |
r32773 | r32774 | |
333 | 329 | /* only draw scanlines that are in this cliprect */ |
334 | 330 | if (yoffs <= cliprect.max_y) |
335 | 331 | { |
336 | | UINT8 *old = &state->m_local_videoram[sy * 512 + xoffs]; |
| 332 | UINT8 *old = &m_local_videoram[sy * 512 + xoffs]; |
337 | 333 | int currx = xoffs; |
338 | 334 | |
339 | 335 | /* loop over x */ |
r32773 | r32774 | |
353 | 349 | |
354 | 350 | /* check the collisions bit */ |
355 | 351 | if (check_collision && (palette[2 * pen] & 0x80) && (count++ < 128)) |
356 | | screen.machine().scheduler().timer_set(screen.time_until_pos(yoffs, currx), timer_expired_delegate(FUNC(exidy440_state::collide_firq_callback),state), currx); |
| 352 | screen.machine().scheduler().timer_set(screen.time_until_pos(yoffs, currx), timer_expired_delegate(FUNC(exidy440_state::collide_firq_callback), this), currx); |
357 | 353 | } |
358 | 354 | currx++; |
359 | 355 | |
r32773 | r32774 | |
366 | 362 | |
367 | 363 | /* check the collisions bit */ |
368 | 364 | if (check_collision && (palette[2 * pen] & 0x80) && (count++ < 128)) |
369 | | screen.machine().scheduler().timer_set(screen.time_until_pos(yoffs, currx), timer_expired_delegate(FUNC(exidy440_state::collide_firq_callback),state), currx); |
| 365 | screen.machine().scheduler().timer_set(screen.time_until_pos(yoffs, currx), timer_expired_delegate(FUNC(exidy440_state::collide_firq_callback), this), currx); |
370 | 366 | } |
371 | 367 | currx++; |
372 | 368 | } |
r32773 | r32774 | |
385 | 381 | * |
386 | 382 | *************************************/ |
387 | 383 | |
388 | | static void update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, |
389 | | int scroll_offset, int check_collision) |
| 384 | void exidy440_state::update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int scroll_offset, int check_collision) |
390 | 385 | { |
391 | | exidy440_state *state = screen.machine().driver_data<exidy440_state>(); |
392 | | int y, sy; |
393 | | |
394 | 386 | /* draw any dirty scanlines from the VRAM directly */ |
395 | | sy = scroll_offset + cliprect.min_y; |
396 | | for (y = cliprect.min_y; y <= cliprect.max_y; y++, sy++) |
| 387 | int sy = scroll_offset + cliprect.min_y; |
| 388 | for (int y = cliprect.min_y; y <= cliprect.max_y; y++, sy++) |
397 | 389 | { |
398 | 390 | /* wrap at the bottom of the screen */ |
399 | 391 | if (sy >= VBSTART) |
400 | 392 | sy -= (VBSTART - VBEND); |
401 | 393 | |
402 | 394 | /* draw line */ |
403 | | draw_scanline8(bitmap, 0, y, (HBSTART - HBEND), &state->m_local_videoram[sy * 512], NULL); |
| 395 | draw_scanline8(bitmap, 0, y, (HBSTART - HBEND), &m_local_videoram[sy * 512], NULL); |
404 | 396 | } |
405 | 397 | |
406 | 398 | /* draw the sprites */ |
trunk/src/mame/video/nycaptor.c
r32773 | r32774 | |
181 | 181 | x - no bg/sprite pri. |
182 | 182 | */ |
183 | 183 | |
184 | | #define mKEY_MASK(x,y) if (machine.input().code_pressed_once(x)) { state->m_mask |= y; state->m_bg_tilemap->mark_all_dirty(); } |
| 184 | #define mKEY_MASK(x,y) if (machine().input().code_pressed_once(x)) { m_mask |= y; m_bg_tilemap->mark_all_dirty(); } |
185 | 185 | |
186 | 186 | void nycaptor_state::nycaptor_setmask( ) |
187 | 187 | { |
r32773 | r32774 | |
207 | 207 | UINT32 nycaptor_state::screen_update_nycaptor(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
208 | 208 | { |
209 | 209 | #if NYCAPTOR_DEBUG |
210 | | nycaptor_setmask(machine()); |
| 210 | nycaptor_setmask(); |
211 | 211 | if (m_mask & 0x1000) |
212 | 212 | { |
213 | 213 | m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3, 0); |
r32773 | r32774 | |
218 | 218 | m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0); |
219 | 219 | m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0); |
220 | 220 | m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0); |
221 | | draw_sprites(machine(), bitmap, cliprect, 0); |
222 | | draw_sprites(machine(), bitmap, cliprect, 1); |
223 | | draw_sprites(machine(), bitmap, cliprect, 2); |
224 | | draw_sprites(machine(), bitmap, cliprect, 3); |
225 | | draw_sprites(machine(), bitmap, cliprect, 4); |
226 | | draw_sprites(machine(), bitmap, cliprect, 5); |
227 | | draw_sprites(machine(), bitmap, cliprect, 6); |
228 | | draw_sprites(machine(), bitmap, cliprect, 7); |
| 221 | draw_sprites(bitmap, cliprect, 0); |
| 222 | draw_sprites(bitmap, cliprect, 1); |
| 223 | draw_sprites(bitmap, cliprect, 2); |
| 224 | draw_sprites(bitmap, cliprect, 3); |
| 225 | draw_sprites(bitmap, cliprect, 4); |
| 226 | draw_sprites(bitmap, cliprect, 5); |
| 227 | draw_sprites(bitmap, cliprect, 6); |
| 228 | draw_sprites(bitmap, cliprect, 7); |
229 | 229 | } |
230 | 230 | else |
231 | 231 | #endif |