Jump to content

Ds Memory Map


Federelli

Recommended Posts

Two9A, i believe you've seen this, just in case i'll post it here.

 

DS Memory Map

-------------

 

ITCM: 0x01ff8000 - 0x01ffffff

Main memory: 0x02000000 - 0x02400000

Main ext: 0x02000000 - 0x02800000

WRAM: 0x037f8000 - 0x037fffff

I/O regs: 0x04000000 - 0x05000000

BG Palette: 0x05000000 - 0x05000200

OBJ Pal: 0x05000200 - 0x05000400

DB BG Pal: 0x05000400 - 0x05000600

DB OBJ Pal: 0x05000600 - 0x05000800

BG VRAM: 0x06000000 - 0x06080000

DB BG VRAM: 0x06200000 - 0x06220000

OBJ VRAM: 0x06400000 - 0x06440000

DB OBJ VRAM: 0x06600000 - 0x06620000

LCDC VRAM: 0x06800000 - 0x068A0000

OAM: 0x07000000 - 0x07000400

DB OAM: 0x07000400 - 0x07000800

Cart ROM: 0x08000000 - 0x0A000000

Cart RAM: 0x0A000000 - 0x0A010000

 

BIOS: 0xFFFF0000 - 0xFFFF8000

(Reset vector at start of BIOS)

 

I/O

---

 

-------------------------------------------------GX

DISPCNT: 000h b31 = O

b30 = BG

b29-27 = BGSCREENOFFSET

b26-24 = BGCHAROFFSET

b23 = OH

b22-20 = EXOBJ

b22-21 = EXOBJ_BM

b20 = EXOBJ_CH

b19-18 = VRAM

b17-16 = MODE

b15 = OW

b14 = W1

b13 = W0

b12-08 = DISPLAY

b07 = BLANK

b06-04 = OBJMAP

b06-05 = OBJMAP_BM

b04 = OBJMAP_CH 0 = 2D object map

1 = 1D object map

b03 = BG02D3D 0 = BG0 is 2D

1 = BG0 is 3D

b02-00 = BGMODE

DISPSTAT: 004h b15-07 = VCOUNTER

b05 = VQI

b04 = HBI

b03 = VBI

b02 = LYC

b01 = HBLK

b00 = VBLK

VCOUNT: 006h b08-00 valid

---------------------------------------------------G2

BG0CNT: 008h b15-14 = SCREENSIZE

b13 = BGPLTTSLOT

b12-08 = SCREENBASE

b07 = COLORMODE

b06 = MOSAIC

b05-02 = CHARBASE

b01-00 = PRIORITY

BG1CNT: 00Ah b15-14 = SCREENSIZE

b13 = BGPLTTSLOT

b12-08 = SCREENBASE

b07 = COLORMODE

b06 = MOSAIC

b05-02 = CHARBASE

b01-00 = PRIORITY

BG2CNT: 00Ch b15-14 = SCREENSIZE

b13 = BGPLTTSLOT

b12-08 = SCREENBASE

b07 = COLORMODE

b06 = MOSAIC

b05-02 = CHARBASE

b01-00 = PRIORITY

BG3CNT: 00Eh b15-14 = SCREENSIZE

b13 = BGPLTTSLOT

b12-08 = SCREENBASE

b07 = COLORMODE

b06 = MOSAIC

b05-02 = CHARBASE

b01-00 = PRIORITY

BG0OFS: 010h

HOFS: 010h b08-00 valid

VOFS: 012h b08-00 valid

BG1OFS: 014h

HOFS: 014h b08-00 valid

VOFS: 016h b08-00 valid

BG2OFS: 018h

HOFS: 018h b08-00 valid

VOFS: 01Ah b08-00 valid

BG3OFS: 01Ch

HOFS: 01Ch b08-00 valid

VOFS: 01Eh b08-00 valid

BG2PA: 020h b15 = S

b14-08 = INTEGER_DX

b07-00 = DECIMAL_DX

BG2PB: 022h b15 = S

b14-08 = INTEGER_DMX

b07-00 = DECIMAL_DMX

BG2PC: 024h b15 = S

b14-08 = INTEGER_DY

b07-00 = DECIMAL_DY

BG2PD: 026h b15 = S

b14-08 = INTEGER_DMY

b07-00 = DECIMAL_DMY

BG2X: 028h b27 = S

b26-08 = INTEGER_SX

b07-00 = DECIMAL_SX

BG2Y: 02Ch b27 = S

b26-08 = INTEGER_SX

b07-00 = DECIMAL_SX

BG3PA: 030h b15 = S

b14-08 = INTEGER_DX

b07-00 = DECIMAL_DX

BG3PB: 032h b15 = S

b14-08 = INTEGER_DMX

b07-00 = DECIMAL_DMX

BG3PC: 034h b15 = S

b14-08 = INTEGER_DY

b07-00 = DECIMAL_DY

BG3PD: 036h b15 = S

b14-08 = INTEGER_DMY

b07-00 = DECIMAL_DMY

BG3X: 038h b27 = S

b26-08 = INTEGER_SX

b07-00 = DECIMAL_SX

BG3Y: 03Ch b27 = S

b26-08 = INTEGER_SX

b07-00 = DECIMAL_SX

WIN0H: 040h b15-08 = LEFTX

b07-00 = RIGHTX

WIN1H: 042h b15-08 = LEFTX

b07-00 = RIGHTX

WIN0V: 044h b15-08 = UPY

b07-00 = DOWNY

WIN1V: 046h b15-08 = UPY

b07-00 = DOWNY

WININ: 048h b13-08 = WIN1IN

b05-00 = WIN0IN

WINOUT: 04Ah b13-08 = OBJWININ

b05-00 = WINOUT

MOSAIC: 04Ch b15-12 = OBJVSIZE

b11-08 = OBJHSIZE

b07-04 = BGVSIZE

b03-00 = BGHSIZE

BLDCNT: 050h b13-08 = PLANE2

b07-06 = EFFECT

b05-00 = PLANE1

BLDALPHA: 052h b12-08 = EVB

b04-00 = EVA

BLDY: 054h b12-08 = EVY

--------------------------------------------------G3X

DISP3DCNT: 060h b14 = PRI

b13 = GO

b12 = RO

b11-08 = FOG_SHIFT

b07 = FME

b06 = FMOD

b04 = EME

b04 = AAE

b03 = ABE

b02 = ATE

b01 = THS

b00 = TME

--------------------------------------------------EXI

SIODATA32: 120h b31-16 = H_SHIFT

b15-00 = L_SHIFT

SIOCNT: 128h b03 = TSEND

b02 = TRECV

SIOSEL: 12Ch b00 = SEL

---------------------------------------------------CP

DIVCNT: 280h b15 = BUSY

b14 = DIV0

b01-00 = MODE

DIV_NUMER: 290h

_L: 290h

_H: 294h

DIV_DENOM: 298h

_L: 298h

_H: 29Ch

DIV_RESULT: 2A0h

_L: 2A0h

_H: 2A4h

DIVREM_RESULT: 2A8h

_L: 2A8h

_H: 2ACh

SQRTCNT: 2B0h b15 = BUSY

b00 = MODE

SQRT_RESULT: 2B4h

SQRT_PARAM: 2B8h

_L: 2B8h

_H: 2BCh

---------------------------------------------------G3X

RDLINES_COUNT: 320h b05-00 = RENDERED_LINES

EDGE_COLOR_0: 330h

_L: 330h b14-10 = BLUE0

b09-05 = GREEN0

b04-00 = RED0

_H: 332h b14-10 = BLUE1

b09-05 = GREEN1

b04-00 = RED1

EDGE_COLOR_1: 334h

_L: 334h b14-10 = BLUE2

b09-05 = GREEN2

b04-00 = RED2

_H: 336h b14-10 = BLUE3

b09-05 = GREEN3

b04-00 = RED3

EDGE_COLOR_2: 338h

_L: 338h b14-10 = BLUE4

b09-05 = GREEN4

b04-00 = RED4

_H: 33Ah b14-10 = BLUE5

b09-05 = GREEN5

b04-00 = RED5

 

EDGE_COLOR_3: 33Ch

_L: 33Ch b14-10 = BLUE6

b09-05 = GREEN6

b04-00 = RED6

_H: 33Eh b14-10 = BLUE7

b09-05 = GREEN7

b04-00 = RED7

ALPHA_TEST_REF: 340h b04-00 = ALPHA_REFERENCE

CLEAR_COLOR: 350h b31-24 = POLYGONID

b20-16 = ALPHA

b15 = F

b14-10 = BLUE

b09-05 = GREEN

b04-00 = RED

CLEAR_DEPTH: 354h b14-00 = CLEARDEPTH

CLRIMAGE_OFFSET: 356h b15-08 = OFFSETY

b07-00 = OFFSETX

FOG_COLOR: 358h b20-16 = ALPHA

b14-10 = BLUE

b09-05 = GREEN

b04-00 = RED

FOG_OFFSET: 35Ch b14-00 = FOG_OFFSET

FOG_TABLE_0: 360h

_L: 360h b14-08 = DENSITY1

b06-00 = DENSITY0

_H: 362h b14-08 = DENSITY3

b06-00 = DENSITY2

_1: 364h

_L: 364h b14-08 = DENSITY5

b06-00 = DENSITY4

_H: 366h b14-08 = DENSITY7

b06-00 = DENSITY6

_2: 368h

_L: 368h b14-08 = DENSITY9

b06-00 = DENSITY8

_H: 36Ah b14-08 = DENSITY11

b06-00 = DENSITY10

_3: 36Ch

_L: 36Ch b14-08 = DENSITY13

b06-00 = DENSITY12

_H: 36Eh b14-08 = DENSITY15

b06-00 = DENSITY14

_4: 370h

_L: 370h b14-08 = DENSITY17

b06-00 = DENSITY16

_H: 372h b14-08 = DENSITY19

b06-00 = DENSITY18

_5: 374h

_L: 374h b14-08 = DENSITY21

b06-00 = DENSITY20

_H: 376h b14-08 = DENSITY23

b06-00 = DENSITY22

_6: 378h

_L: 378h b14-08 = DENSITY25

b06-00 = DENSITY24

_H: 37Ah b14-08 = DENSITY27

b06-00 = DENSITY26

_7: 37Ch

_L: 37Ch b14-08 = DENSITY29

b06-00 = DENSITY28

_H: 37Eh b14-08 = DENSITY31

b06-00 = DENSITY30

TOON_TABLE_0: 380h

_L: 380h b14-10 = BLUE0

b09-05 = GREEN0

b04-00 = RED0

_H: 382h b14-10 = BLUE1

b09-05 = GREEN1

b04-00 = RED1

_1: 384h

_L: 384h b14-10 = BLUE2

b09-05 = GREEN2

b04-00 = RED2

_H: 386h b14-10 = BLUE3

b09-05 = GREEN3

b04-00 = RED3

_2: 388h

_L: 388h b14-10 = BLUE4

b09-05 = GREEN4

b04-00 = RED4

_H: 38Ah b14-10 = BLUE5

b09-05 = GREEN5

b04-00 = RED5

_3: 38Ch

_L: 38Ch b14-10 = BLUE6

b09-05 = GREEN6

b04-00 = RED6

_H: 38Eh b14-10 = BLUE7

b09-05 = GREEN7

b04-00 = RED7

_4: 390h

_L: 390h b14-10 = BLUE8

b09-05 = GREEN8

b04-00 = RED8

_H: 392h b14-10 = BLUE9

b09-05 = GREEN9

b04-00 = RED9

_5: 394h

_L: 394h b14-10 = BLUE10

b09-05 = GREEN10

b04-00 = RED10

_H: 396h b14-10 = BLUE11

b09-05 = GREEN11

b04-00 = RED11

_6: 398h

_L: 398h b14-10 = BLUE12

b09-05 = GREEN12

b04-00 = RED12

_H: 39Ah b14-10 = BLUE13

b09-05 = GREEN13

b04-00 = RED13

_7: 39Ch

_L: 39Ch b14-10 = BLUE14

b09-05 = GREEN14

b04-00 = RED14

_H: 39Eh b14-10 = BLUE15

b09-05 = GREEN15

b04-00 = RED15

_8: 3A0h

_L: 3A0h b14-10 = BLUE16

b09-05 = GREEN16

b04-00 = RED16

_H: 3A2h b14-10 = BLUE17

b09-05 = GREEN17

b04-00 = RED17

_9: 3A4h

_L: 3A4h b14-10 = BLUE18

b09-05 = GREEN18

b04-00 = RED18

_H: 3A6h b14-10 = BLUE19

b09-05 = GREEN19

b04-00 = RED19

_10: 3A8h

_L: 3A8h b14-10 = BLUE20

b09-05 = GREEN20

b04-00 = RED20

_H: 3AAh b14-10 = BLUE21

b09-05 = GREEN21

b04-00 = RED21

_11: 3ACh

_L: 3ACh b14-10 = BLUE22

b09-05 = GREEN22

b04-00 = RED22

_H: 3AEh b14-10 = BLUE23

b09-05 = GREEN23

b04-00 = RED23

_12: 3B0h

_L: 3B0h b14-10 = BLUE24

b09-05 = GREEN24

b04-00 = RED24

_H: 3B2h b14-10 = BLUE25

b09-05 = GREEN25

b04-00 = RED25

_13: 3B4h

_L: 3B4h b14-10 = BLUE26

b09-05 = GREEN26

b04-00 = RED26

_H: 3B6h b14-10 = BLUE27

b09-05 = GREEN27

b04-00 = RED27

_14: 3B8h

_L: 3B8h b14-10 = BLUE28

b09-05 = GREEN28

b04-00 = RED28

_H: 3BAh b14-10 = BLUE29

b09-05 = GREEN29

b04-00 = RED29

_15: 3BCh

_L: 3BCh b14-10 = BLUE30

b09-05 = GREEN30

b04-00 = RED30

_H: 3BEh b14-10 = BLUE31

b09-05 = GREEN31

b04-00 = RED31

GXFIFO: 400h

---------------------------------------------------G3

MTX_MODE: 440h b01-00 = M

MTX_PUSH: 444h

MTX_POP: 448h b05 = S

b04-00 = INT

MTX_STORE: 44Ch b04-00 = INDEX

MTX_RESTORE: 450h b04-00 = INDEX

MTX_IDENTITY: 454h

 

 

MTX_LOAD_4x4: 458h b31 = S

b30-12 = INTEGER_M44

b11-00 = DECIMAL_M44

MTX_LOAD_4x3: 45Ch b31 = S

b30-12 = INTEGER_M43

b11-00 = DECIMAL_M43

MTX_MULT_4x4: 460h b31 = S

b30-12 = INTEGER_M44

b11-00 = DECIMAL_M44

MTX_MULT_4x3: 464h b31 = S

b30-12 = INTEGER_M43

b11-00 = DECIMAL_M43

MTX_MULT_3x3: 468h b31 = S

b30-12 = INTEGER_M33

b11-00 = DECIMAL_M33

MTX_SCALE: 46Ch b31 = S

b30-12 = INTEGER_SCALE

b11-00 = DECIMAL_SCALE

MTX_TRANS: 470h b31 = S

b30-12 = INTEGER_TRANSLATE

b11-00 = DECIMAL_TRANSLATE

COLOR: 480h b14-10 = BLUE

b09-05 = GREEN

b04-00 = RED

NORMAL: 484h b29 = SZ

b28-20 = NZ

b19 = SY

b18-10 = NY

b09 = SX

b08-00 = NX

TEXCOORD: 488h b31 = ST

b30-20 = INTEGER_T

b19-16 = DECIMAL_T

b15 = SS

b14-04 = INTEGER_S

b03-00 = DECIMAL_S

VTX_16: 48Ch b31 = SY

b30-28 = INTEGER_Y

b27-16 = DECIMAL_Y

b15 = SX

b14-12 = INTEGER_X

b11-00 = DECIMAL_X

VTX_10: 490h b29 = SZ

b28-26 = INT_Z

b25-20 = DECIMAL_Z

b19 = SY

b18-16 = INT_Y

b15-10 = DECIMAL_Y

b09 = SX

b08-06 = INT_X

b05-00 = DECIMAL_X

VTX_XY: 494h b31 = SY

b30-28 = INTEGER_Y

b27-16 = DECIMAL_Y

b15 = SX

b14-12 = INTEGER_X

b11-00 = DECIMAL_X

VTX_XZ: 498h b31 = SZ

b30-28 = INTEGER_Z

b27-16 = DECIMAL_Z

b15 = SX

b14-12 = INTEGER_X

b11-00 = DECIMAL_X

VTX_YZ: 49Ch b31 = SZ

b30-28 = INTEGER_Z

b27-16 = DECIMAL_Z

b15 = SY

b14-12 = INTEGER_Y

b11-00 = DECIMAL_Y

VTX_DIFF: 4A0h b29 = SZ

b28-20 = DECIMAL_Z

b19 = SY

b18-10 = DECIMAL_Y

b09 = SX

b08-00 = DECIMAL_X

POLYGON_ATTR: 4A4h b29-24 = ID

b20-16 = ALPHA

b15 = FE

b14 = DT

b13 = D1

b12 = FC

b11 = XL

b07 = FR

b06 = BK

b05-04 = PM

b03-00 = LE

TEXIMAGE_PARAM: 4A8h b31-30 = TGEN

b29 = TR

b28-26 = TEXFMT

b25-23 = T_SIZE

b22-20 = V_SIZE

b19 = FT

b18 = FS

b17 = RT

b16 = RS

b15-00 = TEX_ADDR

TEXPLTT_BASE: 4ACh b12-00 = BASE

DIF_AMB: 4C0h b30-26 = AMBIENT_BLUE

b25-21 = AMBIENT_GREEN

b20-16 = AMBIENT_RED

b15 = C

b14-10 = DIFFUSE_BLUE

b09-05 = DIFFUSE_GREEN

b04-00 = DIFFUSE_RED

SPE_EMI: 4C4h b30-26 = EMISSION_BLUE

b25-21 = EMISSION_GREEN

b20-16 = EMISSION_RED

b15 = S

b14-10 = SPECULAR_BLUE

b09-05 = SPECULAR_GREEN

b04-00 = SPECULAR_RED

LIGHT_VECTOR: 4C8h b31-30 = LNUM

b29 = SZ

b28-20 = DECIMAL_Z

b19 = SY

b18-10 = DECIMAL_Y

b09 = SX

b08-00 = DECIMAL_X

LIGHT_COLOR: 4CCh b31-30 = LNUM

b14-10 = BLUE

b09-05 = GREEN

b04-00 = RED

SHININESS: 4D0h b31-24 = SHININESS3

b23-16 = SHININESS2

b15-08 = SHININESS1

b07-00 = SHININESS0

BEGIN_VTXS: 500h b01-00 = TYPE

END_VTXS: 504h

SWAP_BUFFERS: 540h b01 = DP

b00 = XS

VIEWPORT: 580h b31-24 = INTEGER_Y2

b23-16 = INTEGER_X2

b15-08 = INTEGER_Y1

b07-00 = INTEGER_X1

BOX_TEST: 5C0h b31 = SY

b30-28 = INT_Y

b27-16 = DECIMAL_Y

b15 = SX

b14-12 = INT_X

b11-00 = DECIMAL_X

POS_TEST: 5C4h b31 = SY

b30-28 = INT_Y

b27-16 = DECIMAL_Y

b15 = SX

b14-12 = INT_X

b11-00 = DECIMAL_X

VEC_TEST: 5C8h b29 = SZ

b28-20 = DECIMAL_Z

b19 = SY

b18-10 = DECIMAL_Y

b09 = SX

b08-00 = DECIMAL_X

---------------------------------------------------G3X

GXSTAT: 600h b31-30 = FI

b29 = FC

b27 = B

b26 = E

b25 = H

b24 = F

b23-16 = FIFOCNT

b15 = SE

b14 = SB

b13 = PJ

b12-08 = PV

b01 = TR

b00 = TB

LISTRAM_COUNT: 604h b11-00 = RAMCNT

VTXRAM_COUNT: 606h b11-00 = VTXCNT

DISP_1DOT_DEPTH: 610h b14-03 = INTEGER_W

b02-00 = DECIMAL_W

POS_RESULT_X: 620h b31 = SX

b30-12 = INTEGER_X

b11-00 = DECIMAL_X

 

 

POS_RESULT_Y: 624h b31 = SY

b30-12 = INTEGER_Y

b11-00 = DECIMAL_Y

POS_RESULT_Z: 628h b31 = SZ

b30-12 = INTEGER_Z

b11-00 = DECIMAL_Z

POS_RESULT_W: 62Ch b31 = SW

b30-12 = INTEGER_W

b11-00 = DECIMAL_W

VEC_RESULT_X: 630h b15 = SX

b14-12 = INTEGER_X

b11-00 = DECIMAL_X

VEC_RESULT_Y: 632h b15 = SY

b14-12 = INTEGER_Y

b11-00 = DECIMAL_Y

VEC_RESULT_Z: 634h b15 = SZ

b14-12 = INTEGER_Z

b11-00 = DECIMAL_Z

CLIPMTX_RESULT_0: 640h b31 = S

b30-12 = INTEGER_m0

b11-00 = DECIMAL_m0

_1: 644h b31 = S

b30-12 = INTEGER_m1

b11-00 = DECIMAL_m1

_2: 648h b31 = S

b30-12 = INTEGER_m2

b11-00 = DECIMAL_m2

_3: 64Ch b31 = S

b30-12 = INTEGER_m3

b11-00 = DECIMAL_m3

_4: 650h b31 = S

b30-12 = INTEGER_m4

b11-00 = DECIMAL_m4

_5: 654h b31 = S

b30-12 = INTEGER_m5

b11-00 = DECIMAL_m5

_6: 658h b31 = S

b30-12 = INTEGER_m6

b11-00 = DECIMAL_m6

_7: 65Ch b31 = S

b30-12 = INTEGER_m7

b11-00 = DECIMAL_m7

_8: 660h b31 = S

b30-12 = INTEGER_m8

b11-00 = DECIMAL_m8

_9: 664h b31 = S

b30-12 = INTEGER_m9

b11-00 = DECIMAL_m9

_10: 668h b31 = S

b30-12 = INTEGER_m10

b11-00 = DECIMAL_m10

_11: 66Ch b31 = S

b30-12 = INTEGER_m11

b11-00 = DECIMAL_m11

_12: 670h b31 = S

b30-12 = INTEGER_m12

b11-00 = DECIMAL_m12

_13: 674h b31 = S

b30-12 = INTEGER_m13

b11-00 = DECIMAL_m13

_14: 678h b31 = S

b30-12 = INTEGER_m14

b11-00 = DECIMAL_m14

_15: 67Ch b31 = S

b30-12 = INTEGER_m15

b11-00 = DECIMAL_m15

VECMTX_RESULT_0: 680h b31 = S

b30-12 = INTEGER_m0

b11-00 = DECIMAL_m0

_1: 684h b31 = S

b30-12 = INTEGER_m1

b11-00 = DECIMAL_m1

_2: 688h b31 = S

b30-12 = INTEGER_m2

b11-00 = DECIMAL_m2

_3: 68Ch b31 = S

b30-12 = INTEGER_m3

b11-00 = DECIMAL_m3

_4: 690h b31 = S

b30-12 = INTEGER_m4

b11-00 = DECIMAL_m4

_5: 694h b31 = S

b30-12 = INTEGER_m5

b11-00 = DECIMAL_m5

_6: 698h b31 = S

b30-12 = INTEGER_m6

b11-00 = DECIMAL_m6

_7: 69Ch b31 = S

b30-12 = INTEGER_m7

b11-00 = DECIMAL_m7

_8: 6A0h b31 = S

b30-12 = INTEGER_m8

b11-00 = DECIMAL_m8

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...