![]() One of the tradeoffs to mid-frame palette swapping is that artifacts will often appear on the screen. This technique can be used to surpass the color limitations of the VDP, although it comes with tradeoffs. The process can be repeated more than once per frame. This raster effect results in one vertical section of the screen being drawn with one set of palettes, while another section is drawn with another set of palettes. Palette colors can be changed in CRAM while the VDP is in the middle of rendering a frame and then changed back at the end of the frame, a process known as mid-frame palette swapping. Hblank - Palette swap mid frame, etc.Return to Table of Contents Palette Swapping.Palette swap within the game region? - discussion thread.Re: would screen splitting give extra 13 colours for tiles? - annotated analysis of Indiana Jones.Re: The quest for mid-screen palette changes! - useful summary post, discussion thread.In practice, you prepare the palettes as per normal during vblank and then have the PPU look up any palette entry as if it was the backdrop colour mid-frame. Once done, you should restore the scrolling position and nametable selection before turning rendering on again. This can serve to create lines of colours not otherwise available or available otherwise only available to the sprite plane. While rendering is turned off, it may be marginally useful to point the PPUADDR to one of the 16 palette entries to have the background rendered as that colour. Games that change colors for a status bar can use blank lines at the top of the status bar to similarly avoid visual errors. Indiana Jones hides some potential visual errors by only working where the background is already blank, and only changing the background color. An extra empty line is needed after the palette writes are finished, since there is not enough time in horizontal blank to write 3 colors and restore the PPU address and return to rendering.īecause of these issues, it is best not to use this techniques where sprites may overlap the affected lines. This can be used to change 3 colors in a single horizontal blank, and if rendering is kept off 3 more colors may be updated in each subsequent line. BIT $2007 can be used to skip over the background color, followed by 3 writes to $2007, returning the PPU address to point at the background color again. If the background color is unchanged and stored redundantly at PPU $3F00/4/8/C.While rendering is turned off, and the PPU address is pointing at a palette entry at the same time, this will become the current background color,.(With background rendering on, sprite evaluation will resume but remain hidden.) After the change, one line with background rendering enabled but sprites hidden can be used to flush the invalid sprite evaluation buffer.The write to disable rendering ($2001) should be done after pixel 240 on a scanline to avoid corrupting all sprites on the next frame (see: Errata).Because sprites are evaluated one line in advance, turning off rendering will cause the first line of sprites to be corrupted after re-enabling.Most IRQ or $2001 polling techniques for timing are subject to jitter, varying by about 7 cycles, which cuts into the usable horizontal blank time significantly.Three values can be loaded into the A, X, Y registers in advance of blanking to avoid extra load cycles.Half of the address may be written to $2006 early.NTSC horizontal blank only lasts 21 cycles, which is not enough time to fit all of these steps at once.Ideally, these should be done within or mostly within horizontal blanking to minimize the appearance of visual errors. To write to the palette in the middle of the screen, the following sequence of operations need to be done: Ivan Ironman Stewart's Super Off-Road - on the "Speed Shop" screen, swaps colors for the 4 panels below.Other games using mid frame palette changes: Indiana Jones and the Last Crusade changes its background color many times across the title screen for a gradient sky effect: Changing palette entries in the middle of a frame on the NES is difficult, but marginally possible.Ī few games are known to change palette entries for a status bar region:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |