File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,16 @@ tile is "NN & $FE", and the bottom 8x8 tile is "NN | $01".
54
54
Bit2-0 Palette number **CGB Mode Only** (OBP0-7)
55
55
```
56
56
57
+ ## Writing data to OAM
58
+
59
+ The recommended method is to write the data to a buffer in normal RAM
60
+ (typically WRAM) first, then to copy that buffer to OAM using
61
+ [ the DMA transfer functionality] ( < #OAM DMA Transfer > ) .
62
+
63
+ While it is also possible to write data directly to the OAM area
64
+ [ by accessing it normally] ( < #OAM (memory area at $FE00-$FE9F) is accessible during Modes 0-1 > ) ,
65
+ this only works [ during the HBlank and VBlank periods] ( < #LCD Status Register > ) .
66
+
57
67
## Object Priority and Conflicts
58
68
59
69
There are two kinds of "priorities" as far as objects are concerned.
@@ -113,12 +123,3 @@ This can be exploited to only hide parts of an object behind the background
113
123
A similar behaviour [ can be seen on the NES] ( https://forums.nesdev.com/viewtopic.php?f=10&t=16861 ) ).
114
124
115
125
:::
116
-
117
- ## Writing Data to OAM
118
-
119
- The recommended method is to write the data to normal RAM first, and to
120
- copy that RAM to OAM by using the DMA transfer function, initiated
121
- through DMA register (FF46). Besides, it is also possible to
122
- write data directly to the OAM area by using normal LD instructions, but this
123
- works only during the HBlank and VBlank periods. The current state of
124
- the LCD controller can be read out from the STAT register (FF41).
You can’t perform that action at this time.
0 commit comments