Hi all, I am currently writing an SNES emulator, and have been implementing the CPU so far. I have implemented about 120 opcodes and have gotten it to be able to execute some code in Super Mario World ROM. For debugging, I have it output some disassembly. I have gotten to the point where the SMW rom executes what looks to be a DMA transfer... I have never written an emulator for a game console before and was wondering if anyone here could point me in the right direction on how DMA transfer will work in an emulated sense.
My assumption is that CPU loop stops and we actually modify the array that represents RAM directly and move the PC value the number of bytes that were read? (In a sense, this would behave like an interrupt, right?)
The piece of disassembly I have encountered is along the lines of:
At $9277, I see there are bytes $42 and $26 loaded. Which prompts a series of consecutive bytes to follow:
I actually am using a disassembly for reference and it looks to be referring to this piece of code here:
Site for reference:
http://caffie.net:31415/root/smw-irq/bl ... ank_00.asm
Any thoughts?
Thanks!
My assumption is that CPU loop stops and we actually modify the array that represents RAM directly and move the PC value the number of bytes that were read? (In a sense, this would behave like an interrupt, right?)
The piece of disassembly I have encountered is along the lines of:
Code:
LDA $9277, X
At $9277, I see there are bytes $42 and $26 loaded. Which prompts a series of consecutive bytes to follow:
Code:
7C 92 00 F0 A0 04 F0 80 05 00
I actually am using a disassembly for reference and it looks to be referring to this piece of code here:
Site for reference:
http://caffie.net:31415/root/smw-irq/bl ... ank_00.asm
Any thoughts?
Thanks!