Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for calico #247

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions .github/workflows/building.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: devkitpro/devkitarm:20241104
container: devkitpro/devkitarm
name: Build with Docker using devkitARM
steps:
- name: Checkout repo
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Build & Package GodMode9i
id: build
run: |
make all dsi
make
chmod +x make_cia
./make_cia --srl="GodMode9i.dsi" --id_0=$(git rev-parse --short=7 HEAD) --tikID=$(git rev-parse --short=16 HEAD)
mkdir GodMode9i/
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

81 changes: 44 additions & 37 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,64 +1,71 @@
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
.SECONDARY:

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

include $(DEVKITARM)/ds_rules

export TARGET := GodMode9i
export TOPDIR := $(CURDIR)

export GAME_TITLE := $(TARGET)
# specify a directory which contains the nitro filesystem
# this is relative to the Makefile
NITRO_FILES := nitrofiles

export NITRODATA := nitrofiles
# These set the information text in the nds file
GAME_TITLE := GodMode9i
GAME_SUBTITLE :=
GAME_AUTHOR := Rocket Robz
GAME_CODE := HGMA
GAME_HEADER_TITLE := GODMODE9I

.PHONY: all bootloader bootstub clean dsi arm7/$(TARGET).elf arm9/$(TARGET).elf
GAME_ICON := icon.bmp

all: bootloader bootstub $(TARGET).nds

dsi: $(TARGET).dsi
ifeq ($(strip $(GAME_SUBTITLE)),)
GAME_FULL_TITLE := $(GAME_TITLE);$(GAME_AUTHOR)
else
GAME_FULL_TITLE := $(GAME_TITLE);$(GAME_SUBTITLE);$(GAME_AUTHOR)
endif

$(TARGET).nds: arm7/$(TARGET).elf arm9/$(TARGET).elf
ndstool -c $(TARGET).nds -7 arm7/$(TARGET).elf -9 arm9/$(TARGET).elf -d $(NITRODATA) \
-b icon.bmp "GodMode9i;Rocket Robz" \
-z 80040000
include $(DEVKITARM)/ds_rules

$(TARGET).dsi: arm7/$(TARGET).elf arm9/$(TARGET).elf
ndstool -c $(TARGET).dsi -7 arm7/$(TARGET).elf -9 arm9/$(TARGET).elf -d $(NITRODATA) \
-b icon.bmp "GodMode9i;Rocket Robz" \
-g HGMA 00 "GODMODE9I" -z 80040000 -u 00030004
.PHONY: arm7/$(TARGET).elf bootloader bootstub clean

#---------------------------------------------------------------------------------
arm7/$(TARGET).elf:
@$(MAKE) -C arm7
# main targets
#---------------------------------------------------------------------------------
all: $(TARGET).nds $(TARGET).dsi

#---------------------------------------------------------------------------------
arm9/$(TARGET).elf:
@$(MAKE) -C libnds32 release
@$(MAKE) -C arm9
$(TARGET).nds : $(NITRO_FILES) arm7/$(TARGET).elf arm9/$(TARGET).elf
ndstool -c $(TARGET).nds -7 arm7/$(TARGET).elf -9 arm9/$(TARGET).elf \
-b $(GAME_ICON) "$(GAME_FULL_TITLE)" -z 80040000 \
$(_ADDFILES)

$(TARGET).dsi : $(NITRO_FILES) arm7/$(TARGET).elf arm9/$(TARGET).elf
ndstool -c $(TARGET).dsi -7 arm7/$(TARGET).elf -9 arm9/$(TARGET).elf \
-b $(GAME_ICON) "$(GAME_FULL_TITLE)" \
-g $(GAME_CODE) 00 "$(GAME_HEADER_TITLE)" -z 80040000 -u 00030004 \
$(_ADDFILES)

#---------------------------------------------------------------------------------
#$(BUILD):
#@[ -d $@ ] || mkdir -p $@
#@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
arm7/$(TARGET).elf:
$(MAKE) -C arm7

#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr data/*.bin
@rm -fr $(BUILD) $(TARGET).elf $(TARGET).nds
@rm -fr $(TARGET).arm7.elf
@rm -fr $(TARGET).arm9.elf
@$(MAKE) -C libnds32 clean
@$(MAKE) -C bootloader clean
@$(MAKE) -C bootstub clean
@$(MAKE) -C arm9 clean
@$(MAKE) -C arm7 clean
arm9/$(TARGET).elf: bootloader bootstub
$(MAKE) -C arm9

bootloader: data
@$(MAKE) -C bootloader LOADBIN=$(CURDIR)/data/load.bin

bootstub: data
@$(MAKE) -C bootstub

clean:
@rm -fr data/*.bin
@rm -fr $(TARGET).nds
@$(MAKE) -C bootloader clean
@$(MAKE) -C bootstub clean
@$(MAKE) -C arm9 clean
@$(MAKE) -C arm7 clean
2 changes: 1 addition & 1 deletion arm7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include $(DEVKITARM)/ds_rules
TARGET := GodMode9i
BUILD := build
SOURCES := source
INCLUDES := include build
INCLUDES := include build ../shared/include

#---------------------------------------------------------------------------------
# options for code generation
Expand Down
4 changes: 2 additions & 2 deletions arm7/include/gba.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <nds/ndstypes.h>

void readEeprom(u8 *dst, u32 src, u32 len);
void writeEeprom(u32 dst, u8 *src, u32 len);
bool gbaReadEeprom(u8 *dst, u32 src, u32 len);
bool gbaWriteEeprom(u32 dst, u8 *src, u32 len);

#endif // GBA_H
9 changes: 9 additions & 0 deletions arm7/include/my_i2c.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#define MY_I2C_H
#ifdef MY_I2C_H

#include <nds/ndstypes.h>

u8 my_i2cReadRegister8(u8 device, u8 reg);
u8 my_i2cWriteRegister8(u8 device, u8 reg, u8 data);

#endif // MY_I2C_H
197 changes: 0 additions & 197 deletions arm7/include/my_sdmmc.h

This file was deleted.

21 changes: 21 additions & 0 deletions arm7/include/pxi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#ifndef PXI_H
#define PXI_H

#include "pxiVars.h"

#include <calico/system/thread.h>

#ifdef __cplusplus
extern "C" {
#endif

extern Thread s_pxiThread;
extern u8 s_pxiThreadStack[1024];

int pxiThreadMain(void* arg);

#ifdef __cplusplus
}
#endif

#endif // PXI_H
Loading
Loading