#166047 - Tyler24 - Sun Jan 18, 2009 9:09 pm
I'm trying to avoid using libnds because I feel it's a little bloated for my tastes. I'm coding in assembly instead of C, and in order to write to the screen (at least in MODE_FB0) I realized that the processors have to be synced via IPC and FIFO has to be enabled and ready to go.
I've been trying to look at fifocommon.h, specifically fifoInit()... but nothing is commented. And I have no idea how to sync make the processors sync via the hardware IPC. I have the IPC sync register address and everything from GBAtek, but there's no documentation about how to actually go about syncing processors anywhere.
The sync code I have now works (in C), taken straight from the libnds source code. I have no idea what it's doing, unfortunately, and would like to understand:
Thanks in advance!
I've been trying to look at fifocommon.h, specifically fifoInit()... but nothing is commented. And I have no idea how to sync make the processors sync via the hardware IPC. I have the IPC sync register address and everything from GBAtek, but there's no documentation about how to actually go about syncing processors anywhere.
The sync code I have now works (in C), taken straight from the libnds source code. I have no idea what it's doing, unfortunately, and would like to understand:
Code: |
REG_IPC_SYNC = 0;
while(counted < 3) { their_value = REG_IPC_SYNC&0x000F; if( ((my_value + 1)&0x000F ) == their_value ) counted++; my_value=(their_value+1)&0x000F; REG_IPC_SYNC = my_value<<8; } REG_IPC_SYNC = 14 <<8; |
Thanks in advance!