From 624df2883a208bc966c35925a0e4b386efed184c Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Fri, 17 Sep 2021 21:22:13 +0200 Subject: [PATCH] Cache accesses to VRAM (I_Flip 3.4x) Really makes you wonder how many hours are really needed to get things to line up properly --- .gitignore | 1 + cgdoom/i_video.c | 2 +- src-cg/platform.h | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8ac81af..21b0da8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ build-cg/ build-sdl2/ wad/ wad-edited/ +notes/ diff --git a/cgdoom/i_video.c b/cgdoom/i_video.c index 164a6b6..e77c74b 100644 --- a/cgdoom/i_video.c +++ b/cgdoom/i_video.c @@ -17,7 +17,7 @@ // $Log:$ // // DESCRIPTION: -// DOOM graphics stuff for Nspire +// DOOM graphics stuff for fx-CG 50 // //----------------------------------------------------------------------------- diff --git a/src-cg/platform.h b/src-cg/platform.h index e0e9386..4a40522 100644 --- a/src-cg/platform.h +++ b/src-cg/platform.h @@ -74,7 +74,9 @@ extern int CGD_TrustUnalignedLumps; use the secondary VRAM as heap. We swap because using the VRAM as heap would cause problems with error screens (stepping through errors would crash). */ #ifdef CGDOOM_DIRECT_R61524 -# define CGDOOM_SCREENS_BASE ((void *)GetVRAMAddress()) +# define CGDOOM_SCREENS_BASE ((void *)( \ + ((uint32_t)GetVRAMAddress() & 0x1fffffff) | 0x80000000 \ + )) #else # define CGDOOM_SCREENS_BASE SaveVRAMBuffer #endif