Port to latest GCC and fix CD loading bug
This commit is contained in:
@@ -29,7 +29,8 @@ namespace JabyEngine {
|
||||
static constexpr auto Value = BitRange::from_to(0, 15);
|
||||
);
|
||||
|
||||
struct __no_align Counter {
|
||||
#pragma pack(push, 1)
|
||||
struct Counter {
|
||||
CounterValue_v value;
|
||||
CounterMode_v mode;
|
||||
CounterTarget_v target;
|
||||
@@ -50,12 +51,14 @@ namespace JabyEngine {
|
||||
this->mode = mode;
|
||||
}
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
static constexpr uintptr_t counter_base_adr(size_t ID) {
|
||||
return (0x1F801100 + (ID*0x10));
|
||||
}
|
||||
|
||||
struct __no_align Counter0_v : public Counter {
|
||||
#pragma pack(push, 1)
|
||||
struct Counter0_v : public Counter {
|
||||
struct SyncMode {
|
||||
static constexpr auto Pause_During_Hblank = CounterMode_v::SyncMode.with(0u);
|
||||
static constexpr auto Zero_At_Hblank = CounterMode_v::SyncMode.with(1u);
|
||||
@@ -71,7 +74,7 @@ namespace JabyEngine {
|
||||
};
|
||||
};
|
||||
|
||||
struct __no_align Counter1_v : public Counter {
|
||||
struct Counter1_v : public Counter {
|
||||
struct SyncMode {
|
||||
static constexpr auto Pause_During_Vblank = CounterMode_v::SyncMode.with(0u);
|
||||
static constexpr auto Zero_At_Vblank = CounterMode_v::SyncMode.with(1u);
|
||||
@@ -87,7 +90,7 @@ namespace JabyEngine {
|
||||
};
|
||||
};
|
||||
|
||||
struct __no_align Counter2_v : public Counter {
|
||||
struct Counter2_v : public Counter {
|
||||
struct SyncMode {
|
||||
static constexpr auto Stop_Counter = CounterMode_v::SyncMode.with(0u);
|
||||
static constexpr auto FreeRun = CounterMode_v::SyncMode.with(1u);
|
||||
@@ -102,6 +105,7 @@ namespace JabyEngine {
|
||||
static constexpr auto System_Clock_Div_8_Too = CounterMode_v::ClockSource.with(3u);
|
||||
};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
__declare_new_io_port(Counter0, counter_base_adr(0));
|
||||
__declare_new_io_port(Counter1, counter_base_adr(1));
|
||||
|
Reference in New Issue
Block a user