mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 07:39:56 -06:00
get this started: refactor SPI in OOP
This commit is contained in:
@ -21,26 +21,33 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "Savestate.h"
|
||||
#include "SPI.h"
|
||||
|
||||
namespace DSi_SPI_TSC
|
||||
class DSi_TSC : public TSC
|
||||
{
|
||||
public:
|
||||
DSi_TSC(SPIHost* host);
|
||||
~DSi_TSC() override;
|
||||
|
||||
extern u32 DataPos;
|
||||
void Reset() override;
|
||||
|
||||
bool Init();
|
||||
void DeInit();
|
||||
void Reset();
|
||||
void DoSavestate(Savestate* file);
|
||||
void DoSavestate(Savestate* file) override;
|
||||
|
||||
// 00=DS-mode 01=normal
|
||||
void SetMode(u8 mode);
|
||||
// 00=DS-mode 01=normal
|
||||
void SetMode(u8 mode);
|
||||
|
||||
void SetTouchCoords(u16 x, u16 y);
|
||||
void MicInputFrame(s16* data, int samples);
|
||||
void SetTouchCoords(u16 x, u16 y) override;
|
||||
void MicInputFrame(s16* data, int samples) override;
|
||||
|
||||
u8 Read();
|
||||
void Write(u8 val, u32 hold);
|
||||
void Write(u8 val) override;
|
||||
void Release() override;
|
||||
|
||||
}
|
||||
private:
|
||||
u8 Index;
|
||||
u8 Bank;
|
||||
|
||||
u8 Bank3Regs[0x80];
|
||||
u8 TSCMode;
|
||||
};
|
||||
|
||||
#endif // DSI_SPI_TSC
|
||||
|
Reference in New Issue
Block a user