Support PAL and NTSC splash image
This commit is contained in:
parent
32e5b55b0a
commit
a0c9be0d2a
|
@ -1 +1,2 @@
|
||||||
src/BootLoader/splash_image_boot.hpp
|
src/BootLoader/splash_image_pal_boot.hpp
|
||||||
|
src/BootLoader/splash_image_ntsc_boot.hpp
|
|
@ -3,7 +3,8 @@ JABY_ENGINE_DIR = ../../
|
||||||
ARTIFACT = libJabyEngine_$(TV_FORMAT)
|
ARTIFACT = libJabyEngine_$(TV_FORMAT)
|
||||||
BUILD_DIR = bin
|
BUILD_DIR = bin
|
||||||
|
|
||||||
SPLASH_IMAGE = src/BootLoader/splash_image_boot.hpp
|
SPLASH_IMAGE = src/BootLoader/splash_image_pal_boot.hpp
|
||||||
|
SPLASH_IMAGE_NTSC = src/BootLoader/splash_image_ntsc_boot.hpp
|
||||||
|
|
||||||
CCFLAGS += -Iinclude -I../../include
|
CCFLAGS += -Iinclude -I../../include
|
||||||
CCFLAGS += -save-temps=obj
|
CCFLAGS += -save-temps=obj
|
||||||
|
@ -24,13 +25,18 @@ $(LIB_DIR)/$(ARTIFACT).a: $(TARGET).a
|
||||||
@mkdir -p $(LIB_DIR)
|
@mkdir -p $(LIB_DIR)
|
||||||
cp $(TARGET).a $(LIB_DIR)/$(ARTIFACT).a
|
cp $(TARGET).a $(LIB_DIR)/$(ARTIFACT).a
|
||||||
|
|
||||||
|
# Improve later
|
||||||
$(SPLASH_IMAGE): ressources/Splash.png
|
$(SPLASH_IMAGE): ressources/Splash.png
|
||||||
jaby_engine_fconv $< simple-tim full16 | cpp_out --name SplashScreen -o $@
|
jaby_engine_fconv $< simple-tim full16 | cpp_out --name SplashScreen -o $@
|
||||||
|
|
||||||
|
$(SPLASH_IMAGE_NTSC): ressources/Splash_ntsc.png
|
||||||
|
jaby_engine_fconv $< simple-tim full16 | cpp_out --name SplashScreen -o $@
|
||||||
|
|
||||||
#Rules section for default compilation and linking
|
#Rules section for default compilation and linking
|
||||||
all: $(SPLASH_IMAGE) $(LIB_DIR)/$(ARTIFACT).a
|
all: $(SPLASH_IMAGE) $(SPLASH_IMAGE_NTSC) $(LIB_DIR)/$(ARTIFACT).a
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -fr $(SPLASH_IMAGE)
|
rm -fr $(SPLASH_IMAGE)
|
||||||
|
rm -fr $(SPLASH_IMAGE_NTSC)
|
||||||
rm -fr $(OUTPUT_DIR)
|
rm -fr $(OUTPUT_DIR)
|
||||||
rm -fr $(LIB_DIR)/$(ARTIFACT).a
|
rm -fr $(LIB_DIR)/$(ARTIFACT).a
|
BIN
src/Library/ressources/Splash.png (Stored with Git LFS)
BIN
src/Library/ressources/Splash.png (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
|
@ -2,14 +2,16 @@
|
||||||
#include <PSX/File/Processor/File_Processor.hpp>
|
#include <PSX/File/Processor/File_Processor.hpp>
|
||||||
#include <PSX/GPU/GPU.hpp>
|
#include <PSX/GPU/GPU.hpp>
|
||||||
|
|
||||||
#include "splash_image_boot.hpp"
|
#ifdef JABYENGINE_PAL
|
||||||
|
#include "splash_image_pal_boot.hpp"
|
||||||
|
#else
|
||||||
|
#include "splash_image_ntsc_boot.hpp"
|
||||||
|
#endif //JABYENGINE_PAL
|
||||||
|
|
||||||
namespace GPU {
|
namespace GPU {
|
||||||
void display_logo() {
|
void display_logo() {
|
||||||
Display::disable();
|
|
||||||
|
|
||||||
// Upload SplashScreen picture
|
// Upload SplashScreen picture
|
||||||
auto state = FileProcessor::create(reinterpret_cast<const uint32_t*>(SplashScreen), SimpleTIM(0, 0, 0, 0));
|
auto state = FileProcessor::create(reinterpret_cast<const uint32_t*>(SplashScreen), SimpleTIM(32, 0, 0, 0));
|
||||||
while(state.process((sizeof(SplashScreen)/sizeof(uint32_t))));
|
while(state.process((sizeof(SplashScreen)/sizeof(uint32_t))));
|
||||||
|
|
||||||
Display::enable();
|
Display::enable();
|
||||||
|
@ -20,6 +22,7 @@ namespace GPU {
|
||||||
Screen::configurate();
|
Screen::configurate();
|
||||||
Screen::exchange_buffer_and_display();
|
Screen::exchange_buffer_and_display();
|
||||||
|
|
||||||
quick_fill_fast(Color24::Black(), PositionU16(0, 0), SizeU16(640, 512));
|
GPU::wait_ready_for_CMD();
|
||||||
|
quick_fill_fast(Color24::Black(), PositionU16(32, 0), SizeU16(Display::Width, Display::Height));
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue