Skip to content

Commit

Permalink
constexpr-s the DMA timing tables (melonDS-emu#1489)
Browse files Browse the repository at this point in the history
  • Loading branch information
fixgoats authored Jul 27, 2022
1 parent f5c1094 commit 457dd56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/DMA.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class DMA
bool IsGXFIFODMA;

u32 MRAMBurstCount;
u8* MRAMBurstTable;
const u8* MRAMBurstTable;
};

#endif
10 changes: 5 additions & 5 deletions src/DMA_Timings.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ namespace DMATiming
// setting. Timings are such that the nonseq setting only matters for the first
// access, and minor edge cases (like the last of a 0x20000-byte block).

u8 MRAMDummy[1] = {0};
constexpr u8 MRAMDummy[1] = {0};

u8 MRAMRead16Bursts[][256] =
constexpr u8 MRAMRead16Bursts[][256] =
{
// main RAM to regular 16bit or 32bit bus (similar)
{7, 3, 2, 2, 2, 2, 2, 2, 2, 2,
Expand Down Expand Up @@ -119,7 +119,7 @@ u8 MRAMRead16Bursts[][256] =
0},
};

u8 MRAMRead32Bursts[][256] =
constexpr u8 MRAMRead32Bursts[][256] =
{
// main RAM to regular 16bit bus
{9, 4, 3, 3, 3, 3, 3, 3, 3, 3,
Expand Down Expand Up @@ -178,7 +178,7 @@ u8 MRAMRead32Bursts[][256] =
0},
};

u8 MRAMWrite16Bursts[][256] =
constexpr u8 MRAMWrite16Bursts[][256] =
{
// regular 16bit or 32bit bus to main RAM (similar)
{8, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Expand Down Expand Up @@ -209,7 +209,7 @@ u8 MRAMWrite16Bursts[][256] =
0},
};

u8 MRAMWrite32Bursts[][256] =
constexpr u8 MRAMWrite32Bursts[][256] =
{
// regular 16bit bus to main RAM
{9, 4, 4, 4, 4, 4, 4, 4, 4, 4,
Expand Down

0 comments on commit 457dd56

Please sign in to comment.