diff options
Diffstat (limited to 'languages/cpp/app_templates/chello_gba')
16 files changed, 781 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/chello_gba/.kdev_ignore b/languages/cpp/app_templates/chello_gba/.kdev_ignore new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/.kdev_ignore diff --git a/languages/cpp/app_templates/chello_gba/Makefile.am b/languages/cpp/app_templates/chello_gba/Makefile.am new file mode 100644 index 00000000..2a72573e --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/Makefile.am @@ -0,0 +1,18 @@ +dataFiles = main.c font.raw.c master.pal.c src-Makefile.am c-Makefile.am \ + c-Makefile.cvs configure.in chellogba.png app.kdevelop \ + main.h gba.h font.bmp README.devel +templateName = chellogba + +### no need to change below: +template_DATA = $(templateName).kdevtemplate +templatedir = ${appwizarddatadir}/templates + +appwizarddatadir = ${kde_datadir}/kdevappwizard +$(templateName).tar.gz: ${dataFiles} ${dataFiles} + $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} + $(GZIP_COMMAND) -f9 $(templateName).tar + +archivedir = ${appwizarddatadir} +archive_DATA = $(templateName).tar.gz ${templateName}.png + +CLEANFILES = *.tar.gz
\ No newline at end of file diff --git a/languages/cpp/app_templates/chello_gba/README.devel b/languages/cpp/app_templates/chello_gba/README.devel new file mode 100644 index 00000000..a7cdcc75 --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/README.devel @@ -0,0 +1,30 @@ +***Description*** + +This is a small demo program for the Gameboy Advance. +It use a custom font to display strings in MODE 0 on Background 2, but contains only capitalized letters at the moment. +The tiles & color palette for the font were generated from the bitmap "font.bmp" +with following commandline. + +"gfx2gba -M -t8 -fsrc font.bmp" + +You can get a compiled version for Linux from http://gbadev.org/files/gfx2gba06.zip, +but you don't need it to run the program. + + +***Compiling and Running*** + +To compile the code please install the DevKitAdvance for Linux/Unix. It contains a gcc 3.x configured as a cross compiler +for the GBA platform. You can download a precompiled version from http://www.doc.ic.ac.uk/~tb100/ + +To build the program KDevelop use +"CC=arm-agb-elf-gcc CXX=arm-agb-elf-g++ ./configure --host=arm-gcc-elf --build=i386" +as default,but you can change that in the project options if you want. + +To start your binary you can use an emulator or buy a flash card (http://www.lik-sang.com). +KDevelop already contains a plugin to run your GBA program with the VisualBoy Advance emulator. +You can download the emulator from: http://vboy.emuhq.com/ + +Have fun! + +Please report bugs,wishes,problems.. to smeier@kdevelop.org (Sandy Meier) + diff --git a/languages/cpp/app_templates/chello_gba/app.kdevelop b/languages/cpp/app_templates/chello_gba/app.kdevelop new file mode 100644 index 00000000..0025fd02 --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/app.kdevelop @@ -0,0 +1,100 @@ +<?xml version="1.0"?> +<kdevelop> + <general> + <author>%{AUTHOR}</author> + <email>%{EMAIL}</email> + <version>%{VERSION}</version> + <projectmanagement>KDevAutoProject</projectmanagement> + <primarylanguage>C</primarylanguage> + <keywords> + <keyword>C</keyword> + <keyword>GBA</keyword> + </keywords> + <ignoreparts> + <part>KDevDebugger</part> + </ignoreparts> + </general> + <kdevautoproject> + <general> + <activetarget>src/%{APPNAMELC}</activetarget> + </general> + <run> + <disable_default>true</disable_default> + </run> + <configurations> + <default> + <configargs>--host=arm-gcc-elf --build=i386</configargs> + <ldflags>-T lnkscript crt0.o</ldflags> + <ccompiler>kdevgccoptions</ccompiler> + <cxxcompiler>kdevgppoptions</cxxcompiler> + <f77compiler>kdevg77options</f77compiler> + <ccompilerbinary>arm-agb-elf-gcc</ccompilerbinary> + <cxxcompilerbinary>arm-agb-elf-g++</cxxcompilerbinary> + <cflags>-nostartfiles</cflags> + </default> + </configurations> + </kdevautoproject> + <kdevvisualadvance> + <binary>src/%{APPNAMELC}.gba</binary> + </kdevvisualadvance> + <kdevdoctreeview> + <ignoretocs> + <toc>ada</toc> + <toc>ada_bugs_gcc</toc> + <toc>bash</toc> + <toc>bash_bugs</toc> + <toc>clanlib</toc> + <toc>w3c-dom-level2-html</toc> + <toc>fortran_bugs_gcc</toc> + <toc>gnome1</toc> + <toc>gnustep</toc> + <toc>gtk</toc> + <toc>gtk_bugs</toc> + <toc>haskell</toc> + <toc>haskell_bugs_ghc</toc> + <toc>java_bugs_gcc</toc> + <toc>java_bugs_sun</toc> + <toc>kde2book</toc> + <toc>libstdc++</toc> + <toc>opengl</toc> + <toc>pascal_bugs_fp</toc> + <toc>php</toc> + <toc>php_bugs</toc> + <toc>perl</toc> + <toc>perl_bugs</toc> + <toc>python</toc> + <toc>python_bugs</toc> + <toc>qt-kdev3</toc> + <toc>ruby</toc> + <toc>ruby_bugs</toc> + <toc>sdl</toc> + <toc>stl</toc> + <toc>w3c-svg</toc> + <toc>sw</toc> + <toc>w3c-uaag10</toc> + <toc>wxwidgets_bugs</toc> + </ignoretocs> + <ignoreqt_xml> + <toc>Guide to the Qt Translation Tools</toc> + <toc>Qt Assistant Manual</toc> + <toc>Qt Designer Manual</toc> + <toc>Qt Reference Documentation</toc> + <toc>qmake User Guide</toc> + </ignoreqt_xml> + <ignoredoxygen> + <toc>KDE Libraries (Doxygen)</toc> + </ignoredoxygen> + </kdevdoctreeview> + <kdevfilecreate> + <useglobaltypes> + <type ext="c"/> + <type ext="h"/> + </useglobaltypes> + </kdevfilecreate> + <kdevdocumentation> + <projectdoc> + <docsystem>Doxygen Documentation Collection</docsystem> + <docurl>%{APPNAMELC}.tag</docurl> + </projectdoc> + </kdevdocumentation> +</kdevelop> diff --git a/languages/cpp/app_templates/chello_gba/c-Makefile.am b/languages/cpp/app_templates/chello_gba/c-Makefile.am new file mode 100644 index 00000000..02520f20 --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/c-Makefile.am @@ -0,0 +1,5 @@ +# not a GNU package. You can remove this line, if +# have all needed files, that a GNU package needs +AUTOMAKE_OPTIONS = foreign 1.4 + +SUBDIRS = src diff --git a/languages/cpp/app_templates/chello_gba/c-Makefile.cvs b/languages/cpp/app_templates/chello_gba/c-Makefile.cvs new file mode 100644 index 00000000..d1607023 --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/c-Makefile.cvs @@ -0,0 +1,8 @@ +default: all + +all: + aclocal + autoheader + automake + autoconf + diff --git a/languages/cpp/app_templates/chello_gba/chellogba.kdevtemplate b/languages/cpp/app_templates/chello_gba/chellogba.kdevtemplate new file mode 100644 index 00000000..7a3ba857 --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/chellogba.kdevtemplate @@ -0,0 +1,173 @@ +# KDE Config File +[General] +Name=Hello world program +Name[ca]=Programa Hello world +Name[da]=Goddag verden program +Name[de]="Hello World"-Programm +Name[el]=Πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» +Name[et]="Tere,maailm" programm +Name[eu]="Kaixo mundua" programa +Name[fa]=برنامۀ Hello world +Name[fr]=Programme « Bonjour monde » +Name[ga]=Ríomhchlár "Hello world" +Name[gl]=Programa Ola mundo +Name[it]=Programma di "Hello world" +Name[ja]=Hello world プログラム +Name[nds]="Moin Welt"-Programm +Name[ne]=हेल्डो वोल्ड कार्यक्रम +Name[nl]=Hello World-programma +Name[pl]=Program 'Witaj świecie' +Name[pt]=Programa 'Olá mundo' +Name[pt_BR]=Programa 'Olá mundo' +Name[ru]=Программа Hello world +Name[sk]=Ahoj svet program +Name[sl]=Program Hello world +Name[sr]=Програм „Здраво свете“ +Name[sr@Latn]=Program „Zdravo svete“ +Name[sv]=Hello world-program +Name[tr]=Merhaba Dünya Programı +Name[zh_CN]=Hello world 程序 +Name[zh_TW]=Hello world 程式 +Icon=chellogba.png +Category=C/GBA +Comment=Generates a simple "Hello world" program for the Gameboy Advance. You will need the "devkitadvance" to compile it. See README.devel for more details. +Comment[ca]=Genera un simple programa de "Hello world" per a la Gameboy Advance. Necessitareu "devkitadvance" per a compilar-lo. Consulteu el README.devel per a més detalls. +Comment[da]=Genererer et simpelt "Goddag verden" program for Gameboy Advance. Du vil skulle bruge "devkitadvance" for at kompilere det. Se README.devel for flere detaljer. +Comment[de]=Erstellt ein einfaches "Hello world"-Programm für den Gameboy Advance. Sie benötigen zum Kompilieren das "devkitadvance". Weitere Einzelheiten finden Sie in der Datei README.devel. +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα "Γεια σου κόσμε" για το Gameboy Advance. Θα χρειαστείτε το "devkitadvance" για τη μεταγλώττισή του. Ανατρέξτε στο README.devel για περισσότερες πληροφορίες. +Comment[es]=Genera un sencillo programa «Hola mundo» para Gameboy Advance. Necesitará «devkitadvance» para compilarlo. Vea README.devel para más detalles. +Comment[et]=Lihtsa "Tere, maailm" programmi loomine Gameboy Advance'i jaoks. Kompileerimiseks on vajalik "devkitadvance". Täpsemalt räägib sellest fail README.devel. +Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Gameboy Advance-erako. "devkitadvance" behar duzu konpilatzeko. Ikusi README.devel xehetasun gehiagorako. +Comment[fa]=یک برنامۀ سادۀ «Hello world» برای Gameboy Advance تولید میکند. برای ترجمۀ آن به »devkitadvance« نیاز دارید. برای جزئیات بیشتر، README.devel را ببینید. +Comment[fr]=Génère un programme « Bonjour monde » simple pour la Gameboy Advance. Vous aurez besoin de « devkitadvance » pour le compiler. Consultez le fichier README.devel pour plus de détails. +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" le haghaidh an Gameboy Advance. Tá gá le "devkitadvance" chun é a thiomsú. Féach ar README.devel chun tuilleadh sonraí a fháil. +Comment[gl]=Xera un programa sinxelo "Ola mundo" para Gameboy Advance. Necesitará "devkitadvance" para compilalo. Consulte README.devel para máis detalles. +Comment[hu]=Létrehoz egy egyszerű Hello world programot a Gameboy Advance-hoz. Lefordításához szükség van a "devkitadvance" csomag telepítésére. További információ a README.devel fájlban található. +Comment[it]=Genera un semplice programma di "Hello world" per il Gameboy Advance. Serve il "devkitadvance" per compilarlo. Guarda un po' README.devel per ulteriori dettagli. +Comment[ja]=Gameboy Advance のための Hello world プログラムを作成します。コンパイルするには devkitadvance が必要です。詳しくは README.devel をご覧ください。 +Comment[nds]=Stellt en eenfach "Moin Welt"-Programm för "Gameboy Advance" op. För't Kompileren deit "devkitadvance" noot. Mehr Enkelheiten laat sik binnen "README.devel" finnen. +Comment[ne]=गेमब्याए एडभान्सका लागि साधारण "हेल्लो वोल्ड नमस्कार" उत्पन्न गर्दछ । यसलाई कम्पाइल गर्न तपाईँलाई "devkitadvance" आवश्यक पर्दछ । बढी जानकारीका लागि README.devel हेर्नुहोस् । +Comment[nl]=Genereert een eenvoudig "Hello World" programma voor de Gameboy Advance. U hebt "devkitadvance" nodig om het te kunnen compileren. Zie het bestand README.devel voor meer informatie. +Comment[pl]=Generuje prosty program "Witaj świecie" na konsolę Gameboy Advance. Do skompilowania go potrzebny jest "devkitadvance". Więcej informacji można znaleźć w pliku README.devel. +Comment[pt]=Gera um programa simples "Olá mundo" para o Gameboy Advance. Irá necessitar do "devkitadvance" para o compilar. Veja o README.devel para mais detalhes. +Comment[pt_BR]=Gera um programa simples "Olá mundo" para o Gameboy Advance. Irá necessitar do "devkitadvance" para o compilar. Veja o README.devel para mais detalhes. +Comment[ru]=Создание простой программы "Hello world" на Gameboy Advance. Вам необходима программа "devkitadvance" для её сборки. Прочтите файл README.devel. +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program pre Gameboy Advance.Budete potrebovať "devkitadvance" na to, aby ste ho skompilovali.Pozrite súbor README.devel pre viac detailov. +Comment[sl]=Ustvari preprost program »Pozdravljen svet« za Gameboy Advance. Za prevajanje boste potrebovali »devkitadvance«. Podrobnosti si lahko ogledate v README.devel. +Comment[sr]=Прави једноставан „Здраво свете“ програм за Gameboy Advance. Требаће вам „devkitadvance“ да бисте га превели. Погледајте README.devel за више детаља. +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program za Gameboy Advance. Trebaće vam „devkitadvance“ da biste ga preveli. Pogledajte README.devel za više detalja. +Comment[sv]=Skapar ett enkelt "Hello world"-program för Gameboy Advance. Du behöver "devkitadvance" för att kompilera det. Se filen README.devel för mer information. +Comment[tr]=Gameboy Advance için basit bir "Merhaba Dünya" programı üretir. Derlemek için "devkitadvance" paketine ihtiyacınız olacak. Daha fazla bilgi için README.devel dosyasına bakın. +Comment[zh_CN]=生成 Gameboy Advance 下的“Hello world”程序。您需要“devkitadvane”才能编译。请查看 README.devel 中的细节。 +Comment[zh_TW]=產生一個簡單的 Gameboy Advance 的 Hello world 程式。您需要 "devkitadvance" 來編譯。詳情請參考 README.devel。 +ShowFileAfterGeneration=README.devel +FileTemplates=h,CStyle,c,CStyle +ShowFilesAfterGeneration=%{dest}/src/main.c +Archive=chellogba.tar.gz + +[INCADMIN] +Type=include +File=%{kdevelop}/template-common/incadmin.kdevtemplate + +[GNU] +Type=include +File=%{kdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.kdevelop +Dest=%{dest}/%{APPNAMELC}.kdevelop + +[FILE2] +Type=install +Source=%{src}/README.devel +Dest=%{dest}/README.devel + +[FILE3] +Type=install +Source=%{src}/c-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE4] +Type=install +Source=%{src}/c-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE5] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE6] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE7] +Type=install +Source=%{src}/main.c +Dest=%{dest}/src/main.c + +[FILE8] +Type=install +Source=%{src}/main.h +Dest=%{dest}/src/main.h + +[FILE9] +Type=install +Source=%{src}/gba.h +Dest=%{dest}/src/gba.h + +[FILE10] +Type=install +Source=%{src}/font.bmp +Dest=%{dest}/src/font.bmp + +[FILE11] +Type=install +Source=%{src}/font.raw.c +Dest=%{dest}/src/font.raw.c + +[FILE12] +Type=install +Source=%{src}/master.pal.c +Dest=%{dest}/src/master.pal.c + +[MSG] +Type=message +Comment=A Hello World program was created in %{dest} +Comment[ca]=A programa de Hello World ha estat creat en %{dest} +Comment[da]=Et Goddag verden program blev oprettet i %{dest} +Comment[de]=Ein "Hello World"-Programm wurde in %{dest} erstellt. +Comment[el]=Ένα πρόγραμμα Γεια σου Κόσμε δημιουργήθηκε στο %{dest} +Comment[es]=Un programa «Hola mundo» ha sido creado en %{dest} +Comment[et]="Tere, maailm" programm loodi asukohta %{dest} +Comment[eu]="Kaixo mundua" programa bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ Hello World در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár "Hello World" i %{dest} +Comment[gl]=Creouse un programa Ola mundo en %{dest} +Comment[hu]=Létrejött egy Hello World program itt: %{dest} +Comment[it]=È stato creato un programma di "Hello World" in %{dest} +Comment[ja]=Hello World プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en "Moin Welt"-Programm opstellt +Comment[ne]=एउटा हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een Hello World-programma is aangemaakt in %{dest} +Comment[pl]=Program 'Witaj świecie' utworzony w %{dest}. +Comment[pt]=Foi criado um programa Olá Mundo em %{dest} +Comment[pt_BR]=Foi criado um programa Olá Mundo em %{dest} +Comment[ru]=Простое приложение Hello World создано в %{dest} +Comment[sk]=Ahoj svet program bol vytvorený v %{dest} +Comment[sl]=Program »Pozdravljen svet« je bil ustvarjen v %{dest} +Comment[sr]=„Здраво свете“ је направљен у %{dest} +Comment[sr@Latn]=„Zdravo svete“ je napravljen u %{dest} +Comment[sv]=Ett Hello World-program skapades i %{dest} +Comment[tr]=Bir Merhaba Dünya programı %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 Hello world 程序 +Comment[zh_TW]=一個 Hello World 程式已經建立在 %{dest} diff --git a/languages/cpp/app_templates/chello_gba/chellogba.png b/languages/cpp/app_templates/chello_gba/chellogba.png Binary files differnew file mode 100644 index 00000000..81bba90a --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/chellogba.png diff --git a/languages/cpp/app_templates/chello_gba/configure.in b/languages/cpp/app_templates/chello_gba/configure.in new file mode 100644 index 00000000..3715e0c8 --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/configure.in @@ -0,0 +1,10 @@ +AC_INIT(configure.in) + +AM_CONFIG_HEADER(config.h) +AM_INIT_AUTOMAKE(%{APPNAMELC}, %{VERSION}) + +AC_LANG_C +AC_PROG_CC +AM_PROG_LIBTOOL + +AC_OUTPUT(Makefile src/Makefile) diff --git a/languages/cpp/app_templates/chello_gba/font.bmp b/languages/cpp/app_templates/chello_gba/font.bmp Binary files differnew file mode 100644 index 00000000..28b8c669 --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/font.bmp diff --git a/languages/cpp/app_templates/chello_gba/font.raw.c b/languages/cpp/app_templates/chello_gba/font.raw.c new file mode 100644 index 00000000..8efbf1dd --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/font.raw.c @@ -0,0 +1,123 @@ +const unsigned char font_Tiles[1920]={ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, +0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, +0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, +0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, +0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, +0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, +0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + diff --git a/languages/cpp/app_templates/chello_gba/gba.h b/languages/cpp/app_templates/chello_gba/gba.h new file mode 100644 index 00000000..9e57c8f8 --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/gba.h @@ -0,0 +1,204 @@ +%{H_TEMPLATE} +// gba.h by eloist + +#ifndef GBA_HEADER +#define GBA_HEADER + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned long u32; + +typedef signed char s8; +typedef signed short s16; +typedef signed long s32; + +typedef unsigned char byte; +typedef unsigned short hword; +typedef unsigned long word; + +#define OAMmem (u32*)0x7000000 +#define VideoBuffer (u16*)0x6000000 +#define OAMdata (u16*)0x6100000 +#define BGPaletteMem (u16*)0x5000000 +#define OBJPaletteMem (u16*)0x5000200 + +#define REG_INTERUPT *(u32*)0x3007FFC +#define REG_DISPCNT *(u32*)0x4000000 +#define REG_DISPCNT_L *(u16*)0x4000000 +#define REG_DISPCNT_H *(u16*)0x4000002 +#define REG_DISPSTAT *(u16*)0x4000004 +#define REG_VCOUNT *(u16*)0x4000006 +#define REG_BG0CNT *(u16*)0x4000008 +#define REG_BG1CNT *(u16*)0x400000A +#define REG_BG2CNT *(u16*)0x400000C +#define REG_BG3CNT *(u16*)0x400000E +#define REG_BG0HOFS *(u16*)0x4000010 +#define REG_BG0VOFS *(u16*)0x4000012 +#define REG_BG1HOFS *(u16*)0x4000014 +#define REG_BG1VOFS *(u16*)0x4000016 +#define REG_BG2HOFS *(u16*)0x4000018 +#define REG_BG2VOFS *(u16*)0x400001A +#define REG_BG3HOFS *(u16*)0x400001C +#define REG_BG3VOFS *(u16*)0x400001E +#define REG_BG2PA *(u16*)0x4000020 +#define REG_BG2PB *(u16*)0x4000022 +#define REG_BG2PC *(u16*)0x4000024 +#define REG_BG2PD *(u16*)0x4000026 +#define REG_BG2X *(u32*)0x4000028 +#define REG_BG2X_L *(u16*)0x4000028 +#define REG_BG2X_H *(u16*)0x400002A +#define REG_BG2Y *(u32*)0x400002C +#define REG_BG2Y_L *(u16*)0x400002C +#define REG_BG2Y_H *(u16*)0x400002E +#define REG_BG3PA *(u16*)0x4000030 +#define REG_BG3PB *(u16*)0x4000032 +#define REG_BG3PC *(u16*)0x4000034 +#define REG_BG3PD *(u16*)0x4000036 +#define REG_BG3X *(u32*)0x4000038 +#define REG_BG3X_L *(u16*)0x4000038 +#define REG_BG3X_H *(u16*)0x400003A +#define REG_BG3Y *(u32*)0x400003C +#define REG_BG3Y_L *(u16*)0x400003C +#define REG_BG3Y_H *(u16*)0x400003E +#define REG_WIN0H *(u16*)0x4000040 +#define REG_WIN1H *(u16*)0x4000042 +#define REG_WIN0V *(u16*)0x4000044 +#define REG_WIN1V *(u16*)0x4000046 +#define REG_WININ *(u16*)0x4000048 +#define REG_WINOUT *(u16*)0x400004A +#define REG_MOSAIC *(u32*)0x400004C +#define REG_MOSAIC_L *(u32*)0x400004C +#define REG_MOSAIC_H *(u32*)0x400004E +#define REG_BLDMOD *(u16*)0x4000050 +#define REG_COLEV *(u16*)0x4000052 +#define REG_COLEY *(u16*)0x4000054 +#define REG_SG10 *(u32*)0x4000060 +#define REG_SG10_L *(u16*)0x4000060 +#define REG_SG10_H *(u16*)0x4000062 +#define REG_SG11 *(u16*)0x4000064 +#define REG_SG20 *(u16*)0x4000068 +#define REG_SG21 *(u16*)0x400006C +#define REG_SG30 *(u32*)0x4000070 +#define REG_SG30_L *(u16*)0x4000070 +#define REG_SG30_H *(u16*)0x4000072 +#define REG_SG31 *(u16*)0x4000074 +#define REG_SG40 *(u16*)0x4000078 +#define REG_SG41 *(u16*)0x400007C +#define REG_SGCNT0 *(u32*)0x4000080 +#define REG_SGCNT0_L *(u16*)0x4000080 +#define REG_SGCNT0_H *(u16*)0x4000082 +#define REG_SGCNT1 *(u16*)0x4000084 +#define REG_SGBIAS *(u16*)0x4000088 +#define REG_SGWR0 *(u32*)0x4000090 +#define REG_SGWR0_L *(u16*)0x4000090 +#define REG_SGWR0_H *(u16*)0x4000092 +#define REG_SGWR1 *(u32*)0x4000094 +#define REG_SGWR1_L *(u16*)0x4000094 +#define REG_SGWR1_H *(u16*)0x4000096 +#define REG_SGWR2 *(u32*)0x4000098 +#define REG_SGWR2_L *(u16*)0x4000098 +#define REG_SGWR2_H *(u16*)0x400009A +#define REG_SGWR3 *(u32*)0x400009C +#define REG_SGWR3_L *(u16*)0x400009C +#define REG_SGWR3_H *(u16*)0x400009E +#define REG_SGFIF0A *(u32*)0x40000A0 +#define REG_SGFIFOA_L *(u16*)0x40000A0 +#define REG_SGFIFOA_H *(u16*)0x40000A2 +#define REG_SGFIFOB *(u32*)0x40000A4 +#define REG_SGFIFOB_L *(u16*)0x40000A4 +#define REG_SGFIFOB_H *(u16*)0x40000A6 +#define REG_DM0SAD *(u32*)0x40000B0 +#define REG_DM0SAD_L *(u16*)0x40000B0 +#define REG_DM0SAD_H *(u16*)0x40000B2 +#define REG_DM0DAD *(u32*)0x40000B4 +#define REG_DM0DAD_L *(u16*)0x40000B4 +#define REG_DM0DAD_H *(u16*)0x40000B6 +#define REG_DM0CNT *(u32*)0x40000B8 +#define REG_DM0CNT_L *(u16*)0x40000B8 +#define REG_DM0CNT_H *(u16*)0x40000BA +#define REG_DM1SAD *(u32*)0x40000BC +#define REG_DM1SAD_L *(u16*)0x40000BC +#define REG_DM1SAD_H *(u16*)0x40000BE +#define REG_DM1DAD *(u32*)0x40000C0 +#define REG_DM1DAD_L *(u16*)0x40000C0 +#define REG_DM1DAD_H *(u16*)0x40000C2 +#define REG_DM1CNT *(u32*)0x40000C4 +#define REG_DM1CNT_L *(u16*)0x40000C4 +#define REG_DM1CNT_H *(u16*)0x40000C6 +#define REG_DM2SAD *(u32*)0x40000C8 +#define REG_DM2SAD_L *(u16*)0x40000C8 +#define REG_DM2SAD_H *(u16*)0x40000CA +#define REG_DM2DAD *(u32*)0x40000CC +#define REG_DM2DAD_L *(u16*)0x40000CC +#define REG_DM2DAD_H *(u16*)0x40000CE +#define REG_DM2CNT *(u32*)0x40000D0 +#define REG_DM2CNT_L *(u16*)0x40000D0 +#define REG_DM2CNT_H *(u16*)0x40000D2 +#define REG_DM3SAD *(u32*)0x40000D4 +#define REG_DM3SAD_L *(u16*)0x40000D4 +#define REG_DM3SAD_H *(u16*)0x40000D6 +#define REG_DM3DAD *(u32*)0x40000D8 +#define REG_DM3DAD_L *(u16*)0x40000D8 +#define REG_DM3DAD_H *(u16*)0x40000DA +#define REG_DM3CNT *(u32*)0x40000DC +#define REG_DM3CNT_L *(u16*)0x40000DC +#define REG_DM3CNT_H *(u16*)0x40000DE +#define REG_TM0D *(u16*)0x4000100 +#define REG_TM0CNT *(u16*)0x4000102 +#define REG_TM1D *(u16*)0x4000104 +#define REG_TM1CNT *(u16*)0x4000106 +#define REG_TM2D *(u16*)0x4000108 +#define REG_TM2CNT *(u16*)0x400010A +#define REG_TM3D *(u16*)0x400010C +#define REG_TM3CNT *(u16*)0x400010E +#define REG_SCD0 *(u16*)0x4000120 +#define REG_SCD1 *(u16*)0x4000122 +#define REG_SCD2 *(u16*)0x4000124 +#define REG_SCD3 *(u16*)0x4000126 +#define REG_SCCNT *(u32*)0x4000128 +#define REG_SCCNT_L *(u16*)0x4000128 +#define REG_SCCNT_H *(u16*)0x400012A +#define REG_P1 *(u16*)0x4000130 +#define REG_P1CNT *(u16*)0x4000132 +#define REG_R *(u16*)0x4000134 +#define REG_HS_CTRL *(u16*)0x4000140 +#define REG_JOYRE *(u32*)0x4000150 +#define REG_JOYRE_L *(u16*)0x4000150 +#define REG_JOYRE_H *(u16*)0x4000152 +#define REG_JOYTR *(u32*)0x4000154 +#define REG_JOYTR_L *(u16*)0x4000154 +#define REG_JOYTR_H *(u16*)0x4000156 +#define REG_JSTAT *(u32*)0x4000158 +#define REG_JSTAT_L *(u16*)0x4000158 +#define REG_JSTAT_H *(u16*)0x400015A +#define REG_IE *(u16*)0x4000200 +#define REG_IF *(u16*)0x4000202 +#define REG_WSCNT *(u16*)0x4000204 +#define REG_IME *(u16*)0x4000208 +#define REG_PAUSE *(u16*)0x4000300 + +///REG_DISPCNT Defines//// +#define BG0_ENABLE 0x100 //these are just the flags for enabling backgrounds and sprites +#define BG1_ENABLE 0x200 +#define BG2_ENABLE 0x400 +#define BG3_ENABLE 0x800 +#define OBJ_ENABLE 0x1000 +#define WIN0_ENABLE 0x2000 +#define WIN1_ENABLE 0x4000 +#define WINOBJ_ENABLE 0x8000 + + +#define OBJ_MAP_LINEAR 0x40 //I'll talk about this when i talk about hardware sprites +#define OBJ_MAP_2D 0x0 +#define BACK_BUFFER 0x10 //this is the flag that controlls wich buffer is being rendered + + +#define MODE0 0x0 //these are the modes +#define MODE1 0x1 +#define MODE2 0x2 +#define MODE3 0x3 +#define MODE4 0x4 +#define MODE5 0x5 + +#endif + diff --git a/languages/cpp/app_templates/chello_gba/main.c b/languages/cpp/app_templates/chello_gba/main.c new file mode 100644 index 00000000..354b4fd8 --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/main.c @@ -0,0 +1,50 @@ +%{CPP_TEMPLATE} + +#include "main.h" + +int main(){ + initTextMode(); + print("HELLO WORLD",9,9); + while(1){} //loop forever + +} + + +void print(char* text,u16 x,u16 y){ + u16 i=0; + u16* ScreenBase = (u16*)0x6004000; + ScreenBase = ScreenBase + x + y*32; + while ( *text != '\0' ){ + + *ScreenBase++ = (u16)*text-'A'+1; + i++; + text++; + } +} + +void initTextMode(){ + REG_DISPCNT = (MODE0 | BG2_ENABLE); //this sets the screen mode to mode 0 and enables background 2 + + // 256 colors and charscreenbase 0, screenbase 8 + // default size is 256x256 pixel + REG_BG2CNT = (1 << 7 | 0 << 2 | 8 << 8); + + + u16* palDest=(u16*)BGPaletteMem; //0x5000000 + u16* palSource = (u16*)Master_Palette; + // copy the palette info (256 colors a 15/16 Bit) into the desired address + u16 i=0; + for (;i<256;i++) { + *palDest++ = *palSource++; + } + + // copy the tiles to charbase 0, (0x6000000 start of the videobuffer) + u16* fontDest = (u16*)VideoBuffer; //this is the start of video memory + u16* fontSource = (u16*)font_Tiles; + i=0; + for(;i<1920;i=i+2){ + *fontDest++ = *fontSource++; + } +} + + diff --git a/languages/cpp/app_templates/chello_gba/main.h b/languages/cpp/app_templates/chello_gba/main.h new file mode 100644 index 00000000..c84f48bb --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/main.h @@ -0,0 +1,12 @@ +%{H_TEMPLATE} + +// gba.h has all the register definitions +#include "gba.h" + +extern u16 font_Tiles[]; // the letters as 8x8 tiles +extern u16 Master_Palette[]; // the color palette + +void print(char* text,u16 x,u16 y); +void initTextMode(); + + diff --git a/languages/cpp/app_templates/chello_gba/master.pal.c b/languages/cpp/app_templates/chello_gba/master.pal.c new file mode 100644 index 00000000..a24fde37 --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/master.pal.c @@ -0,0 +1,35 @@ +const unsigned short Master_Palette[256]={ +0x0000, 0x7fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, +0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 +}; + diff --git a/languages/cpp/app_templates/chello_gba/src-Makefile.am b/languages/cpp/app_templates/chello_gba/src-Makefile.am new file mode 100644 index 00000000..a41e883a --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/src-Makefile.am @@ -0,0 +1,13 @@ +all: %{APPNAMELC}.gba + +%{APPNAMELC}.gba: %{APPNAMELC} + arm-agb-elf-objcopy -O binary %{APPNAMELC} %{APPNAMELC}.gba + +bin_PROGRAMS = %{APPNAMELC} +%{APPNAMELC}_SOURCES = main.h main.c font.raw.c master.pal.c + +# set the include path found by configure +INCLUDES= $(all_includes) + +# the library search path. +%{APPNAMELC}_LDFLAGS = $(all_libraries) |