****************************************************************************/
void PMAPI PM_init(void)
{
- // TODO: dO any special init code in here.
+ /* TODO: dO any special init code in here. */
MTRR_init();
}
{
uint pos = strlen(s);
if (s[pos-1] != '\\') {
- s[pos] = '\\';
- s[pos+1] = '\0';
- }
+ s[pos] = '\\';
+ s[pos+1] = '\0';
+ }
}
/****************************************************************************
const char *msg)
{
if (fatalErrorCleanup)
- fatalErrorCleanup();
- // TODO: Display a fatal error message and exit!
-// MessageBox(NULL,msg,"Fatal Error!", MB_ICONEXCLAMATION);
+ fatalErrorCleanup();
+ /* TODO: Display a fatal error message and exit! */
+/* MessageBox(NULL,msg,"Fatal Error!", MB_ICONEXCLAMATION); */
exit(1);
}
****************************************************************************/
int PMAPI PM_kbhit(void)
{
- // TODO: Need to check if a key is waiting on the keyboard queue
+ /* TODO: Need to check if a key is waiting on the keyboard queue */
return true;
}
****************************************************************************/
int PMAPI PM_getch(void)
{
- // TODO: Need to obtain the next keypress, and block until one is hit
+ /* TODO: Need to obtain the next keypress, and block until one is hit */
return 0xD;
}
****************************************************************************/
const char * PMAPI PM_getNucleusPath(void)
{
- // TODO: Point this at the path when the Nucleus drivers will be found
+ /* TODO: Point this at the path when the Nucleus drivers will be found */
return "c:\\nucleus";
}
{
static void *bankPtr;
if (!bankPtr)
- bankPtr = PM_mapPhysicalAddr(0xA0000,0xFFFF,true);
+ bankPtr = PM_mapPhysicalAddr(0xA0000,0xFFFF,true);
return bankPtr;
}
ulong limit,
ibool isCached)
{
- // TODO: Map a physical memory address to a linear address
+ /* TODO: Map a physical memory address to a linear address */
return NULL;
}
void *ptr,
ulong limit)
{
- // TODO: Free the physical address mapping
+ /* TODO: Free the physical address mapping */
}
ulong PMAPI PM_getPhysicalAddr(void *p)
{
- // TODO: This function should find the physical address of a linear
- // address.
+ /* TODO: This function should find the physical address of a linear */
+ /* address. */
return 0xFFFFFFFFUL;
}
int PMAPI PM_getCOMPort(int port)
{
- // TODO: Re-code this to determine real values using the Plug and Play
- // manager for the OS.
+ /* TODO: Re-code this to determine real values using the Plug and Play */
+ /* manager for the OS. */
switch (port) {
- case 0: return 0x3F8;
- case 1: return 0x2F8;
- }
+ case 0: return 0x3F8;
+ case 1: return 0x2F8;
+ }
return 0;
}
int PMAPI PM_getLPTPort(int port)
{
- // TODO: Re-code this to determine real values using the Plug and Play
- // manager for the OS.
+ /* TODO: Re-code this to determine real values using the Plug and Play */
+ /* manager for the OS. */
switch (port) {
- case 0: return 0x3BC;
- case 1: return 0x378;
- case 2: return 0x278;
- }
+ case 0: return 0x3BC;
+ case 1: return 0x378;
+ case 2: return 0x278;
+ }
return 0;
}
ulong *physical,
ulong *total)
{
- // TODO: Figure out how to determine the available memory. Not entirely
- // critical so returning 0 is OK.
+ /* TODO: Figure out how to determine the available memory. Not entirely */
+ /* critical so returning 0 is OK. */
*physical = *total = 0;
}
ibool contiguous,
ibool below16M)
{
- // TODO: Allocate a block of locked, phsyically contigous memory for DMA
+ /* TODO: Allocate a block of locked, phsyically contigous memory for DMA */
return 0;
}
void PMAPI PM_freeLockedMem(
void *p,
uint size,
-
+
ibool contiguous)
{
- // TODO: Free a locked memory buffer
+ /* TODO: Free a locked memory buffer */
}
/****************************************************************************
PM_MODULE PMAPI PM_loadLibrary(
const char *szDLLName)
{
- // TODO: Implement this to load shared libraries!
+ /* TODO: Implement this to load shared libraries! */
(void)szDLLName;
return NULL;
}
PM_MODULE hModule,
const char *szProcName)
{
- // TODO: Implement this!
+ /* TODO: Implement this! */
(void)hModule;
(void)szProcName;
return NULL;
void PMAPI PM_freeLibrary(
PM_MODULE hModule)
{
- // TODO: Implement this!
+ /* TODO: Implement this! */
(void)hModule;
}
const char *filename,
PM_findData *findData)
{
- // TODO: This function should start a directory enumeration search
- // given the filename (with wildcards). The data should be
- // converted and returned in the findData standard form.
+ /* TODO: This function should start a directory enumeration search */
+ /* given the filename (with wildcards). The data should be */
+ /* converted and returned in the findData standard form. */
(void)filename;
(void)findData;
return PM_FILE_INVALID;
ulong handle,
PM_findData *findData)
{
- // TODO: This function should find the next file in directory enumeration
- // search given the search criteria defined in the call to
- // PM_findFirstFile. The data should be converted and returned
- // in the findData standard form.
+ /* TODO: This function should find the next file in directory enumeration */
+ /* search given the search criteria defined in the call to */
+ /* PM_findFirstFile. The data should be converted and returned */
+ /* in the findData standard form. */
(void)handle;
(void)findData;
return false;
void PMAPI PM_findClose(
ulong handle)
{
- // TODO: This function should close the find process. This may do
- // nothing for some OS'es.
+ /* TODO: This function should close the find process. This may do */
+ /* nothing for some OS'es. */
(void)handle;
}
char drive)
{
if (drive == 3)
- return true;
+ return true;
return false;
}
const char *filename,
uint attrib)
{
- // TODO: Set the file attributes for a file
+ /* TODO: Set the file attributes for a file */
(void)filename;
(void)attrib;
}