mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 12:59:14 +12:00
Merge branch 'metal' into metal
This commit is contained in:
commit
124622cf18
10 changed files with 93 additions and 11 deletions
|
@ -176,6 +176,7 @@ namespace Audio {
|
|||
// Decode an entire buffer worth of audio
|
||||
void decodeBuffer(DSPSource& source);
|
||||
|
||||
SampleBuffer decodePCM8(const u8* data, usize sampleCount, Source& source);
|
||||
SampleBuffer decodePCM16(const u8* data, usize sampleCount, Source& source);
|
||||
SampleBuffer decodeADPCM(const u8* data, usize sampleCount, Source& source);
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "services/service_manager.hpp"
|
||||
|
||||
class CPU;
|
||||
struct Scheduler;
|
||||
|
||||
class Kernel {
|
||||
std::span<u32, 16> regs;
|
||||
|
@ -241,6 +242,7 @@ class Kernel {
|
|||
}
|
||||
|
||||
ServiceManager& getServiceManager() { return serviceManager; }
|
||||
Scheduler& getScheduler();
|
||||
|
||||
void sendGPUInterrupt(GPUInterrupt type) { serviceManager.sendGPUInterrupt(type); }
|
||||
void clearInstructionCache();
|
||||
|
|
|
@ -11,7 +11,8 @@ struct Scheduler {
|
|||
VBlank = 0, // End of frame event
|
||||
UpdateTimers = 1, // Update kernel timer objects
|
||||
RunDSP = 2, // Make the emulated DSP run for one audio frame
|
||||
Panic = 3, // Dummy event that is always pending and should never be triggered (Timestamp = UINT64_MAX)
|
||||
SignalY2R = 3, // Signal that a Y2R conversion has finished
|
||||
Panic = 4, // Dummy event that is always pending and should never be triggered (Timestamp = UINT64_MAX)
|
||||
TotalNumberOfEvents // How many event types do we have in total?
|
||||
};
|
||||
static constexpr usize totalNumberOfEvents = static_cast<usize>(EventType::TotalNumberOfEvents);
|
||||
|
|
|
@ -109,4 +109,5 @@ class ServiceManager {
|
|||
HIDService& getHID() { return hid; }
|
||||
NFCService& getNFC() { return nfc; }
|
||||
DSPService& getDSP() { return dsp; }
|
||||
Y2RService& getY2R() { return y2r; }
|
||||
};
|
||||
|
|
|
@ -101,8 +101,12 @@ class Y2RService {
|
|||
void startConversion(u32 messagePointer);
|
||||
void stopConversion(u32 messagePointer);
|
||||
|
||||
public:
|
||||
bool isBusy;
|
||||
|
||||
public:
|
||||
Y2RService(Memory& mem, Kernel& kernel) : mem(mem), kernel(kernel) {}
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
|
||||
void signalConversionDone();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue