Simulated load of a file
This commit is contained in:
@@ -1,16 +1,24 @@
|
||||
#ifndef __JABYENGINE_CD_INTERNAL_HPP__
|
||||
#define __JABYENGINE_CD_INTERNAL_HPP__
|
||||
#include "cd_types.hpp"
|
||||
#include <PSX/System/IOPorts/cd_io.hpp>
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace CD {
|
||||
namespace internal {
|
||||
extern VolatilePOD<CD_IO::Interrupt::Type> last_interrupt;
|
||||
extern CD_IO::Interrupt::Type last_interrupt;
|
||||
extern State current_state;
|
||||
|
||||
static CD_IO::Interrupt::Type read_last_interrupt() {
|
||||
return const_cast<volatile CD_IO::Interrupt::Type&>(last_interrupt);
|
||||
}
|
||||
|
||||
static State read_current_state() {
|
||||
return const_cast<volatile State&>(current_state);
|
||||
}
|
||||
|
||||
struct Command {
|
||||
static void wait_until(CD_IO::Interrupt::Type irq) {
|
||||
while(last_interrupt.read() != irq);
|
||||
while(read_last_interrupt() != irq);
|
||||
}
|
||||
|
||||
template<typename...ARGS>
|
||||
@@ -38,7 +46,7 @@ namespace JabyEngine {
|
||||
}
|
||||
};
|
||||
|
||||
State read_file(FileInfo file_info, const SectorBufferAllocator& buffer_allocator);
|
||||
void read_file(FileInfo file_info, const SectorBufferAllocator& buffer_allocator);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user