src/mess/video/smsvdp.c
| r13583 | r13584 | |
| 527 | 527 | /* Draw middle of the border */ |
| 528 | 528 | /* We need to do this through the regular drawing function so it will */ |
| 529 | 529 | /* be included in the gamegear scaling functions */ |
| 530 | | refresh_line( SMS_LBORDER_START + SMS_LBORDER_X_PIXELS, vpos_limit - m_frame_timing[ACTIVE_DISPLAY_V], vpos - (vpos_limit - m_frame_timing[ACTIVE_DISPLAY_V]) ); |
| 530 | draw_scanline( SMS_LBORDER_START + SMS_LBORDER_X_PIXELS, vpos_limit - m_frame_timing[ACTIVE_DISPLAY_V], vpos - (vpos_limit - m_frame_timing[ACTIVE_DISPLAY_V]) ); |
| 531 | 531 | return; |
| 532 | 532 | } |
| 533 | 533 | |
| r13583 | r13584 | |
| 557 | 557 | bitmap_fill(m_tmpbitmap, &rec, machine().pens[m_current_palette[BACKDROP_COLOR]]); |
| 558 | 558 | bitmap_fill(m_y1_bitmap, &rec, 1); |
| 559 | 559 | |
| 560 | | refresh_line( SMS_LBORDER_START + SMS_LBORDER_X_PIXELS, vpos_limit, vpos - vpos_limit ); |
| 560 | draw_scanline( SMS_LBORDER_START + SMS_LBORDER_X_PIXELS, vpos_limit, vpos - vpos_limit ); |
| 561 | 561 | |
| 562 | 562 | return; |
| 563 | 563 | } |
| r13583 | r13584 | |
| 585 | 585 | /* Draw middle of the border */ |
| 586 | 586 | /* We need to do this through the regular drawing function so it will */ |
| 587 | 587 | /* be included in the gamegear scaling functions */ |
| 588 | | refresh_line( SMS_LBORDER_START + SMS_LBORDER_X_PIXELS, vpos_limit + m_frame_timing[TOP_BORDER], vpos - (vpos_limit + m_frame_timing[TOP_BORDER]) ); |
| 588 | draw_scanline( SMS_LBORDER_START + SMS_LBORDER_X_PIXELS, vpos_limit + m_frame_timing[TOP_BORDER], vpos - (vpos_limit + m_frame_timing[TOP_BORDER]) ); |
| 589 | 589 | return; |
| 590 | 590 | } |
| 591 | 591 | |
| r13583 | r13584 | |
| 771 | 771 | } |
| 772 | 772 | |
| 773 | 773 | |
| 774 | | void sega315_5124_device::refresh_line_mode4( int *line_buffer, int *priority_selected, int line ) |
| 774 | void sega315_5124_device::draw_scanline_mode4( int *line_buffer, int *priority_selected, int line ) |
| 775 | 775 | { |
| 776 | 776 | int tile_column; |
| 777 | 777 | int x_scroll, y_scroll, x_scroll_start_column; |
| r13583 | r13584 | |
| 849 | 849 | } |
| 850 | 850 | } |
| 851 | 851 | |
| 852 | | void sega315_5124_device::refresh_mode4_sprites( int *line_buffer, int *priority_selected, int pixel_plot_y, int line ) |
| 852 | void sega315_5124_device::draw_sprites_mode4( int *line_buffer, int *priority_selected, int pixel_plot_y, int line ) |
| 853 | 853 | { |
| 854 | 854 | int sprite_index; |
| 855 | 855 | int pixel_x, pixel_plot_x; |
| r13583 | r13584 | |
| 1047 | 1047 | } |
| 1048 | 1048 | |
| 1049 | 1049 | |
| 1050 | | void sega315_5124_device::refresh_tms9918_sprites( int *line_buffer, int pixel_plot_y, int line ) |
| 1050 | void sega315_5124_device::draw_sprites_tms9918_mode( int *line_buffer, int pixel_plot_y, int line ) |
| 1051 | 1051 | { |
| 1052 | 1052 | int pixel_plot_x; |
| 1053 | 1053 | bool sprite_col_occurred = false; |
| r13583 | r13584 | |
| 1279 | 1279 | } |
| 1280 | 1280 | |
| 1281 | 1281 | |
| 1282 | | void sega315_5124_device::refresh_line_mode2( int *line_buffer, int line ) |
| 1282 | void sega315_5124_device::draw_scanline_mode2( int *line_buffer, int line ) |
| 1283 | 1283 | { |
| 1284 | 1284 | int tile_column; |
| 1285 | 1285 | int pixel_x, pixel_plot_x; |
| r13583 | r13584 | |
| 1329 | 1329 | } |
| 1330 | 1330 | |
| 1331 | 1331 | |
| 1332 | | void sega315_5124_device::refresh_line_mode0( int *line_buffer, int line ) |
| 1332 | void sega315_5124_device::draw_scanline_mode0( int *line_buffer, int line ) |
| 1333 | 1333 | { |
| 1334 | 1334 | int tile_column; |
| 1335 | 1335 | int pixel_x, pixel_plot_x; |
| r13583 | r13584 | |
| 1367 | 1367 | } |
| 1368 | 1368 | |
| 1369 | 1369 | |
| 1370 | | void sega315_5124_device::refresh_line( int pixel_offset_x, int pixel_plot_y, int line ) |
| 1370 | void sega315_5124_device::draw_scanline( int pixel_offset_x, int pixel_plot_y, int line ) |
| 1371 | 1371 | { |
| 1372 | 1372 | int x; |
| 1373 | 1373 | int *blitline_buffer = m_line_buffer; |
| r13583 | r13584 | |
| 1381 | 1381 | memset(priority_selected, 1, sizeof(priority_selected)); |
| 1382 | 1382 | if ( line >= 0 ) |
| 1383 | 1383 | { |
| 1384 | | refresh_line_mode0( blitline_buffer, line ); |
| 1384 | draw_scanline_mode0( blitline_buffer, line ); |
| 1385 | 1385 | } |
| 1386 | 1386 | if ( line >= 0 || ( line >= -13 && m_y_pixels == 192 ) ) |
| 1387 | 1387 | { |
| 1388 | | refresh_tms9918_sprites( blitline_buffer, pixel_plot_y, line ); |
| 1388 | draw_sprites_tms9918_mode( blitline_buffer, pixel_plot_y, line ); |
| 1389 | 1389 | } |
| 1390 | 1390 | break; |
| 1391 | 1391 | |
| r13583 | r13584 | |
| 1393 | 1393 | memset(priority_selected, 1, sizeof(priority_selected)); |
| 1394 | 1394 | if ( line >= 0 ) |
| 1395 | 1395 | { |
| 1396 | | refresh_line_mode2( blitline_buffer, line ); |
| 1396 | draw_scanline_mode2( blitline_buffer, line ); |
| 1397 | 1397 | } |
| 1398 | 1398 | if ( line >= 0 || ( line >= -13 && m_y_pixels == 192 ) ) |
| 1399 | 1399 | { |
| 1400 | | refresh_tms9918_sprites( blitline_buffer, pixel_plot_y, line ); |
| 1400 | draw_sprites_tms9918_mode( blitline_buffer, pixel_plot_y, line ); |
| 1401 | 1401 | } |
| 1402 | 1402 | break; |
| 1403 | 1403 | |
| r13583 | r13584 | |
| 1406 | 1406 | memset(priority_selected, 0, sizeof(priority_selected)); |
| 1407 | 1407 | if ( line >= 0 ) |
| 1408 | 1408 | { |
| 1409 | | refresh_line_mode4( blitline_buffer, priority_selected, line ); |
| 1409 | draw_scanline_mode4( blitline_buffer, priority_selected, line ); |
| 1410 | 1410 | } |
| 1411 | 1411 | if ( line >= 0 || ( line >= -13 && m_y_pixels == 192 ) ) |
| 1412 | 1412 | { |
| 1413 | | refresh_mode4_sprites( blitline_buffer, priority_selected, pixel_plot_y, line ); |
| 1413 | draw_sprites_mode4( blitline_buffer, priority_selected, pixel_plot_y, line ); |
| 1414 | 1414 | } |
| 1415 | 1415 | break; |
| 1416 | 1416 | } |
| r13583 | r13584 | |
| 1439 | 1439 | } |
| 1440 | 1440 | |
| 1441 | 1441 | |
| 1442 | | void sega315_5378_device::refresh_line( int pixel_offset_x, int pixel_plot_y, int line ) |
| 1442 | void sega315_5378_device::draw_scanline( int pixel_offset_x, int pixel_plot_y, int line ) |
| 1443 | 1443 | { |
| 1444 | 1444 | int x; |
| 1445 | 1445 | int *blitline_buffer = m_line_buffer; |
| r13583 | r13584 | |
| 1452 | 1452 | case 0: |
| 1453 | 1453 | if ( line >= 0 ) |
| 1454 | 1454 | { |
| 1455 | | refresh_line_mode0( blitline_buffer, line ); |
| 1455 | draw_scanline_mode0( blitline_buffer, line ); |
| 1456 | 1456 | } |
| 1457 | 1457 | if ( line >= 0 || ( line >= -13 && m_y_pixels == 192 ) ) |
| 1458 | 1458 | { |
| 1459 | | refresh_tms9918_sprites( blitline_buffer, pixel_plot_y, line ); |
| 1459 | draw_sprites_tms9918_mode( blitline_buffer, pixel_plot_y, line ); |
| 1460 | 1460 | } |
| 1461 | 1461 | break; |
| 1462 | 1462 | |
| 1463 | 1463 | case 2: |
| 1464 | 1464 | if ( line >= 0 ) |
| 1465 | 1465 | { |
| 1466 | | refresh_line_mode2( blitline_buffer, line ); |
| 1466 | draw_scanline_mode2( blitline_buffer, line ); |
| 1467 | 1467 | } |
| 1468 | 1468 | if ( line >= 0 || ( line >= -13 && m_y_pixels == 192 ) ) |
| 1469 | 1469 | { |
| 1470 | | refresh_tms9918_sprites( blitline_buffer, pixel_plot_y, line ); |
| 1470 | draw_sprites_tms9918_mode( blitline_buffer, pixel_plot_y, line ); |
| 1471 | 1471 | } |
| 1472 | 1472 | break; |
| 1473 | 1473 | |
| r13583 | r13584 | |
| 1476 | 1476 | memset(priority_selected, 0, sizeof(priority_selected)); |
| 1477 | 1477 | if ( line >= 0 ) |
| 1478 | 1478 | { |
| 1479 | | refresh_line_mode4( blitline_buffer, priority_selected, line ); |
| 1479 | draw_scanline_mode4( blitline_buffer, priority_selected, line ); |
| 1480 | 1480 | } |
| 1481 | 1481 | if ( line >= 0 || ( line >= -13 && m_y_pixels == 192 ) ) |
| 1482 | 1482 | { |
| 1483 | | refresh_mode4_sprites( blitline_buffer, priority_selected, pixel_plot_y, line ); |
| 1483 | draw_sprites_mode4( blitline_buffer, priority_selected, pixel_plot_y, line ); |
| 1484 | 1484 | } |
| 1485 | 1485 | break; |
| 1486 | 1486 | } |
src/mess/video/smsvdp.h
| r13583 | r13584 | |
| 87 | 87 | protected: |
| 88 | 88 | virtual void set_display_settings(); |
| 89 | 89 | virtual void update_palette(); |
| 90 | | virtual void refresh_line( int pixel_offset_x, int pixel_plot_y, int line ); |
| 90 | virtual void draw_scanline( int pixel_offset_x, int pixel_plot_y, int line ); |
| 91 | 91 | virtual UINT16 get_name_table_address(); |
| 92 | 92 | void process_line_timer(); |
| 93 | | void refresh_line_mode4( int *line_buffer, int *priority_selected, int line ); |
| 94 | | void refresh_mode4_sprites( int *line_buffer, int *priority_selected, int pixel_plot_y, int line ); |
| 95 | | void refresh_tms9918_sprites( int *line_buffer, int pixel_plot_y, int line ); |
| 96 | | void refresh_line_mode2( int *line_buffer, int line ); |
| 97 | | void refresh_line_mode0( int *line_buffer, int line ); |
| 93 | void draw_scanline_mode4( int *line_buffer, int *priority_selected, int line ); |
| 94 | void draw_sprites_mode4( int *line_buffer, int *priority_selected, int pixel_plot_y, int line ); |
| 95 | void draw_sprites_tms9918_mode( int *line_buffer, int pixel_plot_y, int line ); |
| 96 | void draw_scanline_mode2( int *line_buffer, int line ); |
| 97 | void draw_scanline_mode0( int *line_buffer, int line ); |
| 98 | 98 | |
| 99 | 99 | // device-level overrides |
| 100 | 100 | virtual void device_config_complete(); |
| r13583 | r13584 | |
| 175 | 175 | protected: |
| 176 | 176 | virtual void set_display_settings(); |
| 177 | 177 | virtual void update_palette(); |
| 178 | | virtual void refresh_line( int pixel_offset_x, int pixel_plot_y, int line ); |
| 178 | virtual void draw_scanline( int pixel_offset_x, int pixel_plot_y, int line ); |
| 179 | 179 | virtual UINT16 get_name_table_address(); |
| 180 | 180 | }; |
| 181 | 181 | |