From bb7ee127667f6c007252688d5c7fa98d30927303 Mon Sep 17 00:00:00 2001 From: meepingsnesroms Date: Sat, 16 Dec 2017 19:20:43 -0800 Subject: [PATCH 1/2] Fix compile on new devkitARM --- ctr/gpu_old.c | 9 +++++++++ ctr/gpu_old.h | 3 +++ gfx/drivers_font/ctr_font.c | 1 - menu/drivers_display/menu_display_ctr.c | 1 - 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ctr/gpu_old.c b/ctr/gpu_old.c index 7822f6308f..8061d48650 100644 --- a/ctr/gpu_old.c +++ b/ctr/gpu_old.c @@ -306,3 +306,12 @@ void GPU_FinishDrawing() GPUCMD_AddWrite(GPUREG_FRAMEBUFFER_INVALIDATE, 0x00000001); GPUCMD_AddWrite(GPUREG_EARLYDEPTH_CLEAR, 0x00000001); } + +void GPUCMD_Finalize(void) +{ + GPUCMD_AddMaskedWrite(GPUREG_PRIMITIVE_CONFIG, 0x8, 0x00000000); + GPUCMD_AddWrite(GPUREG_FRAMEBUFFER_FLUSH, 0x00000001); + GPUCMD_AddWrite(GPUREG_FRAMEBUFFER_INVALIDATE, 0x00000001); + GPUCMD_AddWrite(GPUREG_FINALIZE, 0x12345678); + GPUCMD_AddWrite(GPUREG_FINALIZE, 0x12345678); //not the cleanest way of guaranteeing 0x10-byte size but whatever good enough for now +} diff --git a/ctr/gpu_old.h b/ctr/gpu_old.h index 673a2a7e5c..deac6bf7f2 100644 --- a/ctr/gpu_old.h +++ b/ctr/gpu_old.h @@ -235,3 +235,6 @@ void GPU_DrawElements(GPU_Primitive_t primitive, u32* indexArray, u32 n) DEPRECA * @deprecated */ void GPU_FinishDrawing() DEPRECATED; + +/// Finalizes the GPU command buffer. +void GPUCMD_Finalize(void) DEPRECATED; diff --git a/gfx/drivers_font/ctr_font.c b/gfx/drivers_font/ctr_font.c index 08d3080ce5..9f0c8cec58 100644 --- a/gfx/drivers_font/ctr_font.c +++ b/gfx/drivers_font/ctr_font.c @@ -27,7 +27,6 @@ #include "../video_driver.h" #include "../common/ctr_common.h" #include "../drivers/ctr_gu.h" -#include "../../ctr/gpu_old.h" #include "../../verbosity.h" diff --git a/menu/drivers_display/menu_display_ctr.c b/menu/drivers_display/menu_display_ctr.c index d3ec5e88d0..5960fb6ac0 100644 --- a/menu/drivers_display/menu_display_ctr.c +++ b/menu/drivers_display/menu_display_ctr.c @@ -26,7 +26,6 @@ #include "../../gfx/video_driver.h" #include "../../gfx/common/ctr_common.h" #include "../../gfx/drivers/ctr_gu.h" -#include "../../ctr/gpu_old.h" static const float *menu_display_ctr_get_default_vertices(void) { From 0e22aec94713b410b560456e9b0ad8bc9ba7a399 Mon Sep 17 00:00:00 2001 From: meepingsnesroms Date: Sat, 16 Dec 2017 20:47:08 -0800 Subject: [PATCH 2/2] Bugfixes Fix multiple line ending tipes in changed files, use DEVKITARM variable when referencing that directory, add 3ds .lst file to gitignore --- .gitignore | 3 +++ Makefile.ctr | 14 +++++++------- Makefile.ctr.salamander | 12 ++++++------ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 292bff2bbd..a55e30e1b2 100644 --- a/.gitignore +++ b/.gitignore @@ -68,6 +68,9 @@ menu/driverspzarch.c *.rpx wiiu/wut/elf2rpl/elf2rpl +# 3ds +/.lst + # Ctags /tags diff --git a/Makefile.ctr b/Makefile.ctr index 701d87298e..a300a04474 100644 --- a/Makefile.ctr +++ b/Makefile.ctr @@ -152,7 +152,7 @@ $(TARGET): $(TARGET_3DSX) $(TARGET_3DS) $(TARGET_CIA) $(TARGET).core $(TARGET).3dsx: $(TARGET).elf $(TARGET).elf: $(OBJ) libretro_ctr.a -PREFIX := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi- +PREFIX := $(DEVKITARM)/bin/arm-none-eabi- CC := $(PREFIX)gcc CXX := $(PREFIX)g++ @@ -175,13 +175,13 @@ else endif %.o: %.vsh %.gsh - $(DEVKITPRO)/devkitARM/bin/picasso $^ -o $*.shbin - $(DEVKITPRO)/devkitARM/bin/bin2s $*.shbin | $(PREFIX)as -o $@ + $(DEVKITARM)/bin/picasso $^ -o $*.shbin + $(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@ rm $*.shbin %.o: %.vsh - $(DEVKITPRO)/devkitARM/bin/picasso $^ -o $*.shbin - $(DEVKITPRO)/devkitARM/bin/bin2s $*.shbin | $(PREFIX)as -o $@ + $(DEVKITARM)/bin/picasso $^ -o $*.shbin + $(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@ rm $*.shbin %.o: %.cpp @@ -202,7 +202,7 @@ endif %.vsh: $(TARGET).smdh: $(APP_ICON) - $(DEVKITPRO)/devkitARM/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@ + $(DEVKITARM)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@ $(TARGET).3dsx: $(TARGET).elf ifeq ($(APP_BIG_TEXT_SECTION), 1) @@ -210,7 +210,7 @@ ifeq ($(APP_BIG_TEXT_SECTION), 1) else rm -f $(TARGET).xml endif - $(DEVKITPRO)/devkitARM/bin/3dsxtool $< $@ $(_3DSXFLAGS) + $(DEVKITARM)/bin/3dsxtool $< $@ $(_3DSXFLAGS) $(TARGET).elf: ctr/3dsx_custom_crt0.o $(LD) $(LDFLAGS) $(OBJ) $(LIBDIRS) $(LIBS) -o $@ diff --git a/Makefile.ctr.salamander b/Makefile.ctr.salamander index 6c67391f17..d2000812f3 100644 --- a/Makefile.ctr.salamander +++ b/Makefile.ctr.salamander @@ -111,7 +111,7 @@ $(TARGET): $(TARGET_3DSX) $(TARGET_3DS) $(TARGET_CIA) $(TARGET).3dsx: $(TARGET).elf $(TARGET).elf: $(OBJ) -PREFIX := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi- +PREFIX := $(DEVKITARM)/bin/arm-none-eabi- CC := $(PREFIX)gcc CXX := $(PREFIX)g++ @@ -134,13 +134,13 @@ else endif %.o: %.vsh %.gsh - $(DEVKITPRO)/devkitARM/bin/picasso $^ -o $*.shbin - $(DEVKITPRO)/devkitARM/bin/bin2s $*.shbin | $(PREFIX)as -o $@ + $(DEVKITARM)/bin/picasso $^ -o $*.shbin + $(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@ rm $*.shbin %.o: %.vsh - $(DEVKITPRO)/devkitARM/bin/picasso $^ -o $*.shbin - $(DEVKITPRO)/devkitARM/bin/bin2s $*.shbin | $(PREFIX)as -o $@ + $(DEVKITARM)/bin/picasso $^ -o $*.shbin + $(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@ rm $*.shbin %.o: %.cpp @@ -161,7 +161,7 @@ endif %.vsh: $(TARGET).smdh: $(APP_ICON) - $(DEVKITPRO)/devkitARM/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@ + $(DEVKITARM)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@ $(TARGET).3dsx: $(TARGET).elf ifeq ($(APP_BIG_TEXT_SECTION), 1)