src/mame/video/snes.c
| r7537 | r7538 | |
| 548 | 548 | mask >>= 1; |
| 549 | 549 | } |
| 550 | 550 | |
| 551 | | if (scanlines[SNES_MAINSCREEN].enable) |
| 551 | if (ii >= 0 && ii < SNES_SCR_WIDTH && scanlines[SNES_MAINSCREEN].enable) |
| 552 | 552 | { |
| 553 | | UINT8 clr = colour; |
| 553 | if (scanlines[SNES_MAINSCREEN].priority[ii] <= priority) |
| 554 | { |
| 555 | UINT8 clr = colour; |
| 554 | 556 | |
| 555 | 557 | #ifdef SNES_LAYER_DEBUG |
| 556 | | if (!debug_options.windows_disabled) |
| 558 | if (!debug_options.windows_disabled) |
| 557 | 559 | #endif /* SNES_LAYER_DEBUG */ |
| 558 | | /* Clip to windows */ |
| 559 | | if (scanlines[SNES_MAINSCREEN].clip) |
| 560 | | clr &= snes_ppu.clipmasks[SNES_OAM][ii]; |
| 560 | /* Clip to windows */ |
| 561 | if (scanlines[SNES_MAINSCREEN].clip) |
| 562 | clr &= snes_ppu.clipmasks[SNES_OAM][ii]; |
| 561 | 563 | |
| 562 | | /* Only draw if we have a colour (0 == transparent) */ |
| 563 | | if (clr) |
| 564 | | { |
| 565 | | if ((scanlines[SNES_MAINSCREEN].priority[ii] <= priority) && (ii >= 0)) |
| 564 | /* Only draw if we have a colour (0 == transparent) */ |
| 565 | if (clr) |
| 566 | 566 | { |
| 567 | 567 | c = snes_cgram[(pal + clr) % FIXED_COLOUR]; |
| 568 | 568 | |
| r7537 | r7538 | |
| 574 | 574 | } |
| 575 | 575 | } |
| 576 | 576 | |
| 577 | | if (scanlines[SNES_SUBSCREEN].enable) |
| 577 | if (ii >= 0 && ii < SNES_SCR_WIDTH && scanlines[SNES_SUBSCREEN].enable) |
| 578 | 578 | { |
| 579 | | UINT8 clr = colour; |
| 579 | if (scanlines[SNES_SUBSCREEN].priority[ii] <= priority) |
| 580 | { |
| 581 | UINT8 clr = colour; |
| 580 | 582 | |
| 581 | 583 | #ifdef SNES_LAYER_DEBUG |
| 582 | | if (!debug_options.windows_disabled) |
| 584 | if (!debug_options.windows_disabled) |
| 583 | 585 | #endif /* SNES_LAYER_DEBUG */ |
| 584 | | /* Clip to windows */ |
| 585 | | if (scanlines[SNES_SUBSCREEN].clip) |
| 586 | | clr &= snes_ppu.clipmasks[SNES_OAM][ii]; |
| 586 | /* Clip to windows */ |
| 587 | if (scanlines[SNES_SUBSCREEN].clip) |
| 588 | clr &= snes_ppu.clipmasks[SNES_OAM][ii]; |
| 587 | 589 | |
| 588 | | /* Only draw if we have a colour (0 == transparent) */ |
| 589 | | if (clr) |
| 590 | | { |
| 591 | | if ((scanlines[SNES_SUBSCREEN].priority[ii] <= priority) && (ii >= 0)) |
| 590 | /* Only draw if we have a colour (0 == transparent) */ |
| 591 | if (clr) |
| 592 | 592 | { |
| 593 | 593 | c = snes_cgram[(pal + clr) % FIXED_COLOUR]; |
| 594 | 594 | |
| r7537 | r7538 | |
| 1083 | 1083 | UINT8 count = 0; |
| 1084 | 1084 | for (xs = (snes_ppu.oam.size[size] - 1); xs >= 0; xs--) |
| 1085 | 1085 | { |
| 1086 | | if ((x + (count << 3) < SNES_SCR_WIDTH + 8)) |
| 1086 | if ((x + (count << 3) < SNES_SCR_WIDTH)) |
| 1087 | 1087 | { |
| 1088 | 1088 | snes_draw_tile_object(charaddr + name_sel + tile + table_obj_offset[ys][xs] + line, x + (count++ << 3), priority, hflip, pal, blend); |
| 1089 | 1089 | } |
| r7537 | r7538 | |
| 1094 | 1094 | { |
| 1095 | 1095 | for (xs = 0; xs < snes_ppu.oam.size[size]; xs++) |
| 1096 | 1096 | { |
| 1097 | | if ((x + (xs << 3) < SNES_SCR_WIDTH + 8)) |
| 1097 | if ((x + (xs << 3) < SNES_SCR_WIDTH)) |
| 1098 | 1098 | { |
| 1099 | 1099 | snes_draw_tile_object(charaddr + name_sel + tile + table_obj_offset[ys][xs] + line, x + (xs << 3), priority, hflip, pal, blend); |
| 1100 | 1100 | } |
src/mess/drivers/snes.c
| r7537 | r7538 | |
| 120 | 120 | { "SUPERSCOPE2", "SUPERSCOPE2_X", "SUPERSCOPE2_Y" }, |
| 121 | 121 | }; |
| 122 | 122 | |
| 123 | | UINT16 x = input_port_read(field->port->machine, portnames[port][1]); |
| 124 | | UINT16 y = input_port_read(field->port->machine, portnames[port][2]); |
| 123 | INT16 x = input_port_read(field->port->machine, portnames[port][1]); |
| 124 | INT16 y = input_port_read(field->port->machine, portnames[port][2]); |
| 125 | 125 | |
| 126 | | /* these are the theoretical boundaries */ |
| 126 | /* these are the theoretical boundaries, but we currently are always onscreen... */ |
| 127 | 127 | if (x < 0 || x >= SNES_SCR_WIDTH || y < 0 || y >= snes_ppu.beam.last_visible_line) |
| 128 | 128 | state->scope[port].offscreen = 1; |
| 129 | 129 | else |