LibXenon Examples: Difference between revisions
Jump to navigation
Jump to search
imported>Sbrqt (Created page with ''''XMENU source code by User:cpasjuste: '''<br /> Download: [http://mydedibox.fr/index.php?option=com_docman&task=doc_details&gid=14&Itemid=29 mydedibox.fr] <br /> <br /> ''…') |
imported>Tuxuser m (Text replace - "Category:Homebrew" to "Category:Xbox360_Homebrew_Software") |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''XMENU source code by [[User:cpasjuste]]: '''<br /> | '''XMENU source code by [[User:cpasjuste]]: '''<br /> | ||
Download: [http:// | Download: [http://file.libxenon.org/free60/libxenon/xmenu_src_20090914.tar.gz libxenon.org] <br /> | ||
<br /> | <br /> | ||
Line 9: | Line 9: | ||
'''Controller Button test code by [[User:ced2911]]: '''<br /> | '''Controller Button test code by [[User:ced2911]]: '''<br /> | ||
Source Code (incl. Makefile): [http://file.libxenon.org/free60/libxenon/LibXenon_HelloWorld.tar.gz Download] | |||
<pre> | <pre> | ||
#include <stdio.h> | #include <stdio.h> | ||
Line 53: | Line 54: | ||
} | } | ||
</pre> | </pre> | ||
== Compiling LibXenon Code == | |||
All of these samples/programs include a Makefile, so its easy to compile them with the [[Compiling_the_Toolchain|Toolchain]]. | |||
cd into_the_directory | |||
make CROSS_COMPILE=xenon- | |||
When you are writing your own programs you can just take the Makefile from this HelloWorld application, put it in your sourcecode-folder and move all the sourcecode-files of your project into a folder "source" so the Makefile can find them. | |||
[[Category:Xbox360_Homebrew_Software]] | |||
[[Category:Xbox360_Development]] |
Latest revision as of 00:24, 7 January 2014
XMENU source code by User:cpasjuste:
Download: libxenon.org
Genesis Plus + SMS Plus source code by User:ced2911:
Genesis Plus: http://www.multiupload.com/6QYQL218GB
SMS Plus: http://www.multiupload.com/62T7RVYB5A
Controller Button test code by User:ced2911:
Source Code (incl. Makefile): Download
#include <stdio.h> #include <stdlib.h> #include <input/input.h> #include <xenos/xenos.h> #include <console/console.h> void mainInit() { //init xenos_init(); console_init(); kmem_init(); usb_init(); usb_do_poll(); } int main() { mainInit(); printf("Test\n"); struct controller_data_s oldc; while(1) { struct controller_data_s c; if (get_controller_data(&c, 0)) { if((c.a)&&(!oldc.a)) { printf("a pushed\n"); } if((!c.a)&&(oldc.a)) { printf("a released\n"); } oldc=c; } usb_do_poll(); } return 0; }
Compiling LibXenon Code
All of these samples/programs include a Makefile, so its easy to compile them with the Toolchain.
cd into_the_directory make CROSS_COMPILE=xenon-
When you are writing your own programs you can just take the Makefile from this HelloWorld application, put it in your sourcecode-folder and move all the sourcecode-files of your project into a folder "source" so the Makefile can find them.