2019-08-04 09:44:36 +00:00
|
|
|
/*
|
2024-06-15 15:01:19 +00:00
|
|
|
Copyright 2016-2024 melonDS team
|
2019-08-04 09:44:36 +00:00
|
|
|
|
|
|
|
This file is part of melonDS.
|
|
|
|
|
|
|
|
melonDS is free software: you can redistribute it and/or modify it under
|
|
|
|
the terms of the GNU General Public License as published by the Free
|
|
|
|
Software Foundation, either version 3 of the License, or (at your option)
|
|
|
|
any later version.
|
|
|
|
|
|
|
|
melonDS is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along
|
|
|
|
with melonDS. If not, see http://www.gnu.org/licenses/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef DSI_SPI_TSC
|
|
|
|
#define DSI_SPI_TSC
|
|
|
|
|
2022-07-27 16:20:31 +00:00
|
|
|
#include "types.h"
|
|
|
|
#include "Savestate.h"
|
2023-11-03 19:17:00 +00:00
|
|
|
#include "SPI.h"
|
2022-07-27 16:20:31 +00:00
|
|
|
|
2023-11-25 17:32:09 +00:00
|
|
|
namespace melonDS
|
|
|
|
{
|
2023-11-28 22:16:41 +00:00
|
|
|
class DSi;
|
2023-11-03 19:17:00 +00:00
|
|
|
class DSi_TSC : public TSC
|
2019-08-04 09:44:36 +00:00
|
|
|
{
|
2023-11-03 19:17:00 +00:00
|
|
|
public:
|
2023-11-28 22:16:41 +00:00
|
|
|
DSi_TSC(melonDS::DSi& dsi);
|
2023-11-03 19:17:00 +00:00
|
|
|
~DSi_TSC() override;
|
2019-08-04 09:44:36 +00:00
|
|
|
|
2023-11-03 19:17:00 +00:00
|
|
|
void Reset() override;
|
2019-08-04 09:44:36 +00:00
|
|
|
|
2023-11-03 19:17:00 +00:00
|
|
|
void DoSavestate(Savestate* file) override;
|
2019-08-04 09:44:36 +00:00
|
|
|
|
2023-11-03 19:17:00 +00:00
|
|
|
// 00=DS-mode 01=normal
|
|
|
|
void SetMode(u8 mode);
|
2021-08-30 19:42:35 +00:00
|
|
|
|
2023-11-03 19:17:00 +00:00
|
|
|
void SetTouchCoords(u16 x, u16 y) override;
|
2023-12-12 10:07:22 +00:00
|
|
|
void MicInputFrame(const s16* data, int samples) override;
|
2019-08-04 09:44:36 +00:00
|
|
|
|
2023-11-03 19:17:00 +00:00
|
|
|
void Write(u8 val) override;
|
|
|
|
void Release() override;
|
2019-08-04 09:44:36 +00:00
|
|
|
|
2023-11-03 19:17:00 +00:00
|
|
|
private:
|
|
|
|
u8 Index;
|
|
|
|
u8 Bank;
|
|
|
|
|
|
|
|
u8 Bank3Regs[0x80];
|
|
|
|
u8 TSCMode;
|
|
|
|
};
|
2019-08-04 09:44:36 +00:00
|
|
|
|
2023-11-25 17:32:09 +00:00
|
|
|
}
|
2019-08-04 09:44:36 +00:00
|
|
|
#endif // DSI_SPI_TSC
|