MyLib ----- MyLib (+DevKitAdvance) installation readme Some useful stuff to get started with GCC and compile my source codes. (which can be found on http://darkfader.cjb.net/gba) History ------- MyLib.2002 - 19 feb 2002 Updates this file. See below for makefile info. Fixed some minor things. MyLib.2002 Some nice features added to Makefile.1 (check it out) And some changes to 3d.cpp/h MyLib.2001b? updated cygwin1.dll (for Win9x/WinNT compatibility?) added mount.exe (for mounting windows directory into unix-like environment) added umount.exe (unmounts them) renamed devkitadv\arm-agb-elf\lib\thumb\interwork\crt0.o -> _crt0.o (so it can find custom crt0.o's but also the other startup/C++ libs) Actually better delete all 4 crt0's there. MyLib Modified Jeff's crt0 (replacing ones of DKA), linkerscript, makefile. Installation procedure of MyLib + DevKitAdvance (compiled by Jason Wilkins) References to additional tools. Procedure --------- Just follow the steps to get a basic setup... * get/extract devkitadv.zip (for example to /dev/gba/devkitadv) * get/extract MyLib.zip (for example to /dev/gba/MyLib) * get/extract NyLib.zip (for example to /dev/gba/NyLib) * get/extract the other zips containing needed tools (for example to /dev/gba/tools) * Set environment settings Edit/copy these lines to a batch file (for example /dev/gba/env.bat or .cmd) @echo off set PATH=\dev\gba\devkitadv\bin;\dev\gba\tools;%PATH% set MYLIB=/dev/gba/devkitadv/MyLib set AGBINC=/dev/gba/devkitadv/NyLib set AGBLIB=/dev/gba/devkitadv/NyLib For non-NT systems, you might need to add a driveletter to the PATH line The paths might be case sensitive! And notice the forward slashes etc... Run this file now (from command line) & whenever you want to compile something or want to access the tools. * Delete or rename the file "\dev\gba\devkitadv\arm-agb-elf\lib\thumb\interwork\crt0.o" This way you can specify a custom crt0 (startup file). * Set Cygnus mountpoints To fix the problem that it can't find '/bin/sh.exe' type the following on the command line: umount -A mount -fX \dev\gba\devkitadv\bin /bin These settings are stored in the registry. * Make NyLib change current directory to /dev/gba/NyLib run 'make' (which is automatically found because of the PATH setting) * Make MyLib change current directory to /dev/gba/MyLib run 'make' (which is automatically found because of the PATH setting) * Download GccTest or some other MyLib compatable example from my site and try to compile it change current directory to /dev/gba/projects/GccTest (example!) run 'make' (which is automatically found because of the PATH setting) maybe you need to replace some things with other values or change makefile a bit to match MyLib version. Should be minor adjustments otherwise there's some big problem :) * Install UltraEdit Configure some hotkeys that will invoke 'env.cmd' and 'make' or something. Capture error output to a listbox and you can click on them to jump to the right line. The errors are clickable and automatically jumps to the right file/line. * Make your own demo or game! Try playing around with it and show me what you have made :) Go through some GCC, C(++), whatever tutorials... * Hang around in #gbadev on EF-net And ask questions... (after you've read all available docs) * Order your GBA & flashadvance linker Click on lik-sang banner on my website :P Oh c'mon... this enables me to continue developing... and you can ask for some handy samples/libs/docs and you can get greetz in my upcoming demos (msg me with date/amount of order to verify) Makefile -------- I like reduce redundancy with things like makefiles. Therefore I include MyLib/Makefile.1 in my makefiles and just specify what files and objects to build. Please check out the comments in Makefile.1 to know what I've put in there. Most settings are optional. If you have problems with comments in makefiles, put the '#' and rest on a new line. Ok here a simple project example... NAME = Test #^^ filename prefix TITLE = Test GAMECODE = Test MAKERCODE = DF PAD_OUTPUT = 0 #^^ passed to header fixer MULTIBOOT = 0 #^^ defines code location etc. (for multibooting) BIN_PREFIX = @ #^^ @ means to include extension in identifier (see bin2o tool) DEBUG = 0 #^^ optimize code? DEBUGLIB = emu #^^ could be mappy|emu|uart|mbv2|none BINS = $(wildcard res/*.bin) #^^ every .bin in res directory will be included SRCS = main.cpp #^^ will add main.o to OBJS list OBJS = \ $(MYLIB)/3d.o $(MYLIB)/maths.o # $(MYLIB)/sprites.o $(MYLIB)/mode7.o #^^ hmm, well... more object files... note the '\' for extending line and '#'. LIBS = stdc++ c m agbsyscall conio #^^ libconio has that cprintf and 3x5 font in it. and bios call thingy and C++ things... include $(MYLIB)/Makefile.1 #^^ at last include the common makefile stuff :) (C) Copyright by Dark Fader