1+ <!doctype html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="utf-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1, minimum-scale=1 " />
6+ < meta name ="generator " content ="pdoc 0.10.0 " />
7+ < title > pyboy.api.constants API documentation</ title >
8+ < meta name ="description " content ="Memory constants used internally to calculate tile and tile map addresses. " />
9+ < link href ='https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css ' rel ='stylesheet '>
10+ < link href ='https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/8.0.0/sanitize.min.css ' rel ='stylesheet '>
11+ < link href ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css " rel ="stylesheet ">
12+ < style > .flex {display : flex !important }body {line-height : 1.5em }# content {padding : 20px }# sidebar {padding : 30px ;overflow : hidden}.http-server-breadcrumbs {font-size : 130% ;margin : 0 0 15px 0 }# footer {font-size : .75em ;padding : 5px 30px ;border-top : 1px solid # ddd ;text-align : right}# footer p {margin : 0 0 0 1em ;display : inline-block}# footer p : last-child {margin-right : 30px }h1 , h2 , h3 , h4 , h5 {font-weight : 300 }h1 {font-size : 2.5em ;line-height : 1.1em }h2 {font-size : 1.75em ;margin : 1em 0 .50em 0 }h3 {font-size : 1.4em ;margin : 25px 0 10px 0 }h4 {margin : 0 ;font-size : 105% }a {color : # 058 ;text-decoration : none;transition : color .3s ease-in-out}a : hover {color : # e82 }.title code {font-weight : bold}h2 [id ^= "header-" ]{margin-top : 2em }.ident {color : # 900 }pre code {background : # f8f8f8 ;font-size : .8em ;line-height : 1.4em }code {background : # f2f2f1 ;padding : 1px 4px ;overflow-wrap : break-word}h1 code {background : transparent}pre {background : # f8f8f8 ;border : 0 ;border-top : 1px solid # ccc ;border-bottom : 1px solid # ccc ;margin : 1em 0 ;padding : 1ex }# http-server-module-list {display : flex;flex-flow : column}# http-server-module-list div {display : flex}# http-server-module-list dt {min-width : 10% }# http-server-module-list p {margin-top : 0 }.toc ul , # index {list-style-type : none;margin : 0 ;padding : 0 }# index code {background : transparent}# index h3 {border-bottom : 1px solid # ddd }# index ul {padding : 0 }# index h4 {font-weight : bold}# index h4 + ul {margin-bottom : .6em }@media (min-width : 200ex ){# index .two-column {column-count : 2 }}@media (min-width : 300ex ){# index .two-column {column-count : 3 }}dl {margin-bottom : 2em }dl dl : last-child {margin-bottom : 4em }dd {margin : 0 0 1em 3em }# header-classes + dl > dd {margin-bottom : 3em }dd dd {margin-left : 2em }dd p {margin : 10px 0 }.name {background : # eee ;font-weight : bold;font-size : .85em ;padding : 5px 10px ;display : inline-block;min-width : 40% }.name : hover {background : # e0e0e0 }.name > span : first-child {white-space : nowrap}.name .class > span : nth-child (2 ){margin-left : .4em }.inherited {color : # 999 ;border-left : 5px solid # eee ;padding-left : 1em }.inheritance em {font-style : normal;font-weight : bold}.desc h2 {font-weight : 400 ;font-size : 1.25em }.desc h3 {font-size : 1em }.desc dt code {background : inherit}.source summary , .git-link-div {color : # 666 ;text-align : right;font-weight : 400 ;font-size : .8em ;text-transform : uppercase}.source summary > * {white-space : nowrap;cursor : pointer}.git-link {color : inherit;margin-left : 1em }.source pre {max-height : 500px ;overflow : auto;margin : 0 }.source pre code {font-size : 12px ;overflow : visible}.hlist {list-style : none}.hlist li {display : inline}.hlist li : after {content : ',\2002' }.hlist li : last-child : after {content : none}.hlist .hlist {display : inline;padding-left : 1em }img {max-width : 100% }.admonition {padding : .1em .5em ;margin-bottom : 1em }.admonition-title {font-weight : bold}.admonition .note , .admonition .info , .admonition .important {background : # aef }.admonition .todo , .admonition .versionadded , .admonition .tip , .admonition .hint {background : # dfd }.admonition .warning , .admonition .versionchanged , .admonition .deprecated {background : # fd4 }.admonition .error , .admonition .danger , .admonition .caution {background : lightpink}</ style >
13+ < style media ="screen and (min-width: 700px) "> @media screen and (min-width : 700px ){# sidebar {width : 30% }# content {width : 70% ;max-width : 100ch ;padding : 3em 4em ;border-left : 1px solid # ddd }pre code {font-size : 0.8em }.item .name {font-size : 1em }main {display : flex;flex-direction : row-reverse;justify-content : flex-end}.toc ul ul , # index ul {padding-left : 1.5em }.toc > ul > li {margin-top : .5em }}</ style >
14+ < style media ="print "> @media print{# sidebar h1 {page-break-before : always}.source {display : none}}@media print{* {background : transparent !important ;color : # 000 !important ;box-shadow : none !important ;text-shadow : none !important }a [href ]: after {content : " (" attr (href) ")" ;font-size : 90% }a [href ][title ]: after {content : none}abbr [title ]: after {content : " (" attr (title) ")" }.ir a : after , a [href ^= "javascript:" ]: after , a [href ^= "#" ]: after {content : "" }pre , blockquote {border : 1px solid # 999 ;page-break-inside : avoid}thead {display : table-header-group}tr , img {page-break-inside : avoid}img {max-width : 100% !important }@page {margin : 0.5cm }p , h2 , h3 {orphans : 3 ;widows : 3 }h1 , h2 , h3 , h4 , h5 , h6 {page-break-after : avoid}}</ style >
15+ < script async src ='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_CHTML '> </ script >
16+ </ head >
17+ < body >
18+ < main >
19+ < article id ="content ">
20+ < header >
21+ < h1 class ="title "> Module < code > pyboy.api.constants</ code > </ h1 >
22+ </ header >
23+ < section id ="section-intro ">
24+ < p > Memory constants used internally to calculate tile and tile map addresses.</ p >
25+ < details class ="source ">
26+ < summary >
27+ < span > Expand source code</ span >
28+ </ summary >
29+ < pre > < code class ="python "> #
30+ # License: See LICENSE.md file
31+ # GitHub: https://github.com/Baekalfen/PyBoy
32+ #
33+ """
34+ Memory constants used internally to calculate tile and tile map addresses.
35+ """
36+
37+ VRAM_OFFSET = 0x8000
38+ """
39+ Start address of VRAM
40+ """
41+ LCDC_OFFSET = 0xFF40
42+ """
43+ LCDC Register
44+ """
45+ OAM_OFFSET = 0xFE00
46+ """
47+ Start address of Object-Attribute-Memory (OAM)
48+ """
49+ LOW_TILEMAP = 0x1800 + VRAM_OFFSET
50+ """
51+ Start address of lower tilemap
52+ """
53+ HIGH_TILEMAP = 0x1C00 + VRAM_OFFSET
54+ """
55+ Start address of high tilemap
56+ """
57+ LOW_TILEDATA = VRAM_OFFSET
58+ """
59+ Start address of lower tile data
60+ """
61+ LOW_TILEDATA_NTILES = 0x100
62+ """
63+ Number of tiles in lower tile data
64+ """
65+ HIGH_TILEDATA = 0x800 + VRAM_OFFSET
66+ """
67+ Start address of high tile data
68+ """
69+ TILES = 384
70+ """
71+ Number of tiles supported on Game Boy DMG (non-color)
72+ """
73+ TILES_CGB = 768
74+ """
75+ Number of tiles supported on Game Boy Color
76+ """
77+ SPRITES = 40
78+ """
79+ Number of sprites supported
80+ """
81+ ROWS = 144
82+ """
83+ Rows (horizontal lines) on the screen
84+ """
85+ COLS = 160
86+ """
87+ Columns (vertical lines) on the screen
88+ """</ code > </ pre >
89+ </ details >
90+ </ section >
91+ < section >
92+ </ section >
93+ < section >
94+ < h2 class ="section-title " id ="header-variables "> Global variables</ h2 >
95+ < dl >
96+ < dt id ="pyboy.api.constants.VRAM_OFFSET "> < code class ="name "> var < span class ="ident "> VRAM_OFFSET</ span > </ code > </ dt >
97+ < dd >
98+ < section class ="desc "> < p > Start address of VRAM</ p > </ section >
99+ </ dd >
100+ < dt id ="pyboy.api.constants.LCDC_OFFSET "> < code class ="name "> var < span class ="ident "> LCDC_OFFSET</ span > </ code > </ dt >
101+ < dd >
102+ < section class ="desc "> < p > LCDC Register</ p > </ section >
103+ </ dd >
104+ < dt id ="pyboy.api.constants.OAM_OFFSET "> < code class ="name "> var < span class ="ident "> OAM_OFFSET</ span > </ code > </ dt >
105+ < dd >
106+ < section class ="desc "> < p > Start address of Object-Attribute-Memory (OAM)</ p > </ section >
107+ </ dd >
108+ < dt id ="pyboy.api.constants.LOW_TILEMAP "> < code class ="name "> var < span class ="ident "> LOW_TILEMAP</ span > </ code > </ dt >
109+ < dd >
110+ < section class ="desc "> < p > Start address of lower tilemap</ p > </ section >
111+ </ dd >
112+ < dt id ="pyboy.api.constants.HIGH_TILEMAP "> < code class ="name "> var < span class ="ident "> HIGH_TILEMAP</ span > </ code > </ dt >
113+ < dd >
114+ < section class ="desc "> < p > Start address of high tilemap</ p > </ section >
115+ </ dd >
116+ < dt id ="pyboy.api.constants.LOW_TILEDATA "> < code class ="name "> var < span class ="ident "> LOW_TILEDATA</ span > </ code > </ dt >
117+ < dd >
118+ < section class ="desc "> < p > Start address of lower tile data</ p > </ section >
119+ </ dd >
120+ < dt id ="pyboy.api.constants.LOW_TILEDATA_NTILES "> < code class ="name "> var < span class ="ident "> LOW_TILEDATA_NTILES</ span > </ code > </ dt >
121+ < dd >
122+ < section class ="desc "> < p > Number of tiles in lower tile data</ p > </ section >
123+ </ dd >
124+ < dt id ="pyboy.api.constants.HIGH_TILEDATA "> < code class ="name "> var < span class ="ident "> HIGH_TILEDATA</ span > </ code > </ dt >
125+ < dd >
126+ < section class ="desc "> < p > Start address of high tile data</ p > </ section >
127+ </ dd >
128+ < dt id ="pyboy.api.constants.TILES "> < code class ="name "> var < span class ="ident "> TILES</ span > </ code > </ dt >
129+ < dd >
130+ < section class ="desc "> < p > Number of tiles supported on Game Boy DMG (non-color)</ p > </ section >
131+ </ dd >
132+ < dt id ="pyboy.api.constants.TILES_CGB "> < code class ="name "> var < span class ="ident "> TILES_CGB</ span > </ code > </ dt >
133+ < dd >
134+ < section class ="desc "> < p > Number of tiles supported on Game Boy Color</ p > </ section >
135+ </ dd >
136+ < dt id ="pyboy.api.constants.SPRITES "> < code class ="name "> var < span class ="ident "> SPRITES</ span > </ code > </ dt >
137+ < dd >
138+ < section class ="desc "> < p > Number of sprites supported</ p > </ section >
139+ </ dd >
140+ < dt id ="pyboy.api.constants.ROWS "> < code class ="name "> var < span class ="ident "> ROWS</ span > </ code > </ dt >
141+ < dd >
142+ < section class ="desc "> < p > Rows (horizontal lines) on the screen</ p > </ section >
143+ </ dd >
144+ < dt id ="pyboy.api.constants.COLS "> < code class ="name "> var < span class ="ident "> COLS</ span > </ code > </ dt >
145+ < dd >
146+ < section class ="desc "> < p > Columns (vertical lines) on the screen</ p > </ section >
147+ </ dd >
148+ </ dl >
149+ </ section >
150+ < section >
151+ </ section >
152+ < section >
153+ </ section >
154+ </ article >
155+ < nav id ="sidebar ">
156+ < h1 > Index</ h1 >
157+ < div class ="toc ">
158+ < ul > </ ul >
159+ </ div >
160+ < ul id ="index ">
161+ < li > < h3 > Super-module</ h3 >
162+ < ul >
163+ < li > < code > < a title ="pyboy.api " href ="index.html "> pyboy.api</ a > </ code > </ li >
164+ </ ul >
165+ </ li >
166+ < li > < h3 > < a href ="#header-variables "> Global variables</ a > </ h3 >
167+ < ul class ="two-column ">
168+ < li > < code > < a title ="pyboy.api.constants.VRAM_OFFSET " href ="#pyboy.api.constants.VRAM_OFFSET "> VRAM_OFFSET</ a > </ code > </ li >
169+ < li > < code > < a title ="pyboy.api.constants.LCDC_OFFSET " href ="#pyboy.api.constants.LCDC_OFFSET "> LCDC_OFFSET</ a > </ code > </ li >
170+ < li > < code > < a title ="pyboy.api.constants.OAM_OFFSET " href ="#pyboy.api.constants.OAM_OFFSET "> OAM_OFFSET</ a > </ code > </ li >
171+ < li > < code > < a title ="pyboy.api.constants.LOW_TILEMAP " href ="#pyboy.api.constants.LOW_TILEMAP "> LOW_TILEMAP</ a > </ code > </ li >
172+ < li > < code > < a title ="pyboy.api.constants.HIGH_TILEMAP " href ="#pyboy.api.constants.HIGH_TILEMAP "> HIGH_TILEMAP</ a > </ code > </ li >
173+ < li > < code > < a title ="pyboy.api.constants.LOW_TILEDATA " href ="#pyboy.api.constants.LOW_TILEDATA "> LOW_TILEDATA</ a > </ code > </ li >
174+ < li > < code > < a title ="pyboy.api.constants.LOW_TILEDATA_NTILES " href ="#pyboy.api.constants.LOW_TILEDATA_NTILES "> LOW_TILEDATA_NTILES</ a > </ code > </ li >
175+ < li > < code > < a title ="pyboy.api.constants.HIGH_TILEDATA " href ="#pyboy.api.constants.HIGH_TILEDATA "> HIGH_TILEDATA</ a > </ code > </ li >
176+ < li > < code > < a title ="pyboy.api.constants.TILES " href ="#pyboy.api.constants.TILES "> TILES</ a > </ code > </ li >
177+ < li > < code > < a title ="pyboy.api.constants.TILES_CGB " href ="#pyboy.api.constants.TILES_CGB "> TILES_CGB</ a > </ code > </ li >
178+ < li > < code > < a title ="pyboy.api.constants.SPRITES " href ="#pyboy.api.constants.SPRITES "> SPRITES</ a > </ code > </ li >
179+ < li > < code > < a title ="pyboy.api.constants.ROWS " href ="#pyboy.api.constants.ROWS "> ROWS</ a > </ code > </ li >
180+ < li > < code > < a title ="pyboy.api.constants.COLS " href ="#pyboy.api.constants.COLS "> COLS</ a > </ code > </ li >
181+ </ ul >
182+ </ li >
183+ </ ul >
184+ </ nav >
185+ </ main >
186+ < footer id ="footer ">
187+ < p > Generated by < a href ="https://pdoc3.github.io/pdoc "> < cite > pdoc</ cite > 0.10.0</ a > .</ p >
188+ </ footer >
189+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js "> </ script >
190+ < script > hljs . initHighlightingOnLoad ( ) </ script >
191+ </ body >
192+ </ html >
0 commit comments