Previous 15994 Revisions Next

r5348 Tuesday 4th August, 2009 at 16:36:25 UTC by Jonathan Gevaryahu
SNES (MESS-specific): Fixed mode 5/6 bg drawing cutted in half bug [Angelo Salese]
[src/mame/machine]snes.c
[src/mame/video]snes.c

src/mame/machine/snes.c
r5347r5348
4040static emu_timer *snes_nmi_timer;
4141static emu_timer *snes_hirq_timer;
4242static UINT16 hblank_offset;
43static UINT16 snes_htmult;   /* in 512 wide, we run HTOTAL double and halve it on latching */
43UINT16 snes_htmult;   /* in 512 wide, we run HTOTAL double and halve it on latching */
4444UINT8 snes_has_addon_chip;
4545
4646// full graphic variables
r5347r5348
971971         } break;
972972      case SETINI:   /* Screen mode/video select */
973973         /* FIXME: We only support line count here */
974         snes_ppu.beam.last_visible_line = (data & 0x4) ? 240 : 225;
974         snes_ppu.beam.last_visible_line = (data & 0x4) ? 240 : 224;
975975#ifdef SNES_DBG_REG_W
976976         if( (data & 0x8) != (snes_ram[SETINI] & 0x8) )
977977            mame_printf_debug( "Pseudo 512 mode: %s\n", (data & 0x8) ? "on" : "off" );
src/mame/video/snes.c
r5347r5348
154154/*7*/   { {snes_update_line_mode7, NULL, NULL, NULL}, 1 }               /* Supports direct colour */
155155};
156156
157extern UINT16 snes_htmult;
158
157159/*****************************************
158160 * snes_draw_blend()
159161 *
r5347r5348
18801882#endif /* SNES_DBG_video */
18811883      if( snes_ram[CGADSUB] & 0x20 )
18821884      {
1883         for( ii = 0; ii < SNES_SCR_WIDTH; ii++ )
1885         for( ii = 0; ii < SNES_SCR_WIDTH * snes_htmult; ii++ )
18841886         {
18851887            snes_draw_blend(ii, &scanlines[MAINSCREEN].buffer[ii], (snes_ram[CGADSUB] & 0x80)?SNES_BLEND_SUB:SNES_BLEND_ADD, (snes_ram[CGWSEL] & 0x30) >> 4 );
18861888         }
r5347r5348
19111913      /* Phew! Draw the line to screen */
19121914      fade = (snes_ram[INIDISP] & 0xf) + 1;
19131915
1914      for (x = 0; x < SNES_SCR_WIDTH; x++)
1916      for (x = 0; x < SNES_SCR_WIDTH * snes_htmult; x++)
19151917      {
19161918         int r = ((scanline->buffer[x] & 0x1f) * fade) >> 4;
19171919         int g = (((scanline->buffer[x] & 0x3e0) >> 5) * fade) >> 4;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team