📄 nds specifications.htm
字号:
4000204h 2 R/W WAITCNT Game Pak Waitstate Control
4000206h - - Not used
4000208h 2 R/W IME Interrupt Master Enable Register
400020Ah - - Not used
4000300h 1 R/W POSTFLG Undocumented - Post Boot Flag
4000301h 1 W HALTCNT Undocumented - Power Down Control
4000302h - - Not used
4000410h ? ? ? Undocumented - Purpose Unknown / Bug ??? 0FFh
4000411h - - Not used
4000800h 4 R/W ? Undocumented - Internal Memory Control (R/W)
4000804h - - Not used
4xx0800h 4 R/W ? Mirrors of 4000800h (repeated each 64K)
</PRE></TD></TR></TBODY></TABLE><BR>All further addresses at 4XXXXXXh are unused
and do not contain mirrors of the I/O area, with the only exception that
4000800h is repeated each 64K (ie. mirrored at 4010800h, 4020800h,
etc.)<BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR bgColor=#cccccc>
<TD><A name=lcdvideocontroller></A><FONT size=+2> LCD Video
Controller</FONT></TD></TR></TBODY></TABLE><BR><B>Registers</B><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdiodisplaycontrol">LCD I/O Display
Control</A><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdiointerruptsandstatus">LCD I/O
Interrupts and Status</A><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdiobgcontrol">LCD I/O BG
Control</A><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdiobgscrolling">LCD I/O BG
Scrolling</A><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdiobgrotationscaling">LCD I/O BG
Rotation/Scaling</A><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdiowindowfeature">LCD I/O Window
Feature</A><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdiomosaicfunction">LCD I/O Mosaic
Function</A><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdiocolorspecialeffects">LCD I/O
Color Special Effects</A><BR><BR><B>VRAM</B><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdvramoverview">LCD VRAM
Overview</A><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdvramcharacterdata">LCD VRAM
Character Data</A><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdvrambgscreendataformatbgmap">LCD
VRAM BG Screen Data Format (BG Map)</A><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdvrambitmapbgmodes">LCD VRAM Bitmap
BG Modes</A><BR><BR><B>Sprites</B><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdobjoverview">LCD OBJ -
Overview</A><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdobjoamattributes">LCD OBJ - OAM
Attributes</A><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdobjoamrotationscalingparameters">LCD
OBJ - OAM Rotation/Scaling Parameters</A><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdobjvramcharactertilemapping">LCD
OBJ - VRAM Character (Tile) Mapping</A><BR><BR><B>Other</B><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcdcolorpalettes">LCD Color
Palettes</A><BR><A
href="http://nocash.emubase.de/gbatek.htm#lcddimensionsandtimings">LCD
Dimensions and Timings</A><BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR bgColor=#cccccc>
<TD><A name=lcdiodisplaycontrol></A><FONT size=+2> LCD I/O Display
Control</FONT></TD></TR></TBODY></TABLE><BR><B>4000000h - DISPCNT - LCD Control
(Read/Write)</B><BR>
<TABLE>
<TBODY>
<TR>
<TD><PRE> Bit Expl.
0-2 BG Mode (0-5=Video Mode 0-5, 6-7=Prohibited)
3 Reserved for BIOS (CGB Mode - cannot be changed after startup)
4 Display Frame Select (0-1=Frame 0-1) (for BG Modes 4,5 only)
5 H-Blank Interval Free (1=Allow access to OAM during H-Blank)
6 OBJ Character VRAM Mapping (0=Two dimensional, 1=One dimensional)
7 Forced Blank (1=Allow access to VRAM,Palette,OAM)
8 Screen Display BG0 (0=Off, 1=On)
9 Screen Display BG1 (0=Off, 1=On)
10 Screen Display BG2 (0=Off, 1=On)
11 Screen Display BG3 (0=Off, 1=On)
12 Screen Display OBJ (0=Off, 1=On)
13 Window 0 Display Flag (0=Off, 1=On)
14 Window 1 Display Flag (0=Off, 1=On)
15 OBJ Window Display Flag (0=Off, 1=On)
</PRE></TD></TR></TBODY></TABLE><BR>The table summarizes the facilities of the
separate BG modes (video modes).<BR>
<TABLE>
<TBODY>
<TR>
<TD><PRE><B> Mode Rot/Scal Layers Size Tiles Colors Features</B>
0 No 0123 256x256..512x515 1024 16/16..256/1 SFMABP
1 Mixed 012- (BG0,BG1 as above Mode 0, BG2 as below Mode 2)
2 Yes --23 128x128..1024x1024 256 256/1 S-MABP
3 Yes --?- 240x160 1 32768 --MABP
4 Yes --?? 240x160 2 256/1 --MABP
5 Yes --?? 160x128 2 32768 --MABP
</PRE></TD></TR></TBODY></TABLE>Features: S)crolling, F)lip, M)osaic,
A)lphaBlending, B)rightness, P)riority.<BR><BR>BG Modes 0-2 are Tile/Map-based.
BG Modes 3-5 are Bitmap-based, in these modes 1 or 2 Frames (ie. bitmaps, or
'full screen tiles') exists, if two frames exist, either one can be displayed,
and the other one can be redrawn in background.<BR><BR><B>Blanking
Bits</B><BR>Setting Forced Blank (Bit 7) causes the video controller to display
white lines, and all VRAM, Palette RAM, and OAM may be accessed.<BR>"When the
internal HV synchronous counter cancels a forced blank during a display period,
the display begins from the beginning, following the display of two vertical
lines." What ???<BR>Setting H-Blank Interval Free (Bit 5) allows to access OAM
during H-Blank time - using this feature reduces the number of sprites that can
be displayed per line.<BR><BR><B>Display Enable Bits</B><BR>By default, BG0-3
and OBJ Display Flags (Bit 8-12) are used to enable/disable BGs and OBJ. When
enabling Window 0 and/or 1 (Bit 13-14), color special effects may be used, and
BG0-3 and OBJ are controlled by the window(s).<BR><BR><B>Frame
Selection</B><BR>In BG Modes 4 and 5 (Bitmap modes), either one of the two
bitmaps/frames may be displayed (Bit 4), allowing the user to update the other
(invisible) frame in background. In BG Mode 3, only one frame exists.<BR>In BG
Modes 0-2 (Tile/Map based modes), a similar effect may be gained by altering the
base address(es) of BG Map and/or BG Character data.<BR><BR><B>4000002h -
Undocumented - Green Swap (R/W)</B><BR>Normally, red green blue intensities for
a group of two pixels is output as BGRbgr (uppercase for left pixel at even
xloc, lowercase for right pixel at odd xloc). When the Green Swap bit is set,
each pixel group is output as BgRbGr (ie. green intensity of each two pixels
exchanged).<BR>
<TABLE>
<TBODY>
<TR>
<TD><PRE> Bit Expl.
0 Green Swap (0=Normal, 1=Swap)
1-15 Not used
</PRE></TD></TR></TBODY></TABLE>This feature appears to be applied to the final
picture (ie. after mixing the separate BG and OBJ layers). Eventually intended
for other display types (with other pin-outs). With normal GBA hardware it is
just producing an interesting dirt effect.<BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR bgColor=#cccccc>
<TD><A name=lcdiointerruptsandstatus></A><FONT size=+2> LCD I/O
Interrupts and Status</FONT></TD></TR></TBODY></TABLE><BR><B>4000004h - DISPSTAT
- General LCD Status (Read/Write)</B><BR>Display status and Interrupt control.
The H-Blank conditions are generated once per scanline, including for the
'hidden' scanlines during V-Blank.<BR>
<TABLE>
<TBODY>
<TR>
<TD><PRE> Bit Expl.
0 V-Blank flag (Read only) (1=VBlank)
1 H-Blank flag (Read only) (1=HBlank)
2 V-Counter flag (Read only) (1=Match)
3 V-Blank IRQ Enable (1=Enable)
4 H-Blank IRQ Enable (1=Enable)
5 V-Counter IRQ Enable (1=Enable)
6-7 Not used
8-15 V-Count Setting (0-227)
</PRE></TD></TR></TBODY></TABLE>The V-Count-Setting value is much the same as
LYC of older gameboys, when its value is identical to the content of the VCOUNT
register then the V-Counter flag is set (Bit 2), and (if enabled in Bit 5) an
interrupt is requested.<BR><BR><B>4000006h - VCOUNT - Vertical Counter (Read
only)</B><BR>Indicates the currently drawn scanline, values in range from
160-227 indicate 'hidden' scanlines within VBlank area.<BR>
<TABLE>
<TBODY>
<TR>
<TD><PRE> Bit Expl.
0-7 Current scanline (0-227)
8-15 Not Used
</PRE></TD></TR></TBODY></TABLE>Note: This is much the same than the 'LY'
register of older gameboys.<BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR bgColor=#cccccc>
<TD><A name=lcdiobgcontrol></A><FONT size=+2> LCD I/O BG
Control</FONT></TD></TR></TBODY></TABLE><BR><B>4000008h - BG0CNT - BG0 Control
(R/W) (BG Modes 0,1 only)</B><BR><B>400000Ah - BG1CNT - BG1 Control (R/W) (BG
Modes 0,1 only)</B><BR><B>400000Ch - BG2CNT - BG2 Control (R/W) (BG Modes 0,1,2
only)</B><BR><B>400000Eh - BG3CNT - BG3 Control (R/W) (BG Modes 0,2
only)</B><BR>
<TABLE>
<TBODY>
<TR>
<TD><PRE> Bit Expl.
0-1 BG Priority (0-3, 0=Highest)
2-3 Character Base Block (0-3, in units of 16 KBytes) (=BG Tile Data)
4-5 Not used (must be zero)
6 Mosaic (0=Disable, 1=Enable)
7 Colors/Palettes (0=16/16, 1=256/1)
8-12 Screen Base Block (0-31, in units of 2 KBytes) (=BG Map Data)
13 Display Area Overflow (0=Transparent, 1=Wraparound; BG2CNT/BG3CNT only)
14-15 Screen Size (0-3)
</PRE></TD></TR></TBODY></TABLE>Internal Screen Size (dots) and size of BG Map
(bytes):<BR>
<TABLE>
<TBODY>
<TR>
<TD><PRE> Value Text Mode Rotation/Scaling Mode
0 256x256 (2K) 128x128 (256 bytes)
1 512x256 (4K) 256x256 (1K)
2 256x512 (4K) 512x512 (4K)
3 512x512 (8K) 1024x1024 (16K)
</PRE></TD></TR></TBODY></TABLE>In case that some or all BGs are set to same
priority then BG0 is having the highest, and BG3 the lowest priority.<BR><BR>In
'Text Modes', the screen size is organized as follows: The screen consists of
one or more 256x256 pixel (32x32 tiles) areas. When Size=0: only 1 area (SC0),
when Size=1 or Size=2: two areas (SC0,SC1 either horizontally or vertically
arranged next to each other), when Size=3: four areas (SC0,SC1 in upper row,
SC2,SC3 in lower row). Whereas SC0 is defined by the normal BG Map base address
(Bit 8-12 of BG#CNT), SC1 uses same address +2K, SC2 address +4K, SC3 address
+6K. When the screen is scrolled it'll always wraparound.<BR><BR>In
'Rotation/Scaling Modes', the screen size is organized as follows, only one area
(SC0) of variable size 128x128..1024x1024 pixels (16x16..128x128 tiles) exists
(SC0). When the screen is rotated/scaled (or scrolled?) so that the LCD viewport
reaches outside of the background/screen area, then BG may be either displayed
as transparent or wraparound (Bit 13 of BG#CNT).<BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR bgColor=#cccccc>
<TD><A name=lcdiobgscrolling></A><FONT size=+2> LCD I/O BG
Scrolling</FONT></TD></TR></TBODY></TABLE><BR><B>4000010h - BG0HOFS - BG0
X-Offset (W)</B><BR><B>4000012h - BG0VOFS - BG0 Y-Offset (W)</B><BR>
<TABLE>
<TBODY>
<TR>
<TD><PRE> Bit Expl.
0-8 Offset (0-511)
9-15 Not used
</PRE></TD></TR></TBODY></TABLE>Specifies the coordinate of the upperleft first
visible dot of BG0 background layer, ie. used to scroll the BG0
area.<BR><BR><B>4000014h - BG1HOFS - BG1 X-Offset (W)</B><BR><B>4000016h -
BG1VOFS - BG1 Y-Offset (W)</B><BR>Same as above BG0HOFS and BG0VOFS for BG1
respectively.<BR><BR><B>4000018h - BG2HOFS - BG2 X-Offset (W)</B><BR><B>400001Ah
- BG2VOFS - BG2 Y-Offset (W)</B><BR>Same as above BG0HOFS and BG0VOFS for BG2
respectively.<BR><BR><B>400001Ch - BG3HOFS - BG3 X-Offset (W)</B><BR><B>400001Eh
- BG3VOFS - BG3 Y-Offset (W)</B><BR>Same as above BG0HOFS and BG0VOFS for BG3
respectively.<BR><BR>The above BG scrolling registers are exclusively used in
Text modes, ie. for all layers in BG Mode 0, and for the first two layers in BG
mode 1.<BR>In other BG modes (Rotation/Scaling and Bitmap modes) above registers
are ignored. Instead, the screen may be scrolled by modifying the BG
Rotation/Scaling Reference Point registers.<BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR bgColor=#cccccc>
<TD><A name=lcdiobgrotationscaling></A><FONT size=+2> LCD I/O BG
Rotation/Scaling</FONT></TD></TR></TBODY></TABLE><BR><B>4000028h - BG2X_L - BG2
Reference Point X-Coordinate, lower 16 bit (W)</B><BR><B>400002Ah - BG2X_H - BG2
Reference Point X-Coordinate, upper 12 bit (W)</B><BR><B>400002Ch - BG2Y_L - BG2
Reference Point Y-Coordinate, lower 16 bit (W)</B><BR><B>400002Eh - BG2Y_H - BG2
Reference Point Y-Coordinate, upper 12 bit (W)</B><BR>These registers are
replacing the BG scrolling registers which are used for Text mode, ie. the X/Y
coordinates specify the source position from inside of the BG Map/Bitmap of the
pixel to be displayed at upper left of the GBA display. The normal BG scrolling
registers are ignored in Rotation/Scaling and Bitmap modes.<BR>
<TABLE>
<TBODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -