From 4c4f1cafad85e7b4ee1306ba40070584ed5ae755 Mon Sep 17 00:00:00 2001 From: Jaby Date: Mon, 12 Dec 2022 03:43:18 +0100 Subject: [PATCH] Prepare CD code and unify header names --- .../PSX/File/Processor/cd_file_processor.hpp | 8 ++++++++ .../{File_Processor.hpp => file_processor.hpp} | 2 +- include/PSX/File/cd_file_types.hpp | 6 ++++++ .../File/{File_Types.hpp => file_types.hpp} | 0 include/PSX/GPU/{GPU.hpp => gpu.hpp} | 2 +- .../PSX/GPU/{GPU_Types.hpp => gpu_types.hpp} | 0 .../System/IOPorts/{DMA_IO.hpp => dma_io.hpp} | 2 +- .../System/IOPorts/{GPU_IO.hpp => gpu_io.hpp} | 4 ++-- .../System/IOPorts/{IOPort.hpp => ioport.hpp} | 0 .../System/IOPorts/{SPU_IO.hpp => spu_io.hpp} | 2 +- .../System/{Scratchpad.hpp => scratchpad.hpp} | 0 src/Library/include/CD/cd.hpp | 18 ++++++++++++++++++ src/Library/include/GPU/{GPU.hpp => gpu.hpp} | 6 +++--- src/Library/src/BootLoader/gpu_boot.cpp | 6 +++--- src/Library/src/BootLoader/spu_boot.cpp | 2 +- src/Library/src/BootLoader/start_boot.cpp | 2 +- .../src/File/Processor/SimpleHelper.hpp | 2 +- .../src/File/Processor/TIM_Processor.cpp | 2 +- src/Library/src/GPU/GPU.cpp | 2 +- 19 files changed, 49 insertions(+), 17 deletions(-) create mode 100644 include/PSX/File/Processor/cd_file_processor.hpp rename include/PSX/File/Processor/{File_Processor.hpp => file_processor.hpp} (95%) create mode 100644 include/PSX/File/cd_file_types.hpp rename include/PSX/File/{File_Types.hpp => file_types.hpp} (100%) rename include/PSX/GPU/{GPU.hpp => gpu.hpp} (93%) rename include/PSX/GPU/{GPU_Types.hpp => gpu_types.hpp} (100%) rename include/PSX/System/IOPorts/{DMA_IO.hpp => dma_io.hpp} (98%) rename include/PSX/System/IOPorts/{GPU_IO.hpp => gpu_io.hpp} (98%) rename include/PSX/System/IOPorts/{IOPort.hpp => ioport.hpp} (100%) rename include/PSX/System/IOPorts/{SPU_IO.hpp => spu_io.hpp} (99%) rename include/PSX/System/{Scratchpad.hpp => scratchpad.hpp} (100%) create mode 100644 src/Library/include/CD/cd.hpp rename src/Library/include/GPU/{GPU.hpp => gpu.hpp} (96%) diff --git a/include/PSX/File/Processor/cd_file_processor.hpp b/include/PSX/File/Processor/cd_file_processor.hpp new file mode 100644 index 00000000..3d15f9aa --- /dev/null +++ b/include/PSX/File/Processor/cd_file_processor.hpp @@ -0,0 +1,8 @@ +#ifndef __JABYENGINE_CD_FILE_PROCESSOR_HPP__ +#define __JABYENGINE_CD_FILE_PROCESSOR_HPP__ + +// This will be used as the file processor but will work on cd types +// Will probably use file_processor +// Will also setup the circular buffer for the CD code + +#endif //!__JABYENGINE_CD_FILE_PROCESSOR_HPP__ \ No newline at end of file diff --git a/include/PSX/File/Processor/File_Processor.hpp b/include/PSX/File/Processor/file_processor.hpp similarity index 95% rename from include/PSX/File/Processor/File_Processor.hpp rename to include/PSX/File/Processor/file_processor.hpp index 4242ff4e..602c6348 100644 --- a/include/PSX/File/Processor/File_Processor.hpp +++ b/include/PSX/File/Processor/file_processor.hpp @@ -1,6 +1,6 @@ #ifndef __JABYENGINE_FILE_PROCESSOR_HPP__ #define __JABYENGINE_FILE_PROCESSOR_HPP__ -#include "../File_Types.hpp" +#include "../file_types.hpp" namespace FileProcessor { class State { diff --git a/include/PSX/File/cd_file_types.hpp b/include/PSX/File/cd_file_types.hpp new file mode 100644 index 00000000..21729413 --- /dev/null +++ b/include/PSX/File/cd_file_types.hpp @@ -0,0 +1,6 @@ +#ifndef __JABYENGINE_CD_FILE_TYPES_HPP__ +#define __JABYENGINE_CD_FILE_TYPES_HPP__ + +// Will extend the file_types for using cd types + +#endif //!__JABYENGINE_CD_FILE_TYPES_HPP__ \ No newline at end of file diff --git a/include/PSX/File/File_Types.hpp b/include/PSX/File/file_types.hpp similarity index 100% rename from include/PSX/File/File_Types.hpp rename to include/PSX/File/file_types.hpp diff --git a/include/PSX/GPU/GPU.hpp b/include/PSX/GPU/gpu.hpp similarity index 93% rename from include/PSX/GPU/GPU.hpp rename to include/PSX/GPU/gpu.hpp index 698532a3..ffe2eb47 100644 --- a/include/PSX/GPU/GPU.hpp +++ b/include/PSX/GPU/gpu.hpp @@ -1,6 +1,6 @@ #ifndef __JABYENGINE_GPU_HPP__ #define __JABYENGINE_GPU_HPP__ -#include "../System/IOPorts/GPU_IO.hpp" +#include "../System/IOPorts/gpu_io.hpp" #if !defined(JABYENGINE_NTSC) && !defined(JABYENGINE_PAL) #error "JABYENGINE_NTSC or JABYENGINE_PAL must be defined" diff --git a/include/PSX/GPU/GPU_Types.hpp b/include/PSX/GPU/gpu_types.hpp similarity index 100% rename from include/PSX/GPU/GPU_Types.hpp rename to include/PSX/GPU/gpu_types.hpp diff --git a/include/PSX/System/IOPorts/DMA_IO.hpp b/include/PSX/System/IOPorts/dma_io.hpp similarity index 98% rename from include/PSX/System/IOPorts/DMA_IO.hpp rename to include/PSX/System/IOPorts/dma_io.hpp index b9bac2f7..b5e30c8a 100644 --- a/include/PSX/System/IOPorts/DMA_IO.hpp +++ b/include/PSX/System/IOPorts/dma_io.hpp @@ -1,6 +1,6 @@ #ifndef __JABYENGINE_DMA_IO_HPP__ #define __JABYENGINE_DMA_IO_HPP__ -#include "IOPort.hpp" +#include "ioport.hpp" namespace DMA { struct __no_align MADR : public ComplexBitMap { diff --git a/include/PSX/System/IOPorts/GPU_IO.hpp b/include/PSX/System/IOPorts/gpu_io.hpp similarity index 98% rename from include/PSX/System/IOPorts/GPU_IO.hpp rename to include/PSX/System/IOPorts/gpu_io.hpp index a076e437..c2b92dcb 100644 --- a/include/PSX/System/IOPorts/GPU_IO.hpp +++ b/include/PSX/System/IOPorts/gpu_io.hpp @@ -1,7 +1,7 @@ #ifndef __JABYENGINE_GPU_IO_HPP__ #define __JABYENGINE_GPU_IO_HPP__ -#include "IOPort.hpp" -#include "../../GPU/GPU_Types.hpp" +#include "ioport.hpp" +#include "../../GPU/gpu_types.hpp" namespace GPU { enum struct SemiTransparency { diff --git a/include/PSX/System/IOPorts/IOPort.hpp b/include/PSX/System/IOPorts/ioport.hpp similarity index 100% rename from include/PSX/System/IOPorts/IOPort.hpp rename to include/PSX/System/IOPorts/ioport.hpp diff --git a/include/PSX/System/IOPorts/SPU_IO.hpp b/include/PSX/System/IOPorts/spu_io.hpp similarity index 99% rename from include/PSX/System/IOPorts/SPU_IO.hpp rename to include/PSX/System/IOPorts/spu_io.hpp index 13cd5815..18b36ee1 100644 --- a/include/PSX/System/IOPorts/SPU_IO.hpp +++ b/include/PSX/System/IOPorts/spu_io.hpp @@ -1,6 +1,6 @@ #ifndef __JABYENGINE_SPU_IO_HPP__ #define __JABYENGINE_SPU_IO_HPP__ -#include "IOPort.hpp" +#include "ioport.hpp" namespace SPU { enum struct Mode { diff --git a/include/PSX/System/Scratchpad.hpp b/include/PSX/System/scratchpad.hpp similarity index 100% rename from include/PSX/System/Scratchpad.hpp rename to include/PSX/System/scratchpad.hpp diff --git a/src/Library/include/CD/cd.hpp b/src/Library/include/CD/cd.hpp new file mode 100644 index 00000000..27a8e3d6 --- /dev/null +++ b/src/Library/include/CD/cd.hpp @@ -0,0 +1,18 @@ +#ifndef __JABYENGINE_CD_HPP__ +#define __JABYENGINE_CD_HPP__ +#include + +namespace CD { + namespace CircularBuffer { + extern uint8_t* write_ptr; + extern uint8_t* read_ptr; + extern uint8_t* end_ptr; + } + + enum struct State { + }; + + extern State state; +} + +#endif //!__JABYENGINE_CD_HPP__ \ No newline at end of file diff --git a/src/Library/include/GPU/GPU.hpp b/src/Library/include/GPU/gpu.hpp similarity index 96% rename from src/Library/include/GPU/GPU.hpp rename to src/Library/include/GPU/gpu.hpp index bddb7c4d..6092211a 100644 --- a/src/Library/include/GPU/GPU.hpp +++ b/src/Library/include/GPU/gpu.hpp @@ -1,8 +1,8 @@ #ifndef __JABYENGINE_INTERNAL_GPU_HPP__ #define __JABYENGINE_INTERNAL_GPU_HPP__ -#include -#include -#include +#include +#include +#include namespace GPU { namespace Screen { diff --git a/src/Library/src/BootLoader/gpu_boot.cpp b/src/Library/src/BootLoader/gpu_boot.cpp index 106aef30..dd0d9841 100644 --- a/src/Library/src/BootLoader/gpu_boot.cpp +++ b/src/Library/src/BootLoader/gpu_boot.cpp @@ -1,6 +1,6 @@ -#include "../../include/GPU/GPU.hpp" -#include -#include +#include "../../include/GPU/gpu.hpp" +#include +#include #ifdef JABYENGINE_PAL #include "splash_image_pal_boot.hpp" diff --git a/src/Library/src/BootLoader/spu_boot.cpp b/src/Library/src/BootLoader/spu_boot.cpp index 30035371..723550fb 100644 --- a/src/Library/src/BootLoader/spu_boot.cpp +++ b/src/Library/src/BootLoader/spu_boot.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/Library/src/BootLoader/start_boot.cpp b/src/Library/src/BootLoader/start_boot.cpp index 4bd30783..4e949a86 100644 --- a/src/Library/src/BootLoader/start_boot.cpp +++ b/src/Library/src/BootLoader/start_boot.cpp @@ -1,5 +1,5 @@ #include "BootLoader/boot_loader.hpp" -#include +#include #include extern int main(); diff --git a/src/Library/src/File/Processor/SimpleHelper.hpp b/src/Library/src/File/Processor/SimpleHelper.hpp index e6cfdb37..2df13aac 100644 --- a/src/Library/src/File/Processor/SimpleHelper.hpp +++ b/src/Library/src/File/Processor/SimpleHelper.hpp @@ -1,7 +1,7 @@ #ifndef __JABYENGINE_INTERNAL_SIMPLE_HELPER_HPP__ #define __JABYENGINE_INTERNAL_SIMPLE_HELPER_HPP__ #define private public -#include +#include namespace FileProcessor { namespace Helper { diff --git a/src/Library/src/File/Processor/TIM_Processor.cpp b/src/Library/src/File/Processor/TIM_Processor.cpp index c2fc81e5..db40c4c8 100644 --- a/src/Library/src/File/Processor/TIM_Processor.cpp +++ b/src/Library/src/File/Processor/TIM_Processor.cpp @@ -1,4 +1,4 @@ -#include "../../../include/GPU/GPU.hpp" +#include "../../../include/GPU/gpu.hpp" #include "SimpleHelper.hpp" #include #include diff --git a/src/Library/src/GPU/GPU.cpp b/src/Library/src/GPU/GPU.cpp index 1aeaea3f..2e2428cf 100644 --- a/src/Library/src/GPU/GPU.cpp +++ b/src/Library/src/GPU/GPU.cpp @@ -1,4 +1,4 @@ -#include "../include/GPU/GPU.hpp" +#include "../include/GPU/gpu.hpp" namespace GPU { namespace Screen {