Split in ROM sectors of 512 bytes instead of clusters of 4 kiB

This makes the search quite a bit slower, I'll look into that later.
This commit is contained in:
Lephenixnoir 2021-07-26 17:24:28 +02:00
parent e52f315de2
commit f869f45d0d
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
3 changed files with 7 additions and 6 deletions

View File

@ -88,11 +88,11 @@ extern TSysCallFuncPtr fnSysCallFuncPtr;
#define ASSERT(x)
//flash file mapping
#define FLASH_START (0xA0B60000) //0x80000000 //0xA0000000
#define FLASH_START (0xA0000000)
#define FLASH_END (0xA2000000)
//page has 4 KB (I hope)
#define FLASH_PAGE_SIZE 4096
#define FLASH_PAGE_SIZE_LOG2 12
//Lephe: Yatis established that allocation is in sectors of 512 bytes
#define FLASH_PAGE_SIZE 512
#define FLASH_PAGE_SIZE_LOG2 9
#define FLASH_PAGE_OFFSET_MASK (FLASH_PAGE_SIZE - 1)
//

1
README
View File

@ -11,6 +11,7 @@ TODO:
-> HUD glitches?
-> Try and use more memory regions in z_zone.c
-> Overclocking etc.
-> Improve file mapping speed
CGDOOM used to be compiled with the mini-SDK. However, it's become quite
difficult to get a copy of that. Instead, this port is built with a slightly

View File

@ -301,7 +301,7 @@ const unsigned short wadfile[] = {'\\','\\','f','l','s','0','\\','d','o','o','m'
//descriptor for 1 fragment
typedef struct
{
short msOffset;//page index (0 ~ 8K)
unsigned short msOffset;//page index (0 ~ 64K)
short msCount;//count of pages in this fragment
}FileMappingItem;
@ -400,7 +400,7 @@ int CreateFileMapping(const unsigned short *pFileName,FileMapping *pMap){
iResult = -3;
goto lbExit;
}
pMap->mTable[pMap->miItemCount-1].msOffset = (short)iPageIndx;
pMap->mTable[pMap->miItemCount-1].msOffset = (unsigned short)iPageIndx;
pMap->mTable[pMap->miItemCount-1].msCount = 0;
//assume fragment has more pages
for(;;)