From 22c58611a1142216a603131f9ab190bdaa822ae7 Mon Sep 17 00:00:00 2001 From: Crayon Date: Mon, 5 Jan 2026 15:29:58 -0500 Subject: [PATCH 1/7] Update some dependencies --- .github/workflows/ci.yml | 2 +- CMakeLists.txt | 2 +- LICENCE.md | 2 +- demo/CMakeLists.txt | 2 +- grrmod.doxygen | 119 +++++++++++++++++++++++++++------------ 5 files changed, 87 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96dc57e..af3feb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout the Git repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Download and install GRRLIB run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 128075f..c635baa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.18) +cmake_minimum_required(VERSION 3.25) project(grrmod VERSION 0.0.1) option(GRRMOD_INSTALL "Generate the install target" ON) diff --git a/LICENCE.md b/LICENCE.md index 2d6bad0..00fe280 100644 --- a/LICENCE.md +++ b/LICENCE.md @@ -1,4 +1,4 @@ -Copyright (c) 2010-2025 The GRRLIB Team +Copyright (c) 2010-2026 The GRRLIB Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt index a6547a8..7ff25e1 100644 --- a/demo/CMakeLists.txt +++ b/demo/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.18) +cmake_minimum_required(VERSION 3.25) project(demo) include(GNUInstallDirs) diff --git a/grrmod.doxygen b/grrmod.doxygen index 80b395d..5ffef28 100644 --- a/grrmod.doxygen +++ b/grrmod.doxygen @@ -1,4 +1,4 @@ -# Doxyfile 1.13.2 +# Doxyfile 1.15.0 # This file describes the settings to be used by the documentation system # Doxygen (www.doxygen.org) for a project. @@ -361,6 +361,20 @@ EXTENSION_MAPPING = MARKDOWN_SUPPORT = YES +# If the MARKDOWN_STRICT tag is enabled then Doxygen treats text in comments as +# Markdown formatted also in cases where Doxygen's native markup format +# conflicts with that of Markdown. This is only relevant in cases where +# backticks are used. Doxygen's native markup style allows a single quote to end +# a text fragment started with a backtick and then treat it as a piece of quoted +# text, whereas in Markdown such text fragment is treated as verbatim and only +# ends when a second matching backtick is found. Also, Doxygen's native markup +# format requires double quotes to be escaped when they appear in a backtick +# section, whereas this is not needed for Markdown. +# The default value is: YES. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +MARKDOWN_STRICT = YES + # When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up # to that level are automatically included in the table of contents, even if # they do not have an id attribute. @@ -392,8 +406,8 @@ AUTOLINK_SUPPORT = YES # This tag specifies a list of words that, when matching the start of a word in # the documentation, will suppress auto links generation, if it is enabled via -# AUTOLINK_SUPPORT. This list does not affect affect links explicitly created -# using \# or the \link or commands. +# AUTOLINK_SUPPORT. This list does not affect links explicitly created using \# +# or the \link or commands. # This tag requires that the tag AUTOLINK_SUPPORT is set to YES. AUTOLINK_IGNORE_WORDS = @@ -510,7 +524,7 @@ LOOKUP_CACHE_SIZE = 0 # which effectively disables parallel processing. Please report any issues you # encounter. Generating dot graphs in parallel is controlled by the # DOT_NUM_THREADS setting. -# Minimum value: 0, maximum value: 32, default value: 1. +# Minimum value: 0, maximum value: 512, default value: 1. NUM_PROC_THREADS = 1 @@ -1027,9 +1041,9 @@ INPUT_FILE_ENCODING = # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cxxm, # *.cpp, *.cppm, *.ccm, *.c++, *.c++m, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, -# *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, *.h++, *.ixx, *.l, *.cs, *.d, -# *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to -# be provided as Doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, +# *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be +# provided as Doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, # *.f18, *.f, *.for, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice. FILE_PATTERNS = *.c \ @@ -1742,7 +1756,7 @@ ECLIPSE_DOC_ID = org.doxygen.Project # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: YES. +# The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO @@ -1757,20 +1771,29 @@ DISABLE_INDEX = NO # further fine tune the look of the index (see "Fine-tuning the output"). As an # example, the default style sheet generated by Doxygen has an example that # shows how to put an image at the root of the tree instead of the PROJECT_NAME. -# Since the tree basically has the same information as the tab index, you could -# consider setting DISABLE_INDEX to YES when enabling this option. +# Since the tree basically has more details information than the tab index, you +# could consider setting DISABLE_INDEX to YES when enabling this option. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO -# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the -# FULL_SIDEBAR option determines if the side bar is limited to only the treeview -# area (value NO) or if it should extend to the full height of the window (value -# YES). Setting this to YES gives a layout similar to -# https://docs.readthedocs.io with more room for contents, but less room for the -# project logo, title, and description. If either GENERATE_TREEVIEW or -# DISABLE_INDEX is set to NO, this option has no effect. +# When GENERATE_TREEVIEW is set to YES, the PAGE_OUTLINE_PANEL option determines +# if an additional navigation panel is shown at the right hand side of the +# screen, displaying an outline of the contents of the main page, similar to +# e.g. https://developer.android.com/reference If GENERATE_TREEVIEW is set to +# NO, this option has no effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +PAGE_OUTLINE_PANEL = YES + +# When GENERATE_TREEVIEW is set to YES, the FULL_SIDEBAR option determines if +# the side bar is limited to only the treeview area (value NO) or if it should +# extend to the full height of the window (value YES). Setting this to YES gives +# a layout similar to e.g. https://docs.readthedocs.io with more room for +# contents, but less room for the project logo, title, and description. If +# GENERATE_TREEVIEW is set to NO, this option has no effect. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1855,7 +1878,7 @@ USE_MATHJAX = NO # regards to the different settings, so it is possible that also other MathJax # settings have to be changed when switching between the different MathJax # versions. -# Possible values are: MathJax_2 and MathJax_3. +# Possible values are: MathJax_2, MathJax_3 and MathJax_4. # The default value is: MathJax_2. # This tag requires that the tag USE_MATHJAX is set to YES. @@ -1864,9 +1887,10 @@ MATHJAX_VERSION = MathJax_2 # When MathJax is enabled you can set the default output format to be used for # the MathJax output. For more details about the output format see MathJax # version 2 (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 +# https://docs.mathjax.org/en/v2.7/output.html), MathJax version 3 (see: +# https://docs.mathjax.org/en/v3.2/output/index.html) and MathJax version 4 # (see: -# http://docs.mathjax.org/en/latest/web/components/output.html). +# https://docs.mathjax.org/en/v4.0/output/index.htm). # Possible values are: HTML-CSS (which is slower, but has the best # compatibility. This is the name for Mathjax version 2, for MathJax version 3 # this will be translated into chtml), NativeMML (i.e. MathML. Only supported @@ -1879,36 +1903,50 @@ MATHJAX_VERSION = MathJax_2 MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. The default value is: +# output directory using the MATHJAX_RELPATH option. For Mathjax version 2 the +# destination directory should contain the MathJax.js script. For instance, if +# the mathjax directory is located at the same level as the HTML output +# directory, then MATHJAX_RELPATH should be ../mathjax.s For Mathjax versions 3 +# and 4 the destination directory should contain the tex-.js script +# (where is either chtml or svg). The default value points to the +# MathJax Content Delivery Network so you can quickly see the result without +# installing MathJax. However, it is strongly recommended to install a local +# copy of MathJax from https://www.mathjax.org before deployment. The default +# value is: # - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 # - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 +# - in case of MathJax version 4: https://cdn.jsdelivr.net/npm/mathjax@4 # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://www.mathjax.org/mathjax # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example -# for MathJax version 2 (see -# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): +# for MathJax version 2 (see https://docs.mathjax.org/en/v2.7/tex.html): # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # For example for MathJax version 3 (see -# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): +# https://docs.mathjax.org/en/v3.2/input/tex/extensions/): # MATHJAX_EXTENSIONS = ams +# For example for MathJax version 4 (see +# https://docs.mathjax.org/en/v4.0/input/tex/extensions/): +# MATHJAX_EXTENSIONS = units +# Note that for Mathjax version 4 quite a few extensions are already +# automatically loaded. To disable a package in Mathjax version 4 one can use +# the package name prepended with a minus sign (- like MATHJAX_EXTENSIONS += +# -textmacros) # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with JavaScript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an -# example see the documentation. +# of code that will be used on startup of the MathJax code. See the Mathjax site +# for more details: +# - MathJax version 2 (see: +# https://docs.mathjax.org/en/v2.7/) +# - MathJax version 3 (see: +# https://docs.mathjax.org/en/v3.2/) +# - MathJax version 4 (see: +# https://docs.mathjax.org/en/v4.0/) For an example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = @@ -2048,7 +2086,7 @@ MAKEINDEX_CMD_NAME = makeindex # The default value is: makeindex. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_MAKEINDEX_CMD = \makeindex +LATEX_MAKEINDEX_CMD = "\makeindex" # If the COMPACT_LATEX tag is set to YES, Doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some @@ -2569,7 +2607,7 @@ HAVE_DOT = NO # processors available in the system. You can set it explicitly to a value # larger than 0 to get control over the balance between CPU load and processing # speed. -# Minimum value: 0, maximum value: 32, default value: 0. +# Minimum value: 0, maximum value: 512, default value: 0. # This tag requires that the tag HAVE_DOT is set to YES. DOT_NUM_THREADS = 0 @@ -2671,6 +2709,15 @@ UML_LOOK = NO UML_LIMIT_NUM_FIELDS = 10 +# If the UML_LOOK tag is enabled, field labels are shown along the edge between +# two class nodes. If there are many fields and many nodes the graph may become +# too cluttered. The UML_MAX_EDGE_LABELS threshold limits the number of items to +# make the size more manageable. Set this to 0 for no limit. +# Minimum value: 0, maximum value: 100, default value: 10. +# This tag requires that the tag UML_LOOK is set to YES. + +UML_MAX_EDGE_LABELS = 10 + # If the DOT_UML_DETAILS tag is set to NO, Doxygen will show attributes and # methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS # tag is set to YES, Doxygen will add type and arguments for attributes and From 5169e9f09b47d48bac9efa64560ee24964ca744a Mon Sep 17 00:00:00 2001 From: Crayon Date: Mon, 5 Jan 2026 16:32:14 -0500 Subject: [PATCH 2/7] Use C23 #embed preprocessor directive --- demo/CMakeLists.txt | 9 ---- demo/Makefile | 100 +----------------------------------- demo/source/main.c | 120 +++++++++++++++++++++++++++++--------------- 3 files changed, 81 insertions(+), 148 deletions(-) diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt index 7ff25e1..126955d 100644 --- a/demo/CMakeLists.txt +++ b/demo/CMakeLists.txt @@ -16,10 +16,6 @@ find_library(FAT fat find_library(GRRLIB grrlib REQUIRED) find_library(PNGU pngu REQUIRED) -file(GLOB_RECURSE BIN_FILES - "${CMAKE_CURRENT_SOURCE_DIR}/data/*.*" -) - add_executable(demo) target_compile_options(demo @@ -39,12 +35,7 @@ target_include_directories(demo ${DEVKITPRO}/portlibs/${OGC_CONSOLE}/${CMAKE_INSTALL_INCLUDEDIR} ) -dkp_add_embedded_binary_library(data - ${BIN_FILES} -) - target_link_libraries(demo - data ${GRRMOD_LIBRARIES} ${GRRLIB} ${PNGU} diff --git a/demo/Makefile b/demo/Makefile index 07f6759..ae97b82 100644 --- a/demo/Makefile +++ b/demo/Makefile @@ -18,7 +18,7 @@ include $(DEVKITPPC)/wii_rules TARGET := $(notdir $(CURDIR)) BUILD := build SOURCES := source -DATA := data +DATA := INCLUDES := #--------------------------------------------------------------------------------- @@ -138,104 +138,6 @@ $(OUTPUT).elf: $(OFILES) @echo $(notdir $<) $(bin2o) -#--------------------------------------------------------------------------------- -# This rule links in binary Module data -#--------------------------------------------------------------------------------- -%.mp3.o : %.mp3 -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.mod.o : %.mod -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.xm.o : %.xm -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.it.o : %.it -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.s3m.o : %.s3m -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.stm.o : %.stm -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.stx.o : %.stx -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.669.o : %.669 -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.amf.o : %.amf -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.asy.o : %.asy -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.med.o : %.med -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.mtm.o : %.mtm -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.far.o : %.far -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.ult.o : %.ult -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.uni.o : %.uni -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.okta.o : %.okta -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.imf.o : %.imf -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.gdm.o : %.gdm -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) -#--------------------------------------------------------------------------------- -%.dsm.o : %.dsm -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - $(bin2o) - -include $(DEPENDS) diff --git a/demo/source/main.c b/demo/source/main.c index 817a9ac..49dcc08 100644 --- a/demo/source/main.c +++ b/demo/source/main.c @@ -9,28 +9,68 @@ #include // Image file -#include "Impact_9_png.h" +static const u8 Impact_9_png[] = { + #embed "../data/Impact_9.png" +}; // Mod file -#include "music_mp3.h" -#include "music_669.h" -#include "music_amf.h" -#include "music_asy.h" -#include "music_dsm.h" -#include "music_far.h" -#include "music_gdm.h" -#include "music_imf.h" -#include "music_it.h" -#include "music_med.h" -#include "music_mod.h" -#include "music_mtm.h" -#include "music_okta.h" -#include "music_s3m.h" -#include "music_stm.h" -#include "music_stx.h" -#include "music_ult.h" -#include "music_uni.h" -#include "music_xm.h" +static const u8 music_mp3[] = { + #embed "../data/music.mp3" +}; +static const u8 music_669[] = { + #embed "../data/music.669" +}; +static const u8 music_amf[] = { + #embed "../data/music.amf" +}; +static const u8 music_asy[] = { + #embed "../data/music.asy" +}; +static const u8 music_dsm[] = { + #embed "../data/music.dsm" +}; +static const u8 music_far[] = { + #embed "../data/music.far" +}; +static const u8 music_gdm[] = { + #embed "../data/music.gdm" +}; +static const u8 music_imf[] = { + #embed "../data/music.imf" +}; +static const u8 music_it[] = { + #embed "../data/music.it" +}; +static const u8 music_med[] = { + #embed "../data/music.med" +}; +static const u8 music_mod[] = { + #embed "../data/music.mod" +}; +static const u8 music_mtm[] = { + #embed "../data/music.mtm" +}; +static const u8 music_okta[] = { + #embed "../data/music.okta" +}; +static const u8 music_s3m[] = { + #embed "../data/music.s3m" +}; +static const u8 music_stm[] = { + #embed "../data/music.stm" +}; +static const u8 music_stx[] = { + #embed "../data/music.stx" +}; +static const u8 music_ult[] = { + #embed "../data/music.ult" +}; +static const u8 music_uni[] = { + #embed "../data/music.uni" +}; +static const u8 music_xm[] = { + #embed "../data/music.xm" +}; #define MAX_WIDTH 6.0f #define MIN_WIDTH 0.2f @@ -57,25 +97,25 @@ int main(int argc, char **argv) { float a = 0.0f; s16 Volume = 255; s8 SongNum = 0; - const PLAYLIST PlayList[] = { {(u8 *)music_mp3, music_mp3_size}, - {(u8 *)music_669, music_669_size}, - {(u8 *)music_amf, music_amf_size}, - {(u8 *)music_asy, music_asy_size}, - {(u8 *)music_dsm, music_dsm_size}, - {(u8 *)music_far, music_far_size}, - {(u8 *)music_gdm, music_gdm_size}, - {(u8 *)music_imf, music_imf_size}, - {(u8 *)music_it, music_it_size}, - {(u8 *)music_med, music_med_size}, - {(u8 *)music_mod, music_mod_size}, - {(u8 *)music_mtm, music_mtm_size}, - {(u8 *)music_okta, music_okta_size}, - {(u8 *)music_s3m, music_s3m_size}, - {(u8 *)music_stm, music_stm_size}, - {(u8 *)music_stx, music_stx_size}, - {(u8 *)music_ult, music_ult_size}, - {(u8 *)music_uni, music_uni_size}, - {(u8 *)music_xm, music_xm_size} }; + const PLAYLIST PlayList[] = { {(u8 *)music_mp3, sizeof(music_mp3)}, + {(u8 *)music_669, sizeof(music_669)}, + {(u8 *)music_amf, sizeof(music_amf)}, + {(u8 *)music_asy, sizeof(music_asy)}, + {(u8 *)music_dsm, sizeof(music_dsm)}, + {(u8 *)music_far, sizeof(music_far)}, + {(u8 *)music_gdm, sizeof(music_gdm)}, + {(u8 *)music_imf, sizeof(music_imf)}, + {(u8 *)music_it, sizeof(music_it)}, + {(u8 *)music_med, sizeof(music_med)}, + {(u8 *)music_mod, sizeof(music_mod)}, + {(u8 *)music_mtm, sizeof(music_mtm)}, + {(u8 *)music_okta, sizeof(music_okta)}, + {(u8 *)music_s3m, sizeof(music_s3m)}, + {(u8 *)music_stm, sizeof(music_stm)}, + {(u8 *)music_stx, sizeof(music_stx)}, + {(u8 *)music_ult, sizeof(music_ult)}, + {(u8 *)music_uni, sizeof(music_uni)}, + {(u8 *)music_xm, sizeof(music_xm)} }; const u8 LastIndex = sizeof(PlayList) / sizeof(*PlayList) - 1; CH Channel[] = { {0, 0, 0, MIN_WIDTH}, {0, 0, 0, MIN_WIDTH}, @@ -97,7 +137,7 @@ int main(int argc, char **argv) { GRRLIB_SetBackgroundColour(0x00, 0x00, 0x00, 0xFF); // Loop forever - while(1) { + while(true) { GRRLIB_2dMode(); WPAD_ScanPads(); // Scan the Wiimotes From 2ba4cdf58cee4617cdfa092f2760d48d43136525 Mon Sep 17 00:00:00 2001 From: Crayon Date: Mon, 5 Jan 2026 16:45:22 -0500 Subject: [PATCH 3/7] Update libmikmod to latest version --- GRRMOD/mikmod/include/mikmod.h | 5 +++-- GRRMOD/mikmod/playercode/mdreg.c | 3 +++ GRRMOD/mikmod/playercode/mwav.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/GRRMOD/mikmod/include/mikmod.h b/GRRMOD/mikmod/include/mikmod.h index c0097df..82ca96f 100644 --- a/GRRMOD/mikmod/include/mikmod.h +++ b/GRRMOD/mikmod/include/mikmod.h @@ -74,7 +74,7 @@ extern "C" { #define LIBMIKMOD_VERSION_MAJOR 3L #define LIBMIKMOD_VERSION_MINOR 3L -#define LIBMIKMOD_REVISION 12L +#define LIBMIKMOD_REVISION 13L #define LIBMIKMOD_VERSION \ ((LIBMIKMOD_VERSION_MAJOR<<16)| \ @@ -124,7 +124,7 @@ typedef char CHAR; /* BOOL: 0=false, <>0 true -- 16 bits on Amiga, int-wide on others. */ #if !(defined(_MIKMOD_OS2) || defined(_MIKMOD_WIN32) || defined(_MIKMOD_AMIGA)) -typedef unsigned int BOOL; +typedef int BOOL; #endif /* 1 byte, signed and unsigned: */ @@ -834,6 +834,7 @@ MIKMODAPI extern struct MDRIVER drv_dc; /* Dreamcast driver */ MIKMODAPI extern struct MDRIVER drv_gp32; /* GP32 Sound driver */ MIKMODAPI extern struct MDRIVER drv_psp; /* PlayStation Portable driver */ MIKMODAPI extern struct MDRIVER drv_n64; /* Nintendo64 driver */ +MIKMODAPI extern struct MDRIVER drv_vita; /* PlayStation Vita driver */ MIKMODAPI extern struct MDRIVER drv_wss; /* DOS WSS driver */ MIKMODAPI extern struct MDRIVER drv_sb; /* DOS S/B driver */ diff --git a/GRRMOD/mikmod/playercode/mdreg.c b/GRRMOD/mikmod/playercode/mdreg.c index ff5d803..7e664e6 100644 --- a/GRRMOD/mikmod/playercode/mdreg.c +++ b/GRRMOD/mikmod/playercode/mdreg.c @@ -123,6 +123,9 @@ static void _mm_registeralldrivers(void) #ifdef DRV_N64 _mm_registerdriver(&drv_n64); #endif +#ifdef DRV_VITA + _mm_registerdriver(&drv_vita); +#endif /* dos drivers - wss first, since some cards emulate sb */ #ifdef DRV_WSS diff --git a/GRRMOD/mikmod/playercode/mwav.c b/GRRMOD/mikmod/playercode/mwav.c index 6f2394f..cafe4d6 100644 --- a/GRRMOD/mikmod/playercode/mwav.c +++ b/GRRMOD/mikmod/playercode/mwav.c @@ -141,7 +141,7 @@ static SAMPLE* Sample_LoadGeneric_internal_wav(MREADER* reader) _mm_errno=MMERR_UNKNOWN_WAVE_TYPE; return NULL; } - if(!(si=(SAMPLE*)MikMod_malloc(sizeof(SAMPLE)))) return NULL; + if(!(si=(SAMPLE*)MikMod_calloc(1,sizeof(SAMPLE)))) return NULL; si->speed = wh.nSamplesPerSec/wh.nChannels; si->volume = 64; si->length = len; @@ -172,7 +172,7 @@ static SAMPLE* Sample_LoadRawGeneric_internal(MREADER* reader, ULONG rate, ULONG long len; int samp_size=1; - if(!(si=(SAMPLE*)MikMod_malloc(sizeof(SAMPLE)))) return NULL; + if(!(si=(SAMPLE*)MikMod_calloc(1,sizeof(SAMPLE)))) return NULL; /* length */ _mm_fseek(reader, 0, SEEK_END); From 76638b4881f6dd49a3882a9f851c86fb4d2e9622 Mon Sep 17 00:00:00 2001 From: Crayon Date: Wed, 7 Jan 2026 21:16:02 -0500 Subject: [PATCH 4/7] Fix libmikmod --- CMakeLists.txt | 3 ++- GRRMOD/GRRMOD_MOD.c | 7 ++++++- GRRMOD/mikmod/drivers/drv_wii.c | 7 +++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c635baa..212f40e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,8 @@ find_library(AESND aesnd if(GRRMOD_USE_MOD) file(GLOB MOD_SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/GRRMOD/GRRMOD_MOD.c" - "${CMAKE_CURRENT_SOURCE_DIR}/GRRMOD/mikmod/drivers/*.c" + "${CMAKE_CURRENT_SOURCE_DIR}/GRRMOD/mikmod/drivers/drv_nos.c" + "${CMAKE_CURRENT_SOURCE_DIR}/GRRMOD/mikmod/drivers/drv_wii.c" "${CMAKE_CURRENT_SOURCE_DIR}/GRRMOD/mikmod/loaders/*.c" "${CMAKE_CURRENT_SOURCE_DIR}/GRRMOD/mikmod/mmio/*.c" "${CMAKE_CURRENT_SOURCE_DIR}/GRRMOD/mikmod/playercode/*.c" diff --git a/GRRMOD/GRRMOD_MOD.c b/GRRMOD/GRRMOD_MOD.c index 90b02ff..ec512d3 100644 --- a/GRRMOD/GRRMOD_MOD.c +++ b/GRRMOD/GRRMOD_MOD.c @@ -1,5 +1,5 @@ /*------------------------------------------------------------------------------ -Copyright (c) 2010-2024 The GRRLIB Team +Copyright (c) 2010-2026 The GRRLIB Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,6 +19,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------*/ +// Required hack before including mikmod headers +// This is because libogc and libmikmod both defines BOOL +#define _MIKMOD_OS2 1 +typedef char CHAR; +typedef unsigned long int ULONG; #include "GRRMOD_internals.h" #include "mikmod/include/mikmod.h" diff --git a/GRRMOD/mikmod/drivers/drv_wii.c b/GRRMOD/mikmod/drivers/drv_wii.c index 1b413a1..10b1f11 100644 --- a/GRRMOD/mikmod/drivers/drv_wii.c +++ b/GRRMOD/mikmod/drivers/drv_wii.c @@ -37,7 +37,6 @@ #endif #include -#include #include "mikmod_internals.h" static int buffersize=0; @@ -45,7 +44,7 @@ static int *audiobuffer=NULL; static BOOL WII_IsThere(void) { - return TRUE; + return true; } static int WII_Init(void) @@ -59,12 +58,12 @@ static int WII_Init(void) static void WII_CommandLine(const CHAR *cmdline) { - CHAR *ptr=MD_GetAtom("buffer",cmdline,FALSE); + CHAR *ptr=MD_GetAtom("buffer",cmdline,false); if (ptr) { audiobuffer = (void *)atoi(ptr); free(ptr); } - ptr=MD_GetAtom("size",cmdline,FALSE); + ptr=MD_GetAtom("size",cmdline,false); if (ptr) { buffersize = atoi(ptr); free(ptr); From c609494496a49a9619f37c98c43f1f530509ebfd Mon Sep 17 00:00:00 2001 From: Crayon Date: Fri, 6 Mar 2026 14:27:00 -0500 Subject: [PATCH 5/7] Use SYS_MainLoop() --- demo/source/main.c | 2 +- grrmod.doxygen | 27 ++++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/demo/source/main.c b/demo/source/main.c index 49dcc08..4a890d2 100644 --- a/demo/source/main.c +++ b/demo/source/main.c @@ -137,7 +137,7 @@ int main(int argc, char **argv) { GRRLIB_SetBackgroundColour(0x00, 0x00, 0x00, 0xFF); // Loop forever - while(true) { + while(SYS_MainLoop()) { GRRLIB_2dMode(); WPAD_ScanPads(); // Scan the Wiimotes diff --git a/grrmod.doxygen b/grrmod.doxygen index 5ffef28..2b5b8f7 100644 --- a/grrmod.doxygen +++ b/grrmod.doxygen @@ -1,4 +1,4 @@ -# Doxyfile 1.15.0 +# Doxyfile 1.16.1 # This file describes the settings to be used by the documentation system # Doxygen (www.doxygen.org) for a project. @@ -406,8 +406,8 @@ AUTOLINK_SUPPORT = YES # This tag specifies a list of words that, when matching the start of a word in # the documentation, will suppress auto links generation, if it is enabled via -# AUTOLINK_SUPPORT. This list does not affect links explicitly created using \# -# or the \link or commands. +# AUTOLINK_SUPPORT. This list does not affect links explicitly created using # +# or the \link or \ref commands. # This tag requires that the tag AUTOLINK_SUPPORT is set to YES. AUTOLINK_IGNORE_WORDS = @@ -793,6 +793,27 @@ GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES +# The GENERATE_REQUIREMENTS tag can be used to enable (YES) or disable (NO) the +# requirements page. When enabled, this page is automatically created when at +# least one comment block with a \requirement command appears in the input. +# The default value is: YES. + +GENERATE_REQUIREMENTS = YES + +# The REQ_TRACEABILITY_INFO tag controls if traceability information is shown on +# the requirements page (only relevant when using \requirement comment blocks). +# The setting NO will disable the traceablility information altogether. The +# setting UNSATISFIED_ONLY will show a list of requirements that are missing a +# satisfies relation (through the command: \satisfies). Similarly the setting +# UNVERIFIED_ONLY will show a list of requirements that are missing a verifies +# relation (through the command: \verifies). Setting the tag to YES (the +# default) will show both lists if applicable. +# Possible values are: YES, NO, UNSATISFIED_ONLY and UNVERIFIED_ONLY. +# The default value is: YES. +# This tag requires that the tag GENERATE_REQUIREMENTS is set to YES. + +REQ_TRACEABILITY_INFO = YES + # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. From f7155519d1aae8822a4bb77743925554a57bc7bc Mon Sep 17 00:00:00 2001 From: Crayon Date: Fri, 6 Mar 2026 14:36:27 -0500 Subject: [PATCH 6/7] Use cmake to build GRRMOD on CI --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af3feb0..69a26c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,5 +24,6 @@ jobs: - name: Build library and demo run: | - (cd GRRMOD && make && make install) + /opt/devkitpro/portlibs/wii/bin/powerpc-eabi-cmake -B build + cmake --build build --target install (cd demo && make) From 055d028460c676cb3fcb7ff49d66b1ef9874a848 Mon Sep 17 00:00:00 2001 From: Crayon Date: Fri, 6 Mar 2026 15:10:46 -0500 Subject: [PATCH 7/7] The library must now be compiled with a PLATFORM The default platform is wii. --- GRRMOD/Makefile | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/GRRMOD/Makefile b/GRRMOD/Makefile index 20f32e2..d7a6a2d 100644 --- a/GRRMOD/Makefile +++ b/GRRMOD/Makefile @@ -12,11 +12,27 @@ $(error "Please set DEVKITPPC in your environment. export DEVKITPPC=dev endif include $(DEVKITPPC)/base_rules + +ifeq ($(PLATFORM),cube) +MACHDEP := -DHW_DOL + +# Installation directory +DESTDIR := $(DEVKITPRO)/portlibs/gamecube + +LIBOGC_INC := $(DEVKITPRO)/libogc/include +LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/cube +else +MACHDEP := -DHW_RVL + +# Installation directory +DESTDIR := $(DEVKITPRO)/portlibs/wii + LIBOGC_INC := $(DEVKITPRO)/libogc/include LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii +endif -INSTALL_INC := $(DEVKITPRO)/portlibs/ppc/include -INSTALL_LIB := $(DEVKITPRO)/portlibs/ppc/lib +INSTALL_INC := $(DESTDIR)/include +INSTALL_LIB := $(DESTDIR)/lib #--------------------------------------------------------------------------------- # options for building the library, set to yes to include, anything else to exclude @@ -66,7 +82,7 @@ endif #--------------------------------------------------------------------------------- # options for code generation #--------------------------------------------------------------------------------- -MACHDEP := -DGEKKO -mcpu=750 -meabi -msdata=eabi -mhard-float -fmodulo-sched -ffunction-sections -fdata-sections +MACHDEP += -DGEKKO -mcpu=750 -meabi -msdata=eabi -mhard-float -fmodulo-sched -ffunction-sections -fdata-sections CFLAGS += -O2 $(MACHDEP) $(INCLUDE) CXXFLAGS := $(CFLAGS)