Commit Graph

290 Commits

Author SHA1 Message Date
Lectem
15bca44322 Added the missing struct and functions 2015-10-21 22:12:38 -04:00
fincs
942ec4af9b Add code to manage New 3DS CPU speedup 2015-10-11 23:44:10 +02:00
Lectem
f14d5721eb Document the loop behaviour of csndPlaySound 2015-10-09 19:41:29 -04:00
Lectem
13adb6a1c2 fixed enums for c++ 2015-10-07 16:00:19 -04:00
Steven Smith
fa5f3783ce Finish up basic documentation. 2015-10-05 18:35:15 -07:00
fincs
f4cef43033 Whoops 2015-10-05 11:40:20 +02:00
Steven Smith
173d386795 Document most of services. 2015-10-04 22:27:43 -07:00
Steven Smith
d6962f2122 Doc consistency. 2015-10-04 14:08:02 -07:00
Steven Smith
9a3baad7ed Rewrite most documentation to be consistent in format. 2015-10-04 10:37:28 -07:00
fincs
b481e6a446 Merge branch 'master' into great-refactor
Conflicts:
	libctru/include/3ds/services/hid.h
	libctru/include/3ds/services/irrst.h
2015-10-04 17:37:19 +02:00
Steven Smith
9fe9493701 Dynamically allocate shared memory. 2015-10-04 08:03:23 -07:00
fincs
8e052004d5 Merge branch 'master' into great-refactor
Conflicts:
	libctru/include/3ds/services/gsp.h
	libctru/source/services/gsp.c
2015-10-03 18:46:04 +02:00
fincs
5c7273ef3b Merge pull request #176 from thedax/gspLcd
Implement some services from gsp::Lcd.
2015-10-03 18:42:50 +02:00
profi200
b9f7f74b58 Renamed TitleList to AM_TitleEntry. 2015-10-03 18:37:47 +02:00
Lectem
bc3ef580b2 Use IPC helpers for apt, and update some commands 2015-10-03 06:56:11 -04:00
fincs
8912773f21 Merge branch 'master' into great-refactor
Conflicts:
	libctru/include/3ds/services/apt.h
	libctru/include/3ds/services/fs.h
	libctru/source/services/apt.c
2015-10-03 12:39:09 +02:00
smea
8e43355620 Merge branch 'patch-1' of github.com:smealum/ctrulib 2015-10-02 23:07:46 -07:00
smea
87b9d1302a Added FSUSER_GetMediaType 2015-10-02 23:05:30 -07:00
thedax
861c0a10b5 Change the enum to use BIT and replace u32 with the enum type. 2015-10-01 13:04:21 -04:00
suloku
2dc74a81ab Update apt.h 2015-10-01 17:18:17 +02:00
thedax
5426fba742 Add an enum to make using the gsp::Lcd service a little nicer. 2015-09-30 20:14:10 -04:00
thedax
7bad79e8b4 Implement some services from gsp::Lcd.
http://www.3dbrew.org/wiki/GSP_Services
2015-09-30 18:21:49 -04:00
fincs
4603b972fa Merge branch 'master' into great-refactor
Conflicts:
	libctru/include/3ds/services/apt.h
	libctru/source/services/apt.c
2015-09-29 23:21:45 +02:00
smea
56b56955c0 Update apt.h 2015-09-27 21:35:55 -07:00
smea
520332e49e Update apt.h 2015-09-27 21:34:47 -07:00
megazig
27b5a49c59 implement APT_GetAppletInfo 2015-09-27 23:30:16 -05:00
smea
c6192c331b Merge branch 'master' of github.com:smealum/ctrulib 2015-09-26 17:03:46 -07:00
smea
066d8873d3 added CFG_Region and CFG_Language enums 2015-09-26 17:03:42 -07:00
fincs
c9a75d6a18 DSP code format cleanup 2015-09-25 22:06:51 +02:00
fincs
649e95cd39 Merge branch 'master' into great-refactor
Conflicts:
	libctru/include/3ds/services/apt.h
	libctru/source/services/apt.c
2015-09-25 16:16:10 +02:00
yellows8
2b467b48b8 Implemented http service-cmd code for GetResponseHeader. 2015-09-24 13:04:18 -04:00
yellows8
31b724a431 Added APT_GetAppletProgramInfo. 2015-09-24 04:26:48 -04:00
fincs
6892a71eec Restore service session parameter in FSUSER_Initialize() 2015-09-16 23:58:12 +02:00
fincs
730899bee6 Merge pull request #165 from Lectem/dsp
Dsp fixes
2015-09-09 15:56:21 +02:00
Lectem
a68ee14632 Formatting and fixes for DSP 2015-09-09 09:48:40 -04:00
fincs
9bf546da45 () -> (void), again 2015-09-09 01:47:30 +02:00
fincs
62aa4d8ab0 Merge branch 'master' into great-refactor 2015-09-09 01:46:00 +02:00
fincs
ce59e60193 Merge pull request #161 from Steveice10/master
Add cam:u support and basic documentation.
2015-09-09 01:45:32 +02:00
Steven Smith
9d3b139255 Add cam:u support and basic documentation. 2015-09-08 16:26:56 -07:00
fincs
428a837224 Merge branch 'master' into great-refactor 2015-09-08 20:54:37 +02:00
fincs
c9ad04f70a Merge pull request #164 from Lectem/dsp
IPC stuff and DSP service commands
2015-09-08 20:53:29 +02:00
Lectem
d227918edc Added DSP service commands 2015-09-08 14:25:51 -04:00
megazig
6d1f409dfd added new NS_APPID values for latest apt module 2015-09-08 12:02:45 -05:00
fincs
0d7a7f4d7d Add missing (void) to functions without arguments 2015-09-06 18:13:31 +02:00
fincs
1817f90c6d Remove service handle parameter from GSPGPU IPC wrappers 2015-09-06 18:04:03 +02:00
fincs
053c71ad08 Remove service handle parameter from FSUSER IPC wrappers 2015-09-06 17:54:36 +02:00
fincs
9b1e6bfc39 Remove service handle parameter from APT IPC wrappers 2015-09-06 17:41:47 +02:00
fincs
e7e21fa9d5 Merge pull request #159 from Lectem/documentation
documentation for the soc service and svcCreateMemoryBlock
2015-09-05 17:46:49 +02:00
Lectem
84d368918e documentation for the soc service 2015-08-28 14:55:40 -04:00
megazig
033b353128 add key type 9 (NFC) for ps service 2015-08-18 16:54:22 -05:00
Lectem
8d36f3f03b Fixed transfer unit and gap type and added a warning 2015-08-10 00:44:55 +02:00
Lectem
894d5342a1 fixed y2r doc and added csnd pan/vol ranges 2015-07-23 21:26:37 +02:00
Lectem
0c8c272bf4 updated y2r documentation 2015-06-26 23:00:12 +02:00
fincs
66b2e4548e Merge pull request #126 from yuriks/y2r
Add y2r:u commands
2015-06-22 00:22:41 +02:00
Lectem
364b9834db Documented y2r
Also aligned enums for readability and changed SetCoefficient to
SetCoefficients
2015-06-22 00:07:18 +02:00
Yuri Kunde Schlesner
8a76010988 Add y2r:u commands 2015-06-21 07:25:28 -03:00
fincs
a7aba7feae (I forgot to update the comment in the header file) 2015-06-20 18:21:06 +02:00
yellows8
f631036063 Added code for getting the session handles for am, fs, and srv. Updated ACU_WaitInternetConnection() so that it waits for outval!=0 instead of outval==1, this fixes new3ds support for this func. 2015-05-26 13:49:37 -04:00
Steven Smith
40d0739ade Update NS_APPID values. 2015-05-23 10:57:40 -07:00
fincs
da680e0503 Add APT event hooking mechanism 2015-05-22 21:56:47 +02:00
smea
e2f8011f69 Merge pull request #115 from Steveice10/master
Add news:u commands.
2015-05-19 15:40:35 -07:00
archshift
e66e417ce0 Add missing httpcAddRequestHeaderField to httpc.h 2015-05-12 22:29:40 -07:00
smea
d30d14dff4 Merge pull request #116 from profi200/master
Added AM_GetCiaFileInfo() and FSUSER_DeleteDirectoryRecursively().
2015-05-09 13:46:56 -07:00
fincs
350cb955b2 Added RUNFLAG_APTREINIT for supporting environments that require APT reinitialization 2015-05-06 22:01:40 +02:00
profi200
df46a2c7dd Added AM_GetCiaFileInfo() and FSUSER_DeleteDirectoryRecursively(). 2015-05-04 19:29:13 +02:00
fincs
c443c34ad0 Major CSND overhaul, see details:
- Missing commands are now added
- Volume and pan are now available in csndPlaySound
- Minor optimization that saves one memcpy per command
- Minor optimization in shared mem channel index computation
2015-04-15 22:17:19 +02:00
Steven Smith
6f37ad03f7 Add news:u commands. 2015-04-14 12:37:20 -07:00
profi200
4ab2b1a363 Replaced AM_installFIRM() with AM_installNativeFirm(). 2015-03-28 22:02:46 +01:00
profi200
1a6bdc38a9 Implemented functions to start system applets. 2015-03-07 22:10:18 +01:00
profi200
ed3045ab6a Fixed AM_InstallFIRM(). See 3dbrew. 2015-03-01 21:52:19 +01:00
profi200
c998b5d035 Added AM_ListTitles(), removed nonsense bitwise ands, replaced sprint() with memcpy() (overflow safe) and made utf.h aveilable for apps. 2015-03-01 19:49:38 +01:00
Dave Murphy
341f10b057 Merge pull request #88 from Steveice10/master
Add AM_GetTitleProductCode, FSUSER_GetNandArchiveResource, and fix missing service imports in 3ds.h.
2015-03-01 18:19:14 +00:00
Steven Smith
20a1a610da Add AM_GetTitleProductCode, FSUSER_GetNandArchiveResource, and fix missing service imports in 3ds.h. 2015-02-28 23:13:21 -08:00
mtheall
1cd7cfdab5 Refactor soc to use errno. 2015-01-24 14:14:06 -06:00
fincs
d414258995 Le chapeau de cul: fix some broken things after the git rebase 2015-01-20 18:05:25 +01:00
fincs
983b38f626 Some more function renaming 2015-01-20 17:57:05 +01:00
fincs
3fafe70f3b CSND: add some capture commands 2015-01-20 17:55:26 +01:00
fincs
69ee2f97c5 Add CSND_AcquireCapUnit/CSND_ReleaseCapUnit 2015-01-20 17:55:25 +01:00
fincs
cbc1c645a6 CSND: IMA-ADPCM playback support, really fix looping 2015-01-20 17:55:24 +01:00
fincs
671ea5f555 Add CSND_ChnSetDuty() 2015-01-20 17:55:24 +01:00
fincs
e562b15a68 CSND: many looping-related discoveries 2015-01-20 17:54:35 +01:00
fincs
59009d531d Partially fix csndChnGetState() and csndChnIsPlaying() 2015-01-20 17:54:33 +01:00
fincs
e943b25bc5 CSND: move waiting code to csndExecChnCmds() 2015-01-20 17:53:52 +01:00
fincs
b15eb566dd Separate left & right volumes in CSND_ChnSetVol 2015-01-20 17:53:51 +01:00
fincs
dba29fe501 CSND: function renaming, refactoring, etc. 2015-01-20 17:53:51 +01:00
fincs
840088a02b Begin CSND refactoring 2015-01-20 17:52:30 +01:00
Dave Murphy
abfb15af1b use struct for channel status array 2015-01-02 22:42:12 +00:00
profi200
18190a0237 Added more cfg:u cmds. 2014-12-29 23:31:15 +01:00
profi200
bb5c4a6ca8 Simplified reading the system language by adding a wrapper. Print only once in the get_system_language example. 2014-12-29 22:46:59 +01:00
profi200
54f2afcb19 Added CFGU_GetConfigInfoBlk2() and an example. 2014-12-26 02:31:59 +01:00
smea
7f0d169c10 fixed hb naming 2014-12-24 21:06:09 -08:00
smea
8f9a2edd1a additional HB stuff 2014-12-23 21:05:55 -08:00
smea
2c04f993d6 added HB service support (ninjhax only) 2014-12-23 20:47:00 -08:00
yellows8
1a72193dc5 Added qtm support + example. 2014-12-21 01:02:23 -05:00
plutoo
f9dee4c2c0 Merge pull request #52 from Aurelio92/2-new-hid-function
Added 2 hid functions
2014-12-15 01:46:49 +01:00
Dave Murphy
ee0a97f3ce fix PM_LaunchFIRMSetParams and PM_LaunchTitle prototypes 2014-12-13 16:20:54 +00:00
Aurelio Mannara
9849deca01 Added 2 hid functions
-Added HIDUSER_GetGyroscopeRawToDpsCoefficient(float *coeff)
-Added HIDUSER_GetSoundVolume(u8 *volume)
2014-12-13 13:10:54 +01:00
archshift
3da1a19f0c Added CreateFile implementation, tested on hardware.
Information about using CreateFile was taken from Steel Diver: Sub Wars with the wonderful help of Citra.
2014-12-10 00:33:08 -08:00
yellows8
7c13463969 Fixed FSUSER_IsSdmcDetected and FSUSER_IsSdmcWritable: the output is an u8 not u32. 2014-12-03 11:06:01 -05:00
Dave Murphy
ea97e7a529 stop polluting 3ds headers with extra system headers 2014-11-28 13:13:34 +00:00
yellows8
56b1c2755c Added note about broken applet process termination with APT_LaunchLibraryApplet(). 2014-11-28 01:26:20 -05:00
yellows8
58b988ab97 Added comments to GSP_FramebufferFormats for the pixel byte-sizes. 2014-11-27 11:27:21 -05:00
smea
643bf59d80 Merge pull request #30 from Subv/cfgu_2
Added more cfg:u functions
2014-11-22 18:26:35 -08:00
smea
dfc9c12b9b Merge pull request #36 from yuriks/fs-rename
Add FSUSER_RenameFile and FSUSER_RenameDirectory
2014-11-22 14:18:43 -08:00
Yuri Kunde Schlesner
2815cd84c4 Add FSUSER_RenameFile and FSUSER_RenameDirectory 2014-11-22 20:18:32 -02:00
Thibaut Girka
251c4d458f Implement PTMU_GetShellState and PTMU_GetPedometerState 2014-11-22 22:04:34 +01:00
plutoo
2d697d6566 Merge pull request #31 from Subv/ptm_u
Added the PTMU_GetTotalStepCount function
2014-11-22 21:23:36 +01:00
yellows8
240ab44f9c Updated httpc code and added an example. 2014-11-22 00:43:39 -05:00
Subv
25d445818f Added the PTMU_GetTotalStepCount function 2014-11-21 23:36:48 -05:00
Subv
0cc31baaea Added more cfg:u functions
GetRegionCanadaUSA
GetModelNintendo2DS
GetCountryCodeString
2014-11-21 22:40:23 -05:00
Subv
8e8685b6e7 Addressed some style issues 2014-11-21 22:12:34 -05:00
Subv
e8c551b114 Added a file for the cfg:u service.
Implemented the CFGU_GetSystemModel function
2014-11-21 22:08:05 -05:00
yellows8
7281abfcd7 Added code for APT_IsRegistered. Added code for launching library applets, which isn't usable from the homebrew launcher atm. 2014-11-21 00:35:37 -05:00
mtheall
55608adaad Overhauled soc service. 2014-11-20 15:36:50 -06:00
smea
463f366e2b added prototype to soc.h 2014-11-20 03:05:51 -08:00
smea
99a5c4406b added APT_HardwareResetAsync (tested) 2014-11-19 17:25:40 -08:00
yellows8
ce226ec1b2 Updated mvd code and added an example. 2014-11-19 16:37:02 -05:00
profi200
16ce5f4c7b Added functions for launching other apps/applets 2014-11-10 17:03:41 +01:00
yellows8
6d2a0f5fa3 Started implementing code for new3ds mvd. Added osConvertOldLINEARMemToNew(). 2014-11-06 19:02:55 -05:00
fincs
7f10ad4097 Add aptMainLoop() for handling APT events in main() 2014-11-02 18:58:37 +01:00
yellows8
3135d1c344 Updated APT_CheckNew3DS to only use the APT cmds once(which also now calls aptOpenSession/aptCloseSession), then store the output value in a flag which is then used for all future APT_CheckNew3DS calls. Updated HID init/shutdown code to automatically call irrst init/shutdown code when running on new3ds. Updated irrst init code to only do init when it wasn't already initialized, likewise for the irrst shutdown code. 2014-11-01 23:48:35 -04:00
yellows8
c8795b1b79 Added APT CheckNew3DS code. Added code for attempting to use the other APT services when APT:U isn't accessible. 2014-11-01 21:39:18 -04:00
smea
08f8caf924 Merge pull request #20 from idunoe/master
Defined FS archive ids
2014-10-27 09:31:10 -07:00
idunoe
ff2a97e35a Added archive ids to fs.h 2014-10-27 22:56:01 +08:00
StapleButter
afd2140cb7 Create APT event handler thread as soon as possible, and complete initialization automatically when needed. No more 'call aptSetupEventHandler() as late as possible' shit.
Adapt examples to the changes (not tested).
2014-10-27 15:37:30 +01:00
idunoe
419815e4e4 PS: Added API 2014-10-27 13:17:56 +08:00
idunoe
bf68b2d4e5 PM: Added API 2014-10-27 13:17:47 +08:00
idunoe
3d798def58 NS: Added API 2014-10-27 13:17:34 +08:00
idunoe
b66d047e76 AM: Added API 2014-10-27 13:17:24 +08:00
smea
e115853aee added c-stick, ZL and ZR support via ir:rst 2014-10-25 18:30:19 -07:00
StapleButter
1f413a7d44 Add synchronization mechanism for entering sleep mode.
When the APT status is APP_PREPARE_SLEEPMODE, the application main thread should call aptSignalReadyForSleep() to signal that it is ready to enter sleep mode, and then call aptWaitStatusEvent() as usual.

Example code:

APP_STATUS status;
while ((status = aptGetStatus()) != APP_EXITING)
{
	if(status==APP_RUNNING)
	{
		// application logic here
	}
	else if(status == APP_SUSPENDING)
	{
		aptReturnToMenu();
	}
	else if(status == APP_PREPARE_SLEEPMODE)
	{
		aptSignalReadyForSleep();
		aptWaitStatusEvent();
	}
}

This maybe isn't the proper/recommended way to do sleep mode, but I tested it multiple times and it always worked reliably.

(note: maybe the sample code above will not work if GPU drawing is done in a separate thread, haven't tested that)
2014-09-18 22:09:15 +02:00
StapleButter
8b27dbe623 * Make the GSP event handler signal events in the right order (essential for proper PICA200 sync)
* Add some comments about the GSP events (based on my observations, may not be right)
2014-09-13 17:01:20 +02:00
yellows8
aa77f9b1e2 Added code for using the microphone and an example app for it. 2014-09-03 14:36:05 -04:00
profi200
3d34e123ee Added functions for sysCore usage 2014-09-01 15:49:32 +02:00
yellows8
62f26e8760 Improved HID code, and added Accelerometer/Gyroscope support. 2014-08-30 20:41:09 -04:00
yellows8
9425edc406 Added HID event code, based on the GSP event code. Added event id check in gspWaitForEvent(). 2014-08-29 16:19:58 -04:00
fincs
16544492a2 Fix KEY_CRIGHT/CLEFT 2014-08-27 12:03:25 +02:00
mtheall
43661f8263 Add FSUSER_GetSdmcArchiveResource(). 2014-08-26 19:01:00 -05:00
mtheall
2eadd6d0b2 FIX DERP. 2014-08-26 17:43:34 -05:00
fincs
9b370c7eff Reorganize includes 2014-08-26 23:18:14 +02:00