mirror of
https://github.com/Creased/RCM-Emulator.git
synced 2026-12-06 02:48:11 +01:00
Add fake Bluetooth controllers and USBSERFILE
This commit is contained in:
1 parent
e17c315f87
commit
41245dc22b
4 files changed
+608
-11
No files matched your search
@@ -0,0 +1,26 @@
|
||||
// Fake Bluetooth controllers for the CYW4356 model (mmio.cpp): what a
|
||||
// payload acting as an HCI host finds and talks to once the radio is up.
|
||||
//
|
||||
// Two peers in pairing mode: a Pro Controller that insists on Secure Simple
|
||||
// Pairing with bonding before it opens its HID channels, and a right Joy-Con
|
||||
// that needs no security at all, so both paths of a host are exercised.
|
||||
// Once a host has both HID channels open, the connected one streams input
|
||||
// reports in guest time, pressing each of its buttons in turn and sweeping
|
||||
// its sticks, so a screenshot shows the host's view moving.
|
||||
//
|
||||
// This proves a host against this model's reading of the protocol, not
|
||||
// against a real controller.
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
struct EmuState;
|
||||
|
||||
// The radio went through a power-on reset: forget every connection.
|
||||
void btpeer_reset(EmuState *state);
|
||||
// An HCI command the reset model does not answer itself. True when handled.
|
||||
bool btpeer_command(EmuState *state, uint16_t opcode, const uint8_t *p,
|
||||
uint32_t n);
|
||||
// One ACL packet from the host: handle/flags (2), length (2), then data.
|
||||
void btpeer_acl(EmuState *state, const uint8_t *pkt, uint32_t n);
|
||||
// Deliver what is due by now. Called on every UART-D register access.
|
||||
void btpeer_tick(EmuState *state);
|
||||
Reference in new issue
Block a user