Difference between revisions of "Sega Mega Drive/VDP registers"
From Sega Retro
Montserrat (talk | contribs) |
Montserrat (talk | contribs) (Undo revision 743915 by Montserrat (talk)) Tag: Undo |
||
Line 84: | Line 84: | ||
| <span id="0B">0B</span> | | <span id="0B">0B</span> | ||
| Mode Register 3 | | Mode Register 3 | ||
− | | {{bitfield|0|0|0|0|IE2|VS|HS1- | + | | {{bitfield|0|0|0|0|IE2|VS|HS1-HS2;2}} |
* '''IE2:''' 1 = enable [[Sega Mega Drive/Interrupts#External interrupts|external interrupts]], caused by the TH pin being set to input mode and having the TH interrupt enable bit set. (Both of these are controlled by the Mega Drive' I/O registers). | * '''IE2:''' 1 = enable [[Sega Mega Drive/Interrupts#External interrupts|external interrupts]], caused by the TH pin being set to input mode and having the TH interrupt enable bit set. (Both of these are controlled by the Mega Drive' I/O registers). | ||
* '''VS:''' [[Sega Mega Drive/Scrolling|Vertical scrolling mode]]: 1 = 16 pixel columns (1 word per column in VSRAM); 0 = full screen (1 longword only in VSRAM). | * '''VS:''' [[Sega Mega Drive/Scrolling|Vertical scrolling mode]]: 1 = 16 pixel columns (1 word per column in VSRAM); 0 = full screen (1 longword only in VSRAM). | ||
− | * '''HS1- | + | * '''HS1-HS2:''' [[Sega Mega Drive/Scrolling|Horizontal scrolling mode]]: 00 = full screen; 01 = invalid; 10 = 8 pixel rows; 11 = single pixel rows. |
| <tt>move.w #$8Bxx,($c00004).l</tt> | | <tt>move.w #$8Bxx,($c00004).l</tt> | ||
|- | |- |
Revision as of 15:28, 3 January 2022
Reg. | Name | Bits | Code |
---|---|---|---|
00 | Mode Register 1 | 7 6 5 4 3 2 1 0 0 0 L IE1 0 M4 M3 DE
|
move.w #$80xx,($c00004).l |
01 | Mode Register 2 | 7 6 5 4 3 2 1 0 VR DE IE0 M1 M2 M5 0 0
|
move.w #$81xx,($c00004).l |
02 | Plane A Name Table Location | 7 6 5 4 3 2 1 0 0 PA6 PA5-PA3 0 0 0
|
move.w #$8200+($xxxx>>10),($c00004).l |
03 | Window Name Table Location | 7 6 5 4 3 2 1 0 0 W6 W5-W1 0
|
move.w #$8300+($xxxx>>10),($c00004).l |
04 | Plane B Name Table Location | 7 6 5 4 3 2 1 0 0 0 0 0 PB3 PB2-PB0
|
move.w #$8400+($xxxx>>13),($c00004).l |
05 | Sprite Table Location | 7 6 5 4 3 2 1 0 ST7 ST6-ST0
|
move.w #$8500+($xxxx>>9),($c00004).l |
06 | 7 6 5 4 3 2 1 0 0 0 SP5 0 0 0 0 0
|
move.w #$8600+($xxxxxx>>11),($c00004).l | |
07 | Background Colour | 7 6 5 4 3 2 1 0 0 0 PL5-PL4 C3-C0
|
move.w #$8700+(xx<<4)+yy,($c00004).l |
08 | Unused | Master System horizontal scroll register | |
09 | Unused | Master System vertical scroll register | |
0A | Horizontal Interrupt Counter | 7 6 5 4 3 2 1 0 H
|
move.w #$8Axx,($c00004).l |
0B | Mode Register 3 | 7 6 5 4 3 2 1 0 0 0 0 0 IE2 VS HS1-HS2
|
move.w #$8Bxx,($c00004).l |
0C | Mode Register 4 | 7 6 5 4 3 2 1 0 RS1 VS HS EP SH LS1-LS0 RS0
|
move.w #$8Cxx,($c00004).l |
0D | Horizontal Scroll Data Location | 7 6 5 4 3 2 1 0 0 HS6 HS5-HS0
|
move.w #$8D00+($xxxx>>10),($c00004).l |
0E | 7 6 5 4 3 2 1 0 0 0 0 PB4 0 0 0 PA0
|
move.w #$8E00+(($xxxxxx&$10000)>>12)+($yyyyyy>>16),($c00004).l | |
0F | Auto-Increment Value | 7 6 5 4 3 2 1 0 INC7-INC0
|
move.w #$8Fxx,($c00004).l |
10 | Plane Size | 7 6 5 4 3 2 1 0 0 0 H1-H0 0 0 W1-W0
|
move.w #$90xx,($c00004).l |
11 | Window Plane Horizontal Position | 7 6 5 4 3 2 1 0 R 0 0 HP4-HP0
|
move.w #$91xx,($c00004).l |
12 | Window Plane Vertical Position | 7 6 5 4 3 2 1 0 D 0 0 VP4-VP0
|
move.w #$92xx,($c00004).l |
13-14 | DMA Length | 7 6 5 4 3 2 1 0 L7-L0 7 6 5 4 3 2 1 0 H7-H0
|
move.w #$9300+(($xxxx>>1)&$FF),($c00004).l move.w #$9400+((($xxxx>>1)&$FF00)>>8),($c00004).l |
15-17 | DMA Source | 7 6 5 4 3 2 1 0 L7-L0 7 6 5 4 3 2 1 0 M7-M0 7 6 5 4 3 2 1 0 T1 T0 H5-H0
|
move.w #$9500+(($xxxxxx>>1)&$FF),($c00004).l move.w #$9600+((($xxxxxx>>1)&$FF00)>>8),($c00004).l move.w #$9700+((($xxxxxx>>1)&$7F0000)>>16),($c00004).l |
Status Register | 7 6 5 4 3 2 1 0 0 0 1 1 0 1 E F 7 6 5 4 3 2 1 0 VI SO SC OD VB HB DMA PAL
|
move.w ($c00004).l,d0 |