diff options
Diffstat (limited to 'board/MAI/bios_emulator/scitech/src/biosemu/biosemu.c')
-rw-r--r-- | board/MAI/bios_emulator/scitech/src/biosemu/biosemu.c | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/board/MAI/bios_emulator/scitech/src/biosemu/biosemu.c b/board/MAI/bios_emulator/scitech/src/biosemu/biosemu.c index ed2717c218e..0052709cc67 100644 --- a/board/MAI/bios_emulator/scitech/src/biosemu/biosemu.c +++ b/board/MAI/bios_emulator/scitech/src/biosemu/biosemu.c @@ -100,9 +100,9 @@ ibool PMAPI BE_init( #endif memset(&M,0,sizeof(M)); if (memSize < 20480) - PM_fatalError("Emulator requires at least 20Kb of memory!\n"); + PM_fatalError("Emulator requires at least 20Kb of memory!\n"); if ((M.mem_base = (unsigned long)malloc(memSize)) == NULL) - PM_fatalError("Out of memory!"); + PM_fatalError("Out of memory!"); M.mem_size = memSize; _BE_env.busmem_base = (ulong)PM_mapPhysicalAddr(0xA0000,0x5FFFF,true); M.x86.debug = debugFlags; @@ -144,15 +144,15 @@ void PMAPI BE_setVGA( _BE_env.vgaInfo.pciInfo = info->pciInfo; _BE_env.vgaInfo.BIOSImage = info->BIOSImage; if (info->BIOSImage) { - _BE_env.biosmem_base = (ulong)info->BIOSImage; - _BE_env.biosmem_limit = 0xC0000 + info->BIOSImageLen-1; - } + _BE_env.biosmem_base = (ulong)info->BIOSImage; + _BE_env.biosmem_limit = 0xC0000 + info->BIOSImageLen-1; + } else { - _BE_env.biosmem_base = _BE_env.busmem_base + 0x20000; - _BE_env.biosmem_limit = 0xC7FFF; - } + _BE_env.biosmem_base = _BE_env.busmem_base + 0x20000; + _BE_env.biosmem_limit = 0xC7FFF; + } if (*((u32*)info->LowMem) == 0) - _BE_bios_init((u32*)info->LowMem); + _BE_bios_init((u32*)info->LowMem); memcpy((u8*)M.mem_base,info->LowMem,sizeof(info->LowMem)); } @@ -182,8 +182,8 @@ This function maps a real mode pointer in the emulator memory to a protected mode pointer that can be used to directly access the memory. NOTE: The memory is *always* in little endian format, son on non-x86 - systems you will need to do endian translations to access this - memory. + systems you will need to do endian translations to access this + memory. ****************************************************************************/ void * PMAPI BE_mapRealPointer( uint r_seg, @@ -192,11 +192,11 @@ void * PMAPI BE_mapRealPointer( u32 addr = ((u32)r_seg << 4) + r_off; if (addr >= 0xC0000 && addr <= _BE_env.biosmem_limit) { - return (void*)(_BE_env.biosmem_base + addr - 0xC0000); - } + return (void*)(_BE_env.biosmem_base + addr - 0xC0000); + } else if (addr >= 0xA0000 && addr <= 0xFFFFF) { - return (void*)(_BE_env.busmem_base + addr - 0xA0000); - } + return (void*)(_BE_env.busmem_base + addr - 0xA0000); + } return (void*)(M.mem_base + addr); } @@ -213,8 +213,8 @@ and located at 15Kb into the start of the real mode memory (16Kb is where we put the real mode code we execute for issuing interrupts). NOTE: The memory is *always* in little endian format, son on non-x86 - systems you will need to do endian translations to access this - memory. + systems you will need to do endian translations to access this + memory. ****************************************************************************/ void * PMAPI BE_getVESABuf( uint *len, @@ -416,28 +416,28 @@ BE_exports * _CEXPORT BE_initLibrary( PM_imports *pmImp) { static BE_exports _BE_exports = { - sizeof(BE_exports), - BE_init, - BE_setVGA, - BE_getVGA, - BE_mapRealPointer, - BE_getVESABuf, - BE_callRealMode, - BE_int86, - BE_int86x, - NULL, - BE_exit, - }; + sizeof(BE_exports), + BE_init, + BE_setVGA, + BE_getVGA, + BE_mapRealPointer, + BE_getVESABuf, + BE_callRealMode, + BE_int86, + BE_int86x, + NULL, + BE_exit, + }; int i,max; ulong *p; - // Initialize all default imports to point to fatal error handler - // for upwards compatibility. + /* Initialize all default imports to point to fatal error handler */ + /* for upwards compatibility. */ max = sizeof(_PM_imports)/sizeof(BE_initLibrary_t); for (i = 0,p = (ulong*)&_PM_imports; i < max; i++) - *p++ = (ulong)_PM_fatalErrorHandler; + *p++ = (ulong)_PM_fatalErrorHandler; - // Now copy all our imported functions + /* Now copy all our imported functions */ memcpy(&_PM_imports,pmImp,MIN(sizeof(_PM_imports),pmImp->dwSize)); return &_BE_exports; } |