Hello,
(Disclaimer: I am making some assumptions in my post so if anything is wrong corrections are much appreciated)
I am at the beginner stages of learning 65816 for SNES (Been at it for about a week). I've been through and re-read as many newbie friendly documents & tutorials as I can find and will continue to do so. These forums have also been a great help in learning. I'm basically hoarding any information I can find, making my own notes from them, going through examples, and reading as much as I can every day.
Everything has been going quite well, but I also feel a lot of concepts are still lost on me particularly when it comes to graphics for the SNES. I've been trying to learn about DMA & HDMA in particular. The process of performing a DMA transfer makes sense, and the examples I've seen I can understand. What I don't fully understand is how everything (NMI, VBlank, DMA, & HDMA) fits in with each other.
For example I've been looking through this tutorial of making a tic-tac-toe game: https://wiki.superfamicom.org/making-a- ... ic-tac-toe
A question about the code:
- Inside .SNESNATIVEVECTOR of header.inc there is this line:
A few general questions:
- It seems like DMA is commonly used in conjunction with NMI & VBlank. In other words a DMA transfer is done in the given period of time in which VBlank occurs is that correct? For example if I want to copy tiles from ROM to VRAM, I would wait for VBlank and then initiate a DMA transfer?
- Assuming the above statement is correct, when should HDMA be used? Nearly all the examples I've seen so far only use DMA. Is HDMA meant to be used in conjunction with DMA? For example could I start a DMA transfer on channel 0 and then an HDMA transfer on channel 1?
- In trying to research this topic a bit I've seen posts saying VBlank is longer than HBlank, is that true? If it is true, does that mean DMA is preferred over HDMA as you'll have a longer amount of time which allows more data to be transferred?
I have so many more questions but lots of them will probably be answered in time and this post is already longer than I wanted it to be. Any help and/or answers are much appreciated. In the meantime I am going to keep researching. Cheers!
(Disclaimer: I am making some assumptions in my post so if anything is wrong corrections are much appreciated)
I am at the beginner stages of learning 65816 for SNES (Been at it for about a week). I've been through and re-read as many newbie friendly documents & tutorials as I can find and will continue to do so. These forums have also been a great help in learning. I'm basically hoarding any information I can find, making my own notes from them, going through examples, and reading as much as I can every day.
Everything has been going quite well, but I also feel a lot of concepts are still lost on me particularly when it comes to graphics for the SNES. I've been trying to learn about DMA & HDMA in particular. The process of performing a DMA transfer makes sense, and the examples I've seen I can understand. What I don't fully understand is how everything (NMI, VBlank, DMA, & HDMA) fits in with each other.
For example I've been looking through this tutorial of making a tic-tac-toe game: https://wiki.superfamicom.org/making-a- ... ic-tac-toe
A question about the code:
- Inside .SNESNATIVEVECTOR of header.inc there is this line:
Code:
NMI VBlank
This means the game goes to the VBlank: routine every single time it is in VBlank? Is the "wai" in the forever: routine necessary in order for this to happen?A few general questions:
- It seems like DMA is commonly used in conjunction with NMI & VBlank. In other words a DMA transfer is done in the given period of time in which VBlank occurs is that correct? For example if I want to copy tiles from ROM to VRAM, I would wait for VBlank and then initiate a DMA transfer?
- Assuming the above statement is correct, when should HDMA be used? Nearly all the examples I've seen so far only use DMA. Is HDMA meant to be used in conjunction with DMA? For example could I start a DMA transfer on channel 0 and then an HDMA transfer on channel 1?
- In trying to research this topic a bit I've seen posts saying VBlank is longer than HBlank, is that true? If it is true, does that mean DMA is preferred over HDMA as you'll have a longer amount of time which allows more data to be transferred?
I have so many more questions but lots of them will probably be answered in time and this post is already longer than I wanted it to be. Any help and/or answers are much appreciated. In the meantime I am going to keep researching. Cheers!