Commit Graph

209 Commits

Author SHA1 Message Date
idunoe
4d891e6190 updated types.h 2014-10-27 13:11:55 +08:00
plutoo
c64bcbb078 Merge branch 'refactor' 2014-10-27 00:08:13 +01:00
plutoo
950ae0b2a4 Added svcQueryMemory 2014-10-27 00:07:07 +01:00
smea
3032a15f95 Merge pull request #15 from neobrain/refactor
Add the system call outputDebugString.
2014-10-26 13:01:51 -07:00
smea
e115853aee added c-stick, ZL and ZR support via ir:rst 2014-10-25 18:30:19 -07:00
Tony Wasserka
90692fee60 Add the system call outputDebugString.
This doesn't do anything on retail consoles, but homebrew developers can use it to debug applications in Citra or in other 3DS emulators which HLE this system call.
2014-10-25 11:52:39 +02:00
StapleButter
af31a7c861 * add code for alphablending, color logic op, alpha test and multitexturing.
* add GPU_FinishDrawing() to be called after a batch of GPU_DrawArray() calls if you're done drawing or if you intend to change the GPU configuration before drawing more. Also fix GPU_Finalize(). With those changes, the GPU no longer freezes if you call GPU_DrawArray() an even number of times.
* fix GPU_SetViewport() to allow color buffer reading, so blending and logicop work as expected.
2014-10-23 17:56:56 +02: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
plutoo
449ead1141 os: Added osGetTime(). 2014-09-06 21:07:26 +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
125398a52f Refactor linear heap code (formerly known as GSP heap) 2014-08-27 23:44:38 +02:00
fincs
16544492a2 Fix KEY_CRIGHT/CLEFT 2014-08-27 12:03:25 +02:00
smea
335acee5d5 Merge branch 'refactor' of github.com:smealum/ctrulib into refactor
Conflicts:
	libctru/include/3ds/types.h
2014-08-26 23:13:36 -07:00
smea
9e78466af8 added stdlibs for size_t 2014-08-26 23:12:33 -07: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
mtheall
a253b10b24 Merge branch 'refactor' of github.com:smealum/ctrulib into refactor 2014-08-26 15:58:24 -05:00
mtheall
cad12973c8 Add FSUSER_IsSdmcDetected() and FSUSER_IsSdmcWritable(). 2014-08-26 15:58:18 -05:00
fincs
8b9666ac40 3ds/types.h: #include <stddef.h> 2014-08-26 22:56:38 +02:00
fincs
589c59fab7 Move 3ds.h to root, add C++ guard, use #pragma once 2014-08-26 22:53:00 +02:00
smea
8e86af967a added Makefile rule to compile vsh shader code to gpu example (fincs, can you see if you can improve it ?) 2014-08-25 23:26:36 -07:00
smea
0aff9c6902 so sick of all these includes 2014-08-25 22:55:12 -07:00
smea
d287719900 Merge branch 'refactor' of github.com:smealum/ctrulib into refactor
Conflicts:
	libctru/source/gfx.c
2014-08-25 21:32:00 -07:00
smea
47284dcd34 GPU stuff 2014-08-25 21:31:12 -07:00
mtheall
4c04373046 Update FS_dirent. 2014-08-25 19:38:17 -05:00
plutoo
716fd86057 Merge branch 'refactor' of https://github.com/smealum/ctrulib into refactor 2014-08-25 23:12:35 +02:00
plutoo
dc052c19ee gsp: Added gspAllocLinear() to allocate from LINEAR heap
Required by CSND, for example
2014-08-25 23:11:53 +02:00
smea
8f3997e3a7 PTM & AC stuff 2014-08-25 09:14:48 -07:00
smea
4c9abef1a9 APT WORKAROUND (update 3dsx_crt0.s to https://gist.github.com/smealum/305802b2b9bf4c877ddb and recompile everything please) 2014-08-24 23:25:54 -07:00
smea
3884ce985c added gfx for simplified framebuffer access 2014-08-24 21:37:49 -07:00
smea
f9fbfc3c48 Merge branch 'refactor' of github.com:smealum/ctrulib into refactor 2014-08-24 21:01:35 -07:00
smea
d5ac7a7cb0 minor GSP adjustments 2014-08-24 21:01:21 -07:00
mtheall
c2315a618d Merge branch 'refactor_mtheall' into refactor 2014-08-24 22:37:34 -05:00
plutoo
41c2a759f8 Merge branch 'refactor' of https://github.com/smealum/ctrulib into refactor 2014-08-24 22:51:19 +02:00
plutoo
65878d99c6 gsp: Update header as part of renaming. 2014-08-24 22:42:23 +02:00
mtheall
d5c39263d8 Add more filesystem service commands. 2014-08-21 21:47:25 -05:00
fincs
8fccb570e5 Homogenize indentation (use tabs) 2014-08-21 22:59:42 +02:00
plutoo
a0f8a6d153 os: Changed Get*Version format. 2014-08-21 22:35:20 +02:00
plutoo
ef1323a3a1 APT: Enumerated the notification signals. 2014-08-21 20:54:23 +02:00
plutoo
8c3ecfc621 os: Added functions for getting Firm/Kernel version. 2014-08-21 20:41:51 +02:00
plutoo
9ff9ce5ad4 os: Added osStrError().
This will summarize an error-code given by the OS/sysmodules in few words.
Useful for debugging.
2014-08-21 20:20:23 +02:00
plutoo
89e29dbe06 HID: Various improvements.
Added gyro enable/disable cmd.
Added accelerometer disable cmd.
Fixed hidInit() error handling.
hidInit() no longer enables accelerometer.
HIDUSER_GetInfo has been renamed to HIDUSER_GetSharedMem.
hid functions no longer require a NULL-ptr as arg0.
2014-08-21 20:08:08 +02:00
fincs
0e850119c9 HID: implement key/touch/circle pad access 2014-08-21 16:55:21 +02:00
fincs
9cef70bbd4 Remove #ifdef SRV_OVERRIDE_SUPPORT 2014-08-21 01:29:22 +02:00
fincs
af93d8e10c gspWaitForEvent(): add nextEvent parameter; GSPEVENT_count -> '_MAX 2014-08-21 00:24:24 +02:00
fincs
0d3ed55b88 GSP: add basic event handling system 2014-08-21 00:09:39 +02:00
fincs
0a1d0403d1 __ctru_exit(): perform svcExitProcess() if there's no retAddr 2014-08-20 22:16:28 +02:00
smea
370707c663 use svcDuplicateHandle in handle override 2014-08-17 13:37:49 -07:00
smea
2b4a219f87 fsInit, fsExit 2014-08-16 17:11:13 -07:00
smea
aa7d9acbbe enable srv override + __service_ptr fix 2014-08-16 15:11:33 -07:00
smea
4e3c18863b various fixes 2014-08-16 14:48:05 -07:00
plutoo
d35233fb1c Revamped "srv.c". 2014-07-28 23:26:13 +02:00
plutoo
ec9734bdeb Moved OS module back out. Renamed functions. 2014-07-28 22:31:20 +02:00
plutoo
884df0ba75 Moved header files from ctr/ to 3ds/. 2014-07-28 21:41:48 +02:00