Created
November 1, 2012 21:14
-
-
Save jdiez17/3996585 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void sped3_setup(void* pointer, unsigned int count) | |
{ | |
__asm | |
{ | |
SET PUSH, Y ; Preserve stack pointer | |
.IMPORT _stubapi_locate_device | |
SET A, 0x42ba ; Set the SPED3 ID (0x42babf3c) | |
SET B, 0xbf3c | |
JSR [_stubapi_locate_device] ; Call the locate_device system function | |
SET PUSH, A ; Keep the value returned by locate_device | |
SET A, 0x1 ; Tell the SPED-3 where our vertices are | |
SET X, <pointer> | |
SET Y, <count> | |
HWI POP ; Interrupt the SPED-3 | |
SET Y, POP | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment