aboutsummaryrefslogtreecommitdiffstats
path: root/src/gba
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2023-05-28 18:54:03 +0200
committerBad Diode <bd@badd10de.dev>2023-05-28 18:54:03 +0200
commit765dc3ab3d79bdca696a0d651385af3020c895c6 (patch)
tree628a6ad09f1f0d9f2d8918a5a8924ded0ce001c4 /src/gba
parent5024c6631ab583c0b375f0002e2ad6d6373d84ee (diff)
downloadstepper-765dc3ab3d79bdca696a0d651385af3020c895c6.tar.gz
stepper-765dc3ab3d79bdca696a0d651385af3020c895c6.zip
Add initial link cable clock sync
Diffstat (limited to 'src/gba')
-rw-r--r--src/gba/gba.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gba/gba.h b/src/gba/gba.h
index be7a305..f726b72 100644
--- a/src/gba/gba.h
+++ b/src/gba/gba.h
@@ -452,6 +452,24 @@ int bios_vblank_wait();
452int bios_div(int num, int denom); 452int bios_div(int num, int denom);
453 453
454// 454//
455// SIO Link Cable
456//
457
458#define SIO_MODE *((vu16*)(MEM_IO + 0x0134))
459#define SIO_CNT *((vu16*)(MEM_IO + 0x0128))
460
461#define SIO_MODE_GP (2 << 14)
462#define SIO_SC(X) ((X) << 0)
463#define SIO_SD(X) ((X) << 1)
464#define SIO_SI(X) ((X) << 2)
465#define SIO_SO(X) ((X) << 3)
466#define SIO_SC_OUT(X) ((X) << 4)
467#define SIO_SD_OUT(X) ((X) << 5)
468#define SIO_SI_OUT(X) ((X) << 6)
469#define SIO_SO_OUT(X) ((X) << 7)
470#define SIO_IRQ_ENABLE (1 << 8)
471
472//
455// Sound. 473// Sound.
456// 474//
457 475