-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
40,601 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
#--------------------------------------------------------------------------------- | ||
# Clear the implicit built in rules | ||
#--------------------------------------------------------------------------------- | ||
.SUFFIXES: | ||
#--------------------------------------------------------------------------------- | ||
ifeq ($(strip $(DEVKITARM)),) | ||
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM) | ||
endif | ||
|
||
include $(DEVKITARM)/gba_rules | ||
|
||
#--------------------------------------------------------------------------------- | ||
# TARGET is the name of the output, if this ends with _mb a multiboot image is generated | ||
# BUILD is the directory where object files & intermediate files will be placed | ||
# SOURCES is a list of directories containing source code | ||
# DATA is a list of directories containing data files | ||
# INCLUDES is a list of directories containing header files | ||
#--------------------------------------------------------------------------------- | ||
TARGET := $(shell basename $(CURDIR)) | ||
BUILD := build | ||
SOURCES := source | ||
DATA := | ||
GRAPHICS := gfx | ||
INCLUDES := | ||
|
||
#--------------------------------------------------------------------------------- | ||
# options for code generation | ||
#--------------------------------------------------------------------------------- | ||
ARCH := -mthumb -mthumb-interwork | ||
|
||
CFLAGS := -g -Wall -O3\ | ||
-mcpu=arm7tdmi -mtune=arm7tdmi\ | ||
-fomit-frame-pointer\ | ||
-ffast-math \ | ||
$(ARCH) | ||
|
||
CFLAGS += $(INCLUDE) | ||
|
||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions | ||
|
||
ASFLAGS := $(ARCH) | ||
LDFLAGS = -g $(ARCH) -Wl,-Map,$(notdir $@).map | ||
|
||
#--------------------------------------------------------------------------------- | ||
# any extra libraries we wish to link with the project | ||
#--------------------------------------------------------------------------------- | ||
LIBS := -lgba | ||
|
||
#--------------------------------------------------------------------------------- | ||
# list of directories containing libraries, this must be the top level containing | ||
# include and lib | ||
#--------------------------------------------------------------------------------- | ||
LIBDIRS := $(LIBGBA) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# 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)) \ | ||
$(foreach dir,$(DATA),$(CURDIR)/$(dir)) | ||
|
||
export DEPSDIR := $(CURDIR)/$(BUILD) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# automatically build a list of object files for our project | ||
#--------------------------------------------------------------------------------- | ||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) | ||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) | ||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) | ||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) | ||
BMPFILES := $(foreach dir,$(GRAPHICS),$(notdir $(wildcard $(dir)/*.bmp))) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# use CXX for linking C++ projects, CC for standard C | ||
#--------------------------------------------------------------------------------- | ||
ifeq ($(strip $(CPPFILES)),) | ||
#--------------------------------------------------------------------------------- | ||
export LD := $(CC) | ||
#--------------------------------------------------------------------------------- | ||
else | ||
#--------------------------------------------------------------------------------- | ||
export LD := $(CXX) | ||
#--------------------------------------------------------------------------------- | ||
endif | ||
#--------------------------------------------------------------------------------- | ||
|
||
export OFILES := $(addsuffix .o,$(BINFILES)) \ | ||
$(BMPFILES:.bmp=.o) \ | ||
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# build a list of include paths | ||
#--------------------------------------------------------------------------------- | ||
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ | ||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \ | ||
-I$(CURDIR)/$(BUILD) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# build a list of library paths | ||
#--------------------------------------------------------------------------------- | ||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) | ||
|
||
.PHONY: $(BUILD) clean | ||
|
||
#--------------------------------------------------------------------------------- | ||
$(BUILD): | ||
@[ -d $@ ] || mkdir -p $@ | ||
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile | ||
|
||
all : $(BUILD) | ||
#--------------------------------------------------------------------------------- | ||
clean: | ||
@echo clean ... | ||
@rm -fr $(BUILD) $(TARGET).elf $(TARGET).gba | ||
|
||
#--------------------------------------------------------------------------------- | ||
else | ||
|
||
DEPENDS := $(OFILES:.o=.d) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# main targets | ||
#--------------------------------------------------------------------------------- | ||
$(OUTPUT).gba : $(OUTPUT).elf | ||
|
||
$(OUTPUT).elf : $(OFILES) | ||
|
||
#--------------------------------------------------------------------------------- | ||
%.gba: %.elf | ||
@$(OBJCOPY) -O binary $< $@ | ||
@echo built ... $(notdir $@) | ||
@gbafix -tCONTROLLER -cGBAX -mEC -r$(shell git rev-list --count HEAD) $@ | ||
|
||
#--------------------------------------------------------------------------------- | ||
# The bin2o rule should be copied and modified | ||
# for each extension used in the data directories | ||
#--------------------------------------------------------------------------------- | ||
|
||
#--------------------------------------------------------------------------------- | ||
# This rule links in binary data with the .bin extension | ||
#--------------------------------------------------------------------------------- | ||
%.bin.o : %.bin | ||
#--------------------------------------------------------------------------------- | ||
@echo $(notdir $<) | ||
@$(bin2o) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# This rule links in binary data with the .raw extension | ||
#--------------------------------------------------------------------------------- | ||
%.raw.o : %.raw | ||
#--------------------------------------------------------------------------------- | ||
@echo $(notdir $<) | ||
@$(bin2o) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# This rule creates assembly source files using grit | ||
# grit takes an image file and a .grit describing how the file is to be processed | ||
# add additional rules like this for each image extension | ||
# you use in the graphics folders | ||
#--------------------------------------------------------------------------------- | ||
%.s %.h : %.bmp %.grit | ||
#--------------------------------------------------------------------------------- | ||
grit $< -fts -o$* | ||
|
||
-include $(DEPENDS) | ||
|
||
#--------------------------------------------------------------------------------- | ||
endif | ||
#--------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# gc-pedometer-emulator | ||
|
||
Game Boy Advance homebrew designed to emulate the Inrou-Kun, a GameCube pedometer. | ||
|
||
## License | ||
gc-pedometer-emulator is Free Open Source Software available under the 2-Clause BSD license. See the LICENSE file for full details. | ||
|
||
Background images were taken from Public Domain sources. | ||
|
||
## Overview | ||
|
||
The Inrou-Kun worked exclusively with the GameCube title Ohenro-San: Hosshin no Dojo. To use this homebrew ROM, copy the file to an appropiate flashcart, then attach the GBA-to-GCN Cable (DOL-011) to the Game Boy Advance. Finally, attach the cable to Controller Port 4 of the GameCube or Wii system. | ||
|
||
From the Main Menu, select "Edit Data" to edit information the Game Boy Advance will send to the GameCube. Use the D-Pad to edit specific entries (Up/Down changes values, Left/Right edits specific positions of certain values). Press the A button to move down the list, and press the L or R triggers to switch between pages. When finished, press the B button to return to the main menu. | ||
|
||
To actually send data to the GameCube, select "Send Data" from the Main Menu. Only when the Game Boy Advance displays this screen will the ROM emulate the Inrou-Kun pedometer. The process is automatic. Press the B button to return to the main menu. | ||
|
||
## Compiling | ||
|
||
This ROM requires DevKitPro and DevKitARM to build. |
Binary file not shown.
Oops, something went wrong.