Re-arranged files
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
},
|
||||
"settings": {
|
||||
"C_Cpp.default.includePath": [
|
||||
"include",
|
||||
"../../include"
|
||||
],
|
||||
"C_Cpp.default.compilerPath": "",
|
||||
|
@@ -1,7 +1,7 @@
|
||||
ARTIFACT = libJabyEngine
|
||||
BUILD_DIR = bin
|
||||
|
||||
CCFLAGS += -I../../include
|
||||
CCFLAGS += -Iinclude -I../../include
|
||||
CCFLAGS += -save-temps=obj
|
||||
|
||||
include ../../lib/Wildcard.mk
|
||||
|
8
src/Library/include/BootLoader/boot_loader.hpp
Normal file
8
src/Library/include/BootLoader/boot_loader.hpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef BOOT_LOADER_HPP
|
||||
#define BOOT_LOADER_HPP
|
||||
|
||||
namespace SPU {
|
||||
void setup();
|
||||
}
|
||||
|
||||
#endif //!BOOT_LOADER_HPP
|
26
src/Library/src/BootLoader/boot_spu.cpp
Normal file
26
src/Library/src/BootLoader/boot_spu.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <PSX/System/IOPorts/SPU_IO.hpp>
|
||||
|
||||
namespace SPU {
|
||||
static void clear_voice(Voice& voice) {
|
||||
io_class__volatile_assign(voice.volumeLeft, SweepVolume());
|
||||
io_class__volatile_assign(voice.volumeRight, SweepVolume());
|
||||
|
||||
io_class__volatile_assign(voice.sampleRate, SampleRate::from_HZ(0.0));
|
||||
io_class__volatile_assign(voice.adsr, ADSR());
|
||||
io_class__volatile_assign(voice.currentVolume, SweepVolume());
|
||||
|
||||
voice.adr = 0x200;
|
||||
voice.repeatAdr = 0x200;
|
||||
}
|
||||
|
||||
void setup() {
|
||||
static constexpr auto StartVol = SweepVolume().set_volume_mode().set_volume_percent(50.0);
|
||||
|
||||
io_class__volatile_assign(MainVolume::Left, StartVol);
|
||||
io_class__volatile_assign(MainVolume::Right, StartVol);
|
||||
|
||||
for(auto& voice : Voice::Channel) {
|
||||
clear_voice(voice);
|
||||
}
|
||||
}
|
||||
}
|
11
src/Library/src/BootLoader/boot_start.cpp
Normal file
11
src/Library/src/BootLoader/boot_start.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "BootLoader/boot_loader.hpp"
|
||||
#include <stdio.h>
|
||||
|
||||
namespace JabyEngine {
|
||||
void start() {
|
||||
printf("Hello Planschbecken\n");
|
||||
|
||||
SPU::setup();
|
||||
printf("Setup done!\n");
|
||||
}
|
||||
}
|
@@ -1,36 +0,0 @@
|
||||
#include <PSX/SPU/SPU_Ports.hpp>
|
||||
#include <stdio.h>
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace SPU {
|
||||
static void clear_voice(::SPU::Voice& voice) {
|
||||
io_class__volatile_assign(voice.volumeLeft, ::SPU::SweepVolume());
|
||||
io_class__volatile_assign(voice.volumeRight, ::SPU::SweepVolume());
|
||||
|
||||
io_class__volatile_assign(voice.sampleRate, ::SPU::SampleRate::from_HZ(0.0));
|
||||
io_class__volatile_assign(voice.adsr, ::SPU::ADSR());
|
||||
io_class__volatile_assign(voice.currentVolume, ::SPU::SweepVolume());
|
||||
|
||||
voice.adr = 0x200;
|
||||
voice.repeatAdr = 0x200;
|
||||
}
|
||||
|
||||
static void setup() {
|
||||
static constexpr auto StartVol = ::SPU::SweepVolume().set_volume_mode().set_volume_percent(50.0);
|
||||
|
||||
io_class__volatile_assign(::SPU::MainVolume::Left, StartVol);
|
||||
io_class__volatile_assign(::SPU::MainVolume::Right, StartVol);
|
||||
|
||||
for(auto& voice : ::SPU::Voice::Channel) {
|
||||
clear_voice(voice);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void start() {
|
||||
printf("Hello Planschbecken\n");
|
||||
|
||||
SPU::setup();
|
||||
printf("Setup done!\n");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user