Video Interface: Difference between revisions

Jump to navigation Jump to search
m
Not done, but a good stopping point.
(Filled out a bunch of stuff.)
m (Not done, but a good stopping point.)
Line 7:
=== Hardware ===
Most of the Video Interface is implemented inside the RCP (Reality CoProcessor), although there is a Video DAC (Digital Analog Converter) on the mainboard, and another encoder IC (ENC-NUS) which which appears to manage some of the signal differences between Composite and S-Video Output.
 
=== The Registers ===
 
=== Base Address - 0x0440'0000 ===
Line 14 ⟶ 16:
 
When using the VI Interface this should be all you need. For other Interfaces there are some situations that it should be accessed with a different technique, so they will be covered in more depth where it's relevant.
 
=== The Registers ===
 
==== 0x0440 0000 - VI_CONTROL_REG ====
Line 54:
 
==== 0x0440 0018 - VI_V_SYNC_REG - R/(W default) ====
'''Always set to the Appropriate value for the Standard being used'''
 
This is the total number of lines both visible and non-visible that must be sent to the TV (based on the the standard for NTSC/PAL)
 
Line 61 ⟶ 63:
 
==== 0x0440 001C - VI_H_SYNC_REG ====
'''Always set to the Appropriate value for the Standard being used'''
 
* [11:0] total duration of a line in 1/4 pixel units
Line 73 ⟶ 76:
 
==== 0x0440 0020 - VI_H_SYNC_LEAP_REG ====
'''Always set to the Appropriate value for the Standard being used'''
 
* [11:0] identical to h_sync_period
Line 118 ⟶ 122:
 
==== 0x0440 002C - VI_V_BURST_REG ====
'''Always set to the Appropriate value for the Standard being used'''
 
* [9:0] end of color burst enable in half-lines
Line 162 ⟶ 167:
* vertical subpixel offset: 0010'0000'0000 = 0.5
 
=== How to use this information ===
 
==== Interlace Mode ====
The NTSC (and PAL) standard support interlace mode which is commonly associated with high resolution, but it can be used for more than that.
 
* High Resolution Mode
* Improve the visible detail of the image
* 60 frames per second in low resolution
 
===== High Resolution Mode =====
High resolution mode supports up to 480 lines (NTSC) while low resolution is 240 lines (NTSC). The Image doesn't magically grow or shrink because first the even lines are drawn on the screen, then it goes back to the top and draws the odd lines. If your game only draws the even lines then on a larger display you may have the image scanlines with smaller black lines visible between them.
 
In order to implement this feature it requires the VI_V_START_REG to be modified on every VI Interrupt, so that it outputs even lines then odd lines as needed.
 
NTSC Alternates between: 0x002301fd and 0x002501ff
 
PAL Alternates between: 0x005f0239 and 0x005d0237
 
Once this is explained I believe it will be fixed soon, so this is explained as an example of what the difference can be. The libdragon homebrew library doesn't actually support High Resolution Mode, because it doesn't implement this register value change. To be fair this is very easy to overlook, it works fine in every emulator and would at least look OK on a console. The difference is that emulators present the framebuffer memory as a single block of data. While the VI Interface and Video DAC see the 1 framebuffer as even lines top to bottom, then odd lines top to bottom.
 
===== Improve visible detail in low resolution =====
 
==== 60 Frames per second in Low Resolution mode ====
This is the easiest mode to use if your frame processing time is very low, because you simply swap the frame buffer 60 times per second inside the VI Interrupt, no other register changes are needed.
 
===== Letter Boxing =====
This is a fairly common effect that is nice for cut scenes or to indicate overworld vs a level.
 
VI_V_START_REG
 
==== Pillar Boxing ====
This feature is almost the default now since the N64 is intended for a 4:3 screen but is commonly played on 16:9 ratio screens.
 
VI_H_START_REG
 
==== Reduce both Height and Width ====
Reducing the display size by just a few pixels also reduces the size of the world view that the player has, while usually improving performance. Especially if the purpose of this is to improve performance I recommend doing it in increments of 8 pixels, for example either 4 or 8 pixels off each side and my increasing the size of the player status bars at either the top or bottom of the screen can also reduce the number of objects to draw on the screen.
 
Use the same techniques mentioned above for Letter Boxing and Pillar Boxing.
 
Advanced version of this is to reduce either the height or width and to increase the scaling so it still fits the screen but stretches the image out to fill the screen.
[[Category:Motherboard]]
__FORCETOC__
autoeditors, Administrators
76

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu