Skip to content

Commit a5583b2

Browse files
authored
Update README.md
1 parent ca61e67 commit a5583b2

File tree

1 file changed

+1
-44
lines changed

1 file changed

+1
-44
lines changed

README.md

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,7 @@
22
A minimal rumble library for the GBA. Supports rumble on either the GameboyPlayer, or on a GameboyAdvance via a cartridge rumble motor. I basically developed this based on the resources on GBATEK, plus blackbox testing ROMS by feeding in data and adding print statements to some emulators. Tested on an actual GameboyPlayer.
33

44
# Setup and Usage
5-
This rumble library does not unlock the Gameboy Player. Prior initializing the library, you will need to display the Gameboy Player splash screen for a few frames. If the console accepts your splash screen, the GBP will notify your application by sending a pattern of specific button signals. See main.cpp for an example.
6-
7-
Usage example:
8-
```C++
9-
// C++
10-
11-
if (unlock_gameboy_player()) {
12-
13-
RumbleGBPConfig conf{[](void (*rumble_isr)(void)) {
14-
irqEnable(IRQ_SERIAL);
15-
irqSet(IRQ_SERIAL, rumble_isr);
16-
}};
17-
18-
rumble_init(&conf);
19-
20-
} else {
21-
rumble_init(nullptr);
22-
}
23-
24-
// ...
25-
26-
// main loop:
27-
28-
RumbleState current_state = rumble_stop;
29-
30-
int counter = 0;
31-
32-
while (true) {
33-
// should be called approx. once per frame.
34-
rumble_update();
35-
36-
if (++counter == 80) {
37-
counter = 0;
38-
if (current_state == rumble_stop) {
39-
current_state = rumble_start;
40-
} else {
41-
current_state = rumble_stop;
42-
}
43-
rumble_set_state(current_state);
44-
}
45-
46-
your_vsync_function();
47-
}
48-
```
5+
This rumble library does not unlock the Gameboy Player. Prior initializing the library, you will need to display the Gameboy Player splash screen for a few frames. If the console accepts your splash screen, the GBP will notify your application by sending a pattern of specific button signals. See example.cpp for an example, and see the releases page of this repository for an example rom.
496

507
# Compiling
518
It's a single C source file with no dependencies, just drop rumble.c/rumble.h into your project.

0 commit comments

Comments
 (0)