Simulated load of a file

This commit is contained in:
2023-03-03 14:33:29 +01:00
parent c7923c245c
commit 45371bc2f0
7 changed files with 106 additions and 38 deletions

View File

@@ -4,6 +4,18 @@
namespace JabyEngine {
namespace CD_IO {
struct DataSector {
static constexpr size_t SizeBytes = 2048;
static constexpr size_t SizeWords = (SizeBytes/sizeof(uint32_t));
uint32_t data[SizeWords];
template<typename T>
static constexpr T words_to_sectors(T size) {
return (size + static_cast<T>(DataSector::SizeWords - 1))/static_cast<T>(DataSector::SizeWords);
}
};
enum Index {
Index0 = 0,
Index1 = 1,