Skip to content

Instantly share code, notes, and snippets.

@jdiez17
Created November 1, 2012 21:14
Show Gist options
  • Save jdiez17/3996585 to your computer and use it in GitHub Desktop.
Save jdiez17/3996585 to your computer and use it in GitHub Desktop.
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