-
-
Notifications
You must be signed in to change notification settings - Fork 135
Specified the status of the VRAM DMA register once a transfer is done. #624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
4b39a2d
333c116
f03e6f7
df09986
d0e8aef
7555343
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -39,13 +39,34 @@ tested on Echo RAM, OAM, FEXX, IO and HRAM\]. Trying to specify a source | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| address in VRAM will cause garbage to be copied. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The four lower bits of this address will be ignored and treated as 0. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| After a transfer the address contained in this register pair is | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| by $10 for each block of $10 bytes transfered, these | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| registers being write-only, this can only be observed by doing another | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transfer without updating these registers. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #### FF53–FF54 — HDMA3, HDMA4 (CGB Mode only): VRAM DMA destination (high, low) \[write-only\] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| These two registers specify the address within 8000-9FF0 to which the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data will be copied. Only bits 12-4 are respected; others are ignored. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The four lower bits of this address will be ignored and treated as 0. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #### State of the VRAM DMA source/destination registers after a transfer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| After a transfer, the source/destination registers are incremented by $10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for each block of $10 bytes transfered. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Despite both the VRAM DMA source/destination registers being write-only, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| knowing their state after a transfer can turn useful when performing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| multiple transfer in a row. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| For instance, a transfer of one large block is mostly equivalent to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| multiple transfers of smaller blocks, without needing to update the source | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nor the destination registers between each of the smaller transfers. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Another use case would be to fill VRAM with the same $10 bytes block repeated | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| all over, as only the source address register would need be updated after each | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transfer, the destination register being automatically incremented by | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| the block size after each transfer. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+42
to
+69
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO the "State of the VRAM DMA source/destination registers after a transfer" is redundant and just add noise to the page. I think the best way representing this info is by adding the lines you added to Something like this:
Suggested change
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've found that it makes sense to describe the overall functioning of the system in a single place, so that the reader can start to form a vague mental picture before getting into the individual components; otherwise, IME, the scattered information is very hard to assemble into the big picture. This line of reasoning is what has led us to creating the Graphics or Audio introduction pages.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I pretty much agree with you about the overview sections for complex systems, I just don't think that this specific case (post-transfer register state) rises to that level. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #### FF55 — HDMA5 (CGB Mode only): VRAM DMA length/mode/start | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| These registers are used to initiate a DMA transfer from ROM or RAM to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this can be moved to a footnote (the fact that they cannot be observed directly etc)