mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Merge pull request #101 from delroth/remove-tests
Remove Source/{Unittests,TestSuite}.
This commit is contained in:
+1
-2
@@ -17,9 +17,8 @@ option(OPENMP "Enable OpenMP parallelization" ON)
|
||||
option(ENCODE_FRAMEDUMPS "Encode framedumps in AVI format" ON)
|
||||
########################################
|
||||
# Optional Targets
|
||||
# TODO: Add DSPSpy and TestSuite.
|
||||
# TODO: Add DSPSpy
|
||||
option(DSPTOOL "Build dsptool" OFF)
|
||||
option(UNITTESTS "Build unitests" OFF)
|
||||
|
||||
# Update compiler before calling project()
|
||||
if (APPLE)
|
||||
|
||||
@@ -52,11 +52,7 @@ if (DSPTOOL)
|
||||
add_subdirectory(DSPTool)
|
||||
endif()
|
||||
|
||||
if (UNITTESTS)
|
||||
add_subdirectory(UnitTests)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
# TODO: Add DSPSpy and TestSuite. Preferrably make them option()s and cpack components
|
||||
# TODO: Add DSPSpy. Preferrably make it option() and cpack component
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{E50732C5-038A-42F7-8C95-8C02A4E2ADA6}</ProjectGuid>
|
||||
<RootNamespace>TestSuite</RootNamespace>
|
||||
<Keyword>MakeFileProj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">build\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">build\</IntDir>
|
||||
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">make -r 2>&1 | sed -e %27s/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/’</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">make clean && make -r 2>&1 | sed -e %27s/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/’</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">make clean</NMakeCleanCommandLine>
|
||||
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">dolphintest_aram.dol</NMakeOutput>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)\include;C:\devkitPro\libogc\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
|
||||
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
|
||||
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
|
||||
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
|
||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\devkitPro\libogc\include;C:\devkitPro\libogc\include\ogc;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<BuildLog>
|
||||
<Path>build\BuildLog.htm</Path>
|
||||
</BuildLog>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="source\dolphintest_aram.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Makefile" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,130 +0,0 @@
|
||||
#---------------------------------------------------------------------------------
|
||||
# Clear the implicit built in rules
|
||||
#---------------------------------------------------------------------------------
|
||||
.SUFFIXES:
|
||||
#---------------------------------------------------------------------------------
|
||||
ifeq ($(strip $(DEVKITPPC)),)
|
||||
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
|
||||
endif
|
||||
|
||||
include $(DEVKITPPC)/gamecube_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
|
||||
# INCLUDES is a list of directories containing extra header files
|
||||
#---------------------------------------------------------------------------------
|
||||
TARGET := $(notdir $(CURDIR))
|
||||
BUILD := build
|
||||
SOURCES := source
|
||||
DATA := data
|
||||
INCLUDES :=
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE)
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
|
||||
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# any extra libraries we wish to link with the project
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBS := -logc -lm
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level containing
|
||||
# include and lib
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBDIRS :=
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# 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)))
|
||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
|
||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# 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)) \
|
||||
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
|
||||
$(sFILES:.s=.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) \
|
||||
-I$(LIBOGC_INC)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build a list of library paths
|
||||
#---------------------------------------------------------------------------------
|
||||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
|
||||
-L$(LIBOGC_LIB)
|
||||
|
||||
export OUTPUT := $(CURDIR)/$(TARGET)
|
||||
.PHONY: $(BUILD) clean
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
$(BUILD):
|
||||
@[ -d $@ ] || mkdir -p $@
|
||||
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
clean:
|
||||
@echo clean ...
|
||||
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
else
|
||||
|
||||
DEPENDS := $(OFILES:.o=.d)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# main targets
|
||||
#---------------------------------------------------------------------------------
|
||||
$(OUTPUT).dol: $(OUTPUT).elf
|
||||
$(OUTPUT).elf: $(OFILES)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# This rule links in binary data with the .jpg extension
|
||||
#---------------------------------------------------------------------------------
|
||||
%.jpg.o : %.jpg
|
||||
#---------------------------------------------------------------------------------
|
||||
@echo $(notdir $<)
|
||||
$(bin2o)
|
||||
|
||||
-include $(DEPENDS)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
endif
|
||||
#---------------------------------------------------------------------------------
|
||||
@@ -1,72 +0,0 @@
|
||||
#include <aram.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <ogcsys.h>
|
||||
#include <gccore.h>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
static void *xfb = NULL;
|
||||
static GXRModeObj *rmode = NULL;
|
||||
|
||||
void Initialise();
|
||||
#define NUM_BLOCKS 10
|
||||
u32 aram_blocks[NUM_BLOCKS];
|
||||
u32 start_addr = -1;
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
Initialise();
|
||||
start_addr = AR_Init(aram_blocks, NUM_BLOCKS);
|
||||
while(1)
|
||||
{
|
||||
PAD_ScanPads();
|
||||
VIDEO_ClearFrameBuffer(rmode, xfb, 0);
|
||||
std::cout<<"\x1b[2;0H"; // Position the cursor (on 2nd row)
|
||||
|
||||
std::cout << "Aram is " << (AR_GetDMAStatus() ? "In Progress" : "Idle") << std::endl;
|
||||
std::cout << "Aram Start is 0x" << std::setbase(16) << start_addr << ", Allocated 0x" << AR_GetSize() << " Of memory" << std::setbase(10) << std::endl;
|
||||
std::cout << "Internal Size is 0x" << std::setbase(16) << AR_GetInternalSize() << std::setbase(10) << std::endl;
|
||||
VIDEO_WaitVSync();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Initialise()
|
||||
{
|
||||
// Initialise the video system
|
||||
VIDEO_Init();
|
||||
|
||||
// This function initialises the attached controllers
|
||||
PAD_Init();
|
||||
|
||||
// Obtain the preferred video mode from the system
|
||||
// This will correspond to the settings in the Wii menu
|
||||
rmode = VIDEO_GetPreferredMode(NULL);
|
||||
|
||||
// Allocate memory for the display in the uncached region
|
||||
xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
|
||||
|
||||
// Initialise the console, required for printf
|
||||
console_init(xfb,20,20,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*VI_DISPLAY_PIX_SZ);
|
||||
|
||||
// Set up the video registers with the chosen mode
|
||||
VIDEO_Configure(rmode);
|
||||
|
||||
// Tell the video hardware where our display memory is
|
||||
VIDEO_SetNextFramebuffer(xfb);
|
||||
|
||||
// Make the display visible
|
||||
VIDEO_SetBlack(FALSE);
|
||||
|
||||
// Flush the video register changes to the hardware
|
||||
VIDEO_Flush();
|
||||
|
||||
// Wait for Video setup to complete
|
||||
VIDEO_WaitVSync();
|
||||
if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{B0723635-279A-44E0-80A6-FC21DBB7A4B4}</ProjectGuid>
|
||||
<RootNamespace>TestSuite</RootNamespace>
|
||||
<Keyword>MakeFileProj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">build\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">build\</IntDir>
|
||||
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">make -r 2>&1 | sed -e %27s/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/’</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">make clean && make -r 2>&1 | sed -e %27s/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/’</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">make clean</NMakeCleanCommandLine>
|
||||
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">dolphintest_asm.dol</NMakeOutput>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)\include;C:\devkitPro\libogc\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
|
||||
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
|
||||
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
|
||||
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<BuildLog>
|
||||
<Path>build\BuildLog.htm</Path>
|
||||
</BuildLog>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="source\asm_float.cpp" />
|
||||
<ClCompile Include="source\asm_integer.cpp" />
|
||||
<ClCompile Include="source\asm_tables.cpp" />
|
||||
<ClCompile Include="source\dolphintest_asm.cpp" />
|
||||
<ClCompile Include="source\Helpers.cpp" />
|
||||
<ClCompile Include="source\Init.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="source\asm_tables.h" />
|
||||
<ClInclude Include="source\Defines.h" />
|
||||
<ClInclude Include="source\Helpers.h" />
|
||||
<ClInclude Include="source\Init.h" />
|
||||
<ClInclude Include="source\Instructions.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Makefile" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,135 +0,0 @@
|
||||
#---------------------------------------------------------------------------------
|
||||
# Clear the implicit built in rules
|
||||
#---------------------------------------------------------------------------------
|
||||
.SUFFIXES:
|
||||
#---------------------------------------------------------------------------------
|
||||
ifeq ($(strip $(DEVKITPPC)),)
|
||||
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
|
||||
endif
|
||||
|
||||
include $(DEVKITPPC)/wii_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
|
||||
# INCLUDES is a list of directories containing extra header files
|
||||
#---------------------------------------------------------------------------------
|
||||
TARGET := $(notdir $(CURDIR))
|
||||
BUILD := build
|
||||
SOURCES := source
|
||||
DATA := data
|
||||
INCLUDES :=
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE)
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
|
||||
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# any extra libraries we wish to link with the project
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBS := -lwiiuse -lbte -lfat -logc -lm
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level containing
|
||||
# include and lib
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBDIRS :=
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# 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)))
|
||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
|
||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# 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)) \
|
||||
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
|
||||
$(sFILES:.s=.o) $(SFILES:.S=.o)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build a list of include paths
|
||||
#---------------------------------------------------------------------------------
|
||||
export INCLUDE := $(foreach dir,$(INCLUDES), -iquote $(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||
-I$(CURDIR)/$(BUILD) \
|
||||
-I$(LIBOGC_INC)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build a list of library paths
|
||||
#---------------------------------------------------------------------------------
|
||||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
|
||||
-L$(LIBOGC_LIB)
|
||||
|
||||
export OUTPUT := $(CURDIR)/$(TARGET)
|
||||
.PHONY: $(BUILD) clean
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
$(BUILD):
|
||||
@[ -d $@ ] || mkdir -p $@
|
||||
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
clean:
|
||||
@echo clean ...
|
||||
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
run:
|
||||
wiiload $(TARGET).dol
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
else
|
||||
|
||||
DEPENDS := $(OFILES:.o=.d)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# main targets
|
||||
#---------------------------------------------------------------------------------
|
||||
$(OUTPUT).dol: $(OUTPUT).elf
|
||||
$(OUTPUT).elf: $(OFILES)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# This rule links in binary data with the .jpg extension
|
||||
#---------------------------------------------------------------------------------
|
||||
%.jpg.o : %.jpg
|
||||
#---------------------------------------------------------------------------------
|
||||
@echo $(notdir $<)
|
||||
$(bin2o)
|
||||
|
||||
-include $(DEPENDS)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
endif
|
||||
#---------------------------------------------------------------------------------
|
||||
@@ -1,8 +0,0 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define u32 unsigned int
|
||||
#define u16 unsigned short
|
||||
#define u8 unsigned char
|
||||
#define s8 signed char
|
||||
#define s16 signed short
|
||||
#define s32 signed int
|
||||
@@ -1,59 +0,0 @@
|
||||
|
||||
#include "Defines.h"
|
||||
|
||||
u32 GetCR0()
|
||||
{
|
||||
u32 var;
|
||||
asm(
|
||||
"mfcr %0"
|
||||
: "=&r"(var)
|
||||
);
|
||||
return var;
|
||||
}
|
||||
|
||||
u32 GetCR(u32 num)
|
||||
{
|
||||
u32 var;
|
||||
if(num == 0) // wtf, silly people
|
||||
return GetCR0();
|
||||
else {
|
||||
// TODO: Ugly switch is ugly, was failing otherwise
|
||||
switch (num) {
|
||||
case 1:
|
||||
asm("mcrf 0, 1");
|
||||
break;
|
||||
case 2:
|
||||
asm("mcrf 0, 2");
|
||||
break;
|
||||
case 3:
|
||||
asm("mcrf 0, 3");
|
||||
break;
|
||||
case 4:
|
||||
asm("mcrf 0, 4");
|
||||
break;
|
||||
case 5:
|
||||
asm("mcrf 0, 5");
|
||||
break;
|
||||
case 6:
|
||||
asm("mcrf 0, 6");
|
||||
break;
|
||||
case 7:
|
||||
asm("mcrf 0, 7");
|
||||
break;
|
||||
default:
|
||||
printf("Can this be more than 7?\n");
|
||||
break;
|
||||
}
|
||||
return GetCR0();
|
||||
}
|
||||
}
|
||||
|
||||
u32 GetXER()
|
||||
{
|
||||
u32 var;
|
||||
asm(
|
||||
"mfxer %0"
|
||||
: "=&r"(var)
|
||||
);
|
||||
return var;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
#include "Defines.h"
|
||||
|
||||
u32 GetCR0();
|
||||
u32 GetCR(u32 num);
|
||||
u32 GetXER();
|
||||
@@ -1,80 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <gccore.h>
|
||||
#include <sdcard/wiisd_io.h>
|
||||
#include <fat.h>
|
||||
#include <dirent.h>
|
||||
#include <wiiuse/wpad.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "Init.h"
|
||||
|
||||
static void *xfb = NULL;
|
||||
static GXRModeObj *rmode = NULL;
|
||||
void die(char *msg) {
|
||||
if (f!=NULL) fclose(f);
|
||||
printf(msg);
|
||||
sleep(5);
|
||||
fatUnmount("sd");
|
||||
__io_wiisd.shutdown();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void initialise_fat() {
|
||||
__io_wiisd.startup();
|
||||
if (!fatInitDefault())
|
||||
die("Unable to initialise FAT subsystem, exiting.\n");
|
||||
fatMountSimple("sd", &__io_wiisd);
|
||||
DIR_ITER *root = diropen("/");
|
||||
if (!root)
|
||||
die("Cannot open root dir, exiting.\n");
|
||||
dirclose(root);
|
||||
if (chdir("/"))
|
||||
die("Could not change to root directory, exiting.\n");
|
||||
}
|
||||
|
||||
void init_crap() {
|
||||
VIDEO_Init();
|
||||
WPAD_Init();
|
||||
PAD_Init();
|
||||
|
||||
// Obtain the preferred video mode from the system
|
||||
// This will correspond to the settings in the Wii menu
|
||||
rmode = VIDEO_GetPreferredMode(NULL);
|
||||
|
||||
// Allocate memory for the display in the uncached region
|
||||
xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
|
||||
|
||||
// Initialise the console, required for printf
|
||||
console_init(xfb,20,20,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*VI_DISPLAY_PIX_SZ);
|
||||
|
||||
// Set up the video registers with the chosen mode
|
||||
VIDEO_Configure(rmode);
|
||||
|
||||
// Tell the video hardware where our display memory is
|
||||
VIDEO_SetNextFramebuffer(xfb);
|
||||
|
||||
// Make the display visible
|
||||
VIDEO_SetBlack(FALSE);
|
||||
|
||||
// Flush the video register changes to the hardware
|
||||
VIDEO_Flush();
|
||||
|
||||
// Wait for Video setup to complete
|
||||
VIDEO_WaitVSync();
|
||||
if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
|
||||
}
|
||||
|
||||
void end() {
|
||||
int columns = 0, rows = 0;
|
||||
CON_GetMetrics(&columns, &rows);
|
||||
printf("\x1b[%i;0H",rows);
|
||||
printf("File written... press Home/Start to exit.");
|
||||
while(1) {
|
||||
WPAD_ScanPads(); PAD_ScanPads();
|
||||
if ((WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) || (PAD_ButtonsDown(0) & PAD_BUTTON_START))
|
||||
exit(0);
|
||||
VIDEO_WaitVSync();
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
extern FILE *f;
|
||||
|
||||
|
||||
void die(char *msg);
|
||||
|
||||
void initialise_fat();
|
||||
|
||||
void init_crap();
|
||||
|
||||
void end();
|
||||
@@ -1,20 +0,0 @@
|
||||
|
||||
// Integer
|
||||
void add(u32 *a, u32 *b, u32 *c, u32 *d);
|
||||
void addRC(u32 *a, u32 *b, u32 *c, u32 *d);
|
||||
|
||||
void subfc(u32 *a, u32 *b, u32 *c, u32 *d);
|
||||
void subfcRC(u32 *a, u32 *b, u32 *c, u32 *d);
|
||||
|
||||
void divw(u32 *a, u32 *b, u32 *c, u32 *d);
|
||||
void divwRC(u32 *a, u32 *b, u32 *c, u32 *d);
|
||||
|
||||
void divwo(u32 *a, u32 *b, u32 *c, u32 *d);
|
||||
void divwoRC(u32 *a, u32 *b, u32 *c, u32 *d);
|
||||
|
||||
|
||||
// Float
|
||||
|
||||
void fsqrt(float *a, float *b, float *c, float *d);
|
||||
|
||||
void fsqrtRC(float *a, float *b, float *c, float *d);
|
||||
@@ -1,16 +0,0 @@
|
||||
|
||||
#include "Defines.h"
|
||||
void fsqrt(float *a, float *b, float *c, float *d)
|
||||
{
|
||||
/*asm(
|
||||
"fsqrt fr0,%0"
|
||||
: "=&r"(*a)
|
||||
);*/
|
||||
}
|
||||
void fsqrtRC(float *a, float *b, float *c, float *d)
|
||||
{
|
||||
/*asm(
|
||||
"fsqrt. fr0,%0"
|
||||
: "=&r"(*a)
|
||||
);*/
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
#include "asm_tables.h"
|
||||
#include "Defines.h"
|
||||
|
||||
void add(u32 *a, u32 *b, u32 *c, u32 *d)
|
||||
{
|
||||
asm(
|
||||
"add %0,%1,%2"
|
||||
: "=r"(*a)
|
||||
: "r"(*b), "r"(*c)
|
||||
);
|
||||
}
|
||||
void addRC(u32 *a, u32 *b, u32 *c, u32 *d)
|
||||
{
|
||||
asm(
|
||||
"add. %0,%1,%2"
|
||||
: "=r"(*a)
|
||||
: "r"(*b), "r"(*c)
|
||||
: "cc"
|
||||
);
|
||||
}
|
||||
|
||||
void subfc(u32 *a, u32 *b, u32 *c, u32 *d)
|
||||
{
|
||||
asm(
|
||||
"subfc %0,%1,%2"
|
||||
: "=r"(*a)
|
||||
: "r"(*b), "r"(*c)
|
||||
);
|
||||
}
|
||||
void subfcRC(u32 *a, u32 *b, u32 *c, u32 *d)
|
||||
{
|
||||
asm(
|
||||
"subfc. %0,%1,%2"
|
||||
: "=r"(*a)
|
||||
: "r"(*b), "r"(*c)
|
||||
: "cc"
|
||||
);
|
||||
}
|
||||
|
||||
void divw(u32 *a, u32 *b, u32 *c, u32 *d)
|
||||
{
|
||||
asm(
|
||||
"divw %0,%1,%2"
|
||||
: "=r"(*a)
|
||||
: "r"(*b), "r"(*c)
|
||||
);
|
||||
}
|
||||
void divwRC(u32 *a, u32 *b, u32 *c, u32 *d)
|
||||
{
|
||||
asm(
|
||||
"divw. %0,%1,%2"
|
||||
: "=r"(*a)
|
||||
: "r"(*b), "r"(*c)
|
||||
: "cc"
|
||||
);
|
||||
}
|
||||
|
||||
void divwo(u32 *a, u32 *b, u32 *c, u32 *d)
|
||||
{
|
||||
asm(
|
||||
"divwo %0,%1,%2"
|
||||
: "=r"(*a)
|
||||
: "r"(*b), "r"(*c)
|
||||
);
|
||||
}
|
||||
void divwoRC(u32 *a, u32 *b, u32 *c, u32 *d)
|
||||
{
|
||||
asm(
|
||||
"divwo. %0,%1,%2"
|
||||
: "=r"(*a)
|
||||
: "r"(*b), "r"(*c)
|
||||
: "cc"
|
||||
);
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
#include "asm_tables.h"
|
||||
#include "Init.h"
|
||||
#include "Helpers.h"
|
||||
|
||||
// Limited Test, Later have a test that will pass all possible variables
|
||||
u32 inval_table[][2] = {
|
||||
{0,0},
|
||||
{1,1},
|
||||
{300,0},
|
||||
{1,0},
|
||||
{0xffff,0},
|
||||
{0xffffffff,0},
|
||||
{0x80000000,0},
|
||||
{0x80000000,1},
|
||||
{0x80000000,2},
|
||||
{0x7fffffff,0},
|
||||
{0x7fffffff,1},
|
||||
{0x7fffffff,2},
|
||||
{0,1},
|
||||
{0,0xffff},
|
||||
{0,0xffffffff},
|
||||
{0,0x80000000},
|
||||
{1,0x80000000},
|
||||
{2,0x80000000},
|
||||
{0,0x7fffffff},
|
||||
{1,0x7fffffff},
|
||||
{2,0x7fffffff},
|
||||
{654321,0},
|
||||
{4653321,0},
|
||||
{0,300},
|
||||
{1024,8},
|
||||
{8,1024},
|
||||
{0xffff,0xffff},
|
||||
{0xffffffff,0xffffffff}
|
||||
};
|
||||
void Print(const char* text)
|
||||
{
|
||||
printf(text);
|
||||
if(f)
|
||||
fprintf(f, text);
|
||||
}
|
||||
void ShowModifies(u32 inst)
|
||||
{
|
||||
u32 mod = instructions[inst].Modifies;
|
||||
if(mod == 0)
|
||||
{
|
||||
Print("NONE");
|
||||
return;
|
||||
}
|
||||
if(mod & MOD_CR0)
|
||||
Print("CR0 ");
|
||||
if(mod & MOD_CR1)
|
||||
Print("CR1 ");
|
||||
if(mod & MOD_SR)
|
||||
Print("SR ");
|
||||
if(mod & MOD_XER)
|
||||
Print("XER ");
|
||||
}
|
||||
void RunInstruction(u32 inst)
|
||||
{
|
||||
u32 inval1, inval2, inval3;
|
||||
|
||||
u32 outval = 0;
|
||||
|
||||
// CR0
|
||||
u32 cr1 = 0, cr2 = 0;
|
||||
|
||||
//CR1
|
||||
u32 cr11 = 0, cr12 = 0;
|
||||
|
||||
//XER
|
||||
u32 xer1 = 0, xer2 = 0;
|
||||
|
||||
bool modCR0 = instructions[inst].Modifies & MOD_CR0;
|
||||
bool modCR1 = instructions[inst].Modifies & MOD_CR1;
|
||||
bool modXER = instructions[inst].Modifies & MOD_XER;
|
||||
|
||||
if(instructions[inst].numInput != 3)
|
||||
{
|
||||
Print("Don't support Input not 3 yet~!\n");
|
||||
fclose(f);
|
||||
return;
|
||||
}
|
||||
if(instructions[inst].type != TYPE_INTEGER)
|
||||
{
|
||||
Print("Types other than TYPE_INTEGER not supported yet!\n");
|
||||
fclose(f);
|
||||
return;
|
||||
}
|
||||
char temp[32];
|
||||
sprintf(temp, "logs/%s.dolphin.jit.log", instructions[inst].name);
|
||||
f = fopen(temp, "wb");
|
||||
if (!f)
|
||||
printf("unable to open output file\n");
|
||||
|
||||
printf("%s: InputNum: %d Modifies(flags): ", instructions[inst].name, instructions[inst].numInput);
|
||||
if(f)
|
||||
fprintf(f, "%s: InputNum: %d Modifies(flags): ", instructions[inst].name, instructions[inst].numInput);
|
||||
ShowModifies(inst);
|
||||
Print("\n");
|
||||
|
||||
for (unsigned int i = 0; i < sizeof(inval_table)/(sizeof(int)*2); i++)
|
||||
{
|
||||
inval1 = inval_table[i][0];
|
||||
inval2 = inval_table[i][1];
|
||||
outval = 0;
|
||||
|
||||
// Show our input values and where we are at on the array
|
||||
printf("\x1b[%i;0H", i);
|
||||
printf("%07i: %08x,%08x",i, inval1,inval2);
|
||||
|
||||
// Get flags before
|
||||
if(modCR0)
|
||||
cr1 = GetCR0();
|
||||
if(modCR1)
|
||||
cr11 = GetCR(1);
|
||||
if(modXER)
|
||||
xer1 = GetXER();
|
||||
|
||||
//Actually call instruction
|
||||
instructions[inst].Call(&outval, &inval1, &inval2, 0);
|
||||
|
||||
// Get flags after
|
||||
if(modCR0)
|
||||
cr2 = GetCR0();
|
||||
if(modCR1)
|
||||
cr12 = GetCR(1);
|
||||
if(modXER)
|
||||
xer2 = GetXER();
|
||||
|
||||
// Print out value
|
||||
printf(":o=%08x\n\t", outval);
|
||||
|
||||
// show off flag changes
|
||||
if(modCR0)
|
||||
printf("CR0:(%08x ~ %08x)", cr1,cr2);
|
||||
if(modCR1)
|
||||
printf("CR1:(%08x ~ %08x)", cr11,cr12);
|
||||
if(modXER)
|
||||
printf("XER:(%08x ~ %08x)", xer1, xer2);
|
||||
|
||||
|
||||
// same in the file
|
||||
if(f)
|
||||
{
|
||||
fprintf(f, ":i=%08x, %08x:o=%08x\n\t", inval1,inval2, outval);
|
||||
if(modCR0)
|
||||
fprintf(f, "CR0:(%08x ~ %08x)", cr1,cr2);
|
||||
if(modCR1)
|
||||
fprintf(f, "CR1:(%08x ~ %08x)", cr11,cr12);
|
||||
if(modXER)
|
||||
fprintf(f, "XER:(%08x ~ %08x)", xer1, xer2);
|
||||
}
|
||||
|
||||
// see the difference in flags if any
|
||||
if(modCR0)
|
||||
{
|
||||
u32 cr_diff = cr2&~cr1;
|
||||
if (cr_diff) {
|
||||
printf(" CR0D:%08x",cr_diff);
|
||||
if(f)
|
||||
fprintf(f, " CR0D:%08x",cr_diff);
|
||||
}
|
||||
}
|
||||
if(modCR1)
|
||||
{
|
||||
u32 cr1_diff = cr12&~cr11;
|
||||
if (cr1_diff) {
|
||||
printf(" CR1D:%08x",cr1_diff);
|
||||
if(f)
|
||||
fprintf(f, " CR1D:%08x",cr1_diff);
|
||||
}
|
||||
}
|
||||
if(modXER)
|
||||
{
|
||||
u32 xer_diff = xer2&~xer1;
|
||||
if (xer_diff) {
|
||||
printf(" XERD:%08x",xer_diff);
|
||||
if(f)
|
||||
fprintf(f, " XERD:%08x",xer_diff);
|
||||
}
|
||||
}
|
||||
if(f)
|
||||
fprintf(f,"\n");
|
||||
}
|
||||
if(f)
|
||||
fclose(f);
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
|
||||
#include "Defines.h"
|
||||
#include "Instructions.h"
|
||||
|
||||
enum Modify
|
||||
{
|
||||
MOD_CR0 = (1 << 0),
|
||||
MOD_CR1 = (1 << 1),
|
||||
MOD_SR = (1 << 2),
|
||||
MOD_XER = (1 << 3),
|
||||
MOD_FPSCR = (1 << 4)
|
||||
};
|
||||
enum IOput
|
||||
{
|
||||
IO_ARG1 = (1 << 0),
|
||||
IO_ARG2 = (1 << 1),
|
||||
IO_ARG3 = (1 << 2),
|
||||
};
|
||||
enum inst_type
|
||||
{
|
||||
TYPE_INTEGER,
|
||||
TYPE_FLOAT
|
||||
};
|
||||
|
||||
struct inst
|
||||
{
|
||||
char name[16];
|
||||
u32 Modifies; // Flag modification
|
||||
u8 numInput;
|
||||
u32 Input;
|
||||
u32 Ouput;
|
||||
inst_type type;
|
||||
void (*Call)(u32*, u32*, u32*, u32*);
|
||||
void (*CallFP)(float*, float*, float*, float*);
|
||||
|
||||
};
|
||||
|
||||
static inst instructions[] = {
|
||||
{ "add", NULL, 3, IO_ARG1 | IO_ARG2 | IO_ARG3, IO_ARG1,TYPE_INTEGER, add},
|
||||
{ "add.", MOD_CR0, 3, IO_ARG1 | IO_ARG2 | IO_ARG3, IO_ARG1,TYPE_INTEGER, add},
|
||||
{ "subfc", NULL, 3, IO_ARG1 | IO_ARG2 | IO_ARG3, IO_ARG1,TYPE_INTEGER, subfc},
|
||||
{ "subfc.", MOD_CR0, 3, IO_ARG1 | IO_ARG2 | IO_ARG3, IO_ARG1,TYPE_INTEGER, subfcRC},
|
||||
{ "divw", NULL, 3, IO_ARG1 | IO_ARG2 | IO_ARG3, IO_ARG1, TYPE_INTEGER, divw},
|
||||
{ "divw.", MOD_CR0, 3, IO_ARG1 | IO_ARG2 | IO_ARG3, IO_ARG1,TYPE_INTEGER, divwRC},
|
||||
{ "divwo", MOD_XER, 3, IO_ARG1 | IO_ARG2 | IO_ARG3, IO_ARG1,TYPE_INTEGER, divwo},
|
||||
{ "divwo.", MOD_CR0 | MOD_XER, 3, IO_ARG1 | IO_ARG2 | IO_ARG3, IO_ARG1, TYPE_INTEGER, divwoRC},
|
||||
//{ "fsqrt", MOD_FPSCR, 2, IO_ARG1 | IO_ARG2, IO_ARG1,TYPE_FLOAT, NULL, fsqrt},
|
||||
//{ "fsqrt.", MOD_CR1 | MOD_FPSCR, 2, IO_ARG1 | IO_ARG2, IO_ARG1,TYPE_FLOAT, NULL, fsqrtRC}
|
||||
};
|
||||
|
||||
|
||||
void RunInstruction(u32 inst);
|
||||
@@ -1,43 +0,0 @@
|
||||
// Copyright (C) 2003 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "Defines.h"
|
||||
#include "Init.h"
|
||||
#include "asm_tables.h"
|
||||
#include "Helpers.h"
|
||||
|
||||
FILE *f = NULL;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
init_crap();
|
||||
initialise_fat();
|
||||
|
||||
for (uint a = 0; a < sizeof(instructions) / sizeof(inst); ++a)
|
||||
{
|
||||
RunInstruction(a);
|
||||
}
|
||||
|
||||
end();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{9F053346-A33D-4E4F-874E-CBA1AF809FC3}</ProjectGuid>
|
||||
<RootNamespace>TestSuite</RootNamespace>
|
||||
<Keyword>MakeFileProj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">build\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">build\</IntDir>
|
||||
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">make -r 2>&1 | sed -e %27s/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/’</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">make clean && make -r 2>&1 | sed -e %27s/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/’</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">make clean</NMakeCleanCommandLine>
|
||||
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">dolphintest_ax.dol</NMakeOutput>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)\include;C:\devkitPro\libogc\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
|
||||
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
|
||||
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
|
||||
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<BuildLog>
|
||||
<Path>build\BuildLog.htm</Path>
|
||||
</BuildLog>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="source\dolphintest_ax.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Makefile" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,130 +0,0 @@
|
||||
#---------------------------------------------------------------------------------
|
||||
# Clear the implicit built in rules
|
||||
#---------------------------------------------------------------------------------
|
||||
.SUFFIXES:
|
||||
#---------------------------------------------------------------------------------
|
||||
ifeq ($(strip $(DEVKITPPC)),)
|
||||
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
|
||||
endif
|
||||
|
||||
include $(DEVKITPPC)/gamecube_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
|
||||
# INCLUDES is a list of directories containing extra header files
|
||||
#---------------------------------------------------------------------------------
|
||||
TARGET := $(notdir $(CURDIR))
|
||||
BUILD := build
|
||||
SOURCES := source
|
||||
DATA := data
|
||||
INCLUDES :=
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE)
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
|
||||
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# any extra libraries we wish to link with the project
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBS := -logc -lm
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level containing
|
||||
# include and lib
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBDIRS :=
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# 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)))
|
||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
|
||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# 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)) \
|
||||
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
|
||||
$(sFILES:.s=.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) \
|
||||
-I$(LIBOGC_INC)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build a list of library paths
|
||||
#---------------------------------------------------------------------------------
|
||||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
|
||||
-L$(LIBOGC_LIB)
|
||||
|
||||
export OUTPUT := $(CURDIR)/$(TARGET)
|
||||
.PHONY: $(BUILD) clean
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
$(BUILD):
|
||||
@[ -d $@ ] || mkdir -p $@
|
||||
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
clean:
|
||||
@echo clean ...
|
||||
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
else
|
||||
|
||||
DEPENDS := $(OFILES:.o=.d)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# main targets
|
||||
#---------------------------------------------------------------------------------
|
||||
$(OUTPUT).dol: $(OUTPUT).elf
|
||||
$(OUTPUT).elf: $(OFILES)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# This rule links in binary data with the .jpg extension
|
||||
#---------------------------------------------------------------------------------
|
||||
%.jpg.o : %.jpg
|
||||
#---------------------------------------------------------------------------------
|
||||
@echo $(notdir $<)
|
||||
$(bin2o)
|
||||
|
||||
-include $(DEPENDS)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
endif
|
||||
#---------------------------------------------------------------------------------
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user