Latest compatible version of Classicube from the original GitHub repository (https://github.com/ClassiCube/ClassiCube) that can be compiled on Classicube for PowerMac PPC running Mac OS X 10.4.

This commit is contained in:
Andrei Alexandru
2025-12-17 13:17:57 +02:00
commit c71492f846
1248 changed files with 422858 additions and 0 deletions

113
misc/xbox360/Makefile Normal file
View File

@@ -0,0 +1,113 @@
#---------------------------------------------------------------------------------
# Clear the implicit built in rules
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITXENON)),)
$(error "Please set DEVKITXENON in your environment. export DEVKITXENON=<path to>devkitPPC")
endif
#---------------------------------------------------------------------------------
export LIBXENON_INC := $(DEVKITXENON)/usr/include
export LIBXENON_LIB := $(DEVKITXENON)/usr/lib
LDSCRIPT := $(DEVKITXENON)/app.lds
MACHDEP = -DXENON -m32 -maltivec -fno-pic -mpowerpc64 -mhard-float -L$(DEVKITXENON)/xenon/lib/32
export AS := xenon-as
export CC := xenon-gcc
export CXX := xenon-g++
export AR := xenon-ar
#---------------------------------------------------------------------------------
# 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
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET := ClassiCube-xbox360
BUILD := build-360
SOURCES := src third_party/bearssl/src
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE)
CXXFLAGS= $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,--gc-sections -Wl,-Map,$(notdir $@).map
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS := -lxenon -lm -lfat
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
#---------------------------------------------------------------------------------
# automatically build a list of object files for our project
#---------------------------------------------------------------------------------
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
export LD := $(CC)
export OFILES := $(CFILES:.c=.o) $(sFILES:.s=.o) $(SFILES:.S=.o)
#---------------------------------------------------------------------------------
# build a list of include paths
#---------------------------------------------------------------------------------
export INCLUDE := -I$(LIBXENON_INC) -Ithird_party/bearssl/inc
#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS := -L$(LIBXENON_LIB)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
default: $(BUILD) $(TARGET).elf32
$(TARGET).elf32: $(TARGET).elf
$(TARGET).elf: $(OFILES)
#---------------------------------------------------------------------------------
$(BUILD):
[ -d $@ ] || mkdir -p $@
#---------------------------------------------------------------------------------
clean:
echo clean ...
rm -fr $(BUILD) $(TARGET).elf $(TARGET).elf32
#---------------------------------------------------------------------------------
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
%.o: %.s
$(CC) -x assembler-with-cpp $(ASFLAGS) -c $< -o $@
%.o: %.S
$(CC) -x assembler-with-cpp $(ASFLAGS) -c $< -o $@
%.elf:
echo linking ... $(notdir $@)
$(LD) $^ $(LDFLAGS) $(LIBPATHS) $(LIBS) -n -T $(LDSCRIPT) -o $@
%.elf32: %.elf
echo converting and stripping ... $(notdir $@)
xenon-objcopy -O elf32-powerpc --adjust-vma 0x80000000 $< $@
xenon-strip $@

View File

@@ -0,0 +1,19 @@
const char ps_coloured[160] = {
0x10, 0x2a, 0x11, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x1c,
0x00, 0x00, 0x00, 0x23, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x1c, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x32, 0x2e,
0x30, 0x2e, 0x34, 0x33, 0x31, 0x34, 0x2e, 0x30, 0x00, 0xab, 0xab,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x21, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xf0, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0xc4, 0x00,
0x22, 0x00, 0x00, 0x00, 0xc8, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const int ps_coloured_length = 160;

View File

@@ -0,0 +1,7 @@
struct INPUT_VERTEX {
float4 col : COLOR0;
};
float4 main(INPUT_VERTEX input) : COLOR0 {
return input.col;
}

View File

@@ -0,0 +1,25 @@
const char ps_textured[228] = {
0x10, 0x2a, 0x11, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00,
0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x1c,
0x00, 0x00, 0x00, 0x4b, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x44, 0x00, 0x00, 0x00, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00,
0x73, 0x00, 0xab, 0xab, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00,
0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73,
0x5f, 0x33, 0x5f, 0x30, 0x00, 0x32, 0x2e, 0x30, 0x2e, 0x34, 0x33,
0x31, 0x34, 0x2e, 0x30, 0x00, 0xab, 0xab, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x3c, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x42, 0x00, 0x01,
0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x30, 0x50, 0x00,
0x00, 0xf1, 0xa0, 0x00, 0x01, 0x10, 0x02, 0x00, 0x00, 0x12, 0x00,
0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00, 0x22,
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x00, 0x01, 0x1f, 0x1f,
0xf6, 0x88, 0x00, 0x00, 0x40, 0x00, 0xc8, 0x0f, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0xc1, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const int ps_textured_length = 228;

View File

@@ -0,0 +1,10 @@
sampler s;
struct INPUT_VERTEX {
float4 col : COLOR0;
float2 uv : TEXCOORD0;
};
float4 main(INPUT_VERTEX input) : COLOR0 {
return tex2D(s, input.uv) * input.col;
}

View File

@@ -0,0 +1,34 @@
const char vs_coloured[324] = {
0x10, 0x2a, 0x11, 0x01, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x1c,
0x00, 0x00, 0x00, 0x53, 0xff, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00,
0x6d, 0x76, 0x70, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x00, 0xab,
0xab, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f,
0x30, 0x00, 0x32, 0x2e, 0x30, 0x2e, 0x34, 0x33, 0x31, 0x34, 0x2e,
0x30, 0x00, 0xab, 0xab, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x84, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x10, 0x21, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x90,
0x00, 0x10, 0x00, 0x03, 0x00, 0x30, 0xa0, 0x04, 0x00, 0x00, 0xf0,
0x50, 0x00, 0x00, 0x10, 0x09, 0x30, 0x05, 0x20, 0x03, 0x00, 0x00,
0x12, 0x00, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x00,
0x00, 0x12, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x09,
0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xf8, 0x20,
0x00, 0x00, 0x00, 0x0e, 0x88, 0x00, 0x00, 0x00, 0x00, 0x05, 0xf8,
0x00, 0x00, 0x00, 0x00, 0x06, 0x88, 0x00, 0x00, 0x00, 0x00, 0xc8,
0x0f, 0x00, 0x01, 0x00, 0xb1, 0x77, 0x00, 0x81, 0x02, 0x01, 0x00,
0xc8, 0x0f, 0x00, 0x01, 0x00, 0x6c, 0x94, 0xe3, 0xab, 0x02, 0x00,
0x01, 0xc8, 0x0f, 0x00, 0x01, 0x00, 0xc6, 0x25, 0xe3, 0xab, 0x02,
0x02, 0x01, 0xc8, 0x0f, 0x80, 0x3e, 0x00, 0x3e, 0x00, 0x00, 0x80,
0x01, 0x03, 0x00, 0xc8, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00
};
const int vs_coloured_length = 324;

View File

@@ -0,0 +1,20 @@
struct INPUT_VERTEX
{
float3 pos : POSITION;
float4 col : COLOR0;
};
struct OUTPUT_VERTEX
{
float4 pos : POSITION;
float4 col : TEXCOORD0;
};
float4x4 mvpMatrix: register(c0);
OUTPUT_VERTEX main(INPUT_VERTEX input) {
OUTPUT_VERTEX output;
output.pos = mul(mvpMatrix, float4(input.pos, 1.0f));
output.col = input.col;
return output;
}

View File

@@ -0,0 +1,37 @@
const char vs_textured[360] = {
0x10, 0x2a, 0x11, 0x01, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00,
0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x1c,
0x00, 0x00, 0x00, 0x53, 0xff, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00,
0x6d, 0x76, 0x70, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x00, 0xab,
0xab, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f,
0x30, 0x00, 0x32, 0x2e, 0x30, 0x2e, 0x34, 0x33, 0x31, 0x34, 0x2e,
0x30, 0x00, 0xab, 0xab, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x9c, 0x00, 0x11, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x18, 0x42, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x90,
0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x30, 0x50,
0x05, 0x00, 0x00, 0x30, 0x50, 0x00, 0x01, 0xf1, 0xa0, 0x00, 0x00,
0x10, 0x0a, 0x00, 0x00, 0x10, 0x0b, 0x70, 0x15, 0x30, 0x03, 0x00,
0x00, 0x12, 0x00, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x06,
0x00, 0x00, 0x12, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x0a, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xf8,
0x30, 0x00, 0x00, 0x00, 0x0e, 0x88, 0x00, 0x00, 0x00, 0x00, 0x05,
0xf8, 0x10, 0x00, 0x00, 0x00, 0x06, 0x88, 0x00, 0x00, 0x00, 0x00,
0x05, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x00,
0x00, 0xc8, 0x0f, 0x00, 0x02, 0x00, 0xb1, 0x77, 0x00, 0x81, 0x03,
0x01, 0x00, 0xc8, 0x0f, 0x00, 0x02, 0x00, 0x6c, 0x94, 0xe3, 0xab,
0x03, 0x00, 0x02, 0xc8, 0x0f, 0x00, 0x02, 0x00, 0xc6, 0x25, 0xe3,
0xab, 0x03, 0x02, 0x02, 0xc8, 0x0f, 0x80, 0x3e, 0x00, 0x3e, 0x00,
0x00, 0x80, 0x02, 0x03, 0x00, 0xc8, 0x03, 0x80, 0x00, 0x00, 0xb0,
0xb0, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xc8, 0x0f, 0x80, 0x01, 0x00,
0x00, 0x00, 0x00, 0xc2, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const int vs_textured_length = 360;

View File

@@ -0,0 +1,23 @@
struct INPUT_VERTEX
{
float3 pos : POSITION;
float4 col : COLOR0;
float2 uv : TEXCOORD0;
};
struct OUTPUT_VERTEX
{
float4 pos : POSITION;
float4 col : COLOR0;
float2 uv : TEXCOORD0;
};
float4x4 mvpMatrix: register(c0);
OUTPUT_VERTEX main(INPUT_VERTEX input) {
OUTPUT_VERTEX output;
output.pos = mul(mvpMatrix, float4(input.pos, 1.0f));
output.col = input.col;
output.uv = input.uv;
return output;
}