[nostaliga/core/gba] Cleanup
This commit is contained in:
parent
0a0476e4ce
commit
439da668ae
@ -4,10 +4,11 @@
|
|||||||
|
|
||||||
#include <ox/fs/fs.hpp>
|
#include <ox/fs/fs.hpp>
|
||||||
#include <ox/std/std.hpp>
|
#include <ox/std/std.hpp>
|
||||||
#include "addresses.hpp"
|
|
||||||
|
|
||||||
#include "../media.hpp"
|
#include "../media.hpp"
|
||||||
|
|
||||||
|
#include "addresses.hpp"
|
||||||
|
|
||||||
namespace nostalgia::core {
|
namespace nostalgia::core {
|
||||||
|
|
||||||
ox::Result<char*> loadRom(const char*) noexcept {
|
ox::Result<char*> loadRom(const char*) noexcept {
|
||||||
@ -18,7 +19,6 @@ ox::Result<char*> loadRom(const char*) noexcept {
|
|||||||
constexpr auto headerP1Len = 15;
|
constexpr auto headerP1Len = 15;
|
||||||
constexpr auto headerP2Len = 16;
|
constexpr auto headerP2Len = 16;
|
||||||
constexpr auto headerLen = headerP1Len + headerP2Len + 1;
|
constexpr auto headerLen = headerP1Len + headerP2Len + 1;
|
||||||
|
|
||||||
for (auto current = MEM_ROM; current < reinterpret_cast<char*>(0x0a000000); current += headerLen) {
|
for (auto current = MEM_ROM; current < reinterpret_cast<char*>(0x0a000000); current += headerLen) {
|
||||||
if (ox_memcmp(current, headerP1, headerP1Len) == 0 &&
|
if (ox_memcmp(current, headerP1, headerP1Len) == 0 &&
|
||||||
ox_memcmp(current + headerP1Len, headerP2, headerP2Len) == 0) {
|
ox_memcmp(current + headerP1Len, headerP2, headerP2Len) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user