Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,29 @@ jobs:
path: |
./3ds/*.3dsx
./3ds/*.smdh
build-switch:
runs-on: ubuntu-latest
container: devkitpro/devkita64:20260219
defaults:
run:
working-directory: ./switch

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build Switch application
run: make -j$(nproc)

- name: Verify .nro exists
run: test -s google-balls.nro

- name: Upload Switch artifact
uses: actions/upload-artifact@v4
with:
name: google-balls-switch
path: switch/google-balls.nro
if-no-files-found: error
build-ds:
runs-on: ubuntu-latest
container: skylyrac/blocksds:dev-latest
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Google for making the original doodle back in 2010!

[Rob Hawkes](https://github.com/robhawkes) for making the remake of the doodle that this project uses as a base!

# Available in *24* flavors!
# Available in *25* flavors!
We have:
- Electron (the og but bulky) - Windows, Linux, macOS
- Tauri (like electron but not bulky) - Windows, Linux
Expand All @@ -43,6 +43,7 @@ We have:
- Terminal (just run it in your terminal) - Windows, macOS, Linux
- DS (touch the google balls on your ds! thanks to @DieGo367) - DS
- ActionScript 2/3 (google balls for those who don't have html5 capable browsers in the big 2026 for whatever reason! thanks to @leap0x7b) - Flash, non-HTML5 browsers
- Nintendo Switch (touch the balls on your switch) - Nintendo Switch

# How 2 download:
See [the docs](docs/installing.md)
Expand Down
14 changes: 14 additions & 0 deletions docs/compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@ your on your own gang
install [BlocksDS](https://blocksds.skylyrac.net/docs/setup/)
and then run `make` in the `ds` directory

# Switch

Get the [toolchain from devkitPro](https://switchbrew.org/wiki/Setting_up_Development_Environment) then run:

```bash
make
```

or if you don't feel like doing that you can install Docker instead and build it inside [a container](https://hub.docker.com/r/devkitpro/devkita64) with:

```bash
make -f docker.mk build
```

# Tizen
its in installing.md :v: :joy:

Expand Down
4 changes: 4 additions & 0 deletions docs/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ put it on your usb go to package installer select usb install pkg boom bobs your
## DS
[Download .nds](https://github.com/weeniemount/googleballs-app/releases/latest/download/google-balls-ds.nds)

## Switch

[Download .nro](https://github.com/weeniemount/googleballs-app/releases/latest/download/google-balls-switch.nro)

## Flash
[Download AS2 .swf](https://github.com/weeniemount/googleballs-app/releases/latest/download/googleballs-flash-as2.swf) [Download AS3 .swf](https://github.com/weeniemount/googleballs-app/releases/latest/download/googleballs-flash-as3.swf)

Expand Down
5 changes: 5 additions & 0 deletions switch/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build/
*.elf
*.map
*.nacp
*.nro
140 changes: 140 additions & 0 deletions switch/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------

ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro")
endif

TOPDIR ?= $(CURDIR)
include $(DEVKITPRO)/libnx/switch_rules

#---------------------------------------------------------------------------------
# TARGET is the name of the output
# 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
# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional)
#
# NO_ICON: if set to anything, do not use icon.
# NO_NACP: if set to anything, no .nacp file is generated.
# APP_TITLE is the name of the app stored in the .nacp file (Optional)
# APP_AUTHOR is the author of the app stored in the .nacp file (Optional)
# APP_VERSION is the version of the app stored in the .nacp file (Optional)
# APP_TITLEID is the titleID of the app stored in the .nacp file (Optional)
# ICON is the filename of the icon (.jpg), relative to the project folder.
# If not set, it attempts to use one of the following (in this order):
# - <Project name>.jpg
# - icon.jpg
# - <libnx folder>/default_icon.jpg
#
# CONFIG_JSON is the filename of the NPDM config file (.json), relative to the project folder.
# If not set, it attempts to use one of the following (in this order):
# - <Project name>.json
# - config.json
# If a JSON file is provided or autodetected, an ExeFS PFS0 (.nsp) is built instead
# of a homebrew executable (.nro). This is intended to be used for sysmodules.
# NACP building is skipped as well.
#---------------------------------------------------------------------------------
TARGET := google-balls
BUILD := build
SOURCES := source
DATA := data
INCLUDES := include

APP_TITLE := Google Balls
APP_AUTHOR := weenie
APP_VERSION := 1.0.0
ICON := icon.jpg

#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE

CFLAGS := -g -Wall -O2 -ffunction-sections \
$(ARCH) $(DEFINES)
CFLAGS += $(INCLUDE) -D__SWITCH__

CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
ASFLAGS := -g $(ARCH)
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) \
-Wl,-Map,$(notdir $*.map)

LIBS := -lnx

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(PORTLIBS) $(LIBNX)

#---------------------------------------------------------------------------------
# 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 TOPDIR := $(CURDIR)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)

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)/*.*)))

ifeq ($(strip $(CPPFILES)),)
export LD := $(CC)
else
export LD := $(CXX)
endif

export OFILES_BIN := $(addsuffix .o,$(BINFILES))
export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
export OFILES := $(OFILES_BIN) $(OFILES_SRC)
export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES)))

export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD)
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)

export NROFLAGS += --icon=$(CURDIR)/$(ICON)
export NROFLAGS += --nacp=$(CURDIR)/$(TARGET).nacp

.PHONY: all clean $(BUILD)

all: $(BUILD)

$(BUILD):
@[ -d $@ ] || mkdir -p $@
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile

clean:
@echo clean ...
@rm -fr $(BUILD) $(TARGET).nro $(TARGET).nacp $(TARGET).elf

else

DEPENDS := $(OFILES:.o=.d)

.PHONY: all

all: $(OUTPUT).nro

$(OUTPUT).nro: $(OUTPUT).elf $(OUTPUT).nacp
$(OUTPUT).elf: $(OFILES)
$(OFILES_SRC): $(HFILES_BIN)

%.bin.o %_bin.h: %.bin
@echo $(notdir $<)
@$(bin2o)

-include $(DEPENDS)

endif
#---------------------------------------------------------------------------------
24 changes: 24 additions & 0 deletions switch/docker.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
DEVKITA64_IMAGE ?= devkitpro/devkita64:20260219
PROJECT_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
DOCKER_RUN := docker run --rm \
--user $(shell id -u):$(shell id -g) \
--env HOME=/tmp \
--volume "$(PROJECT_DIR):/project" \
--workdir /project \
$(DEVKITA64_IMAGE)

.PHONY: build clean shell

build:
$(DOCKER_RUN) make

clean:
$(DOCKER_RUN) make clean

shell:
docker run --rm -it \
--user $(shell id -u):$(shell id -g) \
--env HOME=/tmp \
--volume "$(PROJECT_DIR):/project" \
--workdir /project \
$(DEVKITA64_IMAGE) bash
Binary file added switch/icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading