src/mess/video/gb.c
| r1290 | r1291 | |
| 73 | 73 | INT16 bgline; |
| 74 | 74 | }; |
| 75 | 75 | |
| 76 | | struct gb_lcd_struct { |
| 76 | static struct gb_lcd_struct { |
| 77 | 77 | int window_lines_drawn; |
| 78 | 78 | |
| 79 | 79 | /* Things used to render current line */ |
| r1290 | r1291 | |
| 193 | 193 | Select which sprites should be drawn for the current scanline and return the |
| 194 | 194 | number of sprites selected. |
| 195 | 195 | */ |
| 196 | | int gb_select_sprites( void ) { |
| 196 | static int gb_select_sprites( void ) { |
| 197 | 197 | int i, yindex, line, height; |
| 198 | 198 | UINT8 *oam = gb_oam + 39 * 4; |
| 199 | 199 | |
| r1290 | r1291 | |
| 312 | 312 | } |
| 313 | 313 | } |
| 314 | 314 | |
| 315 | | void gb_update_scanline (void) { |
| 315 | static void gb_update_scanline (void) { |
| 316 | 316 | mame_bitmap *bitmap = tmpbitmap; |
| 317 | 317 | |
| 318 | 318 | profiler_mark(PROFILER_VIDEO); |
| r1290 | r1291 | |
| 534 | 534 | } |
| 535 | 535 | } |
| 536 | 536 | |
| 537 | | void sgb_refresh_border(void) { |
| 537 | static void sgb_refresh_border(void) { |
| 538 | 538 | UINT16 data, data2; |
| 539 | 539 | UINT16 yidx, xidx, xindex; |
| 540 | 540 | UINT8 *map, *tiles, *tiles2; |
| r1290 | r1291 | |
| 596 | 596 | } |
| 597 | 597 | } |
| 598 | 598 | |
| 599 | | void sgb_update_scanline (void) { |
| 599 | static void sgb_update_scanline (void) { |
| 600 | 600 | mame_bitmap *bitmap = tmpbitmap; |
| 601 | 601 | |
| 602 | 602 | profiler_mark(PROFILER_VIDEO); |
| r1290 | r1291 | |
| 859 | 859 | } |
| 860 | 860 | } |
| 861 | 861 | |
| 862 | | void cgb_update_scanline (void) { |
| 862 | static void cgb_update_scanline (void) { |
| 863 | 863 | mame_bitmap *bitmap = tmpbitmap; |
| 864 | 864 | |
| 865 | 865 | profiler_mark(PROFILER_VIDEO); |
| r1290 | r1291 | |
| 1067 | 1067 | this data from my CGB on a boot once. |
| 1068 | 1068 | */ |
| 1069 | 1069 | |
| 1070 | | const UINT8 cgb_oam_extra[0x60] = { |
| 1070 | static const UINT8 cgb_oam_extra[0x60] = { |
| 1071 | 1071 | 0x74, 0xFF, 0x09, 0x00, 0x9D, 0x61, 0xA8, 0x28, 0x36, 0x1E, 0x58, 0xAA, 0x75, 0x74, 0xA1, 0x42, |
| 1072 | 1072 | 0x05, 0x96, 0x40, 0x09, 0x41, 0x02, 0x60, 0x00, 0x1F, 0x11, 0x22, 0xBC, 0x31, 0x52, 0x22, 0x54, |
| 1073 | 1073 | 0x22, 0xA9, 0xC4, 0x00, 0x1D, 0xAD, 0x80, 0x0C, 0x5D, 0xFA, 0x51, 0x92, 0x93, 0x98, 0xA4, 0x04, |
| r1290 | r1291 | |
| 1107 | 1107 | gbc_hdma_enabled = 0; |
| 1108 | 1108 | } |
| 1109 | 1109 | |
| 1110 | | void gbc_hdma(UINT16 length) { |
| 1110 | static void gbc_hdma(UINT16 length) { |
| 1111 | 1111 | UINT16 src, dst; |
| 1112 | 1112 | |
| 1113 | 1113 | src = ((UINT16)HDMA1 << 8) | (HDMA2 & 0xF0); |
| r1290 | r1291 | |
| 1128 | 1128 | } |
| 1129 | 1129 | } |
| 1130 | 1130 | |
| 1131 | | void gb_increment_scanline( void ) { |
| 1131 | static void gb_increment_scanline( void ) { |
| 1132 | 1132 | gb_lcd.current_line = ( gb_lcd.current_line + 1 ) % 154; |
| 1133 | 1133 | if ( LCDCONT & 0x80 ) { |
| 1134 | 1134 | CURLINE = gb_lcd.current_line; |