commit fa4520131b53e0bf1bbd2eebd511b48d2655ddd6 Author: Marcos Brito Date: Mon Dec 21 12:08:35 2015 +0100 Initial commit diff --git a/.DS_Store b/.DS_Store new file mode 100755 index 0000000..8014085 Binary files /dev/null and b/.DS_Store differ diff --git a/3D/.svn/all-wcprops b/3D/.svn/all-wcprops new file mode 100755 index 0000000..d1c0d3f --- /dev/null +++ b/3D/.svn/all-wcprops @@ -0,0 +1,71 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate +END +@project@.ico +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.ico +END +project.vho +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/project.vho +END +@project@.txt +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.txt +END +build.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/build.bat +END +NdsLauncher.exe +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/NdsLauncher.exe +END +clean.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/clean.bat +END +@project@.vhw +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.vhw +END +logo.ico +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.ico +END +logo_wifi.bmp +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/123/trunk/vham/templates/project/PAlibTemplate/logo_wifi.bmp +END +Makefile +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/Makefile +END +logo.bmp +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.bmp +END diff --git a/3D/.svn/entries b/3D/.svn/entries new file mode 100755 index 0000000..df087e8 --- /dev/null +++ b/3D/.svn/entries @@ -0,0 +1,156 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +@project@.ico +file + + + + +2003-05-09T15:53:26.000000Z +1d64ae57ec646dc8bbc6294a8bc48566 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +source +dir + +project.vho +file + + + + +2006-01-31T01:51:50.000000Z +62f8d3225fbfb3bbd8bebbf0589f716c +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.txt +file + + + + +2006-01-31T01:52:02.000000Z +3aaf57a858c308d9952bfb1721859a13 +2006-09-03T16:21:26.676623Z +4 +molousk + +build.bat +file + + + + +2005-11-08T04:24:56.000000Z +4af15a2f33b24192e041b721e0e1a7e4 +2006-09-03T16:21:26.676623Z +4 +molousk + +NdsLauncher.exe +file + + + + +2006-02-02T07:40:04.000000Z +2cddbb9d3427a165fc4fd56b19d427e5 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +clean.bat +file + + + + +2005-10-06T08:16:56.000000Z +b7f3f6ea67c49ab9187d752ef9052516 +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.vhw +file + + + + +2006-08-25T20:19:08.000000Z +aba3a9bc8c1e79a1cbfba3f2741c1c0a +2006-09-03T16:21:26.676623Z +4 +molousk + +logo.ico +file + + + + +2005-11-28T00:37:52.000000Z +67bbc374a4d8c1b34b0aff0078409a8d +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +logo_wifi.bmp +file +123 + + + +2007-02-06T17:05:30.609375Z +f1cc2221ddb8445b9d6d5c510f1a52a3 +2007-02-06T17:05:14.209316Z +123 +Molousk +has-props + +logo.bmp +file + + + + +2005-10-18T01:39:22.000000Z +94768f0e78d21ecfc7ad4ddcf44596b0 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +Makefile +file + + + + +2006-08-25T20:11:56.000000Z +d280afc4cb3ea1c949ecc9655000a557 +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/3D/.svn/format b/3D/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/3D/.svn/format @@ -0,0 +1 @@ +8 diff --git a/3D/.svn/prop-base/@project@.ico.svn-base b/3D/.svn/prop-base/@project@.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/3D/.svn/prop-base/@project@.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/3D/.svn/prop-base/NdsLauncher.exe.svn-base b/3D/.svn/prop-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/3D/.svn/prop-base/NdsLauncher.exe.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/3D/.svn/prop-base/logo.bmp.svn-base b/3D/.svn/prop-base/logo.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/3D/.svn/prop-base/logo.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/3D/.svn/prop-base/logo.ico.svn-base b/3D/.svn/prop-base/logo.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/3D/.svn/prop-base/logo.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/3D/.svn/prop-base/logo_wifi.bmp.svn-base b/3D/.svn/prop-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/3D/.svn/prop-base/logo_wifi.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/3D/.svn/text-base/@project@.ico.svn-base b/3D/.svn/text-base/@project@.ico.svn-base new file mode 100755 index 0000000..c5eb19e Binary files /dev/null and b/3D/.svn/text-base/@project@.ico.svn-base differ diff --git a/3D/.svn/text-base/@project@.txt.svn-base b/3D/.svn/text-base/@project@.txt.svn-base new file mode 100755 index 0000000..2f5a41b --- /dev/null +++ b/3D/.svn/text-base/@project@.txt.svn-base @@ -0,0 +1 @@ +A default PAlib Project template \ No newline at end of file diff --git a/3D/.svn/text-base/@project@.vhw.svn-base b/3D/.svn/text-base/@project@.vhw.svn-base new file mode 100755 index 0000000..128945b --- /dev/null +++ b/3D/.svn/text-base/@project@.vhw.svn-base @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/3D/.svn/text-base/Makefile.svn-base b/3D/.svn/text-base/Makefile.svn-base new file mode 100755 index 0000000..fbcead1 --- /dev/null +++ b/3D/.svn/text-base/Makefile.svn-base @@ -0,0 +1,291 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Demo +TEXT2 := using PAlib +TEXT3 := www.palib.com +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wall -O2\ + -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lnds9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + +define bin2o + cp $(<) $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/3D/.svn/text-base/NdsLauncher.exe.svn-base b/3D/.svn/text-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/3D/.svn/text-base/NdsLauncher.exe.svn-base differ diff --git a/3D/.svn/text-base/build.bat.svn-base b/3D/.svn/text-base/build.bat.svn-base new file mode 100755 index 0000000..320651d --- /dev/null +++ b/3D/.svn/text-base/build.bat.svn-base @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/3D/.svn/text-base/clean.bat.svn-base b/3D/.svn/text-base/clean.bat.svn-base new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/3D/.svn/text-base/clean.bat.svn-base @@ -0,0 +1 @@ +make clean diff --git a/3D/.svn/text-base/logo.bmp.svn-base b/3D/.svn/text-base/logo.bmp.svn-base new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/3D/.svn/text-base/logo.bmp.svn-base differ diff --git a/3D/.svn/text-base/logo.ico.svn-base b/3D/.svn/text-base/logo.ico.svn-base new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/3D/.svn/text-base/logo.ico.svn-base differ diff --git a/3D/.svn/text-base/logo_wifi.bmp.svn-base b/3D/.svn/text-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/3D/.svn/text-base/logo_wifi.bmp.svn-base differ diff --git a/3D/.svn/text-base/project.vho.svn-base b/3D/.svn/text-base/project.vho.svn-base new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/3D/.svn/text-base/project.vho.svn-base @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/3D/3D.vhw b/3D/3D.vhw new file mode 100755 index 0000000..bb30d1b Binary files /dev/null and b/3D/3D.vhw differ diff --git a/3D/3D.vhw.bak b/3D/3D.vhw.bak new file mode 100755 index 0000000..128945b --- /dev/null +++ b/3D/3D.vhw.bak @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/3D/Makefile b/3D/Makefile new file mode 100755 index 0000000..9927c66 --- /dev/null +++ b/3D/Makefile @@ -0,0 +1,299 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Project +TEXT2 := using PAlib +TEXT3 := www.palib.info +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif + + +include $(DEVKITARM)/ds_rules + + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wformat=2 -Winline -Wall -O2\ + + -mcpu=arm946e-s -mtune=arm946e-s -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lfat -lnds9 -ldswifi9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + + +define bin2o + cp $(<) $(*).tmp + echo -n $$(( `cat $(*).tmp | wc -c` & 3 )) | sed -e 's/0//g' | sed -e 's/1/000/g' | sed -e 's/2/00/g' | sed -e 's/3/0/g' >> $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/3D/NdsLauncher.exe b/3D/NdsLauncher.exe new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/3D/NdsLauncher.exe differ diff --git a/3D/build.bat b/3D/build.bat new file mode 100755 index 0000000..320651d --- /dev/null +++ b/3D/build.bat @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/3D/build/main.d b/3D/build/main.d new file mode 100755 index 0000000..bfe5d56 --- /dev/null +++ b/3D/build/main.d @@ -0,0 +1,96 @@ +main.o: c:/devkitPro/proyects/3D/source/main.c \ + c:/devkitPro/PAlib/include/nds/PA9.h c:/devkitPro/libnds/include/nds.h \ + c:/devkitPro/libnds/include/nds/jtypes.h \ + c:/devkitPro/libnds/include/nds/bios.h \ + c:/devkitPro/libnds/include/nds/card.h \ + c:/devkitPro/libnds/include/nds/jtypes.h \ + c:/devkitPro/libnds/include/nds/dma.h \ + c:/devkitPro/libnds/include/nds/interrupts.h \ + c:/devkitPro/libnds/include/nds/ipc.h \ + c:/devkitPro/libnds/include/nds/memory.h \ + c:/devkitPro/libnds/include/nds/system.h \ + c:/devkitPro/libnds/include/nds/timers.h \ + c:/devkitPro/libnds/include/nds/arm9/boxtest.h \ + c:/devkitPro/libnds/include/nds/arm9/video.h \ + c:/devkitPro/libnds/include/nds/arm9/videoGL.h \ + c:/devkitPro/libnds/include/nds/arm9/math.h \ + c:/devkitPro/libnds/include/nds/arm9/trig_lut.h \ + c:/devkitPro/libnds/include/nds/arm9/cache.h \ + c:/devkitPro/libnds/include/nds/arm9/console.h \ + c:/devkitPro/libnds/include/nds/arm9/exceptions.h \ + c:/devkitPro/libnds/include/nds/arm9/image.h \ + c:/devkitPro/libnds/include/nds/arm9/pcx.h \ + c:/devkitPro/libnds/include/nds/arm9/input.h \ + c:/devkitPro/libnds/include/nds/arm9/rumble.h \ + c:/devkitPro/libnds/include/nds/arm9/sound.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_IO.h \ + c:/devkitPro/libnds/include/gbfs.h \ + c:/devkitPro/PAlib/include/nds/gba-jpeg-decode.h \ + c:/devkitPro/PAlib/include/nds/gba-jpeg.h \ + c:/devkitPro/PAlib/include/nds/Sound9.h \ + c:/devkitPro/PAlib/include/nds/SoundCommon.h \ + c:/devkitPro/libnds/include/fat.h \ + c:/devkitPro/PAlib/include/nds/PA_IPC.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_General.h \ + c:/devkitPro/PAlib/include/nds/PA_IPC.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Text.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_BgTiles.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_General.h \ + c:/devkitPro/PAlib/include/nds/arm9/text0.h \ + c:/devkitPro/PAlib/include/nds/arm9/text1.h \ + c:/devkitPro/PAlib/include/nds/arm9/text2.h \ + c:/devkitPro/PAlib/include/nds/arm9/text3.h \ + c:/devkitPro/PAlib/include/nds/arm9/text4.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_BgTiles.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_BgLargeMap.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Video.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Sprite.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Math.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Interrupt.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_SpriteDual.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Sprite.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Sound.h \ + c:/devkitPro/PAlib/include/nds/arm9/../Sound9.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_GBFS.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Text.h \ + c:/devkitPro/libnds/include/gbfs.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_FS.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Micro.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Draw.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Palette.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Splash.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Gif.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Draw.h \ + c:/devkitPro/PAlib/include/nds/arm9/gif/gif_lib.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Interrupt.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Keys.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Motion.h \ + c:/devkitPro/libnds/include/nds/arm9/ndsmotion.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_BgRot.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Timer.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_API.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Math.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Palette.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_PaletteDual.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Save.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_FS.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_GBFS.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_SpecialFx.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_TileDual.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Keyboard.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Window.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Mode7.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_BgRot.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_3DSprites.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_IA.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Reco.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_16c.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Wifi.h \ + c:/devkitPro/libnds/include/dswifi9.h \ + c:/devkitPro/libnds/include/dswifi_version.h \ + c:/devkitPro/libnds/include/sys/socket.h \ + c:/devkitPro/libnds/include/netinet/in.h \ + c:/devkitPro/libnds/include/netdb.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Splash.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Gif.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_BgTrans.h diff --git a/3D/build/main.o b/3D/build/main.o new file mode 100755 index 0000000..9e085e0 Binary files /dev/null and b/3D/build/main.o differ diff --git a/3D/clean.bat b/3D/clean.bat new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/3D/clean.bat @@ -0,0 +1 @@ +make clean diff --git a/3D/logo.bmp b/3D/logo.bmp new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/3D/logo.bmp differ diff --git a/3D/logo.ico b/3D/logo.ico new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/3D/logo.ico differ diff --git a/3D/logo_wifi.bmp b/3D/logo_wifi.bmp new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/3D/logo_wifi.bmp differ diff --git a/3D/project.vho b/3D/project.vho new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/3D/project.vho @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/3D/source/.svn/all-wcprops b/3D/source/.svn/all-wcprops new file mode 100755 index 0000000..3de0ae6 --- /dev/null +++ b/3D/source/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 65 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source +END +main.c +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source/main.c +END diff --git a/3D/source/.svn/entries b/3D/source/.svn/entries new file mode 100755 index 0000000..66ac2e9 --- /dev/null +++ b/3D/source/.svn/entries @@ -0,0 +1,28 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate/source +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +main.c +file + + + + +2006-01-31T01:54:02.000000Z +b1140899dc28b1a23ba1bc3c72431e7f +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/3D/source/.svn/format b/3D/source/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/3D/source/.svn/format @@ -0,0 +1 @@ +8 diff --git a/3D/source/.svn/text-base/main.c.svn-base b/3D/source/.svn/text-base/main.c.svn-base new file mode 100755 index 0000000..fff6011 --- /dev/null +++ b/3D/source/.svn/text-base/main.c.svn-base @@ -0,0 +1,25 @@ +// Includes +#include // Include for PA_Lib + +// Function: main() +int main(int argc, char ** argv) +{ + PA_Init(); // Initializes PA_Lib + PA_InitVBL(); // Initializes a standard VBL + + + + + + // Infinite loop to keep the program running + while (1) + { + + + + + PA_WaitForVBL(); + } + + return 0; +} // End of main() diff --git a/3D/source/main.c b/3D/source/main.c new file mode 100755 index 0000000..b1fc274 --- /dev/null +++ b/3D/source/main.c @@ -0,0 +1,16 @@ +#include +int main() +{ +PA_Init3D();//init +while(1) +{ +PA_Init3DDrawing(0.0,0.0,1.0,0.0,0.0,0.0); +glPushMatrix(); +PA_3DBox(0.0,0.0,0.0,0.5,0.1,1.0,0.0,0.0,0.0,255,0,0);//box +glPopMatrix(1); +glFlush();//show +} + +return 0; +}// + diff --git a/CocoUniverse/.svn/all-wcprops b/CocoUniverse/.svn/all-wcprops new file mode 100755 index 0000000..d1c0d3f --- /dev/null +++ b/CocoUniverse/.svn/all-wcprops @@ -0,0 +1,71 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate +END +@project@.ico +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.ico +END +project.vho +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/project.vho +END +@project@.txt +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.txt +END +build.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/build.bat +END +NdsLauncher.exe +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/NdsLauncher.exe +END +clean.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/clean.bat +END +@project@.vhw +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.vhw +END +logo.ico +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.ico +END +logo_wifi.bmp +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/123/trunk/vham/templates/project/PAlibTemplate/logo_wifi.bmp +END +Makefile +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/Makefile +END +logo.bmp +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.bmp +END diff --git a/CocoUniverse/.svn/entries b/CocoUniverse/.svn/entries new file mode 100755 index 0000000..df087e8 --- /dev/null +++ b/CocoUniverse/.svn/entries @@ -0,0 +1,156 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +@project@.ico +file + + + + +2003-05-09T15:53:26.000000Z +1d64ae57ec646dc8bbc6294a8bc48566 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +source +dir + +project.vho +file + + + + +2006-01-31T01:51:50.000000Z +62f8d3225fbfb3bbd8bebbf0589f716c +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.txt +file + + + + +2006-01-31T01:52:02.000000Z +3aaf57a858c308d9952bfb1721859a13 +2006-09-03T16:21:26.676623Z +4 +molousk + +build.bat +file + + + + +2005-11-08T04:24:56.000000Z +4af15a2f33b24192e041b721e0e1a7e4 +2006-09-03T16:21:26.676623Z +4 +molousk + +NdsLauncher.exe +file + + + + +2006-02-02T07:40:04.000000Z +2cddbb9d3427a165fc4fd56b19d427e5 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +clean.bat +file + + + + +2005-10-06T08:16:56.000000Z +b7f3f6ea67c49ab9187d752ef9052516 +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.vhw +file + + + + +2006-08-25T20:19:08.000000Z +aba3a9bc8c1e79a1cbfba3f2741c1c0a +2006-09-03T16:21:26.676623Z +4 +molousk + +logo.ico +file + + + + +2005-11-28T00:37:52.000000Z +67bbc374a4d8c1b34b0aff0078409a8d +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +logo_wifi.bmp +file +123 + + + +2007-02-06T17:05:30.609375Z +f1cc2221ddb8445b9d6d5c510f1a52a3 +2007-02-06T17:05:14.209316Z +123 +Molousk +has-props + +logo.bmp +file + + + + +2005-10-18T01:39:22.000000Z +94768f0e78d21ecfc7ad4ddcf44596b0 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +Makefile +file + + + + +2006-08-25T20:11:56.000000Z +d280afc4cb3ea1c949ecc9655000a557 +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/CocoUniverse/.svn/format b/CocoUniverse/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/CocoUniverse/.svn/format @@ -0,0 +1 @@ +8 diff --git a/CocoUniverse/.svn/prop-base/@project@.ico.svn-base b/CocoUniverse/.svn/prop-base/@project@.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/CocoUniverse/.svn/prop-base/@project@.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/CocoUniverse/.svn/prop-base/NdsLauncher.exe.svn-base b/CocoUniverse/.svn/prop-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/CocoUniverse/.svn/prop-base/NdsLauncher.exe.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/CocoUniverse/.svn/prop-base/logo.bmp.svn-base b/CocoUniverse/.svn/prop-base/logo.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/CocoUniverse/.svn/prop-base/logo.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/CocoUniverse/.svn/prop-base/logo.ico.svn-base b/CocoUniverse/.svn/prop-base/logo.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/CocoUniverse/.svn/prop-base/logo.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/CocoUniverse/.svn/prop-base/logo_wifi.bmp.svn-base b/CocoUniverse/.svn/prop-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/CocoUniverse/.svn/prop-base/logo_wifi.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/CocoUniverse/.svn/text-base/@project@.ico.svn-base b/CocoUniverse/.svn/text-base/@project@.ico.svn-base new file mode 100755 index 0000000..c5eb19e Binary files /dev/null and b/CocoUniverse/.svn/text-base/@project@.ico.svn-base differ diff --git a/CocoUniverse/.svn/text-base/@project@.txt.svn-base b/CocoUniverse/.svn/text-base/@project@.txt.svn-base new file mode 100755 index 0000000..2f5a41b --- /dev/null +++ b/CocoUniverse/.svn/text-base/@project@.txt.svn-base @@ -0,0 +1 @@ +A default PAlib Project template \ No newline at end of file diff --git a/CocoUniverse/.svn/text-base/@project@.vhw.svn-base b/CocoUniverse/.svn/text-base/@project@.vhw.svn-base new file mode 100755 index 0000000..128945b --- /dev/null +++ b/CocoUniverse/.svn/text-base/@project@.vhw.svn-base @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/CocoUniverse/.svn/text-base/Makefile.svn-base b/CocoUniverse/.svn/text-base/Makefile.svn-base new file mode 100755 index 0000000..fbcead1 --- /dev/null +++ b/CocoUniverse/.svn/text-base/Makefile.svn-base @@ -0,0 +1,291 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Demo +TEXT2 := using PAlib +TEXT3 := www.palib.com +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wall -O2\ + -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lnds9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + +define bin2o + cp $(<) $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/CocoUniverse/.svn/text-base/NdsLauncher.exe.svn-base b/CocoUniverse/.svn/text-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/CocoUniverse/.svn/text-base/NdsLauncher.exe.svn-base differ diff --git a/CocoUniverse/.svn/text-base/build.bat.svn-base b/CocoUniverse/.svn/text-base/build.bat.svn-base new file mode 100755 index 0000000..320651d --- /dev/null +++ b/CocoUniverse/.svn/text-base/build.bat.svn-base @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/CocoUniverse/.svn/text-base/clean.bat.svn-base b/CocoUniverse/.svn/text-base/clean.bat.svn-base new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/CocoUniverse/.svn/text-base/clean.bat.svn-base @@ -0,0 +1 @@ +make clean diff --git a/CocoUniverse/.svn/text-base/logo.bmp.svn-base b/CocoUniverse/.svn/text-base/logo.bmp.svn-base new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/CocoUniverse/.svn/text-base/logo.bmp.svn-base differ diff --git a/CocoUniverse/.svn/text-base/logo.ico.svn-base b/CocoUniverse/.svn/text-base/logo.ico.svn-base new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/CocoUniverse/.svn/text-base/logo.ico.svn-base differ diff --git a/CocoUniverse/.svn/text-base/logo_wifi.bmp.svn-base b/CocoUniverse/.svn/text-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/CocoUniverse/.svn/text-base/logo_wifi.bmp.svn-base differ diff --git a/CocoUniverse/.svn/text-base/project.vho.svn-base b/CocoUniverse/.svn/text-base/project.vho.svn-base new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/CocoUniverse/.svn/text-base/project.vho.svn-base @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/CocoUniverse/CocoUniverse.ds.gba b/CocoUniverse/CocoUniverse.ds.gba new file mode 100755 index 0000000..192b93d Binary files /dev/null and b/CocoUniverse/CocoUniverse.ds.gba differ diff --git a/CocoUniverse/CocoUniverse.nds b/CocoUniverse/CocoUniverse.nds new file mode 100755 index 0000000..f61617e Binary files /dev/null and b/CocoUniverse/CocoUniverse.nds differ diff --git a/CocoUniverse/CocoUniverse.sc.nds b/CocoUniverse/CocoUniverse.sc.nds new file mode 100755 index 0000000..192b93d Binary files /dev/null and b/CocoUniverse/CocoUniverse.sc.nds differ diff --git a/CocoUniverse/CocoUniverse.vhw b/CocoUniverse/CocoUniverse.vhw new file mode 100755 index 0000000..57239bd Binary files /dev/null and b/CocoUniverse/CocoUniverse.vhw differ diff --git a/CocoUniverse/CocoUniverse.vhw.bak b/CocoUniverse/CocoUniverse.vhw.bak new file mode 100755 index 0000000..128945b --- /dev/null +++ b/CocoUniverse/CocoUniverse.vhw.bak @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/CocoUniverse/Makefile b/CocoUniverse/Makefile new file mode 100755 index 0000000..9927c66 --- /dev/null +++ b/CocoUniverse/Makefile @@ -0,0 +1,299 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Project +TEXT2 := using PAlib +TEXT3 := www.palib.info +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif + + +include $(DEVKITARM)/ds_rules + + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wformat=2 -Winline -Wall -O2\ + + -mcpu=arm946e-s -mtune=arm946e-s -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lfat -lnds9 -ldswifi9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + + +define bin2o + cp $(<) $(*).tmp + echo -n $$(( `cat $(*).tmp | wc -c` & 3 )) | sed -e 's/0//g' | sed -e 's/1/000/g' | sed -e 's/2/00/g' | sed -e 's/3/0/g' >> $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/CocoUniverse/NdsLauncher.exe b/CocoUniverse/NdsLauncher.exe new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/CocoUniverse/NdsLauncher.exe differ diff --git a/CocoUniverse/build.bat b/CocoUniverse/build.bat new file mode 100755 index 0000000..320651d --- /dev/null +++ b/CocoUniverse/build.bat @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/CocoUniverse/build/Minuano6-8.h b/CocoUniverse/build/Minuano6-8.h new file mode 100755 index 0000000..d892ee2 --- /dev/null +++ b/CocoUniverse/build/Minuano6-8.h @@ -0,0 +1,2 @@ +extern const u8 Minuano6-8[]; +extern const u32 Minuano6-8_size[]; diff --git a/CocoUniverse/build/Minuano6-8.o b/CocoUniverse/build/Minuano6-8.o new file mode 100755 index 0000000..96ecabe Binary files /dev/null and b/CocoUniverse/build/Minuano6-8.o differ diff --git a/CocoUniverse/build/build.bin b/CocoUniverse/build/build.bin new file mode 100755 index 0000000..60ba454 Binary files /dev/null and b/CocoUniverse/build/build.bin differ diff --git a/CocoUniverse/build/build.elf b/CocoUniverse/build/build.elf new file mode 100755 index 0000000..5ce4d8e Binary files /dev/null and b/CocoUniverse/build/build.elf differ diff --git a/CocoUniverse/build/main.d b/CocoUniverse/build/main.d new file mode 100755 index 0000000..5b688b0 --- /dev/null +++ b/CocoUniverse/build/main.d @@ -0,0 +1,98 @@ +main.o: c:/devkitPro/proyects/CocoUniverse/source/main.c \ + c:/devkitPro/PAlib//include/nds/PA9.h c:/devkitPro/libnds/include/nds.h \ + c:/devkitPro/libnds/include/nds/jtypes.h \ + c:/devkitPro/libnds/include/nds/bios.h \ + c:/devkitPro/libnds/include/nds/card.h \ + c:/devkitPro/libnds/include/nds/jtypes.h \ + c:/devkitPro/libnds/include/nds/dma.h \ + c:/devkitPro/libnds/include/nds/interrupts.h \ + c:/devkitPro/libnds/include/nds/ipc.h \ + c:/devkitPro/libnds/include/nds/memory.h \ + c:/devkitPro/libnds/include/nds/system.h \ + c:/devkitPro/libnds/include/nds/timers.h \ + c:/devkitPro/libnds/include/nds/arm9/background.h \ + c:/devkitPro/libnds/include/nds/arm9/boxtest.h \ + c:/devkitPro/libnds/include/nds/arm9/video.h \ + c:/devkitPro/libnds/include/nds/arm9/videoGL.h \ + c:/devkitPro/libnds/include/nds/arm9/math.h \ + c:/devkitPro/libnds/include/nds/arm9/trig_lut.h \ + c:/devkitPro/libnds/include/nds/arm9/cache.h \ + c:/devkitPro/libnds/include/nds/arm9/console.h \ + c:/devkitPro/libnds/include/nds/arm9/exceptions.h \ + c:/devkitPro/libnds/include/nds/arm9/image.h \ + c:/devkitPro/libnds/include/nds/arm9/pcx.h \ + c:/devkitPro/libnds/include/nds/arm9/input.h \ + c:/devkitPro/libnds/include/nds/arm9/rumble.h \ + c:/devkitPro/libnds/include/nds/arm9/sound.h \ + c:/devkitPro/libnds/include/nds/arm9/sprite.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_IO.h \ + c:/devkitPro/libnds/include/gbfs.h \ + c:/devkitPro/PAlib//include/nds/gba-jpeg-decode.h \ + c:/devkitPro/PAlib//include/nds/gba-jpeg.h \ + c:/devkitPro/PAlib//include/nds/Sound9.h \ + c:/devkitPro/PAlib//include/nds/SoundCommon.h \ + c:/devkitPro/libnds/include/fat.h \ + c:/devkitPro/PAlib//include/nds/PA_IPC.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_General.h \ + c:/devkitPro/PAlib//include/nds/PA_IPC.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Text.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgTiles.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_General.h \ + c:/devkitPro/PAlib//include/nds/arm9/text0.h \ + c:/devkitPro/PAlib//include/nds/arm9/text1.h \ + c:/devkitPro/PAlib//include/nds/arm9/text2.h \ + c:/devkitPro/PAlib//include/nds/arm9/text3.h \ + c:/devkitPro/PAlib//include/nds/arm9/text4.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgTiles.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgLargeMap.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Video.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Sprite.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Math.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Interrupt.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_SpriteDual.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Sprite.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Sound.h \ + c:/devkitPro/PAlib//include/nds/arm9/../Sound9.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_GBFS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Text.h \ + c:/devkitPro/libnds/include/gbfs.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_FS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Micro.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Palette.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Splash.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Gif.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h \ + c:/devkitPro/PAlib//include/nds/arm9/gif/gif_lib.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Interrupt.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Keys.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Motion.h \ + c:/devkitPro/libnds/include/nds/arm9/ndsmotion.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgRot.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Timer.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_API.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Math.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Palette.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_PaletteDual.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Save.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_FS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_GBFS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_SpecialFx.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_TileDual.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Keyboard.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Window.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Mode7.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgRot.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_3DSprites.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_IA.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Reco.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_16c.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Wifi.h \ + c:/devkitPro/libnds/include/dswifi9.h \ + c:/devkitPro/libnds/include/dswifi_version.h \ + c:/devkitPro/libnds/include/sys/socket.h \ + c:/devkitPro/libnds/include/netinet/in.h \ + c:/devkitPro/libnds/include/netdb.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Splash.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Gif.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgTrans.h diff --git a/CocoUniverse/build/main.o b/CocoUniverse/build/main.o new file mode 100755 index 0000000..5185866 Binary files /dev/null and b/CocoUniverse/build/main.o differ diff --git a/CocoUniverse/clean.bat b/CocoUniverse/clean.bat new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/CocoUniverse/clean.bat @@ -0,0 +1 @@ +make clean diff --git a/CocoUniverse/data/Minuano6-8.raw b/CocoUniverse/data/Minuano6-8.raw new file mode 100755 index 0000000..891a433 Binary files /dev/null and b/CocoUniverse/data/Minuano6-8.raw differ diff --git a/CocoUniverse/logo.bmp b/CocoUniverse/logo.bmp new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/CocoUniverse/logo.bmp differ diff --git a/CocoUniverse/logo.ico b/CocoUniverse/logo.ico new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/CocoUniverse/logo.ico differ diff --git a/CocoUniverse/logo_wifi.bmp b/CocoUniverse/logo_wifi.bmp new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/CocoUniverse/logo_wifi.bmp differ diff --git a/CocoUniverse/project.vho b/CocoUniverse/project.vho new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/CocoUniverse/project.vho @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/CocoUniverse/source/.svn/all-wcprops b/CocoUniverse/source/.svn/all-wcprops new file mode 100755 index 0000000..3de0ae6 --- /dev/null +++ b/CocoUniverse/source/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 65 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source +END +main.c +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source/main.c +END diff --git a/CocoUniverse/source/.svn/entries b/CocoUniverse/source/.svn/entries new file mode 100755 index 0000000..66ac2e9 --- /dev/null +++ b/CocoUniverse/source/.svn/entries @@ -0,0 +1,28 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate/source +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +main.c +file + + + + +2006-01-31T01:54:02.000000Z +b1140899dc28b1a23ba1bc3c72431e7f +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/CocoUniverse/source/.svn/format b/CocoUniverse/source/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/CocoUniverse/source/.svn/format @@ -0,0 +1 @@ +8 diff --git a/CocoUniverse/source/.svn/text-base/main.c.svn-base b/CocoUniverse/source/.svn/text-base/main.c.svn-base new file mode 100755 index 0000000..fff6011 --- /dev/null +++ b/CocoUniverse/source/.svn/text-base/main.c.svn-base @@ -0,0 +1,25 @@ +// Includes +#include // Include for PA_Lib + +// Function: main() +int main(int argc, char ** argv) +{ + PA_Init(); // Initializes PA_Lib + PA_InitVBL(); // Initializes a standard VBL + + + + + + // Infinite loop to keep the program running + while (1) + { + + + + + PA_WaitForVBL(); + } + + return 0; +} // End of main() diff --git a/CocoUniverse/source/main.c b/CocoUniverse/source/main.c new file mode 100755 index 0000000..fff6011 --- /dev/null +++ b/CocoUniverse/source/main.c @@ -0,0 +1,25 @@ +// Includes +#include // Include for PA_Lib + +// Function: main() +int main(int argc, char ** argv) +{ + PA_Init(); // Initializes PA_Lib + PA_InitVBL(); // Initializes a standard VBL + + + + + + // Infinite loop to keep the program running + while (1) + { + + + + + PA_WaitForVBL(); + } + + return 0; +} // End of main() diff --git a/Cumple/.svn/all-wcprops b/Cumple/.svn/all-wcprops new file mode 100755 index 0000000..d1c0d3f --- /dev/null +++ b/Cumple/.svn/all-wcprops @@ -0,0 +1,71 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate +END +@project@.ico +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.ico +END +project.vho +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/project.vho +END +@project@.txt +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.txt +END +build.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/build.bat +END +NdsLauncher.exe +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/NdsLauncher.exe +END +clean.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/clean.bat +END +@project@.vhw +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.vhw +END +logo.ico +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.ico +END +logo_wifi.bmp +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/123/trunk/vham/templates/project/PAlibTemplate/logo_wifi.bmp +END +Makefile +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/Makefile +END +logo.bmp +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.bmp +END diff --git a/Cumple/.svn/entries b/Cumple/.svn/entries new file mode 100755 index 0000000..df087e8 --- /dev/null +++ b/Cumple/.svn/entries @@ -0,0 +1,156 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +@project@.ico +file + + + + +2003-05-09T15:53:26.000000Z +1d64ae57ec646dc8bbc6294a8bc48566 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +source +dir + +project.vho +file + + + + +2006-01-31T01:51:50.000000Z +62f8d3225fbfb3bbd8bebbf0589f716c +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.txt +file + + + + +2006-01-31T01:52:02.000000Z +3aaf57a858c308d9952bfb1721859a13 +2006-09-03T16:21:26.676623Z +4 +molousk + +build.bat +file + + + + +2005-11-08T04:24:56.000000Z +4af15a2f33b24192e041b721e0e1a7e4 +2006-09-03T16:21:26.676623Z +4 +molousk + +NdsLauncher.exe +file + + + + +2006-02-02T07:40:04.000000Z +2cddbb9d3427a165fc4fd56b19d427e5 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +clean.bat +file + + + + +2005-10-06T08:16:56.000000Z +b7f3f6ea67c49ab9187d752ef9052516 +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.vhw +file + + + + +2006-08-25T20:19:08.000000Z +aba3a9bc8c1e79a1cbfba3f2741c1c0a +2006-09-03T16:21:26.676623Z +4 +molousk + +logo.ico +file + + + + +2005-11-28T00:37:52.000000Z +67bbc374a4d8c1b34b0aff0078409a8d +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +logo_wifi.bmp +file +123 + + + +2007-02-06T17:05:30.609375Z +f1cc2221ddb8445b9d6d5c510f1a52a3 +2007-02-06T17:05:14.209316Z +123 +Molousk +has-props + +logo.bmp +file + + + + +2005-10-18T01:39:22.000000Z +94768f0e78d21ecfc7ad4ddcf44596b0 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +Makefile +file + + + + +2006-08-25T20:11:56.000000Z +d280afc4cb3ea1c949ecc9655000a557 +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/Cumple/.svn/format b/Cumple/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/Cumple/.svn/format @@ -0,0 +1 @@ +8 diff --git a/Cumple/.svn/prop-base/@project@.ico.svn-base b/Cumple/.svn/prop-base/@project@.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/Cumple/.svn/prop-base/@project@.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/Cumple/.svn/prop-base/NdsLauncher.exe.svn-base b/Cumple/.svn/prop-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/Cumple/.svn/prop-base/NdsLauncher.exe.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/Cumple/.svn/prop-base/logo.bmp.svn-base b/Cumple/.svn/prop-base/logo.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/Cumple/.svn/prop-base/logo.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/Cumple/.svn/prop-base/logo.ico.svn-base b/Cumple/.svn/prop-base/logo.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/Cumple/.svn/prop-base/logo.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/Cumple/.svn/prop-base/logo_wifi.bmp.svn-base b/Cumple/.svn/prop-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/Cumple/.svn/prop-base/logo_wifi.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/Cumple/.svn/text-base/@project@.ico.svn-base b/Cumple/.svn/text-base/@project@.ico.svn-base new file mode 100755 index 0000000..c5eb19e Binary files /dev/null and b/Cumple/.svn/text-base/@project@.ico.svn-base differ diff --git a/Cumple/.svn/text-base/@project@.txt.svn-base b/Cumple/.svn/text-base/@project@.txt.svn-base new file mode 100755 index 0000000..2f5a41b --- /dev/null +++ b/Cumple/.svn/text-base/@project@.txt.svn-base @@ -0,0 +1 @@ +A default PAlib Project template \ No newline at end of file diff --git a/Cumple/.svn/text-base/@project@.vhw.svn-base b/Cumple/.svn/text-base/@project@.vhw.svn-base new file mode 100755 index 0000000..128945b --- /dev/null +++ b/Cumple/.svn/text-base/@project@.vhw.svn-base @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/Cumple/.svn/text-base/Makefile.svn-base b/Cumple/.svn/text-base/Makefile.svn-base new file mode 100755 index 0000000..fbcead1 --- /dev/null +++ b/Cumple/.svn/text-base/Makefile.svn-base @@ -0,0 +1,291 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Demo +TEXT2 := using PAlib +TEXT3 := www.palib.com +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wall -O2\ + -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lnds9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + +define bin2o + cp $(<) $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/Cumple/.svn/text-base/NdsLauncher.exe.svn-base b/Cumple/.svn/text-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/Cumple/.svn/text-base/NdsLauncher.exe.svn-base differ diff --git a/Cumple/.svn/text-base/build.bat.svn-base b/Cumple/.svn/text-base/build.bat.svn-base new file mode 100755 index 0000000..320651d --- /dev/null +++ b/Cumple/.svn/text-base/build.bat.svn-base @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/Cumple/.svn/text-base/clean.bat.svn-base b/Cumple/.svn/text-base/clean.bat.svn-base new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/Cumple/.svn/text-base/clean.bat.svn-base @@ -0,0 +1 @@ +make clean diff --git a/Cumple/.svn/text-base/logo.bmp.svn-base b/Cumple/.svn/text-base/logo.bmp.svn-base new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/Cumple/.svn/text-base/logo.bmp.svn-base differ diff --git a/Cumple/.svn/text-base/logo.ico.svn-base b/Cumple/.svn/text-base/logo.ico.svn-base new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/Cumple/.svn/text-base/logo.ico.svn-base differ diff --git a/Cumple/.svn/text-base/logo_wifi.bmp.svn-base b/Cumple/.svn/text-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/Cumple/.svn/text-base/logo_wifi.bmp.svn-base differ diff --git a/Cumple/.svn/text-base/project.vho.svn-base b/Cumple/.svn/text-base/project.vho.svn-base new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/Cumple/.svn/text-base/project.vho.svn-base @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/Cumple/Cumple.sav b/Cumple/Cumple.sav new file mode 100755 index 0000000..a64a5a9 Binary files /dev/null and b/Cumple/Cumple.sav differ diff --git a/Cumple/Cumple.vhw b/Cumple/Cumple.vhw new file mode 100755 index 0000000..477eac0 Binary files /dev/null and b/Cumple/Cumple.vhw differ diff --git a/Cumple/Cumple.vhw.bak b/Cumple/Cumple.vhw.bak new file mode 100755 index 0000000..128945b --- /dev/null +++ b/Cumple/Cumple.vhw.bak @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/Cumple/Makefile b/Cumple/Makefile new file mode 100755 index 0000000..9927c66 --- /dev/null +++ b/Cumple/Makefile @@ -0,0 +1,299 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Project +TEXT2 := using PAlib +TEXT3 := www.palib.info +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif + + +include $(DEVKITARM)/ds_rules + + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wformat=2 -Winline -Wall -O2\ + + -mcpu=arm946e-s -mtune=arm946e-s -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lfat -lnds9 -ldswifi9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + + +define bin2o + cp $(<) $(*).tmp + echo -n $$(( `cat $(*).tmp | wc -c` & 3 )) | sed -e 's/0//g' | sed -e 's/1/000/g' | sed -e 's/2/00/g' | sed -e 's/3/0/g' >> $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/Cumple/NdsLauncher.exe b/Cumple/NdsLauncher.exe new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/Cumple/NdsLauncher.exe differ diff --git a/Cumple/build.bat b/Cumple/build.bat new file mode 100755 index 0000000..320651d --- /dev/null +++ b/Cumple/build.bat @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/Cumple/clean.bat b/Cumple/clean.bat new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/Cumple/clean.bat @@ -0,0 +1 @@ +make clean diff --git a/Cumple/data/cumple.raw b/Cumple/data/cumple.raw new file mode 100755 index 0000000..f27156b Binary files /dev/null and b/Cumple/data/cumple.raw differ diff --git a/Cumple/logo.bmp b/Cumple/logo.bmp new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/Cumple/logo.bmp differ diff --git a/Cumple/logo.ico b/Cumple/logo.ico new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/Cumple/logo.ico differ diff --git a/Cumple/logo_wifi.bmp b/Cumple/logo_wifi.bmp new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/Cumple/logo_wifi.bmp differ diff --git a/Cumple/project.vho b/Cumple/project.vho new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/Cumple/project.vho @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/Cumple/source/.svn/all-wcprops b/Cumple/source/.svn/all-wcprops new file mode 100755 index 0000000..3de0ae6 --- /dev/null +++ b/Cumple/source/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 65 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source +END +main.c +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source/main.c +END diff --git a/Cumple/source/.svn/entries b/Cumple/source/.svn/entries new file mode 100755 index 0000000..66ac2e9 --- /dev/null +++ b/Cumple/source/.svn/entries @@ -0,0 +1,28 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate/source +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +main.c +file + + + + +2006-01-31T01:54:02.000000Z +b1140899dc28b1a23ba1bc3c72431e7f +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/Cumple/source/.svn/format b/Cumple/source/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/Cumple/source/.svn/format @@ -0,0 +1 @@ +8 diff --git a/Cumple/source/.svn/text-base/main.c.svn-base b/Cumple/source/.svn/text-base/main.c.svn-base new file mode 100755 index 0000000..fff6011 --- /dev/null +++ b/Cumple/source/.svn/text-base/main.c.svn-base @@ -0,0 +1,25 @@ +// Includes +#include // Include for PA_Lib + +// Function: main() +int main(int argc, char ** argv) +{ + PA_Init(); // Initializes PA_Lib + PA_InitVBL(); // Initializes a standard VBL + + + + + + // Infinite loop to keep the program running + while (1) + { + + + + + PA_WaitForVBL(); + } + + return 0; +} // End of main() diff --git a/Cumple/source/gfx/all_gfx.c b/Cumple/source/gfx/all_gfx.c new file mode 100755 index 0000000..f8fa4ad --- /dev/null +++ b/Cumple/source/gfx/all_gfx.c @@ -0,0 +1,24 @@ +//Gfx converted using Mollusk's PAGfx Converter + +//This file contains all the .c, for easier inclusion in a project + +#ifdef __cplusplus +extern "C" { +#endif + +#include "all_gfx.h" + + +// Sprite files : +#include "tarta.c" + +// Palette files : +#include "tarta.pal.c" + +// Background Pointers : + + +#ifdef __cplusplus +} +#endif + diff --git a/Cumple/source/gfx/all_gfx.h b/Cumple/source/gfx/all_gfx.h new file mode 100755 index 0000000..f0329dd --- /dev/null +++ b/Cumple/source/gfx/all_gfx.h @@ -0,0 +1,28 @@ +//Gfx converted using Mollusk's PAGfx Converter + +//This file contains all the .h, for easier inclusion in a project + +#ifndef ALL_GFX_H +#define ALL_GFX_H + +#ifndef PAGfx_struct + typedef struct{ + void *Map; + int MapSize; + void *Tiles; + int TileSize; + void *Palette; + int *Info; +} PAGfx_struct; +#endif + + +// Sprite files : +extern const unsigned char tarta_Sprite[12288] __attribute__ ((aligned (4))) ; // Pal : tarta_Pal + +// Palette files : +extern const unsigned short tarta_Pal[75] __attribute__ ((aligned (4))) ; + + +#endif + diff --git a/Cumple/source/gfx/tarta.c b/Cumple/source/gfx/tarta.c new file mode 100755 index 0000000..9d1d2f1 --- /dev/null +++ b/Cumple/source/gfx/tarta.c @@ -0,0 +1,774 @@ +//Sprite created using PAGfx +//This sprite uses tarta_Pal + +const unsigned char tarta_Sprite[12288] __attribute__ ((aligned (4))) = { +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 15, 16, +0, 0, 0, 0, 0, 15, 16, 13, 0, 0, 0, 0, 13, 13, 13, 16, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 13, 14, 0, 0, 0, 3, 8, 15, 13, 16, 3, 8, 8, 7, 17, +16, 21, 21, 7, 18, 18, 10, 10, 21, 15, 21, 26, 17, 10, 10, 18, +13, 13, 15, 15, 18, 10, 10, 10, 13, 13, 13, 15, 25, 17, 10, 10, +0, 0, 0, 1, 0, 0, 0, 2, 0, 5, 4, 6, 6, 7, 8, 9, +8, 7, 7, 6, 6, 6, 12, 12, 17, 10, 18, 9, 19, 6, 6, 18, +17, 10, 12, 6, 22, 9, 6, 6, 10, 10, 9, 9, 22, 22, 6, 6, +10, 10, 9, 24, 22, 22, 6, 6, 10, 17, 10, 6, 19, 19, 6, 6, +3, 0, 0, 0, 0, 3, 4, 0, 6, 9, 8, 7, 10, 6, 9, 8, +6, 6, 6, 10, 12, 6, 6, 6, 6, 19, 6, 9, 20, 6, 19, 6, +19, 23, 6, 6, 9, 19, 23, 6, 27, 22, 19, 6, 6, 27, 22, 19, +22, 22, 19, 6, 6, 22, 22, 19, 6, 23, 6, 6, 6, 9, 24, 6, +0, 0, 0, 0, 0, 0, 0, 0, 7, 11, 6, 7, 8, 12, 4, 5, +10, 9, 6, 6, 10, 7, 7, 7, 9, 20, 6, 6, 6, 10, 17, 10, +6, 10, 6, 24, 6, 6, 10, 10, 6, 6, 23, 22, 9, 6, 10, 10, +6, 6, 22, 22, 24, 6, 10, 10, 6, 6, 23, 22, 9, 6, 18, 17, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +8, 8, 3, 0, 0, 0, 0, 0, 17, 17, 7, 8, 8, 3, 0, 13, +17, 10, 10, 18, 18, 7, 13, 16, 10, 18, 10, 10, 10, 16, 16, 21, +10, 10, 10, 10, 13, 16, 25, 15, 10, 10, 17, 15, 16, 13, 16, 13, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 13, 0, 0, 0, 0, 0, 0, 15, 16, 0, 0, 0, 0, 0, 0, +25, 16, 0, 0, 0, 0, 0, 0, 25, 15, 0, 0, 0, 0, 0, 0, +13, 25, 0, 0, 0, 0, 0, 0, 13, 15, 14, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 15, 16, 13, 16, 0, 0, 0, 13, 13, 13, 13, 16, +0, 0, 0, 7, 13, 15, 13, 16, 0, 0, 10, 17, 2, 15, 13, 13, +0, 0, 7, 10, 7, 25, 13, 13, 0, 20, 18, 18, 17, 17, 10, 25, +0, 8, 17, 10, 17, 10, 10, 10, 0, 7, 10, 10, 10, 10, 10, 10, +13, 13, 13, 13, 13, 10, 17, 17, 15, 13, 16, 13, 13, 25, 17, 10, +13, 13, 16, 13, 15, 25, 17, 17, 13, 13, 13, 15, 13, 10, 17, 17, +15, 13, 13, 15, 26, 17, 10, 10, 17, 25, 10, 17, 17, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, +17, 10, 10, 10, 11, 28, 10, 10, 10, 17, 17, 17, 9, 38, 12, 10, +10, 17, 17, 17, 29, 11, 10, 10, 17, 10, 10, 10, 9, 28, 10, 10, +10, 10, 10, 10, 9, 38, 10, 10, 10, 10, 10, 10, 9, 10, 10, 10, +17, 17, 10, 17, 5, 52, 17, 10, 10, 10, 10, 17, 5, 55, 17, 10, +29, 30, 31, 10, 17, 32, 33, 34, 10, 39, 31, 10, 17, 40, 33, 34, +10, 39, 43, 10, 17, 44, 45, 17, 10, 30, 31, 10, 17, 48, 49, 34, +10, 39, 31, 10, 17, 40, 33, 34, 10, 39, 12, 10, 17, 48, 45, 34, +17, 53, 54, 10, 17, 5, 55, 17, 17, 53, 54, 11, 10, 5, 55, 17, +10, 35, 36, 11, 9, 12, 10, 10, 10, 41, 42, 29, 10, 10, 17, 17, +10, 46, 47, 17, 10, 17, 17, 17, 17, 50, 42, 17, 10, 10, 10, 10, +10, 41, 42, 11, 10, 10, 10, 10, 10, 51, 47, 10, 10, 10, 10, 10, +17, 5, 55, 17, 10, 10, 10, 17, 17, 5, 55, 17, 10, 10, 10, 10, +17, 17, 10, 13, 13, 13, 16, 13, 10, 17, 25, 16, 13, 16, 13, 13, +10, 17, 15, 13, 13, 16, 13, 15, 17, 17, 10, 13, 15, 16, 13, 15, +10, 10, 17, 25, 15, 13, 13, 15, 10, 10, 10, 17, 9, 15, 2, 25, +17, 10, 10, 10, 10, 17, 17, 10, 10, 10, 10, 10, 10, 10, 10, 10, +16, 13, 13, 37, 0, 0, 0, 0, 16, 13, 13, 15, 8, 0, 0, 0, +13, 13, 15, 13, 18, 8, 0, 0, 16, 13, 15, 13, 17, 17, 10, 0, +13, 13, 15, 26, 18, 10, 7, 0, 15, 9, 10, 17, 17, 18, 18, 20, +17, 10, 10, 10, 17, 10, 17, 8, 10, 10, 10, 10, 10, 10, 10, 7, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 7, 18, 10, 10, 10, 10, 10, 0, 7, 18, 10, 9, 9, 10, 10, +0, 7, 18, 10, 9, 10, 10, 10, 0, 7, 7, 10, 9, 10, 10, 10, +0, 7, 7, 10, 10, 10, 10, 9, 0, 57, 7, 7, 10, 10, 10, 10, +0, 8, 18, 7, 10, 10, 10, 11, 0, 8, 7, 10, 10, 10, 10, 10, +10, 10, 9, 11, 10, 10, 10, 10, 10, 9, 10, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, +9, 9, 9, 9, 10, 10, 10, 10, 9, 9, 9, 9, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 17, 9, 10, 10, 10, 17, 29, 12, 3, +10, 10, 10, 10, 9, 56, 11, 10, 9, 9, 9, 9, 11, 11, 9, 9, +9, 10, 10, 10, 10, 9, 9, 9, 10, 10, 10, 9, 9, 9, 9, 9, +10, 9, 9, 10, 9, 10, 10, 10, 9, 9, 9, 9, 10, 17, 17, 11, +10, 17, 17, 17, 12, 2, 2, 13, 2, 16, 16, 16, 16, 16, 16, 55, +10, 56, 12, 10, 10, 12, 56, 11, 10, 11, 10, 17, 10, 2, 34, 9, +10, 10, 10, 15, 13, 10, 10, 10, 10, 11, 13, 16, 21, 10, 10, 9, +10, 13, 16, 21, 25, 25, 17, 10, 13, 16, 25, 15, 13, 21, 10, 10, +16, 13, 16, 13, 13, 13, 3, 2, 58, 58, 58, 55, 58, 55, 55, 55, +10, 12, 56, 11, 9, 10, 10, 10, 10, 11, 11, 9, 9, 9, 9, 9, +10, 9, 9, 9, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 10, 10, +10, 9, 10, 10, 9, 10, 9, 9, 11, 10, 10, 10, 10, 9, 9, 9, +2, 2, 2, 12, 17, 17, 17, 10, 16, 16, 16, 16, 16, 55, 59, 2, +10, 10, 10, 10, 10, 11, 9, 10, 9, 10, 10, 10, 10, 10, 10, 9, +9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 9, 9, 9, 9, 10, 10, 10, 10, 9, 9, 9, +10, 10, 10, 10, 10, 10, 10, 10, 12, 17, 17, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 18, 7, 10, 10, 10, 9, 9, 10, 18, 7, +10, 10, 10, 10, 9, 10, 18, 7, 10, 10, 10, 10, 9, 10, 7, 7, +9, 9, 10, 10, 10, 10, 7, 7, 9, 10, 10, 10, 10, 7, 7, 57, +10, 11, 10, 10, 10, 7, 18, 8, 9, 10, 10, 10, 10, 10, 7, 8, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 8, 7, 18, 10, 10, 10, 17, 0, 8, 8, 7, 10, 10, 10, 18, +0, 0, 8, 57, 10, 10, 17, 18, 0, 0, 7, 8, 57, 10, 10, 10, +0, 0, 7, 8, 8, 57, 10, 10, 0, 0, 29, 57, 8, 8, 57, 18, +0, 0, 7, 7, 57, 8, 8, 8, 0, 0, 0, 8, 57, 57, 8, 8, +9, 9, 10, 29, 3, 16, 16, 16, 7, 17, 9, 53, 13, 3, 3, 4, +7, 7, 58, 4, 53, 4, 53, 58, 10, 17, 16, 54, 53, 5, 53, 13, +10, 17, 55, 20, 53, 53, 16, 13, 10, 17, 58, 57, 53, 16, 16, 13, +7, 17, 6, 20, 58, 4, 53, 13, 8, 7, 7, 5, 54, 67, 65, 62, +58, 4, 5, 5, 12, 54, 12, 12, 5, 4, 4, 4, 4, 61, 26, 4, +16, 4, 53, 16, 53, 53, 59, 53, 16, 4, 5, 53, 5, 16, 53, 16, +58, 59, 53, 16, 53, 16, 16, 58, 53, 58, 53, 20, 53, 57, 55, 4, +58, 58, 53, 8, 53, 62, 16, 5, 62, 65, 62, 65, 67, 65, 62, 57, +12, 12, 12, 26, 12, 12, 12, 20, 4, 4, 4, 54, 4, 12, 5, 16, +20, 53, 53, 58, 16, 61, 16, 58, 57, 53, 13, 58, 16, 4, 4, 16, +8, 16, 53, 63, 16, 4, 53, 4, 8, 53, 13, 61, 16, 4, 53, 4, +62, 53, 53, 54, 16, 61, 5, 16, 62, 62, 67, 62, 68, 69, 62, 67, +20, 20, 20, 54, 54, 60, 5, 13, 53, 53, 58, 5, 60, 5, 5, 20, +4, 4, 16, 58, 5, 16, 53, 4, 4, 4, 55, 58, 54, 53, 58, 58, +61, 4, 53, 53, 54, 53, 61, 16, 61, 4, 16, 16, 54, 53, 16, 16, +4, 3, 58, 13, 5, 53, 58, 16, 70, 67, 70, 20, 62, 69, 65, 62, +55, 55, 59, 12, 17, 10, 10, 9, 54, 4, 61, 58, 13, 17, 9, 10, +58, 16, 16, 58, 59, 12, 17, 7, 53, 58, 16, 16, 62, 5, 7, 59, +55, 58, 53, 48, 64, 60, 17, 3, 53, 4, 53, 65, 65, 12, 17, 3, +48, 58, 53, 65, 66, 12, 10, 12, 65, 62, 66, 26, 9, 17, 7, 7, +9, 17, 10, 10, 10, 18, 7, 8, 7, 18, 10, 10, 10, 7, 8, 8, +7, 18, 17, 10, 10, 57, 8, 12, 17, 10, 10, 10, 57, 8, 7, 0, +17, 10, 10, 57, 8, 8, 7, 0, 10, 18, 57, 8, 8, 57, 29, 0, +7, 8, 8, 8, 57, 7, 7, 0, 8, 8, 8, 57, 57, 8, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 8, 57, 57, 8, 8, 0, 0, 0, 8, 8, 57, 57, 8, +0, 0, 0, 8, 57, 57, 7, 57, 0, 0, 0, 8, 57, 8, 57, 57, +0, 0, 0, 20, 57, 8, 8, 8, 0, 0, 0, 0, 8, 8, 57, 8, +0, 0, 0, 0, 8, 8, 8, 57, 0, 0, 0, 0, 8, 8, 8, 8, +8, 8, 8, 57, 10, 12, 48, 20, 8, 8, 8, 8, 8, 7, 17, 9, +8, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +67, 62, 65, 65, 65, 65, 65, 65, 12, 12, 5, 60, 60, 60, 60, 60, +7, 18, 17, 10, 9, 9, 9, 9, 8, 8, 8, 8, 57, 7, 10, 10, +8, 8, 57, 8, 57, 57, 57, 57, 57, 57, 57, 57, 57, 7, 7, 7, +8, 8, 8, 57, 57, 7, 7, 7, 8, 57, 57, 57, 57, 7, 7, 7, +64, 64, 64, 64, 64, 65, 65, 65, 60, 60, 60, 60, 60, 60, 60, 60, +11, 11, 11, 11, 10, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, +7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +65, 62, 62, 62, 65, 64, 68, 69, 54, 54, 62, 64, 69, 54, 12, 9, +26, 67, 54, 9, 12, 10, 17, 18, 10, 10, 17, 7, 57, 8, 8, 8, +7, 57, 57, 57, 57, 8, 57, 8, 7, 7, 7, 7, 57, 57, 57, 57, +7, 7, 7, 7, 57, 57, 8, 8, 7, 7, 7, 7, 57, 57, 57, 57, +5, 12, 9, 9, 17, 57, 8, 8, 9, 11, 17, 7, 8, 8, 8, 8, +7, 57, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 57, 57, 8, 0, 0, 8, 8, 57, 57, 8, 8, 0, 0, +8, 57, 7, 57, 57, 8, 0, 0, 8, 57, 57, 8, 57, 8, 0, 0, +8, 8, 8, 8, 57, 20, 0, 0, 8, 8, 57, 8, 8, 0, 0, 0, +8, 57, 8, 8, 8, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, +0,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, 17, 10, 10, 18, +13, 13, 15, 15, 18, 10, 10, 10, 13, 13, 13, 15, 25, 17, 10, 10, +0, 0, 0, 0, 0, 0, 59, 3, 0, 5, 3, 8, 8, 1, 6, 7, +8, 7, 7, 7, 6, 6, 6, 10, 17, 10, 18, 6, 6, 6, 9, 10, +17, 10, 10, 6, 6, 24, 9, 9, 10, 10, 9, 6, 19, 22, 9, 6, +10, 10, 9, 6, 22, 22, 19, 6, 10, 17, 9, 6, 27, 22, 19, 9, +0, 0, 13, 6, 0, 0, 0, 13, 7, 7, 6, 6, 8, 7, 7, 6, +12, 6, 6, 6, 10, 12, 6, 6, 6, 6, 19, 9, 18, 6, 6, 19, +6, 9, 22, 6, 9, 6, 9, 22, 6, 22, 22, 9, 6, 6, 22, 22, +6, 22, 22, 24, 6, 6, 22, 22, 6, 19, 19, 6, 9, 6, 19, 19, +6, 3, 0, 0, 19, 59, 0, 0, 6, 7, 8, 1, 6, 2, 4, 5, +6, 10, 6, 6, 6, 17, 7, 7, 9, 9, 6, 19, 6, 7, 10, 10, +6, 6, 6, 23, 19, 6, 10, 17, 9, 6, 19, 22, 27, 6, 10, 10, +24, 6, 19, 22, 22, 6, 10, 10, 6, 9, 6, 24, 6, 6, 17, 17, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +8, 8, 3, 0, 0, 0, 0, 0, 17, 17, 7, 8, 8, 3, 0, 13, +17, 10, 10, 18, 18, 7, 13, 16, 10, 18, 10, 10, 10, 16, 16, 21, +10, 10, 10, 10, 13, 16, 25, 15, 10, 10, 17, 15, 16, 13, 16, 13, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 13, 0, 0, 0, 0, 0, 0, 15, 16, 0, 0, 0, 0, 0, 0, +25, 16, 0, 0, 0, 0, 0, 0, 25, 15, 0, 0, 0, 0, 0, 0, +13, 25, 0, 0, 0, 0, 0, 0, 13, 15, 14, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 15, 16, 13, 16, 0, 0, 0, 13, 13, 13, 13, 16, +0, 0, 0, 7, 13, 15, 13, 16, 0, 0, 10, 17, 2, 15, 13, 13, +0, 0, 7, 10, 7, 25, 13, 13, 0, 20, 18, 18, 17, 17, 10, 25, +0, 8, 17, 10, 17, 10, 10, 10, 0, 7, 10, 10, 10, 10, 10, 10, +13, 13, 13, 13, 13, 10, 17, 17, 15, 13, 16, 13, 13, 25, 17, 10, +13, 13, 16, 13, 15, 25, 17, 17, 13, 13, 13, 15, 13, 10, 17, 17, +15, 13, 13, 15, 26, 17, 10, 10, 17, 25, 10, 17, 17, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, +17, 10, 10, 9, 11, 9, 9, 10, 10, 17, 17, 17, 12, 38, 10, 10, +10, 17, 17, 17, 29, 11, 10, 10, 17, 10, 10, 10, 9, 28, 10, 10, +10, 10, 10, 10, 9, 38, 10, 10, 10, 10, 10, 10, 9, 10, 10, 10, +17, 17, 10, 17, 5, 52, 17, 10, 10, 10, 10, 17, 5, 55, 17, 10, +17, 50, 71, 17, 17, 67, 72, 6, 10, 39, 31, 10, 17, 40, 33, 34, +10, 39, 43, 10, 17, 44, 45, 17, 10, 30, 31, 10, 17, 48, 49, 34, +10, 39, 31, 10, 17, 40, 33, 34, 10, 39, 12, 10, 17, 48, 45, 34, +17, 53, 54, 10, 17, 5, 55, 17, 17, 53, 54, 11, 10, 5, 55, 17, +10, 73, 73, 11, 10, 10, 10, 10, 10, 51, 42, 34, 10, 10, 17, 17, +10, 46, 47, 17, 10, 17, 17, 17, 17, 50, 42, 17, 10, 10, 10, 10, +10, 41, 42, 11, 10, 10, 10, 10, 10, 51, 47, 10, 10, 10, 10, 10, +17, 5, 55, 17, 10, 10, 10, 17, 17, 5, 55, 17, 10, 10, 10, 10, +17, 17, 10, 13, 13, 13, 16, 13, 10, 17, 25, 16, 13, 16, 13, 13, +10, 17, 15, 13, 13, 16, 13, 15, 17, 17, 10, 13, 15, 16, 13, 15, +10, 10, 17, 25, 15, 13, 13, 15, 10, 10, 10, 17, 9, 15, 2, 25, +17, 10, 10, 10, 10, 17, 17, 10, 10, 10, 10, 10, 10, 10, 10, 10, +16, 13, 13, 37, 0, 0, 0, 0, 16, 13, 13, 15, 8, 0, 0, 0, +13, 13, 15, 13, 18, 8, 0, 0, 16, 13, 15, 13, 17, 17, 10, 0, +13, 13, 15, 26, 18, 10, 7, 0, 15, 9, 10, 17, 17, 18, 18, 20, +17, 10, 10, 10, 17, 10, 17, 8, 10, 10, 10, 10, 10, 10, 10, 7, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 7, 18, 10, 10, 10, 10, 10, 0, 7, 18, 10, 9, 9, 10, 10, +0, 7, 18, 10, 9, 10, 10, 10, 0, 7, 7, 10, 9, 10, 10, 10, +0, 7, 7, 10, 10, 10, 10, 9, 0, 57, 7, 7, 10, 10, 10, 10, +0, 8, 18, 7, 10, 10, 10, 11, 0, 8, 7, 10, 10, 10, 10, 10, +10, 10, 9, 11, 10, 10, 10, 10, 10, 9, 10, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, +9, 9, 9, 9, 10, 10, 10, 10, 9, 9, 9, 9, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 17, 9, 10, 10, 10, 17, 29, 12, 3, +10, 10, 10, 10, 9, 56, 11, 10, 9, 9, 9, 9, 11, 11, 9, 9, +9, 10, 10, 10, 10, 9, 9, 9, 10, 10, 10, 9, 9, 9, 9, 9, +10, 9, 9, 10, 9, 10, 10, 10, 9, 9, 9, 9, 10, 17, 17, 11, +10, 17, 17, 17, 12, 2, 2, 13, 2, 16, 16, 16, 16, 16, 16, 55, +10, 56, 12, 10, 10, 12, 56, 11, 10, 11, 10, 17, 10, 2, 34, 9, +10, 10, 10, 15, 13, 10, 10, 10, 10, 11, 13, 16, 21, 10, 10, 9, +10, 13, 16, 21, 25, 25, 17, 10, 13, 16, 25, 15, 13, 21, 10, 10, +16, 13, 16, 13, 13, 13, 3, 2, 58, 58, 58, 55, 58, 55, 55, 55, +10, 12, 56, 11, 9, 10, 10, 10, 10, 11, 11, 9, 9, 9, 9, 9, +10, 9, 9, 9, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 10, 10, +10, 9, 10, 10, 9, 10, 9, 9, 11, 10, 10, 10, 10, 9, 9, 9, +2, 2, 2, 12, 17, 17, 17, 10, 16, 16, 16, 16, 16, 55, 59, 2, +10, 10, 10, 10, 10, 11, 9, 10, 9, 10, 10, 10, 10, 10, 10, 9, +9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 9, 9, 9, 9, 10, 10, 10, 10, 9, 9, 9, +10, 10, 10, 10, 10, 10, 10, 10, 12, 17, 17, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 18, 7, 10, 10, 10, 9, 9, 10, 18, 7, +10, 10, 10, 10, 9, 10, 18, 7, 10, 10, 10, 10, 9, 10, 7, 7, +9, 9, 10, 10, 10, 10, 7, 7, 9, 10, 10, 10, 10, 7, 7, 57, +10, 11, 10, 10, 10, 7, 18, 8, 9, 10, 10, 10, 10, 10, 7, 8, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 8, 7, 18, 10, 10, 10, 17, 0, 8, 8, 7, 10, 10, 10, 18, +0, 0, 8, 57, 10, 10, 17, 18, 0, 0, 7, 8, 57, 10, 10, 10, +0, 0, 7, 8, 8, 57, 10, 10, 0, 0, 29, 57, 8, 8, 57, 18, +0, 0, 7, 7, 57, 8, 8, 8, 0, 0, 0, 8, 57, 57, 8, 8, +9, 9, 10, 29, 3, 16, 16, 16, 7, 17, 9, 53, 13, 3, 3, 4, +7, 7, 58, 4, 53, 4, 53, 58, 10, 17, 16, 54, 53, 5, 53, 13, +10, 17, 55, 20, 53, 53, 16, 13, 10, 17, 58, 57, 53, 16, 16, 13, +7, 17, 6, 20, 58, 4, 53, 13, 8, 7, 7, 5, 54, 67, 65, 62, +58, 4, 5, 5, 12, 54, 12, 12, 5, 4, 4, 4, 4, 61, 26, 4, +16, 4, 53, 16, 53, 53, 59, 53, 16, 4, 5, 53, 5, 16, 53, 16, +58, 59, 53, 16, 53, 16, 16, 58, 53, 58, 53, 20, 53, 57, 55, 4, +58, 58, 53, 8, 53, 62, 16, 5, 62, 65, 62, 65, 67, 65, 62, 57, +12, 12, 12, 26, 12, 12, 12, 20, 4, 4, 4, 54, 4, 12, 5, 16, +20, 53, 53, 58, 16, 61, 16, 58, 57, 53, 13, 58, 16, 4, 4, 16, +8, 16, 53, 63, 16, 4, 53, 4, 8, 53, 13, 61, 16, 4, 53, 4, +62, 53, 53, 54, 16, 61, 5, 16, 62, 62, 67, 62, 68, 69, 62, 67, +20, 20, 20, 54, 54, 60, 5, 13, 53, 53, 58, 5, 60, 5, 5, 20, +4, 4, 16, 58, 5, 16, 53, 4, 4, 4, 55, 58, 54, 53, 58, 58, +61, 4, 53, 53, 54, 53, 61, 16, 61, 4, 16, 16, 54, 53, 16, 16, +4, 3, 58, 13, 5, 53, 58, 16, 70, 67, 70, 20, 62, 69, 65, 62, +55, 55, 59, 12, 17, 10, 10, 9, 54, 4, 61, 58, 13, 17, 9, 10, +58, 16, 16, 58, 59, 12, 17, 7, 53, 58, 16, 16, 62, 5, 7, 59, +55, 58, 53, 48, 64, 60, 17, 3, 53, 4, 53, 65, 65, 12, 17, 3, +48, 58, 53, 65, 66, 12, 10, 12, 65, 62, 66, 26, 9, 17, 7, 7, +9, 17, 10, 10, 10, 18, 7, 8, 7, 18, 10, 10, 10, 7, 8, 8, +7, 18, 17, 10, 10, 57, 8, 12, 17, 10, 10, 10, 57, 8, 7, 0, +17, 10, 10, 57, 8, 8, 7, 0, 10, 18, 57, 8, 8, 57, 29, 0, +7, 8, 8, 8, 57, 7, 7, 0, 8, 8, 8, 57, 57, 8, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 8, 57, 57, 8, 8, 0, 0, 0, 8, 8, 57, 57, 8, +0, 0, 0, 8, 57, 57, 7, 57, 0, 0, 0, 8, 57, 8, 57, 57, +0, 0, 0, 20, 57, 8, 8, 8, 0, 0, 0, 0, 8, 8, 57, 8, +0, 0, 0, 0, 8, 8, 8, 57, 0, 0, 0, 0, 8, 8, 8, 8, +8, 8, 8, 57, 10, 12, 48, 20, 8, 8, 8, 8, 8, 7, 17, 9, +8, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +67, 62, 65, 65, 65, 65, 65, 65, 12, 12, 5, 60, 60, 60, 60, 60, +7, 18, 17, 10, 9, 9, 9, 9, 8, 8, 8, 8, 57, 7, 10, 10, +8, 8, 57, 8, 57, 57, 57, 57, 57, 57, 57, 57, 57, 7, 7, 7, +8, 8, 8, 57, 57, 7, 7, 7, 8, 57, 57, 57, 57, 7, 7, 7, +64, 64, 64, 64, 64, 65, 65, 65, 60, 60, 60, 60, 60, 60, 60, 60, +11, 11, 11, 11, 10, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, +7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +65, 62, 62, 62, 65, 64, 68, 69, 54, 54, 62, 64, 69, 54, 12, 9, +26, 67, 54, 9, 12, 10, 17, 18, 10, 10, 17, 7, 57, 8, 8, 8, +7, 57, 57, 57, 57, 8, 57, 8, 7, 7, 7, 7, 57, 57, 57, 57, +7, 7, 7, 7, 57, 57, 8, 8, 7, 7, 7, 7, 57, 57, 57, 57, +5, 12, 9, 9, 17, 57, 8, 8, 9, 11, 17, 7, 8, 8, 8, 8, +7, 57, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 57, 57, 8, 0, 0, 8, 8, 57, 57, 8, 8, 0, 0, +8, 57, 7, 57, 57, 8, 0, 0, 8, 57, 57, 8, 57, 8, 0, 0, +8, 8, 8, 8, 57, 20, 0, 0, 8, 8, 57, 8, 8, 0, 0, 0, +8, 57, 8, 8, 8, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, +0,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, 17, 10, 10, 18, +13, 13, 15, 15, 18, 10, 10, 10, 13, 13, 13, 15, 25, 17, 10, 10, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 8, 8, 7, 7, +8, 7, 7, 7, 10, 10, 10, 10, 17, 10, 10, 17, 10, 10, 10, 10, +17, 10, 10, 17, 17, 10, 10, 10, 10, 10, 17, 5, 58, 5, 10, 17, +10, 10, 10, 17, 10, 28, 10, 10, 10, 17, 17, 17, 38, 28, 10, 10, +0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, +10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, +17, 17, 17, 17, 17, 17, 17, 10, 13, 13, 17, 17, 5, 13, 6, 17, +29, 39, 31, 10, 17, 40, 49, 17, 10, 39, 31, 10, 17, 44, 45, 34, +0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 8, 8, 12, 0, 0, +10, 10, 10, 10, 10, 7, 7, 7, 10, 10, 10, 10, 10, 17, 10, 10, +17, 17, 10, 10, 10, 10, 10, 10, 5, 13, 25, 17, 10, 10, 10, 10, +17, 73, 74, 17, 10, 10, 10, 10, 10, 46, 47, 17, 10, 17, 17, 17, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +8, 8, 0, 0, 0, 0, 0, 0, 17, 17, 7, 8, 8, 0, 0, 13, +17, 10, 10, 18, 18, 7, 13, 16, 10, 18, 10, 10, 10, 16, 16, 21, +10, 10, 10, 10, 13, 16, 25, 15, 10, 10, 17, 15, 16, 13, 16, 13, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 13, 0, 0, 0, 0, 0, 0, 15, 16, 0, 0, 0, 0, 0, 0, +25, 16, 0, 0, 0, 0, 0, 0, 25, 15, 0, 0, 0, 0, 0, 0, +13, 25, 0, 0, 0, 0, 0, 0, 13, 15, 14, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 15, 16, 13, 16, 0, 0, 0, 13, 13, 13, 13, 16, +0, 0, 0, 7, 13, 15, 13, 16, 0, 0, 10, 17, 2, 15, 13, 13, +0, 0, 7, 10, 7, 25, 13, 13, 0, 20, 18, 18, 17, 17, 10, 25, +0, 8, 17, 10, 17, 10, 10, 10, 0, 7, 10, 10, 10, 10, 10, 10, +13, 13, 13, 13, 13, 10, 17, 17, 15, 13, 16, 13, 13, 25, 17, 10, +13, 13, 16, 13, 15, 25, 17, 17, 13, 13, 13, 15, 13, 10, 17, 17, +15, 13, 13, 15, 26, 17, 10, 10, 17, 25, 10, 17, 17, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, +17, 10, 10, 10, 9, 28, 10, 10, 10, 17, 17, 17, 9, 38, 12, 10, +10, 17, 17, 17, 29, 11, 10, 10, 17, 10, 10, 10, 9, 28, 10, 10, +10, 10, 10, 10, 9, 38, 10, 10, 10, 10, 10, 10, 9, 10, 10, 10, +17, 17, 10, 17, 5, 52, 17, 10, 10, 10, 10, 17, 5, 55, 17, 10, +10, 30, 31, 10, 17, 48, 49, 34, 10, 39, 31, 10, 17, 40, 33, 34, +10, 39, 43, 10, 17, 44, 45, 17, 10, 30, 31, 10, 17, 48, 49, 34, +10, 39, 31, 10, 17, 40, 33, 34, 10, 39, 12, 10, 17, 48, 45, 34, +17, 53, 54, 10, 17, 5, 55, 17, 17, 53, 54, 11, 10, 5, 55, 17, +10, 50, 42, 11, 10, 10, 10, 10, 10, 51, 42, 11, 10, 10, 17, 17, +10, 46, 47, 17, 10, 17, 17, 17, 17, 50, 42, 17, 10, 10, 10, 10, +10, 41, 42, 11, 10, 10, 10, 10, 10, 51, 47, 10, 10, 10, 10, 10, +17, 5, 55, 17, 10, 10, 10, 17, 17, 5, 55, 17, 10, 10, 10, 10, +17, 17, 10, 13, 13, 13, 16, 13, 10, 17, 25, 16, 13, 16, 13, 13, +10, 17, 15, 13, 13, 16, 13, 15, 17, 17, 10, 13, 15, 16, 13, 15, +10, 10, 17, 25, 15, 13, 13, 15, 10, 10, 10, 17, 9, 15, 2, 25, +17, 10, 10, 10, 10, 17, 17, 10, 10, 10, 10, 10, 10, 10, 10, 10, +16, 13, 13, 37, 0, 0, 0, 0, 16, 13, 13, 15, 8, 0, 0, 0, +13, 13, 15, 13, 18, 8, 0, 0, 16, 13, 15, 13, 17, 17, 10, 0, +13, 13, 15, 26, 18, 10, 7, 0, 15, 9, 10, 17, 17, 18, 18, 20, +17, 10, 10, 10, 17, 10, 17, 8, 10, 10, 10, 10, 10, 10, 10, 7, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 7, 18, 10, 10, 10, 10, 10, 0, 7, 18, 10, 9, 9, 10, 10, +0, 7, 18, 10, 9, 10, 10, 10, 0, 7, 7, 10, 9, 10, 10, 10, +0, 7, 7, 10, 10, 10, 10, 9, 0, 57, 7, 7, 10, 10, 10, 10, +0, 8, 18, 7, 10, 10, 10, 11, 0, 8, 7, 10, 10, 10, 10, 10, +10, 10, 9, 11, 10, 10, 10, 10, 10, 9, 10, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, +9, 9, 9, 9, 10, 10, 10, 10, 9, 9, 9, 9, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 17, 9, 10, 10, 10, 17, 29, 12, 3, +10, 10, 10, 10, 9, 56, 11, 10, 9, 9, 9, 9, 11, 11, 9, 9, +9, 10, 10, 10, 10, 9, 9, 9, 10, 10, 10, 9, 9, 9, 9, 9, +10, 9, 9, 10, 9, 10, 10, 10, 9, 9, 9, 9, 10, 17, 17, 11, +10, 17, 17, 17, 12, 2, 2, 13, 2, 16, 16, 16, 16, 16, 16, 55, +10, 56, 12, 10, 10, 12, 56, 11, 10, 11, 10, 17, 10, 2, 34, 9, +10, 10, 10, 15, 13, 10, 10, 10, 10, 11, 13, 16, 21, 10, 10, 9, +10, 13, 16, 21, 25, 25, 17, 10, 13, 16, 25, 15, 13, 21, 10, 10, +16, 13, 16, 13, 13, 13, 3, 2, 58, 58, 58, 55, 58, 55, 55, 55, +10, 12, 56, 11, 9, 10, 10, 10, 10, 11, 11, 9, 9, 9, 9, 9, +10, 9, 9, 9, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 10, 10, +10, 9, 10, 10, 9, 10, 9, 9, 11, 10, 10, 10, 10, 9, 9, 9, +2, 2, 2, 12, 17, 17, 17, 10, 16, 16, 16, 16, 16, 55, 59, 2, +10, 10, 10, 10, 10, 11, 9, 10, 9, 10, 10, 10, 10, 10, 10, 9, +9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 9, 9, 9, 9, 10, 10, 10, 10, 9, 9, 9, +10, 10, 10, 10, 10, 10, 10, 10, 12, 17, 17, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 18, 7, 10, 10, 10, 9, 9, 10, 18, 7, +10, 10, 10, 10, 9, 10, 18, 7, 10, 10, 10, 10, 9, 10, 7, 7, +9, 9, 10, 10, 10, 10, 7, 7, 9, 10, 10, 10, 10, 7, 7, 57, +10, 11, 10, 10, 10, 7, 18, 8, 9, 10, 10, 10, 10, 10, 7, 8, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 8, 7, 18, 10, 10, 10, 17, 0, 8, 8, 7, 10, 10, 10, 18, +0, 0, 8, 57, 10, 10, 17, 18, 0, 0, 7, 8, 57, 10, 10, 10, +0, 0, 7, 8, 8, 57, 10, 10, 0, 0, 29, 57, 8, 8, 57, 18, +0, 0, 7, 7, 57, 8, 8, 8, 0, 0, 0, 8, 57, 57, 8, 8, +9, 9, 10, 29, 3, 16, 16, 16, 7, 17, 9, 53, 13, 3, 3, 4, +7, 7, 58, 4, 53, 4, 53, 58, 10, 17, 16, 54, 53, 5, 53, 13, +10, 17, 55, 20, 53, 53, 16, 13, 10, 17, 58, 57, 53, 16, 16, 13, +7, 17, 6, 20, 58, 4, 53, 13, 8, 7, 7, 5, 54, 67, 65, 62, +58, 4, 5, 5, 12, 54, 12, 12, 5, 4, 4, 4, 4, 61, 26, 4, +16, 4, 53, 16, 53, 53, 59, 53, 16, 4, 5, 53, 5, 16, 53, 16, +58, 59, 53, 16, 53, 16, 16, 58, 53, 58, 53, 20, 53, 57, 55, 4, +58, 58, 53, 8, 53, 62, 16, 5, 62, 65, 62, 65, 67, 65, 62, 57, +12, 12, 12, 26, 12, 12, 12, 20, 4, 4, 4, 54, 4, 12, 5, 16, +20, 53, 53, 58, 16, 61, 16, 58, 57, 53, 13, 58, 16, 4, 4, 16, +8, 16, 53, 63, 16, 4, 53, 4, 8, 53, 13, 61, 16, 4, 53, 4, +62, 53, 53, 54, 16, 61, 5, 16, 62, 62, 67, 62, 68, 69, 62, 67, +20, 20, 20, 54, 54, 60, 5, 13, 53, 53, 58, 5, 60, 5, 5, 20, +4, 4, 16, 58, 5, 16, 53, 4, 4, 4, 55, 58, 54, 53, 58, 58, +61, 4, 53, 53, 54, 53, 61, 16, 61, 4, 16, 16, 54, 53, 16, 16, +4, 3, 58, 13, 5, 53, 58, 16, 70, 67, 70, 20, 62, 69, 65, 62, +55, 55, 59, 12, 17, 10, 10, 9, 54, 4, 61, 58, 13, 17, 9, 10, +58, 16, 16, 58, 59, 12, 17, 7, 53, 58, 16, 16, 62, 5, 7, 59, +55, 58, 53, 48, 64, 60, 17, 3, 53, 4, 53, 65, 65, 12, 17, 3, +48, 58, 53, 65, 66, 12, 10, 12, 65, 62, 66, 26, 9, 17, 7, 7, +9, 17, 10, 10, 10, 18, 7, 8, 7, 18, 10, 10, 10, 7, 8, 8, +7, 18, 17, 10, 10, 57, 8, 12, 17, 10, 10, 10, 57, 8, 7, 0, +17, 10, 10, 57, 8, 8, 7, 0, 10, 18, 57, 8, 8, 57, 29, 0, +7, 8, 8, 8, 57, 7, 7, 0, 8, 8, 8, 57, 57, 8, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 8, 57, 57, 8, 8, 0, 0, 0, 8, 8, 57, 57, 8, +0, 0, 0, 8, 57, 57, 7, 57, 0, 0, 0, 8, 57, 8, 57, 57, +0, 0, 0, 20, 57, 8, 8, 8, 0, 0, 0, 0, 8, 8, 57, 8, +0, 0, 0, 0, 8, 8, 8, 57, 0, 0, 0, 0, 8, 8, 8, 8, +8, 8, 8, 57, 10, 12, 48, 20, 8, 8, 8, 8, 8, 7, 17, 9, +8, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +67, 62, 65, 65, 65, 65, 65, 65, 12, 12, 5, 60, 60, 60, 60, 60, +7, 18, 17, 10, 9, 9, 9, 9, 8, 8, 8, 8, 57, 7, 10, 10, +8, 8, 57, 8, 57, 57, 57, 57, 57, 57, 57, 57, 57, 7, 7, 7, +8, 8, 8, 57, 57, 7, 7, 7, 8, 57, 57, 57, 57, 7, 7, 7, +64, 64, 64, 64, 64, 65, 65, 65, 60, 60, 60, 60, 60, 60, 60, 60, +11, 11, 11, 11, 10, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, +7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +65, 62, 62, 62, 65, 64, 68, 69, 54, 54, 62, 64, 69, 54, 12, 9, +26, 67, 54, 9, 12, 10, 17, 18, 10, 10, 17, 7, 57, 8, 8, 8, +7, 57, 57, 57, 57, 8, 57, 8, 7, 7, 7, 7, 57, 57, 57, 57, +7, 7, 7, 7, 57, 57, 8, 8, 7, 7, 7, 7, 57, 57, 57, 57, +5, 12, 9, 9, 17, 57, 8, 8, 9, 11, 17, 7, 8, 8, 8, 8, +7, 57, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 57, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 57, 57, 8, 0, 0, 8, 8, 57, 57, 8, 8, 0, 0, +8, 57, 7, 57, 57, 8, 0, 0, 8, 57, 57, 8, 57, 8, 0, 0, +8, 8, 8, 8, 57, 20, 0, 0, 8, 8, 57, 8, 8, 0, 0, 0, +8, 57, 8, 8, 8, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, +0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + diff --git a/Cumple/source/gfx/tarta.pal.c b/Cumple/source/gfx/tarta.pal.c new file mode 100755 index 0000000..5f5a866 --- /dev/null +++ b/Cumple/source/gfx/tarta.pal.c @@ -0,0 +1,4 @@ +//Palette created using Mollusk's PAGfxConverter + +const unsigned short tarta_Pal[75] __attribute__ ((aligned (4))) = { +64543, 33180, 49692, 49820, 49816, 49688, 41500, 32916, 32784, 41372, 41240, 41244, 41368, 58012, 49436, 57884, 64511, 33048, 33044, 41628, 41236, 57756, 33791, 33564, 33692, 49564, 49560, 41756, 41116, 32920, 50076, 33304, 49680, 57728, 33052, 41492, 49940, 41112, 32924, 41884, 49552, 41616, 41856, 33176, 49548, 57860, 41612, 50052, 49684, 57856, 49812, 41620, 64308, 65535, 41364, 58232, 53908, 32912, 58136, 49948, 49556, 58008, 32908, 41496, 32768, 32904, 41360, 41232, 41100, 41228, 41104, 49676, 49808, 41488, 50048}; diff --git a/Cumple/source/main.c b/Cumple/source/main.c new file mode 100755 index 0000000..72bc020 --- /dev/null +++ b/Cumple/source/main.c @@ -0,0 +1,42 @@ + +// Includes +#include // Include for PA_Lib +#include "gfx/all_gfx.c" +#include "gfx/all_gfx.h" +#include "cumple.h" + +u8 MicData[100000]; // Array we will use to save the microphone... + + +// Function: main() +int main(int argc, char ** argv) +{ + PA_Init(); // Initializes PA_Lib + PA_InitVBL(); // Initializes a standard VBL + PA_InitText(1, 0); + + PA_InitSound(); // Init the sound system + + + PA_LoadSpritePal(0,0,(void*)tarta_Pal); + PA_CreateSprite(0,0,(void*)tarta_Sprite, OBJ_SIZE_64X64,1, 0, 100, 64); + + + PA_StartSpriteAnim(0,0,0,1,2); + + // Infinite loop to keep the program running + while (1) + { + PA_MicReplay(0, MicData, 100000); + if (PA_MicGetVol() > 200) + { + PA_StartSpriteAnim(0,0,2,2,2); + PA_PlaySimpleSound(1,cumple); + PA_OutputSimpleText(1,7,12,"Felicidades, Papa!"); + } + + PA_WaitForVBL(); + } + + return 0; +} // End of main() diff --git a/FutbolMatch/.svn/all-wcprops b/FutbolMatch/.svn/all-wcprops new file mode 100755 index 0000000..d1c0d3f --- /dev/null +++ b/FutbolMatch/.svn/all-wcprops @@ -0,0 +1,71 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate +END +@project@.ico +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.ico +END +project.vho +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/project.vho +END +@project@.txt +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.txt +END +build.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/build.bat +END +NdsLauncher.exe +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/NdsLauncher.exe +END +clean.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/clean.bat +END +@project@.vhw +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.vhw +END +logo.ico +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.ico +END +logo_wifi.bmp +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/123/trunk/vham/templates/project/PAlibTemplate/logo_wifi.bmp +END +Makefile +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/Makefile +END +logo.bmp +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.bmp +END diff --git a/FutbolMatch/.svn/entries b/FutbolMatch/.svn/entries new file mode 100755 index 0000000..df087e8 --- /dev/null +++ b/FutbolMatch/.svn/entries @@ -0,0 +1,156 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +@project@.ico +file + + + + +2003-05-09T15:53:26.000000Z +1d64ae57ec646dc8bbc6294a8bc48566 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +source +dir + +project.vho +file + + + + +2006-01-31T01:51:50.000000Z +62f8d3225fbfb3bbd8bebbf0589f716c +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.txt +file + + + + +2006-01-31T01:52:02.000000Z +3aaf57a858c308d9952bfb1721859a13 +2006-09-03T16:21:26.676623Z +4 +molousk + +build.bat +file + + + + +2005-11-08T04:24:56.000000Z +4af15a2f33b24192e041b721e0e1a7e4 +2006-09-03T16:21:26.676623Z +4 +molousk + +NdsLauncher.exe +file + + + + +2006-02-02T07:40:04.000000Z +2cddbb9d3427a165fc4fd56b19d427e5 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +clean.bat +file + + + + +2005-10-06T08:16:56.000000Z +b7f3f6ea67c49ab9187d752ef9052516 +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.vhw +file + + + + +2006-08-25T20:19:08.000000Z +aba3a9bc8c1e79a1cbfba3f2741c1c0a +2006-09-03T16:21:26.676623Z +4 +molousk + +logo.ico +file + + + + +2005-11-28T00:37:52.000000Z +67bbc374a4d8c1b34b0aff0078409a8d +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +logo_wifi.bmp +file +123 + + + +2007-02-06T17:05:30.609375Z +f1cc2221ddb8445b9d6d5c510f1a52a3 +2007-02-06T17:05:14.209316Z +123 +Molousk +has-props + +logo.bmp +file + + + + +2005-10-18T01:39:22.000000Z +94768f0e78d21ecfc7ad4ddcf44596b0 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +Makefile +file + + + + +2006-08-25T20:11:56.000000Z +d280afc4cb3ea1c949ecc9655000a557 +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/FutbolMatch/.svn/format b/FutbolMatch/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/FutbolMatch/.svn/format @@ -0,0 +1 @@ +8 diff --git a/FutbolMatch/.svn/prop-base/@project@.ico.svn-base b/FutbolMatch/.svn/prop-base/@project@.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/FutbolMatch/.svn/prop-base/@project@.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/FutbolMatch/.svn/prop-base/NdsLauncher.exe.svn-base b/FutbolMatch/.svn/prop-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/FutbolMatch/.svn/prop-base/NdsLauncher.exe.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/FutbolMatch/.svn/prop-base/logo.bmp.svn-base b/FutbolMatch/.svn/prop-base/logo.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/FutbolMatch/.svn/prop-base/logo.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/FutbolMatch/.svn/prop-base/logo.ico.svn-base b/FutbolMatch/.svn/prop-base/logo.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/FutbolMatch/.svn/prop-base/logo.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/FutbolMatch/.svn/prop-base/logo_wifi.bmp.svn-base b/FutbolMatch/.svn/prop-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/FutbolMatch/.svn/prop-base/logo_wifi.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/FutbolMatch/.svn/text-base/@project@.ico.svn-base b/FutbolMatch/.svn/text-base/@project@.ico.svn-base new file mode 100755 index 0000000..c5eb19e Binary files /dev/null and b/FutbolMatch/.svn/text-base/@project@.ico.svn-base differ diff --git a/FutbolMatch/.svn/text-base/@project@.txt.svn-base b/FutbolMatch/.svn/text-base/@project@.txt.svn-base new file mode 100755 index 0000000..2f5a41b --- /dev/null +++ b/FutbolMatch/.svn/text-base/@project@.txt.svn-base @@ -0,0 +1 @@ +A default PAlib Project template \ No newline at end of file diff --git a/FutbolMatch/.svn/text-base/@project@.vhw.svn-base b/FutbolMatch/.svn/text-base/@project@.vhw.svn-base new file mode 100755 index 0000000..128945b --- /dev/null +++ b/FutbolMatch/.svn/text-base/@project@.vhw.svn-base @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/FutbolMatch/.svn/text-base/Makefile.svn-base b/FutbolMatch/.svn/text-base/Makefile.svn-base new file mode 100755 index 0000000..fbcead1 --- /dev/null +++ b/FutbolMatch/.svn/text-base/Makefile.svn-base @@ -0,0 +1,291 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Demo +TEXT2 := using PAlib +TEXT3 := www.palib.com +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wall -O2\ + -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lnds9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + +define bin2o + cp $(<) $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/FutbolMatch/.svn/text-base/NdsLauncher.exe.svn-base b/FutbolMatch/.svn/text-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/FutbolMatch/.svn/text-base/NdsLauncher.exe.svn-base differ diff --git a/FutbolMatch/.svn/text-base/build.bat.svn-base b/FutbolMatch/.svn/text-base/build.bat.svn-base new file mode 100755 index 0000000..320651d --- /dev/null +++ b/FutbolMatch/.svn/text-base/build.bat.svn-base @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/FutbolMatch/.svn/text-base/clean.bat.svn-base b/FutbolMatch/.svn/text-base/clean.bat.svn-base new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/FutbolMatch/.svn/text-base/clean.bat.svn-base @@ -0,0 +1 @@ +make clean diff --git a/FutbolMatch/.svn/text-base/logo.bmp.svn-base b/FutbolMatch/.svn/text-base/logo.bmp.svn-base new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/FutbolMatch/.svn/text-base/logo.bmp.svn-base differ diff --git a/FutbolMatch/.svn/text-base/logo.ico.svn-base b/FutbolMatch/.svn/text-base/logo.ico.svn-base new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/FutbolMatch/.svn/text-base/logo.ico.svn-base differ diff --git a/FutbolMatch/.svn/text-base/logo_wifi.bmp.svn-base b/FutbolMatch/.svn/text-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/FutbolMatch/.svn/text-base/logo_wifi.bmp.svn-base differ diff --git a/FutbolMatch/.svn/text-base/project.vho.svn-base b/FutbolMatch/.svn/text-base/project.vho.svn-base new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/FutbolMatch/.svn/text-base/project.vho.svn-base @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/FutbolMatch/FutbolMatch.vhw b/FutbolMatch/FutbolMatch.vhw new file mode 100755 index 0000000..edec312 Binary files /dev/null and b/FutbolMatch/FutbolMatch.vhw differ diff --git a/FutbolMatch/FutbolMatch.vhw.bak b/FutbolMatch/FutbolMatch.vhw.bak new file mode 100755 index 0000000..128945b --- /dev/null +++ b/FutbolMatch/FutbolMatch.vhw.bak @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/FutbolMatch/Makefile b/FutbolMatch/Makefile new file mode 100755 index 0000000..9927c66 --- /dev/null +++ b/FutbolMatch/Makefile @@ -0,0 +1,299 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Project +TEXT2 := using PAlib +TEXT3 := www.palib.info +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif + + +include $(DEVKITARM)/ds_rules + + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wformat=2 -Winline -Wall -O2\ + + -mcpu=arm946e-s -mtune=arm946e-s -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lfat -lnds9 -ldswifi9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + + +define bin2o + cp $(<) $(*).tmp + echo -n $$(( `cat $(*).tmp | wc -c` & 3 )) | sed -e 's/0//g' | sed -e 's/1/000/g' | sed -e 's/2/00/g' | sed -e 's/3/0/g' >> $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/FutbolMatch/NdsLauncher.exe b/FutbolMatch/NdsLauncher.exe new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/FutbolMatch/NdsLauncher.exe differ diff --git a/FutbolMatch/build.bat b/FutbolMatch/build.bat new file mode 100755 index 0000000..320651d --- /dev/null +++ b/FutbolMatch/build.bat @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/FutbolMatch/clean.bat b/FutbolMatch/clean.bat new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/FutbolMatch/clean.bat @@ -0,0 +1 @@ +make clean diff --git a/FutbolMatch/data/prelude.raw b/FutbolMatch/data/prelude.raw new file mode 100755 index 0000000..d33ee7b Binary files /dev/null and b/FutbolMatch/data/prelude.raw differ diff --git a/FutbolMatch/logo.bmp b/FutbolMatch/logo.bmp new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/FutbolMatch/logo.bmp differ diff --git a/FutbolMatch/logo.ico b/FutbolMatch/logo.ico new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/FutbolMatch/logo.ico differ diff --git a/FutbolMatch/logo_wifi.bmp b/FutbolMatch/logo_wifi.bmp new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/FutbolMatch/logo_wifi.bmp differ diff --git a/FutbolMatch/project.vho b/FutbolMatch/project.vho new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/FutbolMatch/project.vho @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/FutbolMatch/source/.svn/all-wcprops b/FutbolMatch/source/.svn/all-wcprops new file mode 100755 index 0000000..3de0ae6 --- /dev/null +++ b/FutbolMatch/source/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 65 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source +END +main.c +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source/main.c +END diff --git a/FutbolMatch/source/.svn/entries b/FutbolMatch/source/.svn/entries new file mode 100755 index 0000000..66ac2e9 --- /dev/null +++ b/FutbolMatch/source/.svn/entries @@ -0,0 +1,28 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate/source +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +main.c +file + + + + +2006-01-31T01:54:02.000000Z +b1140899dc28b1a23ba1bc3c72431e7f +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/FutbolMatch/source/.svn/format b/FutbolMatch/source/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/FutbolMatch/source/.svn/format @@ -0,0 +1 @@ +8 diff --git a/FutbolMatch/source/.svn/text-base/main.c.svn-base b/FutbolMatch/source/.svn/text-base/main.c.svn-base new file mode 100755 index 0000000..fff6011 --- /dev/null +++ b/FutbolMatch/source/.svn/text-base/main.c.svn-base @@ -0,0 +1,25 @@ +// Includes +#include // Include for PA_Lib + +// Function: main() +int main(int argc, char ** argv) +{ + PA_Init(); // Initializes PA_Lib + PA_InitVBL(); // Initializes a standard VBL + + + + + + // Infinite loop to keep the program running + while (1) + { + + + + + PA_WaitForVBL(); + } + + return 0; +} // End of main() diff --git a/FutbolMatch/source/gfx/Ball1.c b/FutbolMatch/source/gfx/Ball1.c new file mode 100755 index 0000000..c9b5e64 --- /dev/null +++ b/FutbolMatch/source/gfx/Ball1.c @@ -0,0 +1,70 @@ +//Sprite created using PAGfx +//This sprite uses Ball1_Pal + +const unsigned char Ball1_Sprite[1024] __attribute__ ((aligned (4))) = { +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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FutbolMatch/source/gfx/Ball1.pal.c @@ -0,0 +1,4 @@ +//Palette created using Mollusk's PAGfxConverter + +const unsigned short Ball1_Pal[5] __attribute__ ((aligned (4))) = { +64543, 49680, 32768, 65535, 58136}; diff --git a/FutbolMatch/source/gfx/all_gfx.c b/FutbolMatch/source/gfx/all_gfx.c new file mode 100755 index 0000000..59b1c21 --- /dev/null +++ b/FutbolMatch/source/gfx/all_gfx.c @@ -0,0 +1,35 @@ +//Gfx converted using Mollusk's PAGfx Converter + +//This file contains all the .c, for easier inclusion in a project + +#ifdef __cplusplus +extern "C" { +#endif + +#include "all_gfx.h" + + +// Sprite files : +#include "Ball1.c" +#include "monster1.c" +#include "monster2.c" +#include "porteria.c" + +// Background files : +#include "back.c" + +// Palette files : +#include "Ball1.pal.c" +#include "monster1.pal.c" +#include "monster2.pal.c" +#include "porteria.pal.c" +#include "back.pal.c" + +// Background Pointers : +PAGfx_struct back = {(void*)back_Map, 1024, (void*)back_Tiles, 128, (void*)back_Pal, (int*)back_Info }; + + +#ifdef __cplusplus +} +#endif + diff --git a/FutbolMatch/source/gfx/all_gfx.h b/FutbolMatch/source/gfx/all_gfx.h new file mode 100755 index 0000000..4298f99 --- /dev/null +++ b/FutbolMatch/source/gfx/all_gfx.h @@ -0,0 +1,42 @@ +//Gfx converted using Mollusk's PAGfx Converter + +//This file contains all the .h, for easier inclusion in a project + +#ifndef ALL_GFX_H +#define ALL_GFX_H + +#ifndef PAGfx_struct + typedef struct{ + void *Map; + int MapSize; + void *Tiles; + int TileSize; + void *Palette; + int *Info; +} PAGfx_struct; +#endif + + +// Sprite files : +extern const unsigned char Ball1_Sprite[1024] __attribute__ ((aligned (4))) ; // Pal : Ball1_Pal +extern const unsigned char monster1_Sprite[1024] __attribute__ ((aligned (4))) ; // Pal : monster1_Pal +extern const unsigned char monster2_Sprite[1024] __attribute__ ((aligned (4))) ; // Pal : monster2_Pal +extern const unsigned char porteria_Sprite[2048] __attribute__ ((aligned (4))) ; // Pal : porteria_Pal + +// Background files : +extern const int back_Info[3]; // BgMode, Width, Height +extern const unsigned short back_Map[1024] __attribute__ ((aligned (4))) ; // Pal : back_Pal +extern const unsigned char back_Tiles[128] __attribute__ ((aligned (4))) ; // Pal : back_Pal +extern PAGfx_struct back; // background pointer + + +// Palette files : +extern const unsigned short Ball1_Pal[5] __attribute__ ((aligned (4))) ; +extern const unsigned short monster1_Pal[20] __attribute__ ((aligned (4))) ; +extern const unsigned short monster2_Pal[16] __attribute__ ((aligned (4))) ; +extern const unsigned short porteria_Pal[3] __attribute__ ((aligned (4))) ; +extern const unsigned short back_Pal[2] __attribute__ ((aligned (4))) ; + + +#endif + diff --git a/FutbolMatch/source/gfx/back.c b/FutbolMatch/source/gfx/back.c new file mode 100755 index 0000000..fc37186 --- /dev/null +++ b/FutbolMatch/source/gfx/back.c @@ -0,0 +1,83 @@ +//Background converted using Mollusk's PAGfx Converter +//This Background uses back_Pal + +const int back_Info[3] = {2, 256, 256}; // BgMode, Width, Height + +const unsigned short back_Map[1024] __attribute__ ((aligned (4))) = { +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0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0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +const unsigned char back_Tiles[128] __attribute__ ((aligned (4))) = { +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +}; + diff --git a/FutbolMatch/source/gfx/back.pal.c b/FutbolMatch/source/gfx/back.pal.c new file mode 100755 index 0000000..8b34904 --- /dev/null +++ b/FutbolMatch/source/gfx/back.pal.c @@ -0,0 +1,4 @@ +//Palette created using Mollusk's PAGfxConverter + +const unsigned short back_Pal[2] __attribute__ ((aligned (4))) = { +64543, 58136}; diff --git a/FutbolMatch/source/gfx/monster1.c b/FutbolMatch/source/gfx/monster1.c new file mode 100755 index 0000000..19e66cb --- /dev/null +++ b/FutbolMatch/source/gfx/monster1.c @@ -0,0 +1,70 @@ +//Sprite created using PAGfx +//This sprite uses monster1_Pal + +const unsigned char monster1_Sprite[1024] __attribute__ ((aligned (4))) = { +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, +0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 1, 2, 2, 3, +0, 0, 0, 1, 2, 3, 3, 4, 0, 0, 1, 2, 3, 4, 4, 5, +0, 0, 1, 2, 3, 4, 12, 10, 0, 1, 2, 3, 4, 4, 15, 13, +0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, +2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, +4, 4, 4, 4, 4, 4, 4, 4, 6, 7, 8, 7, 6, 5, 4, 4, +13, 13, 13, 13, 13, 10, 12, 4, 13, 13, 1, 13, 13, 13, 15, 4, +1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 1, +3, 3, 3, 3, 3, 3, 2, 2, 4, 4, 4, 4, 4, 4, 3, 3, +4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, 10, 11, 10, 9, +4, 4, 14, 13, 13, 13, 13, 13, 4, 16, 13, 13, 13, 13, 1, 13, +0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, +2, 1, 1, 0, 0, 0, 0, 0, 3, 2, 2, 1, 0, 0, 0, 0, +4, 3, 3, 2, 1, 0, 0, 0, 4, 4, 4, 3, 2, 1, 0, 0, +14, 4, 4, 3, 2, 1, 0, 0, 13, 16, 4, 4, 3, 2, 1, 0, +0, 1, 2, 3, 4, 4, 17, 13, 0, 1, 2, 3, 4, 4, 11, 13, +0, 1, 2, 3, 4, 4, 11, 13, 0, 1, 2, 3, 4, 4, 17, 13, +0, 1, 2, 3, 4, 4, 15, 13, 0, 1, 2, 3, 4, 4, 12, 10, +0, 1, 2, 3, 4, 4, 4, 5, 0, 1, 2, 3, 4, 4, 4, 4, +13, 1, 1, 1, 13, 13, 17, 4, 13, 13, 1, 13, 13, 13, 11, 4, +13, 13, 13, 13, 13, 13, 11, 4, 13, 13, 13, 13, 13, 13, 17, 4, +13, 13, 13, 13, 13, 13, 15, 4, 13, 13, 13, 13, 13, 10, 12, 4, +6, 7, 8, 7, 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, +4, 18, 13, 13, 13, 1, 1, 1, 4, 19, 13, 13, 13, 13, 1, 13, +4, 19, 13, 13, 13, 13, 13, 13, 4, 18, 13, 13, 13, 13, 13, 13, +4, 16, 13, 13, 13, 13, 13, 13, 4, 4, 14, 13, 13, 13, 13, 13, +4, 4, 4, 9, 10, 11, 10, 9, 4, 4, 4, 4, 4, 4, 4, 4, +13, 18, 4, 4, 3, 2, 1, 0, 13, 19, 4, 4, 3, 2, 1, 0, +13, 19, 4, 4, 3, 2, 1, 0, 13, 18, 4, 4, 3, 2, 1, 0, +13, 16, 4, 4, 3, 2, 1, 0, 14, 4, 4, 4, 3, 2, 1, 0, +4, 4, 4, 4, 3, 2, 1, 0, 4, 4, 4, 4, 3, 2, 1, 0, +0, 1, 2, 3, 4, 4, 4, 4, 0, 1, 2, 3, 4, 4, 4, 4, +0, 1, 2, 3, 4, 4, 4, 4, 0, 1, 2, 3, 4, 4, 4, 4, +0, 1, 2, 3, 4, 4, 4, 4, 0, 1, 2, 3, 4, 4, 4, 4, +0, 1, 2, 3, 4, 4, 4, 4, 0, 1, 2, 3, 4, 4, 4, 4, +4, 4, 4, 4, 4, 4, 4, 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, 4, 3, 4, +3, 4, 4, 4, 4, 3, 2, 3, 1, 3, 3, 3, 3, 2, 1, 2, +0, 1, 2, 2, 2, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, +4, 4, 4, 4, 3, 2, 1, 0, 4, 4, 4, 4, 3, 2, 1, 0, +4, 4, 4, 4, 3, 2, 1, 0, 4, 4, 4, 4, 3, 2, 1, 0, +4, 4, 4, 3, 2, 2, 1, 0, 3, 3, 3, 2, 1, 2, 1, 0, +2, 2, 2, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0 +}; + diff --git a/FutbolMatch/source/gfx/monster1.pal.c b/FutbolMatch/source/gfx/monster1.pal.c new file mode 100755 index 0000000..b588f79 --- /dev/null +++ b/FutbolMatch/source/gfx/monster1.pal.c @@ -0,0 +1,4 @@ +//Palette created using Mollusk's PAGfxConverter + +const unsigned short monster1_Pal[20] __attribute__ ((aligned (4))) = { +64543, 32768, 44640, 39584, 33760, 35810, 47085, 57335, 64510, 38885, 52210, 63485, 34785, 65535, 44010, 46060, 37860, 55285, 48110, 59385}; diff --git a/FutbolMatch/source/gfx/monster2.c b/FutbolMatch/source/gfx/monster2.c new file mode 100755 index 0000000..c9fa631 --- /dev/null +++ b/FutbolMatch/source/gfx/monster2.c @@ -0,0 +1,70 @@ +//Sprite created using PAGfx +//This sprite uses monster2_Pal + +const unsigned char monster2_Sprite[1024] __attribute__ ((aligned (4))) = { +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, +0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 1, 2, 2, 3, +0, 0, 0, 1, 2, 3, 3, 4, 0, 0, 1, 2, 3, 4, 4, 5, +0, 0, 1, 2, 3, 4, 5, 10, 0, 1, 2, 3, 4, 4, 12, 8, +0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, +2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 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 2, 3, 4, 4, 4, 4, +0, 1, 2, 3, 5, 4, 5, 4, 0, 1, 2, 3, 3, 4, 4, 4, +0, 1, 2, 2, 2, 3, 4, 4, 0, 1, 2, 1, 1, 2, 3, 3, +0, 1, 1, 0, 0, 1, 2, 2, 0, 1, 0, 0, 0, 0, 1, 1, +5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 4, 5, 4, 4, +4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 3, 4, 4, 4, 5, 4, +4, 3, 2, 3, 4, 4, 4, 4, 3, 2, 1, 2, 3, 3, 3, 3, +2, 1, 0, 1, 2, 2, 2, 1, 1, 0, 0, 0, 1, 1, 1, 0, +5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, +4, 4, 5, 4, 5, 4, 4, 4, 5, 4, 4, 4, 4, 4, 3, 4, +3, 4, 4, 4, 4, 3, 2, 3, 1, 3, 3, 3, 3, 2, 1, 2, +0, 1, 2, 2, 2, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, +4, 5, 4, 5, 3, 2, 1, 0, 4, 4, 4, 4, 3, 2, 1, 0, +4, 4, 4, 4, 3, 2, 1, 0, 5, 4, 5, 4, 3, 2, 1, 0, +4, 4, 4, 3, 2, 2, 1, 0, 3, 3, 3, 2, 1, 2, 1, 0, +2, 2, 2, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0 +}; + diff --git a/FutbolMatch/source/gfx/monster2.pal.c b/FutbolMatch/source/gfx/monster2.pal.c new file mode 100755 index 0000000..cdc0897 --- /dev/null +++ b/FutbolMatch/source/gfx/monster2.pal.c @@ -0,0 +1,4 @@ +//Palette created using Mollusk's PAGfxConverter + +const unsigned short monster2_Pal[16] __attribute__ ((aligned (4))) = { +64543, 32768, 32780, 34834, 42012, 44060, 53725, 60191, 65535, 46236, 56926, 50525, 52637, 59102, 64447, 62303}; diff --git a/FutbolMatch/source/gfx/porteria.c b/FutbolMatch/source/gfx/porteria.c new file mode 100755 index 0000000..66871af --- /dev/null +++ b/FutbolMatch/source/gfx/porteria.c @@ -0,0 +1,134 @@ +//Sprite created using PAGfx +//This sprite uses porteria_Pal + +const unsigned char porteria_Sprite[2048] __attribute__ ((aligned (4))) = { +1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +2, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, +2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, +2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, +2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +2, 2, 2, 2, 2, 2, 2, 2,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + diff --git a/FutbolMatch/source/gfx/porteria.pal.c b/FutbolMatch/source/gfx/porteria.pal.c new file mode 100755 index 0000000..c023594 --- /dev/null +++ b/FutbolMatch/source/gfx/porteria.pal.c @@ -0,0 +1,4 @@ +//Palette created using Mollusk's PAGfxConverter + +const unsigned short porteria_Pal[3] __attribute__ ((aligned (4))) = { +64543, 65535, 32768}; diff --git a/FutbolMatch/source/main.c b/FutbolMatch/source/main.c new file mode 100755 index 0000000..55b55f3 --- /dev/null +++ b/FutbolMatch/source/main.c @@ -0,0 +1,121 @@ +// Includes +#include +#include "gfx/all_gfx.h" +#include "gfx/all_gfx.c" +#include "prelude.h" + + + +// Function: main() +int main(int argc, char ** argv) +{ + PA_Init(); // Initializes PA_Lib + PA_InitVBL(); // Initializes a standard VBL + + PA_InitText(1,1); + + PA_OutputSimpleText(1,1,1,"Hecho por Marcos Brito"); + PA_OutputSimpleText(1,1,3,"Futbol Match!"); + + PA_InitSound(); + + PA_SetDefaultSound(255,11025,0); + PA_PlaySoundRepeat(0,prelude); + + + PA_EasyBgLoad(0,0,back); + + PA_LoadSpritePal(0,0,(void*)monster1_Pal); + PA_CreateSprite(0,0,(void*)monster1_Sprite,OBJ_SIZE_32X32,1,0,1,1); + PA_LoadSpritePal(0,1,(void*)monster2_Pal); + PA_CreateSprite(0,1,(void*)monster2_Sprite,OBJ_SIZE_32X32,1,1,150,1); + PA_LoadSpritePal(0,2,(void*)Ball1_Pal); + PA_CreateSprite(0,2,(void*)Ball1_Sprite,OBJ_SIZE_32X32,1,2,127,95); + PA_LoadSpritePal(0,3,(void*)porteria_Pal); + PA_CreateSprite(0,3,(void*)porteria_Sprite,OBJ_SIZE_32X64,1,3,1,65); + PA_CreateSprite(0,4,(void*)porteria_Sprite,OBJ_SIZE_32X64,1,3,240,65); + + s32 x1 = 1; s32 y1 = 1; s32 x2 = 223; s32 y2 = 1; + s32 bx = 127; s32 by = 95; s32 vbx=0; s32 vby=2; s32 i =0; + + + s32 marc1 = 0; + s32 marc2 = 0; + + + while (1) + { + PA_OutputText(1,3,10,"Coco rojo: %d",marc1); + PA_OutputText(1,3,13,"Coco verde: %d",marc2); + + //Coco1 + if (y1>=0) y1 += Pad.Held.Down - Pad.Held.Up; + else y1=0; + if (y1<=153) y1 += Pad.Held.Down - Pad.Held.Up; + else y1=153; + if (x1>=0) x1 += Pad.Held.Right - Pad.Held.Left; + else x1=0; + if (x1<=223) x1 += Pad.Held.Right - Pad.Held.Left; + else x1=223; + PA_SetSpriteXY(0,0,x1,y1); + + //Coco2 + if (y2>=0) y2 += Pad.Held.B - Pad.Held.X; + else y2=0; + if (y2<=153) y2 += Pad.Held.B - Pad.Held.X; + else y2=153; + if (x2>=0) x2 += Pad.Held.A - Pad.Held.Y; + else x2=0; + if (x2<=223) x2 += Pad.Held.A - Pad.Held.Y; + else x2=223; + PA_SetSpriteXY(0,1,x2,y2); + + //Bola + bx += vbx; + by += vby; + + if ((bx <= 0) && (vbx < 0)) vbx = -vbx; + else if ((bx+32 >= 256)&&(vbx > 0)) vbx = -vbx; + + if ((by <= 0) && (vby < 0)) vby = -vby; + else if ((by+32>= 192)&& (vby > 0)) vby = -vby; + + PA_SetSpriteXY(0,2,bx,by); + + if (PA_Distance(bx, by, x1, y1) < 32*32) + { + vbx = (bx-x1)/8; + vby = (by-y1)/8; + } + if (PA_Distance(bx, by, x2, y2) < 32*32) + { + vbx = (bx-x2)/8; + vby = (by-y2)/8; + } + //Gol + if (bx<10 && by>35 && by<120) + { + marc1+=1, + x1=1; y1=1; x2=223; y2=1; bx=127; by=95; + PA_WaitForVBL(); + i=PA_RandMinMax(-255,255); + vbx = PA_Cos(i)*3/255; + vby = PA_Sin(i)*3/255; + } + + if (bx>215 && by>35 && by<120) + { + marc2+=1; + x1=1; y1=1; x2=223; y2=1; bx=127; by=95; + PA_WaitForVBL(); + i=PA_RandMinMax(-255,255); + vbx = PA_Cos(i)*3/255; + vby = PA_Sin(i)*3/255; + } + + + PA_WaitForVBL(); + } + + return 0; +} // End of main() diff --git a/HolaMundo/.svn/all-wcprops b/HolaMundo/.svn/all-wcprops new file mode 100755 index 0000000..d1c0d3f --- /dev/null +++ b/HolaMundo/.svn/all-wcprops @@ -0,0 +1,71 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate +END +@project@.ico +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.ico +END +project.vho +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/project.vho +END +@project@.txt +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.txt +END +build.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/build.bat +END +NdsLauncher.exe +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/NdsLauncher.exe +END +clean.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/clean.bat +END +@project@.vhw +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.vhw +END +logo.ico +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.ico +END +logo_wifi.bmp +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/123/trunk/vham/templates/project/PAlibTemplate/logo_wifi.bmp +END +Makefile +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/Makefile +END +logo.bmp +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.bmp +END diff --git a/HolaMundo/.svn/entries b/HolaMundo/.svn/entries new file mode 100755 index 0000000..df087e8 --- /dev/null +++ b/HolaMundo/.svn/entries @@ -0,0 +1,156 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +@project@.ico +file + + + + +2003-05-09T15:53:26.000000Z +1d64ae57ec646dc8bbc6294a8bc48566 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +source +dir + +project.vho +file + + + + +2006-01-31T01:51:50.000000Z +62f8d3225fbfb3bbd8bebbf0589f716c +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.txt +file + + + + +2006-01-31T01:52:02.000000Z +3aaf57a858c308d9952bfb1721859a13 +2006-09-03T16:21:26.676623Z +4 +molousk + +build.bat +file + + + + +2005-11-08T04:24:56.000000Z +4af15a2f33b24192e041b721e0e1a7e4 +2006-09-03T16:21:26.676623Z +4 +molousk + +NdsLauncher.exe +file + + + + +2006-02-02T07:40:04.000000Z +2cddbb9d3427a165fc4fd56b19d427e5 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +clean.bat +file + + + + +2005-10-06T08:16:56.000000Z +b7f3f6ea67c49ab9187d752ef9052516 +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.vhw +file + + + + +2006-08-25T20:19:08.000000Z +aba3a9bc8c1e79a1cbfba3f2741c1c0a +2006-09-03T16:21:26.676623Z +4 +molousk + +logo.ico +file + + + + +2005-11-28T00:37:52.000000Z +67bbc374a4d8c1b34b0aff0078409a8d +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +logo_wifi.bmp +file +123 + + + +2007-02-06T17:05:30.609375Z +f1cc2221ddb8445b9d6d5c510f1a52a3 +2007-02-06T17:05:14.209316Z +123 +Molousk +has-props + +logo.bmp +file + + + + +2005-10-18T01:39:22.000000Z +94768f0e78d21ecfc7ad4ddcf44596b0 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +Makefile +file + + + + +2006-08-25T20:11:56.000000Z +d280afc4cb3ea1c949ecc9655000a557 +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/HolaMundo/.svn/format b/HolaMundo/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/HolaMundo/.svn/format @@ -0,0 +1 @@ +8 diff --git a/HolaMundo/.svn/prop-base/@project@.ico.svn-base b/HolaMundo/.svn/prop-base/@project@.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/HolaMundo/.svn/prop-base/@project@.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/HolaMundo/.svn/prop-base/NdsLauncher.exe.svn-base b/HolaMundo/.svn/prop-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/HolaMundo/.svn/prop-base/NdsLauncher.exe.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/HolaMundo/.svn/prop-base/logo.bmp.svn-base b/HolaMundo/.svn/prop-base/logo.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/HolaMundo/.svn/prop-base/logo.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/HolaMundo/.svn/prop-base/logo.ico.svn-base b/HolaMundo/.svn/prop-base/logo.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/HolaMundo/.svn/prop-base/logo.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/HolaMundo/.svn/prop-base/logo_wifi.bmp.svn-base b/HolaMundo/.svn/prop-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/HolaMundo/.svn/prop-base/logo_wifi.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/HolaMundo/.svn/text-base/@project@.ico.svn-base b/HolaMundo/.svn/text-base/@project@.ico.svn-base new file mode 100755 index 0000000..c5eb19e Binary files /dev/null and b/HolaMundo/.svn/text-base/@project@.ico.svn-base differ diff --git a/HolaMundo/.svn/text-base/@project@.txt.svn-base b/HolaMundo/.svn/text-base/@project@.txt.svn-base new file mode 100755 index 0000000..2f5a41b --- /dev/null +++ b/HolaMundo/.svn/text-base/@project@.txt.svn-base @@ -0,0 +1 @@ +A default PAlib Project template \ No newline at end of file diff --git a/HolaMundo/.svn/text-base/@project@.vhw.svn-base b/HolaMundo/.svn/text-base/@project@.vhw.svn-base new file mode 100755 index 0000000..128945b --- /dev/null +++ b/HolaMundo/.svn/text-base/@project@.vhw.svn-base @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/HolaMundo/.svn/text-base/Makefile.svn-base b/HolaMundo/.svn/text-base/Makefile.svn-base new file mode 100755 index 0000000..fbcead1 --- /dev/null +++ b/HolaMundo/.svn/text-base/Makefile.svn-base @@ -0,0 +1,291 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Demo +TEXT2 := using PAlib +TEXT3 := www.palib.com +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wall -O2\ + -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lnds9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + +define bin2o + cp $(<) $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/HolaMundo/.svn/text-base/NdsLauncher.exe.svn-base b/HolaMundo/.svn/text-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/HolaMundo/.svn/text-base/NdsLauncher.exe.svn-base differ diff --git a/HolaMundo/.svn/text-base/build.bat.svn-base b/HolaMundo/.svn/text-base/build.bat.svn-base new file mode 100755 index 0000000..320651d --- /dev/null +++ b/HolaMundo/.svn/text-base/build.bat.svn-base @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/HolaMundo/.svn/text-base/clean.bat.svn-base b/HolaMundo/.svn/text-base/clean.bat.svn-base new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/HolaMundo/.svn/text-base/clean.bat.svn-base @@ -0,0 +1 @@ +make clean diff --git a/HolaMundo/.svn/text-base/logo.bmp.svn-base b/HolaMundo/.svn/text-base/logo.bmp.svn-base new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/HolaMundo/.svn/text-base/logo.bmp.svn-base differ diff --git a/HolaMundo/.svn/text-base/logo.ico.svn-base b/HolaMundo/.svn/text-base/logo.ico.svn-base new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/HolaMundo/.svn/text-base/logo.ico.svn-base differ diff --git a/HolaMundo/.svn/text-base/logo_wifi.bmp.svn-base b/HolaMundo/.svn/text-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/HolaMundo/.svn/text-base/logo_wifi.bmp.svn-base differ diff --git a/HolaMundo/.svn/text-base/project.vho.svn-base b/HolaMundo/.svn/text-base/project.vho.svn-base new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/HolaMundo/.svn/text-base/project.vho.svn-base @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/HolaMundo/Hola Mundo.vhw b/HolaMundo/Hola Mundo.vhw new file mode 100755 index 0000000..40d518a Binary files /dev/null and b/HolaMundo/Hola Mundo.vhw differ diff --git a/HolaMundo/Hola Mundo.vhw.bak b/HolaMundo/Hola Mundo.vhw.bak new file mode 100755 index 0000000..128945b --- /dev/null +++ b/HolaMundo/Hola Mundo.vhw.bak @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/HolaMundo/HolaMundo.ds.gba b/HolaMundo/HolaMundo.ds.gba new file mode 100755 index 0000000..c3710dd Binary files /dev/null and b/HolaMundo/HolaMundo.ds.gba differ diff --git a/HolaMundo/HolaMundo.nds b/HolaMundo/HolaMundo.nds new file mode 100755 index 0000000..a141e61 Binary files /dev/null and b/HolaMundo/HolaMundo.nds differ diff --git a/HolaMundo/HolaMundo.sav b/HolaMundo/HolaMundo.sav new file mode 100755 index 0000000..a64a5a9 Binary files /dev/null and b/HolaMundo/HolaMundo.sav differ diff --git a/HolaMundo/HolaMundo.sc.nds b/HolaMundo/HolaMundo.sc.nds new file mode 100755 index 0000000..c3710dd Binary files /dev/null and b/HolaMundo/HolaMundo.sc.nds differ diff --git a/HolaMundo/Makefile b/HolaMundo/Makefile new file mode 100755 index 0000000..9927c66 --- /dev/null +++ b/HolaMundo/Makefile @@ -0,0 +1,299 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Project +TEXT2 := using PAlib +TEXT3 := www.palib.info +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif + + +include $(DEVKITARM)/ds_rules + + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wformat=2 -Winline -Wall -O2\ + + -mcpu=arm946e-s -mtune=arm946e-s -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lfat -lnds9 -ldswifi9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + + +define bin2o + cp $(<) $(*).tmp + echo -n $$(( `cat $(*).tmp | wc -c` & 3 )) | sed -e 's/0//g' | sed -e 's/1/000/g' | sed -e 's/2/00/g' | sed -e 's/3/0/g' >> $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/HolaMundo/NdsLauncher.exe b/HolaMundo/NdsLauncher.exe new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/HolaMundo/NdsLauncher.exe differ diff --git a/HolaMundo/build.bat b/HolaMundo/build.bat new file mode 100755 index 0000000..320651d --- /dev/null +++ b/HolaMundo/build.bat @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/HolaMundo/build/build.bin b/HolaMundo/build/build.bin new file mode 100755 index 0000000..4cc01db Binary files /dev/null and b/HolaMundo/build/build.bin differ diff --git a/HolaMundo/build/build.elf b/HolaMundo/build/build.elf new file mode 100755 index 0000000..ea3f7dd Binary files /dev/null and b/HolaMundo/build/build.elf differ diff --git a/HolaMundo/build/main.d b/HolaMundo/build/main.d new file mode 100755 index 0000000..5d8b92a --- /dev/null +++ b/HolaMundo/build/main.d @@ -0,0 +1,98 @@ +main.o: c:/devkitPro/proyects/HolaMundo/source/main.c \ + c:/devkitPro/PAlib//include/nds/PA9.h c:/devkitPro/libnds/include/nds.h \ + c:/devkitPro/libnds/include/nds/jtypes.h \ + c:/devkitPro/libnds/include/nds/bios.h \ + c:/devkitPro/libnds/include/nds/card.h \ + c:/devkitPro/libnds/include/nds/jtypes.h \ + c:/devkitPro/libnds/include/nds/dma.h \ + c:/devkitPro/libnds/include/nds/interrupts.h \ + c:/devkitPro/libnds/include/nds/ipc.h \ + c:/devkitPro/libnds/include/nds/memory.h \ + c:/devkitPro/libnds/include/nds/system.h \ + c:/devkitPro/libnds/include/nds/timers.h \ + c:/devkitPro/libnds/include/nds/arm9/background.h \ + c:/devkitPro/libnds/include/nds/arm9/boxtest.h \ + c:/devkitPro/libnds/include/nds/arm9/video.h \ + c:/devkitPro/libnds/include/nds/arm9/videoGL.h \ + c:/devkitPro/libnds/include/nds/arm9/math.h \ + c:/devkitPro/libnds/include/nds/arm9/trig_lut.h \ + c:/devkitPro/libnds/include/nds/arm9/cache.h \ + c:/devkitPro/libnds/include/nds/arm9/console.h \ + c:/devkitPro/libnds/include/nds/arm9/exceptions.h \ + c:/devkitPro/libnds/include/nds/arm9/image.h \ + c:/devkitPro/libnds/include/nds/arm9/pcx.h \ + c:/devkitPro/libnds/include/nds/arm9/input.h \ + c:/devkitPro/libnds/include/nds/arm9/rumble.h \ + c:/devkitPro/libnds/include/nds/arm9/sound.h \ + c:/devkitPro/libnds/include/nds/arm9/sprite.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_IO.h \ + c:/devkitPro/libnds/include/gbfs.h \ + c:/devkitPro/PAlib//include/nds/gba-jpeg-decode.h \ + c:/devkitPro/PAlib//include/nds/gba-jpeg.h \ + c:/devkitPro/PAlib//include/nds/Sound9.h \ + c:/devkitPro/PAlib//include/nds/SoundCommon.h \ + c:/devkitPro/libnds/include/fat.h \ + c:/devkitPro/PAlib//include/nds/PA_IPC.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_General.h \ + c:/devkitPro/PAlib//include/nds/PA_IPC.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Text.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgTiles.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_General.h \ + c:/devkitPro/PAlib//include/nds/arm9/text0.h \ + c:/devkitPro/PAlib//include/nds/arm9/text1.h \ + c:/devkitPro/PAlib//include/nds/arm9/text2.h \ + c:/devkitPro/PAlib//include/nds/arm9/text3.h \ + c:/devkitPro/PAlib//include/nds/arm9/text4.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgTiles.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgLargeMap.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Video.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Sprite.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Math.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Interrupt.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_SpriteDual.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Sprite.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Sound.h \ + c:/devkitPro/PAlib//include/nds/arm9/../Sound9.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_GBFS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Text.h \ + c:/devkitPro/libnds/include/gbfs.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_FS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Micro.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Palette.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Splash.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Gif.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h \ + c:/devkitPro/PAlib//include/nds/arm9/gif/gif_lib.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Interrupt.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Keys.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Motion.h \ + c:/devkitPro/libnds/include/nds/arm9/ndsmotion.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgRot.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Timer.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_API.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Math.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Palette.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_PaletteDual.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Save.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_FS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_GBFS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_SpecialFx.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_TileDual.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Keyboard.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Window.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Mode7.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgRot.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_3DSprites.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_IA.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Reco.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_16c.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Wifi.h \ + c:/devkitPro/libnds/include/dswifi9.h \ + c:/devkitPro/libnds/include/dswifi_version.h \ + c:/devkitPro/libnds/include/sys/socket.h \ + c:/devkitPro/libnds/include/netinet/in.h \ + c:/devkitPro/libnds/include/netdb.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Splash.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Gif.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgTrans.h diff --git a/HolaMundo/build/main.o b/HolaMundo/build/main.o new file mode 100755 index 0000000..41aab04 Binary files /dev/null and b/HolaMundo/build/main.o differ diff --git a/HolaMundo/clean.bat b/HolaMundo/clean.bat new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/HolaMundo/clean.bat @@ -0,0 +1 @@ +make clean diff --git a/HolaMundo/logo.bmp b/HolaMundo/logo.bmp new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/HolaMundo/logo.bmp differ diff --git a/HolaMundo/logo.ico b/HolaMundo/logo.ico new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/HolaMundo/logo.ico differ diff --git a/HolaMundo/logo_wifi.bmp b/HolaMundo/logo_wifi.bmp new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/HolaMundo/logo_wifi.bmp differ diff --git a/HolaMundo/project.vho b/HolaMundo/project.vho new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/HolaMundo/project.vho @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/HolaMundo/source/.svn/all-wcprops b/HolaMundo/source/.svn/all-wcprops new file mode 100755 index 0000000..3de0ae6 --- /dev/null +++ b/HolaMundo/source/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 65 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source +END +main.c +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source/main.c +END diff --git a/HolaMundo/source/.svn/entries b/HolaMundo/source/.svn/entries new file mode 100755 index 0000000..66ac2e9 --- /dev/null +++ b/HolaMundo/source/.svn/entries @@ -0,0 +1,28 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate/source +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +main.c +file + + + + +2006-01-31T01:54:02.000000Z +b1140899dc28b1a23ba1bc3c72431e7f +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/HolaMundo/source/.svn/format b/HolaMundo/source/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/HolaMundo/source/.svn/format @@ -0,0 +1 @@ +8 diff --git a/HolaMundo/source/.svn/text-base/main.c.svn-base b/HolaMundo/source/.svn/text-base/main.c.svn-base new file mode 100755 index 0000000..fff6011 --- /dev/null +++ b/HolaMundo/source/.svn/text-base/main.c.svn-base @@ -0,0 +1,25 @@ +// Includes +#include // Include for PA_Lib + +// Function: main() +int main(int argc, char ** argv) +{ + PA_Init(); // Initializes PA_Lib + PA_InitVBL(); // Initializes a standard VBL + + + + + + // Infinite loop to keep the program running + while (1) + { + + + + + PA_WaitForVBL(); + } + + return 0; +} // End of main() diff --git a/HolaMundo/source/main.c b/HolaMundo/source/main.c new file mode 100755 index 0000000..9ae75e6 --- /dev/null +++ b/HolaMundo/source/main.c @@ -0,0 +1,16 @@ +#include +void main(void) +{ + PA_Init(); + PA_InitVBL(); + PA_InitText(1,1); + PA_OutputSimpleText(1,1,1,"Hola Mundo."); + PA_OutputSimpleText(1,1,2,"Hecho por Marcos Brito."); + while(1) + { + if (Stylus.Held) PA_OutputSimpleText(1,1,3,"El Stylus esta presionado "); + if (Stylus.Held==0) PA_OutputSimpleText(1,1,3,"El Stylus no esta presionado"); + } + + return 0; +} // End of main() diff --git a/Imagen/.svn/all-wcprops b/Imagen/.svn/all-wcprops new file mode 100755 index 0000000..d1c0d3f --- /dev/null +++ b/Imagen/.svn/all-wcprops @@ -0,0 +1,71 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate +END +@project@.ico +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.ico +END +project.vho +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/project.vho +END +@project@.txt +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.txt +END +build.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/build.bat +END +NdsLauncher.exe +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/NdsLauncher.exe +END +clean.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/clean.bat +END +@project@.vhw +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.vhw +END +logo.ico +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.ico +END +logo_wifi.bmp +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/123/trunk/vham/templates/project/PAlibTemplate/logo_wifi.bmp +END +Makefile +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/Makefile +END +logo.bmp +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.bmp +END diff --git a/Imagen/.svn/entries b/Imagen/.svn/entries new file mode 100755 index 0000000..df087e8 --- /dev/null +++ b/Imagen/.svn/entries @@ -0,0 +1,156 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +@project@.ico +file + + + + +2003-05-09T15:53:26.000000Z +1d64ae57ec646dc8bbc6294a8bc48566 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +source +dir + +project.vho +file + + + + +2006-01-31T01:51:50.000000Z +62f8d3225fbfb3bbd8bebbf0589f716c +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.txt +file + + + + +2006-01-31T01:52:02.000000Z +3aaf57a858c308d9952bfb1721859a13 +2006-09-03T16:21:26.676623Z +4 +molousk + +build.bat +file + + + + +2005-11-08T04:24:56.000000Z +4af15a2f33b24192e041b721e0e1a7e4 +2006-09-03T16:21:26.676623Z +4 +molousk + +NdsLauncher.exe +file + + + + +2006-02-02T07:40:04.000000Z +2cddbb9d3427a165fc4fd56b19d427e5 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +clean.bat +file + + + + +2005-10-06T08:16:56.000000Z +b7f3f6ea67c49ab9187d752ef9052516 +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.vhw +file + + + + +2006-08-25T20:19:08.000000Z +aba3a9bc8c1e79a1cbfba3f2741c1c0a +2006-09-03T16:21:26.676623Z +4 +molousk + +logo.ico +file + + + + +2005-11-28T00:37:52.000000Z +67bbc374a4d8c1b34b0aff0078409a8d +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +logo_wifi.bmp +file +123 + + + +2007-02-06T17:05:30.609375Z +f1cc2221ddb8445b9d6d5c510f1a52a3 +2007-02-06T17:05:14.209316Z +123 +Molousk +has-props + +logo.bmp +file + + + + +2005-10-18T01:39:22.000000Z +94768f0e78d21ecfc7ad4ddcf44596b0 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +Makefile +file + + + + +2006-08-25T20:11:56.000000Z +d280afc4cb3ea1c949ecc9655000a557 +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/Imagen/.svn/format b/Imagen/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/Imagen/.svn/format @@ -0,0 +1 @@ +8 diff --git a/Imagen/.svn/prop-base/@project@.ico.svn-base b/Imagen/.svn/prop-base/@project@.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/Imagen/.svn/prop-base/@project@.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/Imagen/.svn/prop-base/NdsLauncher.exe.svn-base b/Imagen/.svn/prop-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/Imagen/.svn/prop-base/NdsLauncher.exe.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/Imagen/.svn/prop-base/logo.bmp.svn-base b/Imagen/.svn/prop-base/logo.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/Imagen/.svn/prop-base/logo.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/Imagen/.svn/prop-base/logo.ico.svn-base b/Imagen/.svn/prop-base/logo.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/Imagen/.svn/prop-base/logo.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/Imagen/.svn/prop-base/logo_wifi.bmp.svn-base b/Imagen/.svn/prop-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/Imagen/.svn/prop-base/logo_wifi.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/Imagen/.svn/text-base/@project@.ico.svn-base b/Imagen/.svn/text-base/@project@.ico.svn-base new file mode 100755 index 0000000..c5eb19e Binary files /dev/null and b/Imagen/.svn/text-base/@project@.ico.svn-base differ diff --git a/Imagen/.svn/text-base/@project@.txt.svn-base b/Imagen/.svn/text-base/@project@.txt.svn-base new file mode 100755 index 0000000..2f5a41b --- /dev/null +++ b/Imagen/.svn/text-base/@project@.txt.svn-base @@ -0,0 +1 @@ +A default PAlib Project template \ No newline at end of file diff --git a/Imagen/.svn/text-base/@project@.vhw.svn-base b/Imagen/.svn/text-base/@project@.vhw.svn-base new file mode 100755 index 0000000..128945b --- /dev/null +++ b/Imagen/.svn/text-base/@project@.vhw.svn-base @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/Imagen/.svn/text-base/Makefile.svn-base b/Imagen/.svn/text-base/Makefile.svn-base new file mode 100755 index 0000000..fbcead1 --- /dev/null +++ b/Imagen/.svn/text-base/Makefile.svn-base @@ -0,0 +1,291 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Demo +TEXT2 := using PAlib +TEXT3 := www.palib.com +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wall -O2\ + -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lnds9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + +define bin2o + cp $(<) $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/Imagen/.svn/text-base/NdsLauncher.exe.svn-base b/Imagen/.svn/text-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/Imagen/.svn/text-base/NdsLauncher.exe.svn-base differ diff --git a/Imagen/.svn/text-base/build.bat.svn-base b/Imagen/.svn/text-base/build.bat.svn-base new file mode 100755 index 0000000..320651d --- /dev/null +++ b/Imagen/.svn/text-base/build.bat.svn-base @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/Imagen/.svn/text-base/clean.bat.svn-base b/Imagen/.svn/text-base/clean.bat.svn-base new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/Imagen/.svn/text-base/clean.bat.svn-base @@ -0,0 +1 @@ +make clean diff --git a/Imagen/.svn/text-base/logo.bmp.svn-base b/Imagen/.svn/text-base/logo.bmp.svn-base new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/Imagen/.svn/text-base/logo.bmp.svn-base differ diff --git a/Imagen/.svn/text-base/logo.ico.svn-base b/Imagen/.svn/text-base/logo.ico.svn-base new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/Imagen/.svn/text-base/logo.ico.svn-base differ diff --git a/Imagen/.svn/text-base/logo_wifi.bmp.svn-base b/Imagen/.svn/text-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/Imagen/.svn/text-base/logo_wifi.bmp.svn-base differ diff --git a/Imagen/.svn/text-base/project.vho.svn-base b/Imagen/.svn/text-base/project.vho.svn-base new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/Imagen/.svn/text-base/project.vho.svn-base @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/Imagen/Imagen.ds.gba b/Imagen/Imagen.ds.gba new file mode 100755 index 0000000..bcc34c7 Binary files /dev/null and b/Imagen/Imagen.ds.gba differ diff --git a/Imagen/Imagen.nds b/Imagen/Imagen.nds new file mode 100755 index 0000000..69723a5 Binary files /dev/null and b/Imagen/Imagen.nds differ diff --git a/Imagen/Imagen.sc.nds b/Imagen/Imagen.sc.nds new file mode 100755 index 0000000..bcc34c7 Binary files /dev/null and b/Imagen/Imagen.sc.nds differ diff --git a/Imagen/Imagen.vhw b/Imagen/Imagen.vhw new file mode 100755 index 0000000..1b2e305 Binary files /dev/null and b/Imagen/Imagen.vhw differ diff --git a/Imagen/Imagen.vhw.bak b/Imagen/Imagen.vhw.bak new file mode 100755 index 0000000..128945b --- /dev/null +++ b/Imagen/Imagen.vhw.bak @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/Imagen/Makefile b/Imagen/Makefile new file mode 100755 index 0000000..9927c66 --- /dev/null +++ b/Imagen/Makefile @@ -0,0 +1,299 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Project +TEXT2 := using PAlib +TEXT3 := www.palib.info +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif + + +include $(DEVKITARM)/ds_rules + + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wformat=2 -Winline -Wall -O2\ + + -mcpu=arm946e-s -mtune=arm946e-s -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lfat -lnds9 -ldswifi9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + + +define bin2o + cp $(<) $(*).tmp + echo -n $$(( `cat $(*).tmp | wc -c` & 3 )) | sed -e 's/0//g' | sed -e 's/1/000/g' | sed -e 's/2/00/g' | sed -e 's/3/0/g' >> $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/Imagen/NdsLauncher.exe b/Imagen/NdsLauncher.exe new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/Imagen/NdsLauncher.exe differ diff --git a/Imagen/build.bat b/Imagen/build.bat new file mode 100755 index 0000000..320651d --- /dev/null +++ b/Imagen/build.bat @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/Imagen/build/build.bin b/Imagen/build/build.bin new file mode 100755 index 0000000..078d73e Binary files /dev/null and b/Imagen/build/build.bin differ diff --git a/Imagen/build/build.elf b/Imagen/build/build.elf new file mode 100755 index 0000000..7ad8afb Binary files /dev/null and b/Imagen/build/build.elf differ diff --git a/Imagen/build/main.d b/Imagen/build/main.d new file mode 100755 index 0000000..7ca048f --- /dev/null +++ b/Imagen/build/main.d @@ -0,0 +1,106 @@ +main.o: c:/devkitPro/proyects/Imagen/source/main.c \ + c:/devkitPro/PAlib//include/nds/PA9.h c:/devkitPro/libnds/include/nds.h \ + c:/devkitPro/libnds/include/nds/jtypes.h \ + c:/devkitPro/libnds/include/nds/bios.h \ + c:/devkitPro/libnds/include/nds/card.h \ + c:/devkitPro/libnds/include/nds/jtypes.h \ + c:/devkitPro/libnds/include/nds/dma.h \ + c:/devkitPro/libnds/include/nds/interrupts.h \ + c:/devkitPro/libnds/include/nds/ipc.h \ + c:/devkitPro/libnds/include/nds/memory.h \ + c:/devkitPro/libnds/include/nds/system.h \ + c:/devkitPro/libnds/include/nds/timers.h \ + c:/devkitPro/libnds/include/nds/arm9/background.h \ + c:/devkitPro/libnds/include/nds/arm9/boxtest.h \ + c:/devkitPro/libnds/include/nds/arm9/video.h \ + c:/devkitPro/libnds/include/nds/arm9/videoGL.h \ + c:/devkitPro/libnds/include/nds/arm9/math.h \ + c:/devkitPro/libnds/include/nds/arm9/trig_lut.h \ + c:/devkitPro/libnds/include/nds/arm9/cache.h \ + c:/devkitPro/libnds/include/nds/arm9/console.h \ + c:/devkitPro/libnds/include/nds/arm9/exceptions.h \ + c:/devkitPro/libnds/include/nds/arm9/image.h \ + c:/devkitPro/libnds/include/nds/arm9/pcx.h \ + c:/devkitPro/libnds/include/nds/arm9/input.h \ + c:/devkitPro/libnds/include/nds/arm9/rumble.h \ + c:/devkitPro/libnds/include/nds/arm9/sound.h \ + c:/devkitPro/libnds/include/nds/arm9/sprite.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_IO.h \ + c:/devkitPro/libnds/include/gbfs.h \ + c:/devkitPro/PAlib//include/nds/gba-jpeg-decode.h \ + c:/devkitPro/PAlib//include/nds/gba-jpeg.h \ + c:/devkitPro/PAlib//include/nds/Sound9.h \ + c:/devkitPro/PAlib//include/nds/SoundCommon.h \ + c:/devkitPro/libnds/include/fat.h \ + c:/devkitPro/PAlib//include/nds/PA_IPC.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_General.h \ + c:/devkitPro/PAlib//include/nds/PA_IPC.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Text.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgTiles.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_General.h \ + c:/devkitPro/PAlib//include/nds/arm9/text0.h \ + c:/devkitPro/PAlib//include/nds/arm9/text1.h \ + c:/devkitPro/PAlib//include/nds/arm9/text2.h \ + c:/devkitPro/PAlib//include/nds/arm9/text3.h \ + c:/devkitPro/PAlib//include/nds/arm9/text4.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgTiles.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgLargeMap.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Video.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Sprite.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Math.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Interrupt.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_SpriteDual.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Sprite.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Sound.h \ + c:/devkitPro/PAlib//include/nds/arm9/../Sound9.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_GBFS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Text.h \ + c:/devkitPro/libnds/include/gbfs.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_FS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Micro.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Palette.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Splash.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Gif.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h \ + c:/devkitPro/PAlib//include/nds/arm9/gif/gif_lib.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Interrupt.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Keys.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Motion.h \ + c:/devkitPro/libnds/include/nds/arm9/ndsmotion.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgRot.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Timer.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_API.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Math.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Palette.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_PaletteDual.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Save.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_FS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_GBFS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_SpecialFx.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_TileDual.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Keyboard.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Window.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Mode7.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgRot.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_3DSprites.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_IA.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Reco.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_16c.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Wifi.h \ + c:/devkitPro/libnds/include/dswifi9.h \ + c:/devkitPro/libnds/include/dswifi_version.h \ + c:/devkitPro/libnds/include/sys/socket.h \ + c:/devkitPro/libnds/include/netinet/in.h \ + c:/devkitPro/libnds/include/netdb.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Splash.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Gif.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgTrans.h \ + c:/devkitPro/proyects/Imagen/source/gfx/all_gfx.c \ + c:/devkitPro/proyects/Imagen/source/gfx/all_gfx.h \ + c:/devkitPro/proyects/Imagen/source/gfx/monster1.c \ + c:/devkitPro/proyects/Imagen/source/gfx/monster2.c \ + c:/devkitPro/proyects/Imagen/source/gfx/monster1.pal.c \ + c:/devkitPro/proyects/Imagen/source/gfx/monster2.pal.c \ + c:/devkitPro/proyects/Imagen/source/gfx/all_gfx.h \ + c:/devkitPro/proyects/Imagen/build/minuano.h diff --git a/Imagen/build/main.o b/Imagen/build/main.o new file mode 100755 index 0000000..5a0b809 Binary files /dev/null and b/Imagen/build/main.o differ diff --git a/Imagen/build/minuano.h b/Imagen/build/minuano.h new file mode 100755 index 0000000..ec39c84 --- /dev/null +++ b/Imagen/build/minuano.h @@ -0,0 +1,2 @@ +extern const u8 minuano[]; +extern const u32 minuano_size[]; diff --git a/Imagen/build/minuano.o b/Imagen/build/minuano.o new file mode 100755 index 0000000..905d252 Binary files /dev/null and b/Imagen/build/minuano.o differ diff --git a/Imagen/clean.bat b/Imagen/clean.bat new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/Imagen/clean.bat @@ -0,0 +1 @@ +make clean diff --git a/Imagen/data/minuano.raw b/Imagen/data/minuano.raw new file mode 100755 index 0000000..891a433 Binary files /dev/null and b/Imagen/data/minuano.raw differ diff --git a/Imagen/logo.bmp b/Imagen/logo.bmp new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/Imagen/logo.bmp differ diff --git a/Imagen/logo.ico b/Imagen/logo.ico new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/Imagen/logo.ico differ diff --git a/Imagen/logo_wifi.bmp b/Imagen/logo_wifi.bmp new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/Imagen/logo_wifi.bmp differ diff --git a/Imagen/project.vho b/Imagen/project.vho new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/Imagen/project.vho @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/Imagen/source/.svn/all-wcprops b/Imagen/source/.svn/all-wcprops new file mode 100755 index 0000000..3de0ae6 --- /dev/null +++ b/Imagen/source/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 65 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source +END +main.c +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source/main.c +END diff --git a/Imagen/source/.svn/entries b/Imagen/source/.svn/entries new file mode 100755 index 0000000..66ac2e9 --- /dev/null +++ b/Imagen/source/.svn/entries @@ -0,0 +1,28 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate/source +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +main.c +file + + + + +2006-01-31T01:54:02.000000Z +b1140899dc28b1a23ba1bc3c72431e7f +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/Imagen/source/.svn/format b/Imagen/source/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/Imagen/source/.svn/format @@ -0,0 +1 @@ +8 diff --git a/Imagen/source/.svn/text-base/main.c.svn-base b/Imagen/source/.svn/text-base/main.c.svn-base new file mode 100755 index 0000000..fff6011 --- /dev/null +++ b/Imagen/source/.svn/text-base/main.c.svn-base @@ -0,0 +1,25 @@ +// Includes +#include // Include for PA_Lib + +// Function: main() +int main(int argc, char ** argv) +{ + PA_Init(); // Initializes PA_Lib + PA_InitVBL(); // Initializes a standard VBL + + + + + + // Infinite loop to keep the program running + while (1) + { + + + + + PA_WaitForVBL(); + } + + return 0; +} // End of main() diff --git a/Imagen/source/gfx/all_gfx.c b/Imagen/source/gfx/all_gfx.c new file mode 100755 index 0000000..186a85b --- /dev/null +++ b/Imagen/source/gfx/all_gfx.c @@ -0,0 +1,26 @@ +//Gfx converted using Mollusk's PAGfx Converter + +//This file contains all the .c, for easier inclusion in a project + +#ifdef __cplusplus +extern "C" { +#endif + +#include "all_gfx.h" + + +// Sprite files : +#include "monster1.c" +#include "monster2.c" + +// Palette files : +#include "monster1.pal.c" +#include "monster2.pal.c" + +// Background Pointers : + + +#ifdef __cplusplus +} +#endif + diff --git a/Imagen/source/gfx/all_gfx.h b/Imagen/source/gfx/all_gfx.h new file mode 100755 index 0000000..3feaa4f --- /dev/null +++ b/Imagen/source/gfx/all_gfx.h @@ -0,0 +1,30 @@ +//Gfx converted using Mollusk's PAGfx Converter + +//This file contains all the .h, for easier inclusion in a project + +#ifndef ALL_GFX_H +#define ALL_GFX_H + +#ifndef PAGfx_struct + typedef struct{ + void *Map; + int MapSize; + void *Tiles; + int TileSize; + void *Palette; + int *Info; +} PAGfx_struct; +#endif + + +// Sprite files : +extern const unsigned char monster1_Sprite[1024] __attribute__ ((aligned (4))) ; // Pal : monster1_Pal +extern const unsigned char monster2_Sprite[1024] __attribute__ ((aligned (4))) ; // Pal : monster2_Pal + +// Palette files : +extern const unsigned short monster1_Pal[20] __attribute__ ((aligned (4))) ; +extern const unsigned short monster2_Pal[16] __attribute__ ((aligned (4))) ; + + +#endif + diff --git a/Imagen/source/gfx/monster1.c b/Imagen/source/gfx/monster1.c new file mode 100755 index 0000000..19e66cb --- /dev/null +++ b/Imagen/source/gfx/monster1.c @@ -0,0 +1,70 @@ +//Sprite created using PAGfx +//This sprite uses monster1_Pal + +const unsigned char monster1_Sprite[1024] __attribute__ ((aligned (4))) = { +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, +0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 1, 2, 2, 3, +0, 0, 0, 1, 2, 3, 3, 4, 0, 0, 1, 2, 3, 4, 4, 5, +0, 0, 1, 2, 3, 4, 12, 10, 0, 1, 2, 3, 4, 4, 15, 13, +0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, +2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, +4, 4, 4, 4, 4, 4, 4, 4, 6, 7, 8, 7, 6, 5, 4, 4, +13, 13, 13, 13, 13, 10, 12, 4, 13, 13, 1, 13, 13, 13, 15, 4, +1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 1, +3, 3, 3, 3, 3, 3, 2, 2, 4, 4, 4, 4, 4, 4, 3, 3, +4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, 10, 11, 10, 9, +4, 4, 14, 13, 13, 13, 13, 13, 4, 16, 13, 13, 13, 13, 1, 13, +0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, +2, 1, 1, 0, 0, 0, 0, 0, 3, 2, 2, 1, 0, 0, 0, 0, +4, 3, 3, 2, 1, 0, 0, 0, 4, 4, 4, 3, 2, 1, 0, 0, +14, 4, 4, 3, 2, 1, 0, 0, 13, 16, 4, 4, 3, 2, 1, 0, +0, 1, 2, 3, 4, 4, 17, 13, 0, 1, 2, 3, 4, 4, 11, 13, +0, 1, 2, 3, 4, 4, 11, 13, 0, 1, 2, 3, 4, 4, 17, 13, +0, 1, 2, 3, 4, 4, 15, 13, 0, 1, 2, 3, 4, 4, 12, 10, +0, 1, 2, 3, 4, 4, 4, 5, 0, 1, 2, 3, 4, 4, 4, 4, +13, 1, 1, 1, 13, 13, 17, 4, 13, 13, 1, 13, 13, 13, 11, 4, +13, 13, 13, 13, 13, 13, 11, 4, 13, 13, 13, 13, 13, 13, 17, 4, +13, 13, 13, 13, 13, 13, 15, 4, 13, 13, 13, 13, 13, 10, 12, 4, +6, 7, 8, 7, 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, +4, 18, 13, 13, 13, 1, 1, 1, 4, 19, 13, 13, 13, 13, 1, 13, +4, 19, 13, 13, 13, 13, 13, 13, 4, 18, 13, 13, 13, 13, 13, 13, +4, 16, 13, 13, 13, 13, 13, 13, 4, 4, 14, 13, 13, 13, 13, 13, +4, 4, 4, 9, 10, 11, 10, 9, 4, 4, 4, 4, 4, 4, 4, 4, +13, 18, 4, 4, 3, 2, 1, 0, 13, 19, 4, 4, 3, 2, 1,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2, 3, 4, 4, 0, 1, 2, 1, 1, 2, 3, 3, +0, 1, 1, 0, 0, 1, 2, 2, 0, 1, 0, 0, 0, 0, 1, 1, +4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, +4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, +4, 3, 2, 3, 4, 4, 4, 4, 3, 2, 1, 2, 3, 3, 3, 3, +2, 1, 0, 1, 2, 2, 2, 1, 1, 0, 0, 0, 1, 1, 1, 0, +4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, +4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, +3, 4, 4, 4, 4, 3, 2, 3, 1, 3, 3, 3, 3, 2, 1, 2, +0, 1, 2, 2, 2, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, +4, 4, 4, 4, 3, 2, 1, 0, 4, 4, 4, 4, 3, 2, 1, 0, +4, 4, 4, 4, 3, 2, 1, 0, 4, 4, 4, 4, 3, 2, 1, 0, +4, 4, 4, 3, 2, 2, 1, 0, 3, 3, 3, 2, 1, 2, 1, 0, +2, 2, 2, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0 +}; + diff --git a/Imagen/source/gfx/monster1.pal.c b/Imagen/source/gfx/monster1.pal.c new file mode 100755 index 0000000..b588f79 --- /dev/null +++ b/Imagen/source/gfx/monster1.pal.c @@ -0,0 +1,4 @@ +//Palette created using Mollusk's PAGfxConverter + +const unsigned short monster1_Pal[20] __attribute__ ((aligned (4))) = { +64543, 32768, 44640, 39584, 33760, 35810, 47085, 57335, 64510, 38885, 52210, 63485, 34785, 65535, 44010, 46060, 37860, 55285, 48110, 59385}; diff --git a/Imagen/source/gfx/monster2.c b/Imagen/source/gfx/monster2.c new file mode 100755 index 0000000..c9fa631 --- /dev/null +++ b/Imagen/source/gfx/monster2.c @@ -0,0 +1,70 @@ +//Sprite created using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 2, 1, 0, +2, 2, 2, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0 +}; + diff --git a/Imagen/source/gfx/monster2.pal.c b/Imagen/source/gfx/monster2.pal.c new file mode 100755 index 0000000..cdc0897 --- /dev/null +++ b/Imagen/source/gfx/monster2.pal.c @@ -0,0 +1,4 @@ +//Palette created using Mollusk's PAGfxConverter + +const unsigned short monster2_Pal[16] __attribute__ ((aligned (4))) = { +64543, 32768, 32780, 34834, 42012, 44060, 53725, 60191, 65535, 46236, 56926, 50525, 52637, 59102, 64447, 62303}; diff --git a/Imagen/source/main.c b/Imagen/source/main.c new file mode 100755 index 0000000..934724e --- /dev/null +++ b/Imagen/source/main.c @@ -0,0 +1,53 @@ +// Includes +#include +#include "gfx/all_gfx.c" +#include "gfx/all_gfx.h" +#include "minuano.h" + +int main(void){ + s32 x = 0; + s32 y = 0; + s32 x1= 150; + s32 y1= 0; + + PA_Init(); //PAlib inits + PA_InitVBL(); + PA_InitSound(); + PA_PlaySimpleSound(0, minuano); + PA_InitText(1,1); + PA_OutputSimpleText(1,1,1,"Hecho por Marcos Brito"); + PA_OutputSimpleText(1,1,23,"Futbol Match!"); + + PA_LoadSpritePal(0,0,(void*)monster1_Pal); + PA_CreateSprite(0,0,(void*)monster1_Sprite,OBJ_SIZE_32X32,1,0,50, 50); + PA_LoadSpritePal(0,1,(void*)monster2_Pal); + PA_CreateSprite(0,1,(void*)monster2_Sprite,OBJ_SIZE_32X32,1,1,50, 50); + while(1) // Infinite loops + { + if (y>=0) y += Pad.Held.Down - Pad.Held.Up; + else y=0; + if (y<=153) y += Pad.Held.Down - Pad.Held.Up; + else y=153; + if (x>=0) x += Pad.Held.Right - Pad.Held.Left; + else x=0; + if (x<=223) x += Pad.Held.Right - Pad.Held.Left; + else x=223; + PA_SetSpriteXY(0,0,x,y); + + if (y1>=0) y1 += Pad.Held.B - Pad.Held.X; + else y1=0; + if (y1<=153) y1 += Pad.Held.B - Pad.Held.X; + else y1=153; + if (x1>=0) x1 += Pad.Held.A - Pad.Held.Y; + else x1=0; + if (x1<=223) x1 += Pad.Held.A - Pad.Held.Y; + else x1=223; + PA_SetSpriteXY(0,1,x1,y1); + + if (PA_Distance(x, y, x1, y1) < 1024) PA_OutputText(1, 2, 10, "Collision !!"); + else PA_OutputSimpleText(1,2,10," "); + + PA_WaitForVBL(); + } +return 0; +} diff --git a/ReconocimentoDeTeclas/.svn/all-wcprops b/ReconocimentoDeTeclas/.svn/all-wcprops new file mode 100755 index 0000000..d1c0d3f --- /dev/null +++ b/ReconocimentoDeTeclas/.svn/all-wcprops @@ -0,0 +1,71 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate +END +@project@.ico +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.ico +END +project.vho +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/project.vho +END +@project@.txt +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.txt +END +build.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/build.bat +END +NdsLauncher.exe +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/NdsLauncher.exe +END +clean.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/clean.bat +END +@project@.vhw +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.vhw +END +logo.ico +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.ico +END +logo_wifi.bmp +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/123/trunk/vham/templates/project/PAlibTemplate/logo_wifi.bmp +END +Makefile +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/Makefile +END +logo.bmp +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.bmp +END diff --git a/ReconocimentoDeTeclas/.svn/entries b/ReconocimentoDeTeclas/.svn/entries new file mode 100755 index 0000000..df087e8 --- /dev/null +++ b/ReconocimentoDeTeclas/.svn/entries @@ -0,0 +1,156 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +@project@.ico +file + + + + +2003-05-09T15:53:26.000000Z +1d64ae57ec646dc8bbc6294a8bc48566 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +source +dir + +project.vho +file + + + + +2006-01-31T01:51:50.000000Z +62f8d3225fbfb3bbd8bebbf0589f716c +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.txt +file + + + + +2006-01-31T01:52:02.000000Z +3aaf57a858c308d9952bfb1721859a13 +2006-09-03T16:21:26.676623Z +4 +molousk + +build.bat +file + + + + +2005-11-08T04:24:56.000000Z +4af15a2f33b24192e041b721e0e1a7e4 +2006-09-03T16:21:26.676623Z +4 +molousk + +NdsLauncher.exe +file + + + + +2006-02-02T07:40:04.000000Z +2cddbb9d3427a165fc4fd56b19d427e5 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +clean.bat +file + + + + +2005-10-06T08:16:56.000000Z +b7f3f6ea67c49ab9187d752ef9052516 +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.vhw +file + + + + +2006-08-25T20:19:08.000000Z +aba3a9bc8c1e79a1cbfba3f2741c1c0a +2006-09-03T16:21:26.676623Z +4 +molousk + +logo.ico +file + + + + +2005-11-28T00:37:52.000000Z +67bbc374a4d8c1b34b0aff0078409a8d +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +logo_wifi.bmp +file +123 + + + +2007-02-06T17:05:30.609375Z +f1cc2221ddb8445b9d6d5c510f1a52a3 +2007-02-06T17:05:14.209316Z +123 +Molousk +has-props + +logo.bmp +file + + + + +2005-10-18T01:39:22.000000Z +94768f0e78d21ecfc7ad4ddcf44596b0 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +Makefile +file + + + + +2006-08-25T20:11:56.000000Z +d280afc4cb3ea1c949ecc9655000a557 +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/ReconocimentoDeTeclas/.svn/format b/ReconocimentoDeTeclas/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/ReconocimentoDeTeclas/.svn/format @@ -0,0 +1 @@ +8 diff --git a/ReconocimentoDeTeclas/.svn/prop-base/@project@.ico.svn-base b/ReconocimentoDeTeclas/.svn/prop-base/@project@.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/ReconocimentoDeTeclas/.svn/prop-base/@project@.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/ReconocimentoDeTeclas/.svn/prop-base/NdsLauncher.exe.svn-base b/ReconocimentoDeTeclas/.svn/prop-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/ReconocimentoDeTeclas/.svn/prop-base/NdsLauncher.exe.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/ReconocimentoDeTeclas/.svn/prop-base/logo.bmp.svn-base b/ReconocimentoDeTeclas/.svn/prop-base/logo.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/ReconocimentoDeTeclas/.svn/prop-base/logo.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/ReconocimentoDeTeclas/.svn/prop-base/logo.ico.svn-base b/ReconocimentoDeTeclas/.svn/prop-base/logo.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/ReconocimentoDeTeclas/.svn/prop-base/logo.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/ReconocimentoDeTeclas/.svn/prop-base/logo_wifi.bmp.svn-base b/ReconocimentoDeTeclas/.svn/prop-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/ReconocimentoDeTeclas/.svn/prop-base/logo_wifi.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/ReconocimentoDeTeclas/.svn/text-base/@project@.ico.svn-base b/ReconocimentoDeTeclas/.svn/text-base/@project@.ico.svn-base new file mode 100755 index 0000000..c5eb19e Binary files /dev/null and b/ReconocimentoDeTeclas/.svn/text-base/@project@.ico.svn-base differ diff --git a/ReconocimentoDeTeclas/.svn/text-base/@project@.txt.svn-base b/ReconocimentoDeTeclas/.svn/text-base/@project@.txt.svn-base new file mode 100755 index 0000000..2f5a41b --- /dev/null +++ b/ReconocimentoDeTeclas/.svn/text-base/@project@.txt.svn-base @@ -0,0 +1 @@ +A default PAlib Project template \ No newline at end of file diff --git a/ReconocimentoDeTeclas/.svn/text-base/@project@.vhw.svn-base b/ReconocimentoDeTeclas/.svn/text-base/@project@.vhw.svn-base new file mode 100755 index 0000000..128945b --- /dev/null +++ b/ReconocimentoDeTeclas/.svn/text-base/@project@.vhw.svn-base @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/ReconocimentoDeTeclas/.svn/text-base/Makefile.svn-base b/ReconocimentoDeTeclas/.svn/text-base/Makefile.svn-base new file mode 100755 index 0000000..fbcead1 --- /dev/null +++ b/ReconocimentoDeTeclas/.svn/text-base/Makefile.svn-base @@ -0,0 +1,291 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Demo +TEXT2 := using PAlib +TEXT3 := www.palib.com +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wall -O2\ + -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lnds9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + +define bin2o + cp $(<) $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/ReconocimentoDeTeclas/.svn/text-base/NdsLauncher.exe.svn-base b/ReconocimentoDeTeclas/.svn/text-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/ReconocimentoDeTeclas/.svn/text-base/NdsLauncher.exe.svn-base differ diff --git a/ReconocimentoDeTeclas/.svn/text-base/build.bat.svn-base b/ReconocimentoDeTeclas/.svn/text-base/build.bat.svn-base new file mode 100755 index 0000000..320651d --- /dev/null +++ b/ReconocimentoDeTeclas/.svn/text-base/build.bat.svn-base @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/ReconocimentoDeTeclas/.svn/text-base/clean.bat.svn-base b/ReconocimentoDeTeclas/.svn/text-base/clean.bat.svn-base new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/ReconocimentoDeTeclas/.svn/text-base/clean.bat.svn-base @@ -0,0 +1 @@ +make clean diff --git a/ReconocimentoDeTeclas/.svn/text-base/logo.bmp.svn-base b/ReconocimentoDeTeclas/.svn/text-base/logo.bmp.svn-base new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/ReconocimentoDeTeclas/.svn/text-base/logo.bmp.svn-base differ diff --git a/ReconocimentoDeTeclas/.svn/text-base/logo.ico.svn-base b/ReconocimentoDeTeclas/.svn/text-base/logo.ico.svn-base new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/ReconocimentoDeTeclas/.svn/text-base/logo.ico.svn-base differ diff --git a/ReconocimentoDeTeclas/.svn/text-base/logo_wifi.bmp.svn-base b/ReconocimentoDeTeclas/.svn/text-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/ReconocimentoDeTeclas/.svn/text-base/logo_wifi.bmp.svn-base differ diff --git a/ReconocimentoDeTeclas/.svn/text-base/project.vho.svn-base b/ReconocimentoDeTeclas/.svn/text-base/project.vho.svn-base new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/ReconocimentoDeTeclas/.svn/text-base/project.vho.svn-base @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/ReconocimentoDeTeclas/Makefile b/ReconocimentoDeTeclas/Makefile new file mode 100755 index 0000000..9927c66 --- /dev/null +++ b/ReconocimentoDeTeclas/Makefile @@ -0,0 +1,299 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Project +TEXT2 := using PAlib +TEXT3 := www.palib.info +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif + + +include $(DEVKITARM)/ds_rules + + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wformat=2 -Winline -Wall -O2\ + + -mcpu=arm946e-s -mtune=arm946e-s -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lfat -lnds9 -ldswifi9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + + +define bin2o + cp $(<) $(*).tmp + echo -n $$(( `cat $(*).tmp | wc -c` & 3 )) | sed -e 's/0//g' | sed -e 's/1/000/g' | sed -e 's/2/00/g' | sed -e 's/3/0/g' >> $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/ReconocimentoDeTeclas/NdsLauncher.exe b/ReconocimentoDeTeclas/NdsLauncher.exe new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/ReconocimentoDeTeclas/NdsLauncher.exe differ diff --git a/ReconocimentoDeTeclas/ReconocimentoDeTeclas.ds.gba b/ReconocimentoDeTeclas/ReconocimentoDeTeclas.ds.gba new file mode 100755 index 0000000..9dc8824 Binary files /dev/null and b/ReconocimentoDeTeclas/ReconocimentoDeTeclas.ds.gba differ diff --git a/ReconocimentoDeTeclas/ReconocimentoDeTeclas.nds b/ReconocimentoDeTeclas/ReconocimentoDeTeclas.nds new file mode 100755 index 0000000..3163baa Binary files /dev/null and b/ReconocimentoDeTeclas/ReconocimentoDeTeclas.nds differ diff --git a/ReconocimentoDeTeclas/ReconocimentoDeTeclas.sc.nds b/ReconocimentoDeTeclas/ReconocimentoDeTeclas.sc.nds new file mode 100755 index 0000000..9dc8824 Binary files /dev/null and b/ReconocimentoDeTeclas/ReconocimentoDeTeclas.sc.nds differ diff --git a/ReconocimentoDeTeclas/ReconocimentoDeTeclas.vhw b/ReconocimentoDeTeclas/ReconocimentoDeTeclas.vhw new file mode 100755 index 0000000..794d417 Binary files /dev/null and b/ReconocimentoDeTeclas/ReconocimentoDeTeclas.vhw differ diff --git a/ReconocimentoDeTeclas/ReconocimentoDeTeclas.vhw.bak b/ReconocimentoDeTeclas/ReconocimentoDeTeclas.vhw.bak new file mode 100755 index 0000000..128945b --- /dev/null +++ b/ReconocimentoDeTeclas/ReconocimentoDeTeclas.vhw.bak @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/ReconocimentoDeTeclas/build.bat b/ReconocimentoDeTeclas/build.bat new file mode 100755 index 0000000..320651d --- /dev/null +++ b/ReconocimentoDeTeclas/build.bat @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/ReconocimentoDeTeclas/build/build.bin b/ReconocimentoDeTeclas/build/build.bin new file mode 100755 index 0000000..b821434 Binary files /dev/null and b/ReconocimentoDeTeclas/build/build.bin differ diff --git a/ReconocimentoDeTeclas/build/build.elf b/ReconocimentoDeTeclas/build/build.elf new file mode 100755 index 0000000..8664e72 Binary files /dev/null and b/ReconocimentoDeTeclas/build/build.elf differ diff --git a/ReconocimentoDeTeclas/build/main.d b/ReconocimentoDeTeclas/build/main.d new file mode 100755 index 0000000..a671fd7 --- /dev/null +++ b/ReconocimentoDeTeclas/build/main.d @@ -0,0 +1,98 @@ +main.o: c:/devkitPro/proyects/ReconocimentoDeTeclas/source/main.c \ + c:/devkitPro/PAlib//include/nds/PA9.h c:/devkitPro/libnds/include/nds.h \ + c:/devkitPro/libnds/include/nds/jtypes.h \ + c:/devkitPro/libnds/include/nds/bios.h \ + c:/devkitPro/libnds/include/nds/card.h \ + c:/devkitPro/libnds/include/nds/jtypes.h \ + c:/devkitPro/libnds/include/nds/dma.h \ + c:/devkitPro/libnds/include/nds/interrupts.h \ + c:/devkitPro/libnds/include/nds/ipc.h \ + c:/devkitPro/libnds/include/nds/memory.h \ + c:/devkitPro/libnds/include/nds/system.h \ + c:/devkitPro/libnds/include/nds/timers.h \ + c:/devkitPro/libnds/include/nds/arm9/background.h \ + c:/devkitPro/libnds/include/nds/arm9/boxtest.h \ + c:/devkitPro/libnds/include/nds/arm9/video.h \ + c:/devkitPro/libnds/include/nds/arm9/videoGL.h \ + c:/devkitPro/libnds/include/nds/arm9/math.h \ + c:/devkitPro/libnds/include/nds/arm9/trig_lut.h \ + c:/devkitPro/libnds/include/nds/arm9/cache.h \ + c:/devkitPro/libnds/include/nds/arm9/console.h \ + c:/devkitPro/libnds/include/nds/arm9/exceptions.h \ + c:/devkitPro/libnds/include/nds/arm9/image.h \ + c:/devkitPro/libnds/include/nds/arm9/pcx.h \ + c:/devkitPro/libnds/include/nds/arm9/input.h \ + c:/devkitPro/libnds/include/nds/arm9/rumble.h \ + c:/devkitPro/libnds/include/nds/arm9/sound.h \ + c:/devkitPro/libnds/include/nds/arm9/sprite.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_IO.h \ + c:/devkitPro/libnds/include/gbfs.h \ + c:/devkitPro/PAlib//include/nds/gba-jpeg-decode.h \ + c:/devkitPro/PAlib//include/nds/gba-jpeg.h \ + c:/devkitPro/PAlib//include/nds/Sound9.h \ + c:/devkitPro/PAlib//include/nds/SoundCommon.h \ + c:/devkitPro/libnds/include/fat.h \ + c:/devkitPro/PAlib//include/nds/PA_IPC.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_General.h \ + c:/devkitPro/PAlib//include/nds/PA_IPC.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Text.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgTiles.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_General.h \ + c:/devkitPro/PAlib//include/nds/arm9/text0.h \ + c:/devkitPro/PAlib//include/nds/arm9/text1.h \ + c:/devkitPro/PAlib//include/nds/arm9/text2.h \ + c:/devkitPro/PAlib//include/nds/arm9/text3.h \ + c:/devkitPro/PAlib//include/nds/arm9/text4.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgTiles.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgLargeMap.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Video.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Sprite.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Math.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Interrupt.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_SpriteDual.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Sprite.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Sound.h \ + c:/devkitPro/PAlib//include/nds/arm9/../Sound9.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_GBFS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Text.h \ + c:/devkitPro/libnds/include/gbfs.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_FS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Micro.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Palette.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Splash.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Gif.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h \ + c:/devkitPro/PAlib//include/nds/arm9/gif/gif_lib.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Interrupt.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Keys.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Motion.h \ + c:/devkitPro/libnds/include/nds/arm9/ndsmotion.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgRot.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Timer.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_API.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Math.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Palette.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_PaletteDual.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Save.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_FS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_GBFS.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_SpecialFx.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_TileDual.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Keyboard.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Window.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Mode7.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgRot.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_3DSprites.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_IA.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Reco.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_16c.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Wifi.h \ + c:/devkitPro/libnds/include/dswifi9.h \ + c:/devkitPro/libnds/include/dswifi_version.h \ + c:/devkitPro/libnds/include/sys/socket.h \ + c:/devkitPro/libnds/include/netinet/in.h \ + c:/devkitPro/libnds/include/netdb.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Splash.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_Gif.h \ + c:/devkitPro/PAlib//include/nds/arm9/PA_BgTrans.h diff --git a/ReconocimentoDeTeclas/build/main.o b/ReconocimentoDeTeclas/build/main.o new file mode 100755 index 0000000..7c09687 Binary files /dev/null and b/ReconocimentoDeTeclas/build/main.o differ diff --git a/ReconocimentoDeTeclas/clean.bat b/ReconocimentoDeTeclas/clean.bat new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/ReconocimentoDeTeclas/clean.bat @@ -0,0 +1 @@ +make clean diff --git a/ReconocimentoDeTeclas/logo.bmp b/ReconocimentoDeTeclas/logo.bmp new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/ReconocimentoDeTeclas/logo.bmp differ diff --git a/ReconocimentoDeTeclas/logo.ico b/ReconocimentoDeTeclas/logo.ico new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/ReconocimentoDeTeclas/logo.ico differ diff --git a/ReconocimentoDeTeclas/logo_wifi.bmp b/ReconocimentoDeTeclas/logo_wifi.bmp new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/ReconocimentoDeTeclas/logo_wifi.bmp differ diff --git a/ReconocimentoDeTeclas/project.vho b/ReconocimentoDeTeclas/project.vho new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/ReconocimentoDeTeclas/project.vho @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/ReconocimentoDeTeclas/source/.svn/all-wcprops b/ReconocimentoDeTeclas/source/.svn/all-wcprops new file mode 100755 index 0000000..3de0ae6 --- /dev/null +++ b/ReconocimentoDeTeclas/source/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 65 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source +END +main.c +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source/main.c +END diff --git a/ReconocimentoDeTeclas/source/.svn/entries b/ReconocimentoDeTeclas/source/.svn/entries new file mode 100755 index 0000000..66ac2e9 --- /dev/null +++ b/ReconocimentoDeTeclas/source/.svn/entries @@ -0,0 +1,28 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate/source +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +main.c +file + + + + +2006-01-31T01:54:02.000000Z +b1140899dc28b1a23ba1bc3c72431e7f +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/ReconocimentoDeTeclas/source/.svn/format b/ReconocimentoDeTeclas/source/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/ReconocimentoDeTeclas/source/.svn/format @@ -0,0 +1 @@ +8 diff --git a/ReconocimentoDeTeclas/source/.svn/text-base/main.c.svn-base b/ReconocimentoDeTeclas/source/.svn/text-base/main.c.svn-base new file mode 100755 index 0000000..fff6011 --- /dev/null +++ b/ReconocimentoDeTeclas/source/.svn/text-base/main.c.svn-base @@ -0,0 +1,25 @@ +// Includes +#include // Include for PA_Lib + +// Function: main() +int main(int argc, char ** argv) +{ + PA_Init(); // Initializes PA_Lib + PA_InitVBL(); // Initializes a standard VBL + + + + + + // Infinite loop to keep the program running + while (1) + { + + + + + PA_WaitForVBL(); + } + + return 0; +} // End of main() diff --git a/ReconocimentoDeTeclas/source/main.c b/ReconocimentoDeTeclas/source/main.c new file mode 100755 index 0000000..5f74e2d --- /dev/null +++ b/ReconocimentoDeTeclas/source/main.c @@ -0,0 +1,53 @@ +// Includes +#include // Include for PA_Lib + +// Function: main() +int main(int argc, char ** argv) +{ + PA_Init(); // Initializes PA_Lib + PA_InitVBL(); // Initializes a standard VBL + +PA_InitText(1, 0); // Inicia el sistema de textos en la pantalla superior +PA_Init8bitBg(0, 0); // Dibujaremos los caracteres en este background... + +u16 *pal = (u16*)PAL_BG0; +pal[1] = PA_RGB(31, 31, 31); +char letter = 0; // Siguiente letra a escribir. +char text[200]; // Este ha de ser nuestro texto. + +PA_WaitForVBL(); + +u8 nletter = 0; + +// Loop infinito para mantener el programa en marcha +while (1) +{ + + if(Stylus.Newpress) PA_Clear8bitBg(0); // Resetea la pantaña cuando empezamos un nuevo caracter + + PA_8bitDraw(0, 1); + + char letter = PA_CheckLetter(); // ¡¡¡ Devuelve la letra!!! + + if (letter > 31) { // Esta es una letra nueva + text[nletter] = letter; + nletter++; + } + else if ((letter == PA_BACKSPACE)&&nletter) { // Espacio pulsado + nletter--; + text[nletter] = ' '; // Borra la ultima letra + } + else if (letter == '\n'){ // Intro pulsado + text[nletter] = letter; + nletter++; + } + + PA_OutputText(1, 2, 2, text); // Escribe el texto + + PA_OutputSimpleText(1, 0, 10, "Draw a PAGraffiti letter to have it recognized by the system..."); + + PA_WaitForVBL(); +} + + return 0; +} // End of main() diff --git a/SpaceInvaders/.DS_Store b/SpaceInvaders/.DS_Store new file mode 100755 index 0000000..85ac978 Binary files /dev/null and b/SpaceInvaders/.DS_Store differ diff --git a/SpaceInvaders/.svn/all-wcprops b/SpaceInvaders/.svn/all-wcprops new file mode 100755 index 0000000..d1c0d3f --- /dev/null +++ b/SpaceInvaders/.svn/all-wcprops @@ -0,0 +1,71 @@ +K 25 +svn:wc:ra_dav:version-url +V 58 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate +END +@project@.ico +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.ico +END +project.vho +K 25 +svn:wc:ra_dav:version-url +V 70 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/project.vho +END +@project@.txt +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.txt +END +build.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/build.bat +END +NdsLauncher.exe +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/NdsLauncher.exe +END +clean.bat +K 25 +svn:wc:ra_dav:version-url +V 68 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/clean.bat +END +@project@.vhw +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/@project@.vhw +END +logo.ico +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.ico +END +logo_wifi.bmp +K 25 +svn:wc:ra_dav:version-url +V 74 +/svn/!svn/ver/123/trunk/vham/templates/project/PAlibTemplate/logo_wifi.bmp +END +Makefile +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/Makefile +END +logo.bmp +K 25 +svn:wc:ra_dav:version-url +V 67 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/logo.bmp +END diff --git a/SpaceInvaders/.svn/entries b/SpaceInvaders/.svn/entries new file mode 100755 index 0000000..df087e8 --- /dev/null +++ b/SpaceInvaders/.svn/entries @@ -0,0 +1,156 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +@project@.ico +file + + + + +2003-05-09T15:53:26.000000Z +1d64ae57ec646dc8bbc6294a8bc48566 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +source +dir + +project.vho +file + + + + +2006-01-31T01:51:50.000000Z +62f8d3225fbfb3bbd8bebbf0589f716c +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.txt +file + + + + +2006-01-31T01:52:02.000000Z +3aaf57a858c308d9952bfb1721859a13 +2006-09-03T16:21:26.676623Z +4 +molousk + +build.bat +file + + + + +2005-11-08T04:24:56.000000Z +4af15a2f33b24192e041b721e0e1a7e4 +2006-09-03T16:21:26.676623Z +4 +molousk + +NdsLauncher.exe +file + + + + +2006-02-02T07:40:04.000000Z +2cddbb9d3427a165fc4fd56b19d427e5 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +clean.bat +file + + + + +2005-10-06T08:16:56.000000Z +b7f3f6ea67c49ab9187d752ef9052516 +2006-09-03T16:21:26.676623Z +4 +molousk + +@project@.vhw +file + + + + +2006-08-25T20:19:08.000000Z +aba3a9bc8c1e79a1cbfba3f2741c1c0a +2006-09-03T16:21:26.676623Z +4 +molousk + +logo.ico +file + + + + +2005-11-28T00:37:52.000000Z +67bbc374a4d8c1b34b0aff0078409a8d +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +logo_wifi.bmp +file +123 + + + +2007-02-06T17:05:30.609375Z +f1cc2221ddb8445b9d6d5c510f1a52a3 +2007-02-06T17:05:14.209316Z +123 +Molousk +has-props + +logo.bmp +file + + + + +2005-10-18T01:39:22.000000Z +94768f0e78d21ecfc7ad4ddcf44596b0 +2006-09-03T16:21:26.676623Z +4 +molousk +has-props + +Makefile +file + + + + +2006-08-25T20:11:56.000000Z +d280afc4cb3ea1c949ecc9655000a557 +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/SpaceInvaders/.svn/format b/SpaceInvaders/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/SpaceInvaders/.svn/format @@ -0,0 +1 @@ +8 diff --git a/SpaceInvaders/.svn/prop-base/@project@.ico.svn-base b/SpaceInvaders/.svn/prop-base/@project@.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/SpaceInvaders/.svn/prop-base/@project@.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/SpaceInvaders/.svn/prop-base/NdsLauncher.exe.svn-base b/SpaceInvaders/.svn/prop-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/SpaceInvaders/.svn/prop-base/NdsLauncher.exe.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/SpaceInvaders/.svn/prop-base/logo.bmp.svn-base b/SpaceInvaders/.svn/prop-base/logo.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/SpaceInvaders/.svn/prop-base/logo.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/SpaceInvaders/.svn/prop-base/logo.ico.svn-base b/SpaceInvaders/.svn/prop-base/logo.ico.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/SpaceInvaders/.svn/prop-base/logo.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/SpaceInvaders/.svn/prop-base/logo_wifi.bmp.svn-base b/SpaceInvaders/.svn/prop-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..5e9587e --- /dev/null +++ b/SpaceInvaders/.svn/prop-base/logo_wifi.bmp.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/SpaceInvaders/.svn/text-base/@project@.ico.svn-base b/SpaceInvaders/.svn/text-base/@project@.ico.svn-base new file mode 100755 index 0000000..c5eb19e Binary files /dev/null and b/SpaceInvaders/.svn/text-base/@project@.ico.svn-base differ diff --git a/SpaceInvaders/.svn/text-base/@project@.txt.svn-base b/SpaceInvaders/.svn/text-base/@project@.txt.svn-base new file mode 100755 index 0000000..2f5a41b --- /dev/null +++ b/SpaceInvaders/.svn/text-base/@project@.txt.svn-base @@ -0,0 +1 @@ +A default PAlib Project template \ No newline at end of file diff --git a/SpaceInvaders/.svn/text-base/@project@.vhw.svn-base b/SpaceInvaders/.svn/text-base/@project@.vhw.svn-base new file mode 100755 index 0000000..128945b --- /dev/null +++ b/SpaceInvaders/.svn/text-base/@project@.vhw.svn-base @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/SpaceInvaders/.svn/text-base/Makefile.svn-base b/SpaceInvaders/.svn/text-base/Makefile.svn-base new file mode 100755 index 0000000..fbcead1 --- /dev/null +++ b/SpaceInvaders/.svn/text-base/Makefile.svn-base @@ -0,0 +1,291 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Demo +TEXT2 := using PAlib +TEXT3 := www.palib.com +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wall -O2\ + -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lnds9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + +define bin2o + cp $(<) $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/SpaceInvaders/.svn/text-base/NdsLauncher.exe.svn-base b/SpaceInvaders/.svn/text-base/NdsLauncher.exe.svn-base new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/SpaceInvaders/.svn/text-base/NdsLauncher.exe.svn-base differ diff --git a/SpaceInvaders/.svn/text-base/build.bat.svn-base b/SpaceInvaders/.svn/text-base/build.bat.svn-base new file mode 100755 index 0000000..320651d --- /dev/null +++ b/SpaceInvaders/.svn/text-base/build.bat.svn-base @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/SpaceInvaders/.svn/text-base/clean.bat.svn-base b/SpaceInvaders/.svn/text-base/clean.bat.svn-base new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/SpaceInvaders/.svn/text-base/clean.bat.svn-base @@ -0,0 +1 @@ +make clean diff --git a/SpaceInvaders/.svn/text-base/logo.bmp.svn-base b/SpaceInvaders/.svn/text-base/logo.bmp.svn-base new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/SpaceInvaders/.svn/text-base/logo.bmp.svn-base differ diff --git a/SpaceInvaders/.svn/text-base/logo.ico.svn-base b/SpaceInvaders/.svn/text-base/logo.ico.svn-base new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/SpaceInvaders/.svn/text-base/logo.ico.svn-base differ diff --git a/SpaceInvaders/.svn/text-base/logo_wifi.bmp.svn-base b/SpaceInvaders/.svn/text-base/logo_wifi.bmp.svn-base new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/SpaceInvaders/.svn/text-base/logo_wifi.bmp.svn-base differ diff --git a/SpaceInvaders/.svn/text-base/project.vho.svn-base b/SpaceInvaders/.svn/text-base/project.vho.svn-base new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/SpaceInvaders/.svn/text-base/project.vho.svn-base @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/SpaceInvaders/Makefile b/SpaceInvaders/Makefile new file mode 100755 index 0000000..9927c66 --- /dev/null +++ b/SpaceInvaders/Makefile @@ -0,0 +1,299 @@ +PROGNAME = PAlib +OFILES += +ADD_LIBS += + +PATH := $(DEVKITARM)/bin:$(PATH) + +ARM7BIN := -7 $(PAPATH)/lib/arm7/arm7.bin +TEXT1 := PAlib Project +TEXT2 := using PAlib +TEXT3 := www.palib.info +ICON := -b $(CURDIR)/../logo.bmp +LOGO := -o $(CURDIR)/../logo_wifi.bmp + +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) +endif + + +include $(DEVKITARM)/ds_rules + + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output, if this ends with _mb generates a multiboot image +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# INCLUDES is a list of directories containing extra header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := gfx source data +INCLUDES := include build data + +EXPORT_DIR := /c/ndsexamples/ +#--------------------------------------------------------------------------------- +# ARM7BIN is the path to an arm7 binary other than the default +# usage: ARM7BIN := -7 binaryName.bin +# +# ICON is the path to an icon to be used int the header plus text +# usage: ICON := -t iconName.bmp "text line one; text line 2; text line 3" +# +#--------------------------------------------------------------------------------- + + + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +CFLAGS := -g -Wformat=2 -Winline -Wall -O2\ + + -mcpu=arm946e-s -mtune=arm946e-s -fomit-frame-pointer\ + -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 -I$(DEVKITPRO)/PAlib/include/nds + +ASFLAGS := -g $(ARCH) +LDFLAGS := -g $(ARCH) -mno-fpu -L$(DEVKITPRO)/PAlib/lib + + +#--------------------------------------------------------------------------------- +# path to tools - this can be deleted if you set the path in windows +#--------------------------------------------------------------------------------- +# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin + +#--------------------------------------------------------------------------------- +# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it +#--------------------------------------------------------------------------------- +# NDSLIBPATH := /d/dev/ds/ndslib/ + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := arm-eabi- +#--------------------------------------------------------------------------------- +# any extra libraries we wish to link with the project +#--------------------------------------------------------------------------------- +LIBS := -lfat -lnds9 -ldswifi9 +LIBSPA := -lpa9 + + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(DEVKITPRO)/libnds +LIBDIRPA := $(PAPATH) + + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/$(TARGET) + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) + +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +export LD := $(CXX) +#export LD := $(CC) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx))) +BINFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bin))) +PALFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pal))) +RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw))) +MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map))) +JPEGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.jpg))) +MODFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.mod))) +GIFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.gif))) +BMPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.bmp))) + +export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o) $(JPEGFILES:.jpg=.o) $(MODFILES:.mod=.o) $(GIFFILES:.gif=.o) $(BMPFILES:.bmp=.o)\ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include/nds) \ + -I$(PAPATH)/include/nds\ + -I$(CURDIR)/$(BUILD) + +export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +export LIBPATHPA := $(foreach dir,$(LIBDIRPA),-L$(dir)/lib) + +.PHONY: $(BUILD) clean export + +#--------------------------------------------------------------------------------- +$(BUILD): + @[ -d $@ ] || mkdir -p $@ + @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ...$(TARGET) + @rm -fr $(BUILD) *.elf *.*ds* + +export: + @echo exporting ...$(TARGET) + @cp *.nds $(EXPORT_DIR)/$(TARGET).nds + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT).ds.gba : $(OUTPUT).nds + +$(OUTPUT).nds : $(OUTPUT).bin + +$(OUTPUT).bin : $(OUTPUT).elf + +$(OUTPUT).elf : $(OFILES) + +#--------------------------------------------------------------------------------- +%.ds.gba: %.nds + @echo built ... $(notdir $@) + @dsbuild $< + @cp $(CURDIR)/../$(notdir $@) ../$(notdir $(OUTPUT)).sc.nds + +#--------------------------------------------------------------------------------- +%.nds: %.bin + + @ndstool -c $@ -9 $(TARGET).bin $(ARM7BIN) $(LOGO) $(ICON) "$(TEXT1);$(TEXT2);$(TEXT3)" + + +#--------------------------------------------------------------------------------- +%.bin: %.elf + + @$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin + +#--------------------------------------------------------------------------------- +%.elf: + @echo $(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + @$(LD) $(LDFLAGS) -specs=ds_arm9.specs $(OFILES) $(LIBPATHPA) $(LIBSPA) $(LIBPATHS) $(LIBS) -o $(TARGET).elf + + + +#--------------------------------------------------------------------------------- +# Compile Targets for C/C++ +#--------------------------------------------------------------------------------- + +#--------------------------------------------------------------------------------- +%.o : %.cpp + @echo $(notdir $<) + @$(CXX) -MM $(CFLAGS) -o $*.d $< + @$(CXX) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.c + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(CFLAGS) -c $< -o$@ + +#--------------------------------------------------------------------------------- +%.o : %.s + @echo $(notdir $<) + @$(CC) -MM $(CFLAGS) -o $*.d $< + @$(CC) $(ASFLAGS) -c $< -o$@ + + +define bin2o + cp $(<) $(*).tmp + echo -n $$(( `cat $(*).tmp | wc -c` & 3 )) | sed -e 's/0//g' | sed -e 's/1/000/g' | sed -e 's/2/00/g' | sed -e 's/3/0/g' >> $(*).tmp + $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ + --rename-section .data=.rodata \ + --redefine-sym _binary_$*_tmp_start=$*\ + --redefine-sym _binary_$*_tmp_end=$*_end\ + --redefine-sym _binary_$*_tmp_size=$*_size\ + $(*).tmp $(@) + echo "extern const u8" $(*)"[];" > $(*).h + echo "extern const u32" $(*)_size[]";" >> $(*).h + rm $(*).tmp +endef + +#--------------------------------------------------------------------------------- +%.o : %.pcx +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.raw +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.pal +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.map +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mdl +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.jpg +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.mod +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.gif +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + +#--------------------------------------------------------------------------------- +%.o : %.bmp +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/SpaceInvaders/NdsLauncher.exe b/SpaceInvaders/NdsLauncher.exe new file mode 100755 index 0000000..33f6267 Binary files /dev/null and b/SpaceInvaders/NdsLauncher.exe differ diff --git a/SpaceInvaders/SpaceInvaders.ds.gba b/SpaceInvaders/SpaceInvaders.ds.gba new file mode 100755 index 0000000..a5f28d1 Binary files /dev/null and b/SpaceInvaders/SpaceInvaders.ds.gba differ diff --git a/SpaceInvaders/SpaceInvaders.nds b/SpaceInvaders/SpaceInvaders.nds new file mode 100755 index 0000000..47add3d Binary files /dev/null and b/SpaceInvaders/SpaceInvaders.nds differ diff --git a/SpaceInvaders/SpaceInvaders.sc.nds b/SpaceInvaders/SpaceInvaders.sc.nds new file mode 100755 index 0000000..a5f28d1 Binary files /dev/null and b/SpaceInvaders/SpaceInvaders.sc.nds differ diff --git a/SpaceInvaders/SpaceInvaders.vhw b/SpaceInvaders/SpaceInvaders.vhw new file mode 100755 index 0000000..a6cfc17 Binary files /dev/null and b/SpaceInvaders/SpaceInvaders.vhw differ diff --git a/SpaceInvaders/SpaceInvaders.vhw.bak b/SpaceInvaders/SpaceInvaders.vhw.bak new file mode 100755 index 0000000..128945b --- /dev/null +++ b/SpaceInvaders/SpaceInvaders.vhw.bak @@ -0,0 +1,6 @@ +[VisualHAMTreeContentV1] +HAM Workspace= +HAM Workspace\Source Files= +HAM Workspace\Source Files=source/main.c +HAM Workspace\Header Files= +HAM Workspace=makefile diff --git a/SpaceInvaders/build.bat b/SpaceInvaders/build.bat new file mode 100755 index 0000000..320651d --- /dev/null +++ b/SpaceInvaders/build.bat @@ -0,0 +1,3 @@ +make clean +make +pause \ No newline at end of file diff --git a/SpaceInvaders/build/build.bin b/SpaceInvaders/build/build.bin new file mode 100755 index 0000000..277df59 Binary files /dev/null and b/SpaceInvaders/build/build.bin differ diff --git a/SpaceInvaders/build/build.elf b/SpaceInvaders/build/build.elf new file mode 100755 index 0000000..2d30c4a Binary files /dev/null and b/SpaceInvaders/build/build.elf differ diff --git a/SpaceInvaders/build/main.d b/SpaceInvaders/build/main.d new file mode 100755 index 0000000..d07bb3e --- /dev/null +++ b/SpaceInvaders/build/main.d @@ -0,0 +1,105 @@ +main.o: c:/devkitPro/proyects/SpaceInvaders/source/main.c \ + c:/devkitPro/PAlib/include/nds/PA9.h c:/devkitPro/libnds/include/nds.h \ + c:/devkitPro/libnds/include/nds/jtypes.h \ + c:/devkitPro/libnds/include/nds/bios.h \ + c:/devkitPro/libnds/include/nds/card.h \ + c:/devkitPro/libnds/include/nds/jtypes.h \ + c:/devkitPro/libnds/include/nds/dma.h \ + c:/devkitPro/libnds/include/nds/interrupts.h \ + c:/devkitPro/libnds/include/nds/ipc.h \ + c:/devkitPro/libnds/include/nds/memory.h \ + c:/devkitPro/libnds/include/nds/system.h \ + c:/devkitPro/libnds/include/nds/timers.h \ + c:/devkitPro/libnds/include/nds/arm9/boxtest.h \ + c:/devkitPro/libnds/include/nds/arm9/video.h \ + c:/devkitPro/libnds/include/nds/arm9/videoGL.h \ + c:/devkitPro/libnds/include/nds/arm9/math.h \ + c:/devkitPro/libnds/include/nds/arm9/trig_lut.h \ + c:/devkitPro/libnds/include/nds/arm9/cache.h \ + c:/devkitPro/libnds/include/nds/arm9/console.h \ + c:/devkitPro/libnds/include/nds/arm9/exceptions.h \ + c:/devkitPro/libnds/include/nds/arm9/image.h \ + c:/devkitPro/libnds/include/nds/arm9/pcx.h \ + c:/devkitPro/libnds/include/nds/arm9/input.h \ + c:/devkitPro/libnds/include/nds/arm9/rumble.h \ + c:/devkitPro/libnds/include/nds/arm9/sound.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_IO.h \ + c:/devkitPro/libnds/include/gbfs.h \ + c:/devkitPro/PAlib/include/nds/gba-jpeg-decode.h \ + c:/devkitPro/PAlib/include/nds/gba-jpeg.h \ + c:/devkitPro/PAlib/include/nds/Sound9.h \ + c:/devkitPro/PAlib/include/nds/SoundCommon.h \ + c:/devkitPro/libnds/include/fat.h \ + c:/devkitPro/PAlib/include/nds/PA_IPC.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_General.h \ + c:/devkitPro/PAlib/include/nds/PA_IPC.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Text.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_BgTiles.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_General.h \ + c:/devkitPro/PAlib/include/nds/arm9/text0.h \ + c:/devkitPro/PAlib/include/nds/arm9/text1.h \ + c:/devkitPro/PAlib/include/nds/arm9/text2.h \ + c:/devkitPro/PAlib/include/nds/arm9/text3.h \ + c:/devkitPro/PAlib/include/nds/arm9/text4.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_BgTiles.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_BgLargeMap.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Video.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Sprite.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Math.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Interrupt.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_SpriteDual.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Sprite.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Sound.h \ + c:/devkitPro/PAlib/include/nds/arm9/../Sound9.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_GBFS.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Text.h \ + c:/devkitPro/libnds/include/gbfs.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_FS.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Micro.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Draw.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Palette.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Splash.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Gif.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Draw.h \ + c:/devkitPro/PAlib/include/nds/arm9/gif/gif_lib.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Interrupt.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Keys.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Motion.h \ + c:/devkitPro/libnds/include/nds/arm9/ndsmotion.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_BgRot.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Timer.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_API.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Math.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Palette.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_PaletteDual.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Save.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_FS.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_GBFS.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_SpecialFx.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_TileDual.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Keyboard.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Window.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Mode7.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_BgRot.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_3DSprites.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_IA.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Reco.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_16c.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Wifi.h \ + c:/devkitPro/libnds/include/dswifi9.h \ + c:/devkitPro/libnds/include/dswifi_version.h \ + c:/devkitPro/libnds/include/sys/socket.h \ + c:/devkitPro/libnds/include/netinet/in.h \ + c:/devkitPro/libnds/include/netdb.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Splash.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_Gif.h \ + c:/devkitPro/PAlib/include/nds/arm9/PA_BgTrans.h \ + c:/devkitPro/proyects/SpaceInvaders/source/gfx/all_gfx.c \ + c:/devkitPro/proyects/SpaceInvaders/source/gfx/all_gfx.h \ + c:/devkitPro/proyects/SpaceInvaders/source/gfx/monster.c \ + c:/devkitPro/proyects/SpaceInvaders/source/gfx/bala.c \ + c:/devkitPro/proyects/SpaceInvaders/source/gfx/nave.c \ + c:/devkitPro/proyects/SpaceInvaders/source/gfx/monster.pal.c \ + c:/devkitPro/proyects/SpaceInvaders/source/gfx/bala.pal.c \ + c:/devkitPro/proyects/SpaceInvaders/source/gfx/nave.pal.c \ + c:/devkitPro/proyects/SpaceInvaders/source/gfx/all_gfx.h diff --git a/SpaceInvaders/build/main.o b/SpaceInvaders/build/main.o new file mode 100755 index 0000000..ee8f106 Binary files /dev/null and b/SpaceInvaders/build/main.o differ diff --git a/SpaceInvaders/clean.bat b/SpaceInvaders/clean.bat new file mode 100755 index 0000000..666cf40 --- /dev/null +++ b/SpaceInvaders/clean.bat @@ -0,0 +1 @@ +make clean diff --git a/SpaceInvaders/logo.bmp b/SpaceInvaders/logo.bmp new file mode 100755 index 0000000..7cf6d0e Binary files /dev/null and b/SpaceInvaders/logo.bmp differ diff --git a/SpaceInvaders/logo.ico b/SpaceInvaders/logo.ico new file mode 100755 index 0000000..3c0ffe2 Binary files /dev/null and b/SpaceInvaders/logo.ico differ diff --git a/SpaceInvaders/logo_wifi.bmp b/SpaceInvaders/logo_wifi.bmp new file mode 100755 index 0000000..37ef242 Binary files /dev/null and b/SpaceInvaders/logo_wifi.bmp differ diff --git a/SpaceInvaders/project.vho b/SpaceInvaders/project.vho new file mode 100755 index 0000000..7f0baa5 --- /dev/null +++ b/SpaceInvaders/project.vho @@ -0,0 +1,2 @@ +[VisualHamOFileListV1] +source/main.c diff --git a/SpaceInvaders/source/.svn/all-wcprops b/SpaceInvaders/source/.svn/all-wcprops new file mode 100755 index 0000000..3de0ae6 --- /dev/null +++ b/SpaceInvaders/source/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 65 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source +END +main.c +K 25 +svn:wc:ra_dav:version-url +V 72 +/svn/!svn/ver/4/trunk/vham/templates/project/PAlibTemplate/source/main.c +END diff --git a/SpaceInvaders/source/.svn/entries b/SpaceInvaders/source/.svn/entries new file mode 100755 index 0000000..66ac2e9 --- /dev/null +++ b/SpaceInvaders/source/.svn/entries @@ -0,0 +1,28 @@ +8 + +dir +116 +https://palibds.googlecode.com/svn/trunk/vham/templates/project/PAlibTemplate/source +https://palibds.googlecode.com/svn + + + +2006-09-03T16:21:26.676623Z +4 +molousk + + +svn:special svn:externals svn:needs-lock + +main.c +file + + + + +2006-01-31T01:54:02.000000Z +b1140899dc28b1a23ba1bc3c72431e7f +2006-09-03T16:21:26.676623Z +4 +molousk + diff --git a/SpaceInvaders/source/.svn/format b/SpaceInvaders/source/.svn/format new file mode 100755 index 0000000..45a4fb7 --- /dev/null +++ b/SpaceInvaders/source/.svn/format @@ -0,0 +1 @@ +8 diff --git a/SpaceInvaders/source/.svn/text-base/main.c.svn-base b/SpaceInvaders/source/.svn/text-base/main.c.svn-base new file mode 100755 index 0000000..fff6011 --- /dev/null +++ b/SpaceInvaders/source/.svn/text-base/main.c.svn-base @@ -0,0 +1,25 @@ +// Includes +#include // Include for PA_Lib + +// Function: main() +int main(int argc, char ** argv) +{ + PA_Init(); // Initializes PA_Lib + PA_InitVBL(); // Initializes a standard VBL + + + + + + // Infinite loop to keep the program running + while (1) + { + + + + + PA_WaitForVBL(); + } + + return 0; +} // End of main() diff --git a/SpaceInvaders/source/gfx/PAGfx.exe b/SpaceInvaders/source/gfx/PAGfx.exe new file mode 100755 index 0000000..8ead8cb Binary files /dev/null and b/SpaceInvaders/source/gfx/PAGfx.exe differ diff --git a/SpaceInvaders/source/gfx/PAGfx.ini b/SpaceInvaders/source/gfx/PAGfx.ini new file mode 100755 index 0000000..5e15c6e --- /dev/null +++ b/SpaceInvaders/source/gfx/PAGfx.ini @@ -0,0 +1,10 @@ +#TranspColor Black + +#Sprites : +C:\devkitPro\proyects\SpaceInvaders\source\gfx\monster.bmp 256colors monster +C:\devkitPro\proyects\SpaceInvaders\source\gfx\bala.bmp 256colors bala +C:\devkitPro\proyects\SpaceInvaders\source\gfx\nave.bmp 256colors nave + +#Backgrounds : + +#Textures : diff --git a/SpaceInvaders/source/gfx/PAGfx.log b/SpaceInvaders/source/gfx/PAGfx.log new file mode 100755 index 0000000..9d12d71 --- /dev/null +++ b/SpaceInvaders/source/gfx/PAGfx.log @@ -0,0 +1,11 @@ +PAGfx Converter, by Mollusk www.palib.com +If you have suggestions, problems, or anything, please mail me at mollusk@palib.info + +Converting PAGfx.ini +Transparent Color : Black + +0 palettes : + +Converted in 0 minutes 4 seconds + +Finished ! diff --git a/SpaceInvaders/source/gfx/all_gfx.c b/SpaceInvaders/source/gfx/all_gfx.c new file mode 100755 index 0000000..eece755 --- /dev/null +++ b/SpaceInvaders/source/gfx/all_gfx.c @@ -0,0 +1,20 @@ +//Gfx converted using Mollusk's PAGfx Converter + +//This file contains all the .c, for easier inclusion in a project + +#ifdef __cplusplus +extern "C" { +#endif + +#include "all_gfx.h" + + +// Palette files : + +// Background Pointers : + + +#ifdef __cplusplus +} +#endif + diff --git a/SpaceInvaders/source/gfx/all_gfx.h b/SpaceInvaders/source/gfx/all_gfx.h new file mode 100755 index 0000000..950e1af --- /dev/null +++ b/SpaceInvaders/source/gfx/all_gfx.h @@ -0,0 +1,24 @@ +//Gfx converted using Mollusk's PAGfx Converter + +//This file contains all the .h, for easier inclusion in a project + +#ifndef ALL_GFX_H +#define ALL_GFX_H + +#ifndef PAGfx_struct + typedef struct{ + void *Map; + int MapSize; + void *Tiles; + int TileSize; + void *Palette; + int *Info; +} PAGfx_struct; +#endif + + +// Palette files : + + +#endif + diff --git a/SpaceInvaders/source/gfx/bala.bmp b/SpaceInvaders/source/gfx/bala.bmp new file mode 100755 index 0000000..b063044 Binary files /dev/null and b/SpaceInvaders/source/gfx/bala.bmp differ diff --git a/SpaceInvaders/source/gfx/bala.c b/SpaceInvaders/source/gfx/bala.c new file mode 100755 index 0000000..3f88a2b --- /dev/null +++ b/SpaceInvaders/source/gfx/bala.c @@ -0,0 +1,10 @@ +//Sprite created using PAGfx +//This sprite uses bala_Pal + +const unsigned char bala_Sprite[64] __attribute__ ((aligned (4))) = { +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, +0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, +0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + diff --git a/SpaceInvaders/source/gfx/bala.pal.c b/SpaceInvaders/source/gfx/bala.pal.c new file mode 100755 index 0000000..399f22e --- /dev/null +++ b/SpaceInvaders/source/gfx/bala.pal.c @@ -0,0 +1,4 @@ +//Palette created using Mollusk's PAGfxConverter + +const unsigned short bala_Pal[2] __attribute__ ((aligned (4))) = { +32768, 65535}; diff --git a/SpaceInvaders/source/gfx/bin/bala_Pal.bin b/SpaceInvaders/source/gfx/bin/bala_Pal.bin new file mode 100755 index 0000000..76f880c Binary files /dev/null and b/SpaceInvaders/source/gfx/bin/bala_Pal.bin differ diff --git a/SpaceInvaders/source/gfx/bin/bala_Sprite.bin b/SpaceInvaders/source/gfx/bin/bala_Sprite.bin new file mode 100755 index 0000000..415e029 Binary files /dev/null and b/SpaceInvaders/source/gfx/bin/bala_Sprite.bin differ diff --git a/SpaceInvaders/source/gfx/bin/monster_Pal.bin b/SpaceInvaders/source/gfx/bin/monster_Pal.bin new file mode 100755 index 0000000..76f880c Binary files /dev/null and b/SpaceInvaders/source/gfx/bin/monster_Pal.bin differ diff --git a/SpaceInvaders/source/gfx/bin/monster_Sprite.bin b/SpaceInvaders/source/gfx/bin/monster_Sprite.bin new file mode 100755 index 0000000..8bced2a Binary files /dev/null and b/SpaceInvaders/source/gfx/bin/monster_Sprite.bin differ diff --git a/SpaceInvaders/source/gfx/bin/nave_Pal.bin b/SpaceInvaders/source/gfx/bin/nave_Pal.bin new file mode 100755 index 0000000..76f880c Binary files /dev/null and b/SpaceInvaders/source/gfx/bin/nave_Pal.bin differ diff --git a/SpaceInvaders/source/gfx/bin/nave_Sprite.bin b/SpaceInvaders/source/gfx/bin/nave_Sprite.bin new file mode 100755 index 0000000..cda45d2 Binary files /dev/null and b/SpaceInvaders/source/gfx/bin/nave_Sprite.bin differ diff --git a/SpaceInvaders/source/gfx/monster.bmp b/SpaceInvaders/source/gfx/monster.bmp new file mode 100755 index 0000000..79cac60 Binary files /dev/null and b/SpaceInvaders/source/gfx/monster.bmp differ diff --git a/SpaceInvaders/source/gfx/monster.c b/SpaceInvaders/source/gfx/monster.c new file mode 100755 index 0000000..101d594 --- /dev/null +++ b/SpaceInvaders/source/gfx/monster.c @@ -0,0 +1,38 @@ +//Sprite created using PAGfx +//This sprite uses monster_Pal + +const unsigned char monster_Sprite[512] __attribute__ ((aligned (4))) = { +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, +0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, +0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, +0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, +1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, +0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, +0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, +0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, +1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, +0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, +0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, +0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, +0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, +1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, +0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, +0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, +0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, +1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, +0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + diff --git a/SpaceInvaders/source/gfx/monster.pal.c b/SpaceInvaders/source/gfx/monster.pal.c new file mode 100755 index 0000000..2d93cbd --- /dev/null +++ b/SpaceInvaders/source/gfx/monster.pal.c @@ -0,0 +1,4 @@ +//Palette created using Mollusk's PAGfxConverter + +const unsigned short monster_Pal[2] __attribute__ ((aligned (4))) = { +32768, 65535}; diff --git a/SpaceInvaders/source/gfx/nave.bmp b/SpaceInvaders/source/gfx/nave.bmp new file mode 100755 index 0000000..8574a0d Binary files /dev/null and b/SpaceInvaders/source/gfx/nave.bmp differ diff --git a/SpaceInvaders/source/gfx/nave.c b/SpaceInvaders/source/gfx/nave.c new file mode 100755 index 0000000..d3b07ec --- /dev/null +++ b/SpaceInvaders/source/gfx/nave.c @@ -0,0 +1,22 @@ +//Sprite created using PAGfx +//This sprite uses nave_Pal + +const unsigned char nave_Sprite[256] __attribute__ ((aligned (4))) = { +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, +0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, +0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, +1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, +1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + diff --git a/SpaceInvaders/source/gfx/nave.pal.c b/SpaceInvaders/source/gfx/nave.pal.c new file mode 100755 index 0000000..d137c6a --- /dev/null +++ b/SpaceInvaders/source/gfx/nave.pal.c @@ -0,0 +1,4 @@ +//Palette created using Mollusk's PAGfxConverter + +const unsigned short nave_Pal[2] __attribute__ ((aligned (4))) = { +32768, 65535}; diff --git a/SpaceInvaders/source/main.c b/SpaceInvaders/source/main.c new file mode 100755 index 0000000..0ad84ee --- /dev/null +++ b/SpaceInvaders/source/main.c @@ -0,0 +1,172 @@ +// Includes +#include +#include "gfx/all_gfx.c" +#include "gfx/all_gfx.h" + + +#define MONSTERS 30 +#define SCREENHOLE 48 +#define BALASS 10 + +void MoveMonsters(void); +void NaveActs(void); +void Disparo(s16 x, s16 y); +void Bala (void); +void deletesprite(u8 spritenumber); +u8 getsprite(); +u8 sprite[128]; +u8 nave; + +typedef struct{ + s16 x, y; + s16 vx, vy; + s16 sprite; +}monsinfo; + +monsinfo monster[MONSTERS]; + + s32 count = 0; + s32 pos = 0; + s32 dir = 1; + s32 naveX = 127; + +typedef struct{ + s16 x, y; + s16 sprite; + s16 v; +}balainfo; +balainfo bala[100000]; +s32 numbalas =0; + +int main(int argc, char ** argv) +{ + PA_Init(); // Initializes PA_Lib + PA_InitVBL(); // Initializes a standard VBL + + PA_InitText(0, 0); + + PA_DualLoadSpritePal(0, (void*)monster_Pal); + + nave=getsprite(); + PA_DualCreateSprite(nave, (void*)nave_Sprite, OBJ_SIZE_16X16, 1, 0, naveX,385); + + + s32 i; + + for (i = 0; i < MONSTERS; i++) + { + monster[i].x = (i%10)*16; + monster[i].y = ((i/10)+1)*16; + monster[i].sprite =getsprite(); + PA_DualCreateSprite(monster[i].sprite, (void*)monster_Sprite, OBJ_SIZE_16X16, 1, 0, monster[i].x,monster[i].y-16); + PA_DualStartSpriteAnim(monster[i].sprite,0,1,2); + } + + while (1) + { + MoveMonsters(); + NaveActs(); + Bala(); + for(i=0; i=0) naveX += Pad.Held.Right - Pad.Held.Left; + else naveX=0; + if (naveX<=223) naveX += Pad.Held.Right - Pad.Held.Left; + else naveX=223; + PA_DualSetSpriteXY(nave,naveX,385); + if (Pad.Newpress.A) Disparo(naveX+3,382); +} +void Disparo(s16 x, s16 y) +{ + bala[numbalas].x=x; + bala[numbalas].y=y; + bala[numbalas].sprite = getsprite(); + bala[numbalas].v=6; + PA_DualCreateSprite(bala[numbalas].sprite,(void*)bala_Sprite,OBJ_SIZE_8X8, 1, 0,bala[numbalas].x,bala[numbalas].y); + numbalas++; +} +u8 getsprite(){ + int i; + for(i=0;i<128;i++) + { + if(sprite[i]==0) + { + sprite[i]=1; + return i; + } + } + return -1; +} +void deletesprite(u8 spritenumber){ + sprite[spritenumber]=0; + PA_DeleteSprite(1,spritenumber); +} +void Bala(void) +{ + s32 i; + for(i=0; i monster[j].y-16) && bala[i].xmonster[j].x) + { + if(sprite[bala[i].sprite]!=0) + { + deletesprite(monster[j].sprite); + deletesprite(bala[i].sprite); + bala[i].v=0; + } + } + } + } +}