Spelling fixes for src dir

Note: large parts of libs, in particular libs/decoders were skipped
This commit is contained in:
Robert de Rooy 2022-09-03 14:00:42 +02:00
parent 69ffc82ef7
commit 575eac06bd
79 changed files with 155 additions and 155 deletions

View File

@ -46,7 +46,7 @@
if (!(inst.prefix & PREFIX_REP)) { if (!(inst.prefix & PREFIX_REP)) {
count=1; count=1;
} else { } else {
/* we allow the user to cap our count as a way of making REP string operations interruptable (and at what granularity) */ /* we allow the user to cap our count as a way of making REP string operations interruptible (and at what granularity) */
/* NTS: This condition is less important now that the loops themselves break when CPU_Cycles <= 0. when this code was /* NTS: This condition is less important now that the loops themselves break when CPU_Cycles <= 0. when this code was
* initially implemented the string ops stubbornly counted through the bytes regardless of pending interrupts and * initially implemented the string ops stubbornly counted through the bytes regardless of pending interrupts and
* it caused problems with code that needed fine timing i.e. demos that played music through the LPT DAC while * it caused problems with code that needed fine timing i.e. demos that played music through the LPT DAC while

View File

@ -55,7 +55,7 @@ void DoString(STRING_OP type) {
count=1; count=1;
} }
else { else {
/* we allow the user to cap our count as a way of making REP string operations interruptable (and at what granularity) */ /* we allow the user to cap our count as a way of making REP string operations interruptible (and at what granularity) */
/* NTS: This condition is less important now that the loops themselves break when CPU_Cycles <= 0. when this code was /* NTS: This condition is less important now that the loops themselves break when CPU_Cycles <= 0. when this code was
* initially implemented the string ops stubbornly counted through the bytes regardless of pending interrupts and * initially implemented the string ops stubbornly counted through the bytes regardless of pending interrupts and
* it caused problems with code that needed fine timing i.e. demos that played music through the LPT DAC while * it caused problems with code that needed fine timing i.e. demos that played music through the LPT DAC while

View File

@ -5447,7 +5447,7 @@ private:
else if (isdigit(letter)) { /* DOSBox-X: drives mounted by number (INT 13h) can be unmounted this way */ else if (isdigit(letter)) { /* DOSBox-X: drives mounted by number (INT 13h) can be unmounted this way */
int index = letter - '0'; int index = letter - '0';
//detatch hard drive or floppy drive from bios and ide controller //detach hard drive or floppy drive from bios and ide controller
if (index < MAX_DISK_IMAGES && imageDiskList[index]) { if (index < MAX_DISK_IMAGES && imageDiskList[index]) {
if (index > 1) IDE_Hard_Disk_Detach(index); if (index > 1) IDE_Hard_Disk_Detach(index);
imageDiskList[index]->Release(); imageDiskList[index]->Release();

View File

@ -161,7 +161,7 @@
//*************************************************************************** //***************************************************************************
#define SCSI_GETDBSTAT 0x34 // Get Data Buffer Status (O) #define SCSI_GETDBSTAT 0x34 // Get Data Buffer Status (O)
#define SCSI_GETWINDOW 0x25 // Get Window (O) #define SCSI_GETWINDOW 0x25 // Get Window (O)
#define SCSI_OBJECTPOS 0x31 // Object Postion (O) #define SCSI_OBJECTPOS 0x31 // Object Position (O)
#define SCSI_SCAN 0x1B // Scan (O) #define SCSI_SCAN 0x1B // Scan (O)
#define SCSI_SETWINDOW 0x24 // Set Window (MANDATORY) #define SCSI_SETWINDOW 0x24 // Set Window (MANDATORY)

View File

@ -617,7 +617,7 @@ void FPU_ESC6_Normal(Bitu rm) {
break; break;
case 0x02: /* FCOMP5*/ case 0x02: /* FCOMP5*/
FPU_FCOM(TOP,STV(sub)); FPU_FCOM(TOP,STV(sub));
break; /* TODO IS THIS ALLRIGHT ????????? */ break; /* TODO IS THIS ALRIGHT ????????? */
case 0x03: /*FCOMPP*/ case 0x03: /*FCOMPP*/
if(sub != 1) { if(sub != 1) {
LOG(LOG_FPU,LOG_WARN)("ESC 6:Unhandled group %d subfunction %d",(int)group,(int)sub); LOG(LOG_FPU,LOG_WARN)("ESC 6:Unhandled group %d subfunction %d",(int)group,(int)sub);
@ -1196,4 +1196,4 @@ std::string FPUStatusWord::to_string() const
" UE=" + std::to_string(UE) + " OE=" + std::to_string(OE) + " UE=" + std::to_string(UE) + " OE=" + std::to_string(OE) +
" ZE=" + std::to_string(ZE) + " DE=" + std::to_string(DE) + " ZE=" + std::to_string(ZE) + " DE=" + std::to_string(DE) +
" IE=" + std::to_string(IE) + " TOP=" + std::to_string(top); " IE=" + std::to_string(IE) + " TOP=" + std::to_string(top);
} }

View File

@ -1512,7 +1512,7 @@ void ConstructSubMenu(DOSBoxMenu::item_handle_t item_id, const char * const * li
* This seemingly inefficient method of populating the display * This seemingly inefficient method of populating the display
* list is REQUIRED because DOSBoxMenu::item& is a reference * list is REQUIRED because DOSBoxMenu::item& is a reference
* to a std::vector, and the reference becomes invalid when * to a std::vector, and the reference becomes invalid when
* the vector reallocates to accomodate more entries. * the vector reallocates to accommodate more entries.
* *
* Holding onto one reference for the entire loop risks a * Holding onto one reference for the entire loop risks a
* segfault (use after free) bug if the vector should reallocate * segfault (use after free) bug if the vector should reallocate
@ -2238,7 +2238,7 @@ umount:
Drives[i_drive-'A'] = 0; Drives[i_drive-'A'] = 0;
if(i_drive-'A' == DOS_GetDefaultDrive()) if(i_drive-'A' == DOS_GetDefaultDrive())
DOS_SetDrive(toupper('Z') - 'A'); DOS_SetDrive(toupper('Z') - 'A');
LOG_MSG("GUI:Drive %c has succesfully been removed.",i_drive); break; LOG_MSG("GUI:Drive %c has successfully been removed.",i_drive); break;
case 1: case 1:
LOG_MSG("GUI:Virtual Drives can not be unMOUNTed."); break; LOG_MSG("GUI:Virtual Drives can not be unMOUNTed."); break;
case 2: case 2:

View File

@ -520,7 +520,7 @@ void MIDI_RawOutByte(uint8_t data) {
midi.handler->PlayMsg(midi.rt_buf); midi.handler->PlayMsg(midi.rt_buf);
return; return;
} }
/* Test for a active sysex tranfer */ /* Test for a active sysex transfer */
if (midi.status==0xf0) { if (midi.status==0xf0) {
if (!(data&0x80)) { if (!(data&0x80)) {
if (midi.sysex.used<(SYSEX_SIZE-1)) midi.sysex.buf[midi.sysex.used++] = data; if (midi.sysex.used<(SYSEX_SIZE-1)) midi.sysex.buf[midi.sysex.used++] = data;

View File

@ -133,7 +133,7 @@ public:
} }
#else #else
// kMusicDeviceProperty_SoundBankFSRef is present on 10.6+, but // kMusicDeviceProperty_SoundBankFSRef is present on 10.6+, but
// kMusicDeviceProperty_SoundBankURL was added in 10.5 as a future prooof replacement // kMusicDeviceProperty_SoundBankURL was added in 10.5 as a future proof replacement
CFURLRef url = CFURLCreateFromFileSystemRepresentation( CFURLRef url = CFURLCreateFromFileSystemRepresentation(
kCFAllocatorDefault, kCFAllocatorDefault,
(const UInt8*)soundfont, (const UInt8*)soundfont,

View File

@ -1329,7 +1329,7 @@ void RENDER_Init() {
render.forceUpdate=false; render.forceUpdate=false;
std::string cline; std::string cline;
std::string scaler; std::string scaler;
//Check for commandline paramters and parse them through the configclass so they get checked against allowed values //Check for commandline parameters and parse them through the configclass so they get checked against allowed values
if (control->cmdline->FindString("-scaler",cline,true)) { if (control->cmdline->FindString("-scaler",cline,true)) {
section->HandleInputline(std::string("scaler=") + cline); section->HandleInputline(std::string("scaler=") + cline);
} else if (control->cmdline->FindString("-forcescaler",cline,true)) { } else if (control->cmdline->FindString("-forcescaler",cline,true)) {

View File

@ -3032,7 +3032,7 @@ public:
bar->addItem(2,MSG_Get("VISIT_HOMEPAGE")); bar->addItem(2,MSG_Get("VISIT_HOMEPAGE"));
bar->addItem(2,""); bar->addItem(2,"");
if (!dos_kernel_disabled) { if (!dos_kernel_disabled) {
/* these do not work until shell help text is registerd */ /* these do not work until shell help text is registered */
bar->addItem(2,MSG_Get("GET_STARTED")); bar->addItem(2,MSG_Get("GET_STARTED"));
bar->addItem(2,MSG_Get("CDROM_SUPPORT")); bar->addItem(2,MSG_Get("CDROM_SUPPORT"));
bar->addItem(2,""); bar->addItem(2,"");

View File

@ -2654,7 +2654,7 @@ void GFX_SwitchFullScreen(void)
Frankly I wish I knew how to fix the SDL1 Quartz code to use whatever abracadabra magic code is required Frankly I wish I knew how to fix the SDL1 Quartz code to use whatever abracadabra magic code is required
to enumerate these extra HDTV modes so this hack isn't necessary, except that experience says this hack is to enumerate these extra HDTV modes so this hack isn't necessary, except that experience says this hack is
always necesary because it might not always work. always necessary because it might not always work.
This magic hidden super secret API bullshit is annoying. You're worse than Microsoft with this stuff, Apple --J.C. */ This magic hidden super secret API bullshit is annoying. You're worse than Microsoft with this stuff, Apple --J.C. */
{ {
@ -2709,7 +2709,7 @@ void GFX_SwitchFullScreen(void)
// if we're going fullscreen and current scaler exceeds screen size, // if we're going fullscreen and current scaler exceeds screen size,
// cancel the fullscreen change -> fixes scaler crashes // cancel the fullscreen change -> fixes scaler crashes
// TODO this will need further changes to accomodate different outputs (e.g. stretched) // TODO this will need further changes to accommodate different outputs (e.g. stretched)
if (full) if (full)
{ {
int width, height; int width, height;
@ -3087,7 +3087,7 @@ static void SetPriority(PRIORITY_LEVELS level) {
SetPriorityClass(GetCurrentProcess(),HIGH_PRIORITY_CLASS); SetPriorityClass(GetCurrentProcess(),HIGH_PRIORITY_CLASS);
break; break;
#elif C_SET_PRIORITY #elif C_SET_PRIORITY
/* Linux use group as dosbox-x has mulitple threads under linux */ /* Linux use group as dosbox-x has multiple threads under linux */
case PRIORITY_LEVEL_PAUSE: // if DOSBox-X is paused, assume idle priority case PRIORITY_LEVEL_PAUSE: // if DOSBox-X is paused, assume idle priority
case PRIORITY_LEVEL_LOWEST: case PRIORITY_LEVEL_LOWEST:
setpriority (PRIO_PGRP, 0,PRIO_MAX); setpriority (PRIO_PGRP, 0,PRIO_MAX);
@ -5270,7 +5270,7 @@ bool eatRestoredWindow = false;
/* DOSBox SVN revision 4176:4177: For Linux/X11, Xorg 1.20.1 /* DOSBox SVN revision 4176:4177: For Linux/X11, Xorg 1.20.1
* will make spurious focus gain and loss events when locking the mouse in windowed mode. * will make spurious focus gain and loss events when locking the mouse in windowed mode.
* *
* This has not been tested with DOSBox-X yet becaus I do not run Xorg 1.20.1, yet */ * This has not been tested with DOSBox-X yet because I do not run Xorg 1.20.1, yet */
#if defined(LINUX) #if defined(LINUX)
#define SDL_XORG_FIX 1 #define SDL_XORG_FIX 1
#else #else
@ -8564,7 +8564,7 @@ int main(int argc, char* argv[]) SDL_MAIN_NOEXCEPT {
KeyboardLayoutDetect(); KeyboardLayoutDetect();
SetMapperKeyboardLayout(host_keyboard_layout); SetMapperKeyboardLayout(host_keyboard_layout);
/* -- -- Initialise Joystick and CD-ROM seperately. This way we can warn when it fails instead of exiting the application */ /* -- -- Initialise Joystick and CD-ROM separately. This way we can warn when it fails instead of exiting the application */
LOG(LOG_MISC,LOG_DEBUG)("Initializing SDL joystick subsystem..."); LOG(LOG_MISC,LOG_DEBUG)("Initializing SDL joystick subsystem...");
glide.fullscreen = &sdl.desktop.fullscreen; glide.fullscreen = &sdl.desktop.fullscreen;
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) >= 0) { if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) >= 0) {

View File

@ -405,7 +405,7 @@ unsigned long zip_nv_pair_map::get_ulong(const char *name) {
void zip_nv_pair_map::process_line(char *line/*will modify, assume caller has put NUL at the end*/) { void zip_nv_pair_map::process_line(char *line/*will modify, assume caller has put NUL at the end*/) {
char *equ = strchr(line,'='); char *equ = strchr(line,'=');
if (equ == NULL) return; if (equ == NULL) return;
*equ++ = 0; /* overwite '=' with NUL, split name vs value */ *equ++ = 0; /* overwrite '=' with NUL, split name vs value */
/* no null names */ /* no null names */
if (*line == 0) return; if (*line == 0) return;

View File

@ -533,7 +533,7 @@ struct RawHeader {
/* /*
The Raw Tables is < 128 and is used to convert raw commands into a full register index The Raw Tables is < 128 and is used to convert raw commands into a full register index
When the high bit of a raw command is set it indicates the cmd/data pair is to be sent to the 2nd port When the high bit of a raw command is set it indicates the cmd/data pair is to be sent to the 2nd port
After the conversion table the raw data follows immediatly till the end of the chunk After the conversion table the raw data follows immediately till the end of the chunk
*/ */
//Table to map the opl register to one <127 for dro saving //Table to map the opl register to one <127 for dro saving
@ -1050,7 +1050,7 @@ void Module::Init( Mode m ) {
case MODE_OPL2: case MODE_OPL2:
break; break;
case MODE_DUALOPL2: case MODE_DUALOPL2:
//Setup opl3 mode in the hander //Setup opl3 mode in the handler
handler->WriteReg( 0x105, 1 ); handler->WriteReg( 0x105, 1 );
//Also set it up in the cache so the capturing will start opl3 //Also set it up in the cache so the capturing will start opl3
CacheWrite( 0x105, 1 ); CacheWrite( 0x105, 1 );
@ -1110,7 +1110,7 @@ void SaveRad() {
fwrite( "RAD by REALiTY!!", 1, 16, handle ); fwrite( "RAD by REALiTY!!", 1, 16, handle );
b[w++] = 0x10; //version b[w++] = 0x10; //version
b[w++] = 0x06; //default speed and no description b[w++] = 0x06; //default speed and no description
//Write 18 instuments for all operators in the cache //Write 18 instruments for all operators in the cache
for ( unsigned int i = 0; i < 18; i++ ) { for ( unsigned int i = 0; i < 18; i++ ) {
uint8_t* set = module->cache + ( i / 9 ) * 256; uint8_t* set = module->cache + ( i / 9 ) * 256;
Bitu offset = ((i % 9) / 3) * 8 + (i % 3); Bitu offset = ((i % 9) / 3) * 8 + (i % 3);

View File

@ -100,7 +100,7 @@ namespace DBOPL {
#endif #endif
//How much to substract from the base value for the final attenuation //How much to subtract from the base value for the final attenuation
static const uint8_t KslCreateTable[16] = { static const uint8_t KslCreateTable[16] = {
//0 will always be be lower than 7 * 8 //0 will always be be lower than 7 * 8
64, 32, 24, 19, 64, 32, 24, 19,
@ -210,7 +210,7 @@ static void EnvelopeSelect( uint8_t val, uint8_t& index, uint8_t& shift ) {
#if ( DBOPL_WAVE == WAVE_HANDLER ) #if ( DBOPL_WAVE == WAVE_HANDLER )
/* /*
Generate the different waveforms out of the sine/exponetial table using handlers Generate the different waveforms out of the sine/exponential table using handlers
*/ */
static /*inline*/ Bits MakeVolume( Bitu wave, Bitu volume ) { static /*inline*/ Bits MakeVolume( Bitu wave, Bitu volume ) {
Bitu total = wave + volume; Bitu total = wave + volume;
@ -910,10 +910,10 @@ Channel* Channel::BlockTemplate( Chip* chip, uint32_t samples, int32_t* output )
//Early out for percussion handlers //Early out for percussion handlers
if ( mode == sm2Percussion ) { if ( mode == sm2Percussion ) {
GeneratePercussion<false>( chip, output + i ); GeneratePercussion<false>( chip, output + i );
continue; //Prevent some unitialized value bitching continue; //Prevent some uninitialized value bitching
} else if ( mode == sm3Percussion ) { } else if ( mode == sm3Percussion ) {
GeneratePercussion<true>( chip, output + i * 2 ); GeneratePercussion<true>( chip, output + i * 2 );
continue; //Prevent some unitialized value bitching continue; //Prevent some uninitialized value bitching
} }
//Do unsigned shift so we can shift out all bits but still stay in 10 bit range otherwise //Do unsigned shift so we can shift out all bits but still stay in 10 bit range otherwise
@ -1450,7 +1450,7 @@ void InitTables( void ) {
ChanOffsetTable[i] = 0; ChanOffsetTable[i] = 0;
continue; continue;
} }
//Make sure the four op channels follow eachother //Make sure the four op channels follow each other
if ( index < 6 ) { if ( index < 6 ) {
index = (index % 3) * 2 + ( index / 3 ); index = (index % 3) * 2 + ( index / 3 );
} }

View File

@ -199,7 +199,7 @@ static void disney_write(Bitu port,Bitu val,Bitu iolen) {
{ {
disney.data=(uint8_t)val; disney.data=(uint8_t)val;
// if data is written here too often without using the stereo // if data is written here too often without using the stereo
// mechanism we use the simple DAC machanism. // mechanism we use the simple DAC mechanism.
if(disney.state != DS_RUNNING) { if(disney.state != DS_RUNNING) {
disney.interface_det++; disney.interface_det++;
if(disney.interface_det > 5) if(disney.interface_det > 5)
@ -350,7 +350,7 @@ static void DISNEY_CallBack(Bitu len) {
uint8_t gapfiller = 128; //Keep the middle uint8_t gapfiller = 128; //Keep the middle
if(real_used) { if(real_used) {
// fix for some stupid game; it outputs 0 at the end of the stream // fix for some stupid game; it outputs 0 at the end of the stream
// causing a click. So if we have at least two bytes availible in the // causing a click. So if we have at least two bytes available in the
// buffer and the last one is a 0 then ignore that. // buffer and the last one is a 0 then ignore that.
if(disney.leader->buffer[real_used-1]==0) if(disney.leader->buffer[real_used-1]==0)
real_used--; real_used--;

View File

@ -299,7 +299,7 @@ void DmaController::WriteControllerReg(Bitu reg,Bitu val,Bitu /*len*/) {
chan->currcnt=(uint16_t)((chan->currcnt&0x00ff)|(val << 8)); chan->currcnt=(uint16_t)((chan->currcnt&0x00ff)|(val << 8));
} }
break; break;
case 0x8: /* Comand reg not used */ case 0x8: /* Command reg not used */
break; break;
case 0x9: /* Request registers, memory to memory */ case 0x9: /* Request registers, memory to memory */
//TODO Warning? //TODO Warning?

View File

@ -3088,7 +3088,7 @@ void IDE_EmuINT13DiskReadByBIOS(unsigned char disk,unsigned int cyl,unsigned int
LOG_MSG("INT 13 WARNING: I/O issued on drive attached to IDE emulation with changed logical geometry!\n"); LOG_MSG("INT 13 WARNING: I/O issued on drive attached to IDE emulation with changed logical geometry!\n");
/* HACK: src/ints/bios_disk.cpp implementation doesn't correctly /* HACK: src/ints/bios_disk.cpp implementation doesn't correctly
* wrap sector numbers across tracks. it fullfills the read * wrap sector numbers across tracks. it fulfills the read
* by counting sectors and reading from C,H,S+i which means * by counting sectors and reading from C,H,S+i which means
* that if the OS assumes the ability to read across track * that if the OS assumes the ability to read across track
* boundaries (as Windows 95 does) we will get invalid * boundaries (as Windows 95 does) we will get invalid
@ -4186,7 +4186,7 @@ void IDEATADevice::writecommand(uint8_t cmd) {
case 0xA1: /* IDENTIFY PACKET DEVICE */ case 0xA1: /* IDENTIFY PACKET DEVICE */
/* We are not an ATAPI packet device. /* We are not an ATAPI packet device.
* Most MS-DOS drivers and Windows 95 like to issue both IDENTIFY ATA and IDENTIFY ATAPI commands. * Most MS-DOS drivers and Windows 95 like to issue both IDENTIFY ATA and IDENTIFY ATAPI commands.
* I also gather from some contributers on the github comments that people think our "Unknown IDE/ATA command" * I also gather from some contributors on the github comments that people think our "Unknown IDE/ATA command"
* error message is part of some other error in the emulation. Rather than put up with that, we'll just * error message is part of some other error in the emulation. Rather than put up with that, we'll just
* silently abort the command with an error. */ * silently abort the command with an error. */
abort_normal(); abort_normal();

View File

@ -361,7 +361,7 @@ static void IPX_AES_EventHandler(Bitu param)
} }
tmpECB = tmp2ECB; tmpECB = tmp2ECB;
} }
LOG_MSG("!!!! Rouge AES !!!!" ); LOG_MSG("!!!! Rogue AES !!!!" );
} }
static void sendPacket(ECBClass* sendecb); static void sendPacket(ECBClass* sendecb);
@ -685,7 +685,7 @@ static void sendPacket(ECBClass* sendecb) {
uint8_t immedAddr[6]; uint8_t immedAddr[6];
sendecb->getImmAddress(immedAddr); sendecb->getImmAddress(immedAddr);
// filter out broadcasts and local loopbacks // filter out broadcasts and local loopbacks
// Real implementation uses the ImmedAddr to check wether this is a broadcast // Real implementation uses the ImmedAddr to check whether this is a broadcast
bool islocalbroadcast=true; bool islocalbroadcast=true;
bool isloopback=true; bool isloopback=true;

View File

@ -176,7 +176,7 @@ static void IPX_ServerLoop() {
UnpackIP(tmpHeader->src.addr.byIP, &tmpAddr); UnpackIP(tmpHeader->src.addr.byIP, &tmpAddr);
for(i=0;i<SOCKETTABLESIZE;i++) { for(i=0;i<SOCKETTABLESIZE;i++) {
if(!connBuffer[i].connected) { if(!connBuffer[i].connected) {
// Use prefered host IP rather than the reported source IP // Use preferred host IP rather than the reported source IP
// It may be better to use the reported source // It may be better to use the reported source
ipconn[i] = inPacket.address; ipconn[i] = inPacket.address;

View File

@ -103,7 +103,7 @@ struct ps2mouse {
bool scale21; /* 2:1 scaling */ bool scale21; /* 2:1 scaling */
bool intellimouse_mode; /* intellimouse scroll wheel */ bool intellimouse_mode; /* intellimouse scroll wheel */
bool intellimouse_btn45; /* 4th & 5th buttons */ bool intellimouse_btn45; /* 4th & 5th buttons */
bool int33_taken; /* for compatability with existing DOSBox code: allow INT 33H emulation to "take over" and disable us */ bool int33_taken; /* for compatibility with existing DOSBox code: allow INT 33H emulation to "take over" and disable us */
bool l,m,r; /* mouse button states */ bool l,m,r; /* mouse button states */
}; };
@ -239,7 +239,7 @@ void KEYBOARD_AUX_Event(float x,float y,Bitu buttons,int scrollwheel) {
int KEYBOARD_AUX_Active() { int KEYBOARD_AUX_Active() {
/* NTS: We want to allow software to read by polling, which doesn't /* NTS: We want to allow software to read by polling, which doesn't
* require interrupts to be enabled. Whether or not IRQ12 is * require interrupts to be enabled. Whether or not IRQ12 is
* unmasked is irrelevent */ * unmasked is irrelevant */
return keyb.auxactive && !keyb.ps2mouse.int33_taken; return keyb.auxactive && !keyb.ps2mouse.int33_taken;
} }
@ -1631,9 +1631,9 @@ void KEYBOARD_AddKey1(KBD_KEYS keytype,bool pressed) {
case KBD_jp_hiragana:ret=0x70;break;/*also Katakana */ case KBD_jp_hiragana:ret=0x70;break;/*also Katakana */
case KBD_jp_backslash:ret=0x73;break;/*JP 106-key: _ \ or ろ (ro) <-- WARNING: UTF-8 unicode */ case KBD_jp_backslash:ret=0x73;break;/*JP 106-key: _ \ or ろ (ro) <-- WARNING: UTF-8 unicode */
case KBD_jp_yen:ret=0x7d;break;/*JP 106-key: | ¥ (yen) or ー (prolonged sound mark) <-- WARNING: UTF-8 unicode */ case KBD_jp_yen:ret=0x7d;break;/*JP 106-key: | ¥ (yen) or ー (prolonged sound mark) <-- WARNING: UTF-8 unicode */
case KBD_colon:if (!pc98_force_ibm_layout) {ret = 0x28; break;} /*JP106-key : or * same postion with Quote key */ case KBD_colon:if (!pc98_force_ibm_layout) {ret = 0x28; break;} /*JP106-key : or * same position with Quote key */
case KBD_caret:if (!pc98_force_ibm_layout) {ret = 0x0d; break;} /*JP106-key ^ or ~ same postion with Equals key */ case KBD_caret:if (!pc98_force_ibm_layout) {ret = 0x0d; break;} /*JP106-key ^ or ~ same position with Equals key */
case KBD_atsign:if (!pc98_force_ibm_layout) {ret = 0x1a; break;} /*JP106-key @ or ` same postion with Left-bracket key */ case KBD_atsign:if (!pc98_force_ibm_layout) {ret = 0x1a; break;} /*JP106-key @ or ` same position with Left-bracket key */
default: default:
LOG(LOG_MISC, LOG_WARN)("Unsupported key press %lu", (unsigned long)keytype); LOG(LOG_MISC, LOG_WARN)("Unsupported key press %lu", (unsigned long)keytype);
return; return;

View File

@ -2100,7 +2100,7 @@ static unsigned char OPLRead(FM_OPL *OPL,int a)
return 0xff; return 0xff;
} }
/* CSM Key Controll */ /* CSM Key Control */
static inline void CSMKeyControll(OPL_CH *CH) static inline void CSMKeyControll(OPL_CH *CH)
{ {
CH->SLOT[SLOT1].KEYON(4); CH->SLOT[SLOT1].KEYON(4);
@ -2121,7 +2121,7 @@ static int OPLTimerOver(FM_OPL *OPL,int c)
else else
{ /* Timer A */ { /* Timer A */
OPL->STATUS_SET(0x40); OPL->STATUS_SET(0x40);
/* CSM mode key,TL controll */ /* CSM mode key,TL control */
if( OPL->mode & 0x80 ) if( OPL->mode & 0x80 )
{ /* CSM mode total level latch and auto key on */ { /* CSM mode total level latch and auto key on */
int ch; int ch;

View File

@ -23,7 +23,7 @@
// TYPE DEFINITIONS // TYPE DEFINITIONS
//************************************************************************** //**************************************************************************
//Container class for int that just initalizes to 0 //Container class for int that just initializes to 0
class NullInt { class NullInt {
int value; int value;
public: public:

View File

@ -222,7 +222,7 @@ value: START, REC, MEMDAT, REPEAT, SPOFF, x,x,RESET meaning:
if (portstate & 0x20) /* do we access external memory? */ if (portstate & 0x20) /* do we access external memory? */
{ {
now_addr = start << 1; now_addr = start << 1;
memread = 2; /* two dummy reads needed before accesing external memory via register $08*/ memread = 2; /* two dummy reads needed before accessing external memory via register $08*/
/* if yes, then let's check if ADPCM memory is mapped and big enough */ /* if yes, then let's check if ADPCM memory is mapped and big enough */
if (!memory) if (!memory)

View File

@ -61,7 +61,7 @@ struct YM_DELTAT { /* AT: rearranged and tightened structure */
*/ */
void * status_change_which_chip; /* this chip id */ void * status_change_which_chip; /* this chip id */
uint8_t status_change_EOS_bit; /* 1 on End Of Sample (record/playback/cycle time of AD/DA converting has passed)*/ uint8_t status_change_EOS_bit; /* 1 on End Of Sample (record/playback/cycle time of AD/DA converting has passed)*/
uint8_t status_change_BRDY_bit; /* 1 after recording 2 datas (2x4bits) or after reading/writing 1 data */ uint8_t status_change_BRDY_bit; /* 1 after recording 2 data (2x4bits) or after reading/writing 1 data */
uint8_t status_change_ZERO_bit; /* 1 if silence lasts for more than 290 milliseconds on ADPCM recording */ uint8_t status_change_ZERO_bit; /* 1 if silence lasts for more than 290 milliseconds on ADPCM recording */
/* neither Y8950 nor YM2608 can generate IRQ when PCMBSY bit changes, so instead of above, /* neither Y8950 nor YM2608 can generate IRQ when PCMBSY bit changes, so instead of above,

View File

@ -26,7 +26,7 @@ Revision History:
6. 4-channel sound output. 6. 4-channel sound output.
7. YMF262 compabile DAC (YAC512) is available. 7. YMF262 compabile DAC (YAC512) is available.
8. LFO for vibrato and tremolo effedts. 8. LFO for vibrato and tremolo effedts.
9. 2 programable timers. 9. 2 programmable timers.
10. Shorter register access time compared with YM3812. 10. Shorter register access time compared with YM3812.
11. 5V single supply silicon gate CMOS process. 11. 5V single supply silicon gate CMOS process.
12. 24 Pin SOP Package (YMF262-M), 48 Pin SQFP Package (YMF262-S). 12. 24 Pin SOP Package (YMF262-M), 48 Pin SQFP Package (YMF262-S).

View File

@ -18,7 +18,7 @@
/* /*
Remove the sdl code from here and have it handeld in the sdlmain. Remove the sdl code from here and have it handled in sdlmain.
That should call the mixer start from there or something. That should call the mixer start from there or something.
*/ */

View File

@ -747,7 +747,7 @@ bx_ne2k_c::page0_write(uint32_t offset, uint32_t value, unsigned io_len)
break; break;
case 0xe: // DCR case 0xe: // DCR
// the loopback mode is not suppported yet // the loopback mode is not supported yet
if (!(value & 0x08)) { if (!(value & 0x08)) {
BX_ERROR(("DCR write, loopback mode selected")); BX_ERROR(("DCR write, loopback mode selected"));
} }

View File

@ -44,7 +44,7 @@ public:
bool addLF; // if set, add line feed after carriage return if not used by app bool addLF; // if set, add line feed after carriage return if not used by app
bool squote; bool squote;
uint8_t lastChar = 0; // used to save the previous character to decide wether to add LF uint8_t lastChar = 0; // used to save the previous character to decide whether to add LF
const uint16_t* codepage_ptr; // pointer to the translation codepage if not null const uint16_t* codepage_ptr; // pointer to the translation codepage if not null
bool OpenFile(); bool OpenFile();

View File

@ -372,7 +372,7 @@ class PARPORTS:public Module_base {
defaultirq[i] = (uint8_t)strtol(str.c_str(), NULL, 10); defaultirq[i] = (uint8_t)strtol(str.c_str(), NULL, 10);
cmd.FindCommand(1,str); cmd.FindCommand(1,str);
/* DOSBox SVN disney=true compatability: Reserve LPT1 for Disney Sound Source */ /* DOSBox SVN disney=true compatibility: Reserve LPT1 for Disney Sound Source */
if (i == 0 && DISNEY_ShouldInit()) if (i == 0 && DISNEY_ShouldInit())
continue; continue;
@ -681,9 +681,9 @@ void PARALLEL_OnPowerOn (Section * sec) {
if (testParallelPortsBaseclass) delete testParallelPortsBaseclass; if (testParallelPortsBaseclass) delete testParallelPortsBaseclass;
testParallelPortsBaseclass = new PARPORTS (control->GetSection("parallel")); testParallelPortsBaseclass = new PARPORTS (control->GetSection("parallel"));
/* DOSBox SVN compatability: LPT1 should be reserved for Disney Sound Source if disney=true, now init it */ /* DOSBox SVN compatibility: LPT1 should be reserved for Disney Sound Source if disney=true, now init it */
if (!DISNEY_HasInit() && DISNEY_ShouldInit() && parallelPortObjects[0] == NULL) { if (!DISNEY_HasInit() && DISNEY_ShouldInit() && parallelPortObjects[0] == NULL) {
LOG_MSG("disney=true. For compatability with other DOSBox forks and SVN, LPT1 has been reserved for Disney Sound Source. Initializing it now."); LOG_MSG("disney=true. For compatibility with other DOSBox forks and SVN, LPT1 has been reserved for Disney Sound Source. Initializing it now.");
LOG_MSG("DOSBox-X also supports disney=false and parallel1=disney"); LOG_MSG("DOSBox-X also supports disney=false and parallel1=disney");
DISNEY_Init(parallel_baseaddr[0]); DISNEY_Init(parallel_baseaddr[0]);
} }

View File

@ -2224,7 +2224,7 @@ void CPrinter::outputPage()
} }
else else
{ {
// Find end of heterogenous area // Find end of heterogeneous area
uint8_t diffCount = 1; uint8_t diffCount = 1;
while ( while (
diffCount < 128 && diffCount + pix < numpix && diffCount < 128 && diffCount + pix < numpix &&
@ -2322,7 +2322,7 @@ void CPrinter::fprintASCII85(FILE* f, uint16_t b)
} }
else // Close string else // Close string
{ {
// Partial tupel if there are still bytes in the buffer // Partial tuple if there are still bytes in the buffer
if (ASCII85BufferPos > 0) if (ASCII85BufferPos > 0)
{ {
for (uint8_t i = ASCII85BufferPos; i < 4; i++) for (uint8_t i = ASCII85BufferPos; i < 4; i++)

View File

@ -164,7 +164,7 @@ private:
// Closes a multipage document // Closes a multipage document
void finishMultipage(); void finishMultipage();
// Returns value of the num-th pixel (couting left-right, top-down) in a safe way // Returns value of the num-th pixel (counting left-right, top-down) in a safe way
uint8_t getPixel(uint32_t num); uint8_t getPixel(uint32_t num);
FT_Library FTlib; // FreeType2 library used to render the characters FT_Library FTlib; // FreeType2 library used to render the characters

View File

@ -135,7 +135,7 @@ reg16 EnvelopeGenerator::rate_counter_period[] = {
// of ENV3 with another timed loop to fully synchronize with ENV3. // of ENV3 with another timed loop to fully synchronize with ENV3.
// //
// At the first period when an exponential counter period larger than one // At the first period when an exponential counter period larger than one
// is used (decay or relase), one extra cycle is spent before the envelope is // is used (decay or release), one extra cycle is spent before the envelope is
// decremented. The envelope output is then delayed one cycle until the state // decremented. The envelope output is then delayed one cycle until the state
// is changed to attack. Now one cycle less will be spent before the envelope // is changed to attack. Now one cycle less will be spent before the envelope
// is incremented, and the situation is normalized. // is incremented, and the situation is normalized.

View File

@ -414,7 +414,7 @@ double SID2::I0(double x)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Setting of SID sampling parameters. // Setting of SID sampling parameters.
// //
// Use a clock freqency of 985248Hz for PAL C64, 1022730Hz for NTSC C64. // Use a clock frequency of 985248Hz for PAL C64, 1022730Hz for NTSC C64.
// The default end of passband frequency is pass_freq = 0.9*sample_freq/2 // The default end of passband frequency is pass_freq = 0.9*sample_freq/2
// for sample frequencies up to ~ 44.1kHz, and 20kHz for higher sample // for sample frequencies up to ~ 44.1kHz, and 20kHz for higher sample
// frequencies. // frequencies.
@ -715,7 +715,7 @@ void SID2::clock(cycle_count delta_t)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// SID clocking with audio sampling. // SID clocking with audio sampling.
// Fixpoint arithmetics is used. // Fixpoint arithmetic is used.
// //
// The example below shows how to clock the SID a specified amount of cycles // The example below shows how to clock the SID a specified amount of cycles
// while producing audio output: // while producing audio output:
@ -920,7 +920,7 @@ int SID2::clock_resample_interpolate(cycle_count& delta_t, short* buf, int n,
v >>= FIR_SHIFT; v >>= FIR_SHIFT;
// Saturated arithmetics to guard against 16 bit sample overflow. // Saturated arithmetic to guard against 16 bit sample overflow.
const int half = 1 << 15; const int half = 1 << 15;
if (v >= half) { if (v >= half) {
v = half - 1; v = half - 1;
@ -983,7 +983,7 @@ int SID2::clock_resample_fast(cycle_count& delta_t, short* buf, int n,
v >>= FIR_SHIFT; v >>= FIR_SHIFT;
// Saturated arithmetics to guard against 16 bit sample overflow. // Saturated arithmetic to guard against 16 bit sample overflow.
const int half = 1 << 15; const int half = 1 << 15;
if (v >= half) { if (v >= half) {
v = half - 1; v = half - 1;

View File

@ -1709,16 +1709,16 @@ static void DSP_DoCommand(void) {
for (s=0;s < sc;s++) sb.chan->AddSamples_m8(1,(uint8_t*)(&sb.dsp.in.data[0])); for (s=0;s < sc;s++) sb.chan->AddSamples_m8(1,(uint8_t*)(&sb.dsp.in.data[0]));
} }
break; break;
case 0x24: /* Singe Cycle 8-Bit DMA ADC */ case 0x24: /* Single Cycle 8-Bit DMA ADC */
sb.dma.left=sb.dma.total=1u+(unsigned int)sb.dsp.in.data[0]+((unsigned int)sb.dsp.in.data[1] << 8u); sb.dma.left=sb.dma.total=1u+(unsigned int)sb.dsp.in.data[0]+((unsigned int)sb.dsp.in.data[1] << 8u);
sb.dma.sign=false; sb.dma.sign=false;
LOG(LOG_SB,LOG_ERROR)("DSP:Faked ADC for %d bytes",(int)sb.dma.total); LOG(LOG_SB,LOG_ERROR)("DSP:Faked ADC for %d bytes",(int)sb.dma.total);
GetDMAChannel(sb.hw.dma8)->Register_Callback(DSP_ADC_CallBack); GetDMAChannel(sb.hw.dma8)->Register_Callback(DSP_ADC_CallBack);
break; break;
case 0x91: /* Singe Cycle 8-Bit DMA High speed DAC */ case 0x91: /* Single Cycle 8-Bit DMA High speed DAC */
DSP_SB2_ABOVE; DSP_SB2_ABOVE;
/* fall through */ /* fall through */
case 0x14: /* Singe Cycle 8-Bit DMA DAC */ case 0x14: /* Single Cycle 8-Bit DMA DAC */
case 0x15: /* Wari hack. Waru uses this one instead of 0x14, but some weird stuff going on there anyway */ case 0x15: /* Wari hack. Waru uses this one instead of 0x14, but some weird stuff going on there anyway */
/* Note: 0x91 is documented only for DSP ver.2.x and 3.x, not 4.x */ /* Note: 0x91 is documented only for DSP ver.2.x and 3.x, not 4.x */
DSP_PrepareDMA_Old(DSP_DMA_8,false,false,/*hispeed*/(sb.dsp.cmd&0x80)!=0); DSP_PrepareDMA_Old(DSP_DMA_8,false,false,/*hispeed*/(sb.dsp.cmd&0x80)!=0);
@ -1773,7 +1773,7 @@ static void DSP_DoCommand(void) {
// the Sound Blaster Pro in which the Pro treats stereo output as just mono that is alternately latched // the Sound Blaster Pro in which the Pro treats stereo output as just mono that is alternately latched
// to left and right DACs. The SB16 handling here also follows that tradition because Creative's SB16 // to left and right DACs. The SB16 handling here also follows that tradition because Creative's SB16
// playback commands 0xB0-0xCF follow the same tradition: Block size specified in the command is given // playback commands 0xB0-0xCF follow the same tradition: Block size specified in the command is given
// in samples, and by samples, they mean individual samples, and therefore it is stil doubled when // in samples, and by samples, they mean individual samples, and therefore it is still doubled when
// asked to play stereo audio. I suppose this is why Linux ALSA chose to further clarify the terminology // asked to play stereo audio. I suppose this is why Linux ALSA chose to further clarify the terminology
// by defining audio "samples" vs audio "frames". // by defining audio "samples" vs audio "frames".
// NTS: The sb.dma.total as individual sample count has been confirmed with DOSLIB and real hardware, and by // NTS: The sb.dma.total as individual sample count has been confirmed with DOSLIB and real hardware, and by
@ -2213,7 +2213,7 @@ static bool DSP_busy_cycle() {
* enough, more than 8 is required, and the SNDSB test code will have issues with * enough, more than 8 is required, and the SNDSB test code will have issues with
* direct DAC mode again. * direct DAC mode again.
* *
* This isn't 100% accurate, but it's the best DOSBox-X can do for now to mimick * This isn't 100% accurate, but it's the best DOSBox-X can do for now to mimic
* SB16 DSP behavior. */ * SB16 DSP behavior. */
now = PIC_FullIndex(); now = PIC_FullIndex();
@ -2305,7 +2305,7 @@ static void DSP_DoWrite(uint8_t val) {
} }
static uint8_t DSP_ReadData(void) { static uint8_t DSP_ReadData(void) {
/* Static so it repeats the last value on succesive reads (JANGLE DEMO) */ /* Static so it repeats the last value on successive reads (JANGLE DEMO) */
if (sb.dsp.out.used) { if (sb.dsp.out.used) {
sb.dsp.out.lastval=sb.dsp.out.data[sb.dsp.out.pos]; sb.dsp.out.lastval=sb.dsp.out.data[sb.dsp.out.pos];
sb.dsp.out.pos++; sb.dsp.out.pos++;
@ -2387,7 +2387,7 @@ void updateSoundBlasterFilter(Bitu rate) {
* *
* Try to approximate the ESS's filter by undoing the calculation then feeding our own lowpass filter with it. * Try to approximate the ESS's filter by undoing the calculation then feeding our own lowpass filter with it.
* *
* This implementation is matched aginst real hardware by ear, even though the reference hardware is a * This implementation is matched against real hardware by ear, even though the reference hardware is a
* laptop with a cheap tinny amplifier */ * laptop with a cheap tinny amplifier */
uint64_t filter_raw = (uint64_t)7160000ULL / (256u - ESSreg(0xA2)); uint64_t filter_raw = (uint64_t)7160000ULL / (256u - ESSreg(0xA2));
uint64_t filter_hz = (filter_raw * (uint64_t)11) / (uint64_t)(82 * 4); /* match lowpass by ear compared to real hardware */ uint64_t filter_hz = (filter_raw * (uint64_t)11) / (uint64_t)(82 * 4); /* match lowpass by ear compared to real hardware */

View File

@ -270,7 +270,7 @@ bool SERIAL_setCommParameters(COMPORT port,
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> // sprinf #include <stdio.h> // sprintf
struct _COMPORT { struct _COMPORT {
int porthandle; int porthandle;

View File

@ -240,7 +240,7 @@ ENETServerSocket::~ENETServerSocket()
isopen = false; isopen = false;
} }
// covert an ENet address to a string // convert an ENet address to a string
static char *enet_address_to_string(const ENetAddress &address) static char *enet_address_to_string(const ENetAddress &address)
{ {
static char ip_buf[INET_ADDRSTRLEN]; static char ip_buf[INET_ADDRSTRLEN];

View File

@ -146,7 +146,7 @@ static REG8 IOINPCALL pcm86_ia460(UINT port) {
return pcm86.soundflags; return pcm86.soundflags;
} }
// Bit0 flips syncronizing with the sampling rate set by port A468h. // Bit0 flips synchronizing with the sampling rate set by port A468h.
// but I could not think of a good way to implement it. // but I could not think of a good way to implement it.
// NEC Windows 3.1 sound driver freeze if bit0 does not change, // NEC Windows 3.1 sound driver freeze if bit0 does not change,
// so I have added a process to switch it on each call. // so I have added a process to switch it on each call.

View File

@ -150,7 +150,7 @@ static void TandyDACModeChanged(void) {
if (tandy.dac.dma.chan) { if (tandy.dac.dma.chan) {
tandy.dac.dma.chan->Register_Callback(TandyDAC_DMA_CallBack); tandy.dac.dma.chan->Register_Callback(TandyDAC_DMA_CallBack);
tandy.dac.chan->Enable(true); tandy.dac.chan->Enable(true);
// LOG_MSG("Tandy DAC: playback started with freqency %f, volume %f",freq,vol); // LOG_MSG("Tandy DAC: playback started with frequency %f, volume %f",freq,vol);
} }
} }
} }

View File

@ -645,9 +645,9 @@ static void write_p43(Bitu /*port*/,Bitu val,Bitu /*iolen*/) {
// Intel 8254 PIT datasheet: // Intel 8254 PIT datasheet:
// //
// "The selected Counter's output latch (OL) latches the count at the time the // "The selected Counter's output latch (OL) latches the count at the time the
// Counter Latch Comand is received. The count is held in the latch until it is // Counter Latch Command is received. The count is held in the latch until it is
// read by the CPU (or until the Counter is reprogrammed). The count is then // read by the CPU (or until the Counter is reprogrammed). The count is then
// unlatched automaticaly and the OL returns to "following" the counting element (CE)". // unlatched automatically and the OL returns to "following" the counting element (CE)".
// //
// So the datasheet, and the behavior of Lemmings, confirms that the latch stays // So the datasheet, and the behavior of Lemmings, confirms that the latch stays
// in effect even if you write the control word. // in effect even if you write the control word.

View File

@ -1038,7 +1038,7 @@ void VGA_Reset(Section*) {
// TODO: There are reports of VGA cards that have less than 256KB in the early days of VGA. // TODO: There are reports of VGA cards that have less than 256KB in the early days of VGA.
// How does that work exactly, especially when 640x480 requires about 37KB per plane? // How does that work exactly, especially when 640x480 requires about 37KB per plane?
// Did these cards have some means to chain two bitplanes odd/even in the same way // Did these cards have some means to chain two bitplanes odd/even in the same way
// tha EGA did it? // than EGA did it?
if (vga.mem.memsize != 0 || svgaCard == SVGA_None) { if (vga.mem.memsize != 0 || svgaCard == SVGA_None) {
if (vga.mem.memsize < _KB_bytes(256)) vga.mem.memsize = _KB_bytes(256); if (vga.mem.memsize < _KB_bytes(256)) vga.mem.memsize = _KB_bytes(256);
} }
@ -1747,17 +1747,17 @@ void JEGA_setupAX(void) {
jega.RDFFB = 0x00;//bc: Font access first byte jega.RDFFB = 0x00;//bc: Font access first byte
jega.RDFSB = 0x00;//bd: second jega.RDFSB = 0x00;//bd: second
jega.RDFAP = 0x00;//be: Font Access Pattern jega.RDFAP = 0x00;//be: Font Access Pattern
jega.RPESL = 0x00;//09: end scan line (superceded by EGA) jega.RPESL = 0x00;//09: end scan line (superseded by EGA)
jega.RPULP = 0x00;//14: under scan line (superceded by EGA) jega.RPULP = 0x00;//14: under scan line (superseded by EGA)
jega.RPSSC = 1;//db: DBCS start scan line jega.RPSSC = 1;//db: DBCS start scan line
jega.RPSSU = 3;//d9: 2x DBCS upper start scan jega.RPSSU = 3;//d9: 2x DBCS upper start scan
jega.RPSSL = 0;//da: 2x DBCS lower start scan jega.RPSSL = 0;//da: 2x DBCS lower start scan
jega.RPPAJ = 0x00;//dc: super imposed (only AX-2 system, not implemented) jega.RPPAJ = 0x00;//dc: super imposed (only AX-2 system, not implemented)
jega.RCMOD = 0x00;//dd: Cursor Mode (not implemented) jega.RCMOD = 0x00;//dd: Cursor Mode (not implemented)
jega.RCCLH = 0x00;//0e: Cursor location Upper bits (superceded by EGA) jega.RCCLH = 0x00;//0e: Cursor location Upper bits (superseded by EGA)
jega.RCCLL = 0x00;//0f: Cursor location Lower bits (superceded by EGA) jega.RCCLL = 0x00;//0f: Cursor location Lower bits (superseded by EGA)
jega.RCCSL = 0x00;//0a: Cursor Start Line (superceded by EGA) jega.RCCSL = 0x00;//0a: Cursor Start Line (superseded by EGA)
jega.RCCEL = 0x00;//0b: Cursor End Line (superceded by EGA) jega.RCCEL = 0x00;//0b: Cursor End Line (superseded by EGA)
jega.RCSKW = 0x20;//de: Cursor Skew control (not implemented) jega.RCSKW = 0x20;//de: Cursor Skew control (not implemented)
jega.ROMSL = 0x00;//df: Unused? jega.ROMSL = 0x00;//df: Unused?
jega.RSTAT = 0x03;//bf: Font register accessible status jega.RSTAT = 0x03;//bf: Font register accessible status

View File

@ -319,7 +319,7 @@ void write_p3c0(Bitu /*port*/,Bitu val,Bitu iolen) {
svga.write_p3c0(attr(index), val, iolen); svga.write_p3c0(attr(index), val, iolen);
break; break;
} }
LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:ATTR:Write to unkown Index %2X",attr(index)); LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:ATTR:Write to unknown Index %2X",attr(index));
break; break;
} }
} }
@ -347,7 +347,7 @@ Bitu read_p3c1(Bitu /*port*/,Bitu iolen) {
default: default:
if (svga.read_p3c1) if (svga.read_p3c1)
return svga.read_p3c1(attr(index), iolen); return svga.read_p3c1(attr(index), iolen);
LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:ATTR:Read from unkown Index %2X",attr(index)); LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:ATTR:Read from unknown Index %2X",attr(index));
} }
return 0; return 0;
} }

View File

@ -1925,7 +1925,7 @@ static uint8_t * MCGA_TEXT_Draw_Line(Bitu vidstart, Bitu line) {
// draw the text mode cursor if needed // draw the text mode cursor if needed
if ((vga.draw.cursor.count&0x8) && (line >= vga.draw.cursor.sline) && if ((vga.draw.cursor.count&0x8) && (line >= vga.draw.cursor.sline) &&
(line <= vga.draw.cursor.eline) && vga.draw.cursor.enabled) { (line <= vga.draw.cursor.eline) && vga.draw.cursor.enabled) {
// the adress of the attribute that makes up the cell the cursor is in // the address of the attribute that makes up the cell the cursor is in
Bits attr_addr = ((Bits)vga.draw.cursor.address - (Bits)vidstart) >> (Bits)1; /* <- FIXME: This right? */ Bits attr_addr = ((Bits)vga.draw.cursor.address - (Bits)vidstart) >> (Bits)1; /* <- FIXME: This right? */
if (attr_addr >= 0 && attr_addr < (Bits)vga.draw.blocks) { if (attr_addr >= 0 && attr_addr < (Bits)vga.draw.blocks) {
Bitu index = (Bitu)attr_addr * (vga.draw.char9dot?9u:8u) * 4u; Bitu index = (Bitu)attr_addr * (vga.draw.char9dot?9u:8u) * 4u;
@ -4722,7 +4722,7 @@ void VGA_SetupDrawing(Bitu /*val*/) {
Bitu vblank_skip; Bitu vblank_skip;
/* NTS: PC-98 emulation re-uses VGA state FOR NOW. /* NTS: PC-98 emulation re-uses VGA state FOR NOW.
* This will slowly change to accomodate PC-98 display controller over time * This will slowly change to accommodate PC-98 display controller over time
* and IS_PC98_ARCH will become it's own case statement. */ * and IS_PC98_ARCH will become it's own case statement. */
if (IS_PC98_ARCH) { if (IS_PC98_ARCH) {
@ -5162,7 +5162,7 @@ void VGA_SetupDrawing(Bitu /*val*/) {
vga.draw.address_line_total *= 2; vga.draw.address_line_total *= 2;
/* if doublescan=false and line_total is even, then halve the height. /* if doublescan=false and line_total is even, then halve the height.
* the VGA raster scan will skip every other line to accomodate that. */ * the VGA raster scan will skip every other line to accommodate that. */
if ((!vga.draw.doublescan_effect) && (vga.draw.address_line_total & 1) == 0) if ((!vga.draw.doublescan_effect) && (vga.draw.address_line_total & 1) == 0)
height /= 2; height /= 2;
else else

View File

@ -78,7 +78,7 @@ int vga_memio_delay_ns = 1000;
void VGAMEM_USEC_read_delay() { void VGAMEM_USEC_read_delay() {
if (vga_memio_delay_ns > 0) { if (vga_memio_delay_ns > 0) {
Bits delaycyc = (CPU_CycleMax * vga_memio_delay_ns) / 1000000; Bits delaycyc = (CPU_CycleMax * vga_memio_delay_ns) / 1000000;
// if(GCC_UNLIKELY(CPU_Cycles < 3*delaycyc)) delaycyc = 0; //Else port acces will set cycles to 0. which might trigger problem with games which read 16 bit values // if(GCC_UNLIKELY(CPU_Cycles < 3*delaycyc)) delaycyc = 0; //Else port access will set cycles to 0. which might trigger problem with games which read 16 bit values
CPU_Cycles -= delaycyc; CPU_Cycles -= delaycyc;
CPU_IODelayRemoved += delaycyc; CPU_IODelayRemoved += delaycyc;
} }
@ -87,7 +87,7 @@ void VGAMEM_USEC_read_delay() {
void VGAMEM_USEC_write_delay() { void VGAMEM_USEC_write_delay() {
if (vga_memio_delay_ns > 0) { if (vga_memio_delay_ns > 0) {
Bits delaycyc = (CPU_CycleMax * vga_memio_delay_ns * 3) / (1000000 * 4); Bits delaycyc = (CPU_CycleMax * vga_memio_delay_ns * 3) / (1000000 * 4);
// if(GCC_UNLIKELY(CPU_Cycles < 3*delaycyc)) delaycyc = 0; //Else port acces will set cycles to 0. which might trigger problem with games which read 16 bit values // if(GCC_UNLIKELY(CPU_Cycles < 3*delaycyc)) delaycyc = 0; //Else port access will set cycles to 0. which might trigger problem with games which read 16 bit values
CPU_Cycles -= delaycyc; CPU_Cycles -= delaycyc;
CPU_IODelayRemoved += delaycyc; CPU_IODelayRemoved += delaycyc;
} }

View File

@ -877,7 +877,7 @@ static void write_tandy(Bitu port,Bitu val,Bitu /*iolen*/) {
// The remapped range is 32kB instead of 16. Therefore CPU_PG bit 0 // The remapped range is 32kB instead of 16. Therefore CPU_PG bit 0
// appears to be ORed with CPU A14 (to preserve some sort of // appears to be ORed with CPU A14 (to preserve some sort of
// backwards compatibility?), resulting in odd pages being mapped // backwards compatibility?), resulting in odd pages being mapped
// as 2x16kB. Implemeted in vga_memory.cpp Tandy handler. // as 2x16kB. Implemented in vga_memory.cpp Tandy handler.
vga.tandy.line_mask = (uint8_t)(val >> 6); vga.tandy.line_mask = (uint8_t)(val >> 6);
vga.tandy.draw_bank = val & ((vga.tandy.line_mask&2) ? 0x6 : 0x7); vga.tandy.draw_bank = val & ((vga.tandy.line_mask&2) ? 0x6 : 0x7);

View File

@ -521,7 +521,7 @@ void PC98_GDC_state::begin_frame(void) {
scan_address = 0; scan_address = 0;
display_partition = 0; display_partition = 0;
/* the actual starting address is determined by the display partition in paramter RAM */ /* the actual starting address is determined by the display partition in parameter RAM */
load_display_partition(); load_display_partition();
} }

View File

@ -267,7 +267,7 @@ void SVGA_S3_WriteCRTC(Bitu reg,Bitu val,Bitu iolen) {
3 (80x,928) ISA Latch Address. If set latches address during every ISA 3 (80x,928) ISA Latch Address. If set latches address during every ISA
cycle, unlatches during every ISA cycle if clear. cycle, unlatches during every ISA cycle if clear.
(864/964) LAT DEL. Address Latch Delay Control (VL-Bus only). If set (864/964) LAT DEL. Address Latch Delay Control (VL-Bus only). If set
address latching occours in the T1 cycle, if clear in the T2 cycle address latching occurs in the T1 cycle, if clear in the T2 cycle
(I.e. one clock cycle delayed). (I.e. one clock cycle delayed).
4 ENB LA. Enable Linear Addressing if set. 4 ENB LA. Enable Linear Addressing if set.
5 (not 864/964) Limit Entry Depth for Write-Post. If set limits Write 5 (not 864/964) Limit Entry Depth for Write-Post. If set limits Write

View File

@ -2314,7 +2314,7 @@ void XGA_Write(Bitu port, Bitu val, Bitu len) {
// LOG_MSG("XGA: Write to port %x, val %8x, len %x", (unsigned int)port, (unsigned int)val, (unsigned int)len); // LOG_MSG("XGA: Write to port %x, val %8x, len %x", (unsigned int)port, (unsigned int)val, (unsigned int)len);
#if 0 #if 0
// streams procesing debug // streams processing debug
if (port >= 0x8180 && port <= 0x81FF) if (port >= 0x8180 && port <= 0x81FF)
LOG_MSG("XGA streams processing: Write to port %x, val %8x, len %x",(unsigned int)port,(unsigned int)val,(unsigned int)len); LOG_MSG("XGA streams processing: Write to port %x, val %8x, len %x",(unsigned int)port,(unsigned int)val,(unsigned int)len);
#endif #endif
@ -2560,7 +2560,7 @@ void XGA_Write(Bitu port, Bitu val, Bitu len) {
case 0x81EC: // S3 Trio64V+ streams processor, Streams FIFO and RAS Controls (MMIO only) case 0x81EC: // S3 Trio64V+ streams processor, Streams FIFO and RAS Controls (MMIO only)
if (s3Card == S3_Trio64V || s3Card >= S3_ViRGE) { if (s3Card == S3_Trio64V || s3Card >= S3_ViRGE) {
/* bits [4:0] should be a value from 0 to 24 to shift priority between primary and secondary. /* bits [4:0] should be a value from 0 to 24 to shift priority between primary and secondary.
* The larger the value, the more slots alloted to secondary layer. * The larger the value, the more slots allotted to secondary layer.
* Allocation is out of 24 slots, therefore values larger than 24 are invalid. */ * Allocation is out of 24 slots, therefore values larger than 24 are invalid. */
uint8_t thr = val & 0x1Fu; uint8_t thr = val & 0x1Fu;
if (thr > 24u) thr -= 16u; // assume some kind of odd malfunction happens on real hardware, check later if (thr > 24u) thr -= 16u; // assume some kind of odd malfunction happens on real hardware, check later

View File

@ -5274,7 +5274,7 @@ static Bitu INTDC_PC98_Handler(void) {
/* DS:DX contains /* DS:DX contains
* 16*10 bytes, 16 bytes per entry for function keys F1-F10 * 16*10 bytes, 16 bytes per entry for function keys F1-F10
* 16*10 bytes, 16 bytes per entry for function key shortcuts Shift+F1 to Shift+F10 * 16*10 bytes, 16 bytes per entry for function key shortcuts Shift+F1 to Shift+F10
* 6*11 bytes, 6 bytes per entry of unknown relevence (GUESS: Escapes for other keys like INS, DEL?) * 6*11 bytes, 6 bytes per entry of unknown relevance (GUESS: Escapes for other keys like INS, DEL?)
* *
* For whatever reason, the buffer is copied to the DOS buffer +1, meaning that on write it skips the 0x08 byte. */ * For whatever reason, the buffer is copied to the DOS buffer +1, meaning that on write it skips the 0x08 byte. */
Bitu ofs = (Bitu)(SegValue(ds) << 4ul) + (Bitu)reg_dx; Bitu ofs = (Bitu)(SegValue(ds) << 4ul) + (Bitu)reg_dx;
@ -5965,7 +5965,7 @@ static Bitu INT14_Handler(void) {
if (INT14_Wait(port+6u, 0x30u, timeout, &reg_ah)) { if (INT14_Wait(port+6u, 0x30u, timeout, &reg_ah)) {
// wait for TX buffer empty // wait for TX buffer empty
if (INT14_Wait(port+5u, 0x20u, timeout, &reg_ah)) { if (INT14_Wait(port+5u, 0x20u, timeout, &reg_ah)) {
// fianlly send the character // finally send the character
IO_WriteB(port,reg_al); IO_WriteB(port,reg_al);
} else } else
reg_ah |= 0x80u; reg_ah |= 0x80u;
@ -6466,7 +6466,7 @@ static Bitu INT15_Handler(void) {
reg_ah=0x86; reg_ah=0x86;
CALLBACK_SCF(true); CALLBACK_SCF(true);
break; break;
case 0xc4: /* BIOS POS Programm option Select */ case 0xc4: /* BIOS POS Program option Select */
LOG(LOG_BIOS,LOG_NORMAL)("INT15:Function %X called, bios mouse not supported",reg_ah); LOG(LOG_BIOS,LOG_NORMAL)("INT15:Function %X called, bios mouse not supported",reg_ah);
CALLBACK_SCF(true); CALLBACK_SCF(true);
break; break;
@ -6497,7 +6497,7 @@ static Bitu INT15_Handler(void) {
break; break;
case 0x01: // connect real mode interface case 0x01: // connect real mode interface
if(!APMBIOS_allow_realmode) { if(!APMBIOS_allow_realmode) {
LOG_MSG("APM BIOS: OS attemped real-mode connection, which is disabled in your dosbox-x.conf\n"); LOG_MSG("APM BIOS: OS attempted real-mode connection, which is disabled in your dosbox-x.conf\n");
reg_ah = 0x86; // APM not present reg_ah = 0x86; // APM not present
CALLBACK_SCF(true); CALLBACK_SCF(true);
break; break;
@ -6524,7 +6524,7 @@ static Bitu INT15_Handler(void) {
break; break;
case 0x02: // connect 16-bit protected mode interface case 0x02: // connect 16-bit protected mode interface
if(!APMBIOS_allow_prot16) { if(!APMBIOS_allow_prot16) {
LOG_MSG("APM BIOS: OS attemped 16-bit protected mode connection, which is disabled in your dosbox-x.conf\n"); LOG_MSG("APM BIOS: OS attempted 16-bit protected mode connection, which is disabled in your dosbox-x.conf\n");
reg_ah = 0x06; // not supported reg_ah = 0x06; // not supported
CALLBACK_SCF(true); CALLBACK_SCF(true);
break; break;
@ -6561,7 +6561,7 @@ static Bitu INT15_Handler(void) {
// Note that Windows 98 will NOT talk to the APM BIOS unless the 32-bit protected mode connection is available. // Note that Windows 98 will NOT talk to the APM BIOS unless the 32-bit protected mode connection is available.
// And if you lie about it in function 0x00 and then fail, Windows 98 will fail with a "Windows protection error". // And if you lie about it in function 0x00 and then fail, Windows 98 will fail with a "Windows protection error".
if(!APMBIOS_allow_prot32) { if(!APMBIOS_allow_prot32) {
LOG_MSG("APM BIOS: OS attemped 32-bit protected mode connection, which is disabled in your dosbox-x.conf\n"); LOG_MSG("APM BIOS: OS attempted 32-bit protected mode connection, which is disabled in your dosbox-x.conf\n");
reg_ah = 0x08; // not supported reg_ah = 0x08; // not supported
CALLBACK_SCF(true); CALLBACK_SCF(true);
break; break;
@ -10444,7 +10444,7 @@ void write_ID_version_string() {
* experiments show you can move the version string around so long as it's * experiments show you can move the version string around so long as it's
* +1 from a paragraph boundary */ * +1 from a paragraph boundary */
/* TODO: *DO* allow dynamic relocation however if the dosbox-x.conf indicates that the user /* TODO: *DO* allow dynamic relocation however if the dosbox-x.conf indicates that the user
* is not interested in IBM BIOS compatability. Also, it would be really cool if * is not interested in IBM BIOS compatibility. Also, it would be really cool if
* dosbox-x.conf could override these strings and the user could enter custom BIOS * dosbox-x.conf could override these strings and the user could enter custom BIOS
* version and ID strings. Heh heh heh.. :) */ * version and ID strings. Heh heh heh.. :) */
str_id_at = 0xFE00E; str_id_at = 0xFE00E;

View File

@ -363,7 +363,7 @@ bool BIOS_AddKeyToBuffer(uint16_t code) {
} }
} }
/* Check for buffer Full */ /* Check for buffer Full */
//TODO Maybe beeeeeeep or something although that should happend when internal buffer is full //TODO Maybe beeeeeeep or something although that should happened when internal buffer is full
if (ttail==head) { if (ttail==head) {
#if defined(USE_TTF) #if defined(USE_TTF)
if(IS_DOSV || ttf_dosv) { if(IS_DOSV || ttf_dosv) {

View File

@ -34,7 +34,7 @@
* a size in kilobytes or a specific set of chs values to emulate * a size in kilobytes or a specific set of chs values to emulate
* It will then split the image into 64k chunks that are allocated on-demand. * It will then split the image into 64k chunks that are allocated on-demand.
* Initially the only RAM required is for the chunk map * Initially the only RAM required is for the chunk map
* The image is effectively intialized to all zeros, as each chunk is zeroed * The image is effectively initialized to all zeros, as each chunk is zeroed
* upon allocation * upon allocation
* Writes of all zeros do not allocate memory if none has yet been assigned * Writes of all zeros do not allocate memory if none has yet been assigned
* *
@ -45,7 +45,7 @@ imageDiskMemory::imageDiskMemory(uint32_t imgSizeK) : imageDisk(ID_MEMORY) {
//notes: //notes:
// this code always returns HARD DRIVES with 512 byte sectors // this code always returns HARD DRIVES with 512 byte sectors
// the code will round up in case it cannot make an exact match // the code will round up in case it cannot make an exact match
// it enforces a minimum drive size of 32kb, since a hard drive cannot be formatted as FAT12 with a smaller parition // it enforces a minimum drive size of 32kb, since a hard drive cannot be formatted as FAT12 with a smaller partition
// the code works properly throughout the range of a 32-bit unsigned integer, however: // the code works properly throughout the range of a 32-bit unsigned integer, however:
// a) for drives requesting more than 8,225,280kb, the number of cylinders will exceed 1024 // a) for drives requesting more than 8,225,280kb, the number of cylinders will exceed 1024
// b) for drives requesting ULONG_MAX kb, the drive it creates will be slightly larger than ULONG_MAX kb, due to rounding // b) for drives requesting ULONG_MAX kb, the drive it creates will be slightly larger than ULONG_MAX kb, due to rounding
@ -346,7 +346,7 @@ uint8_t imageDiskMemory::Write_AbsoluteSector(uint32_t sectnum, const void * dat
return 0x00; return 0x00;
} }
// Parition and format the ramdrive // Partition and format the ramdrive
uint8_t imageDiskMemory::Format() { uint8_t imageDiskMemory::Format() {
//verify that the geometry of the drive is valid //verify that the geometry of the drive is valid
if (this->sector_size != 512) { if (this->sector_size != 512) {

View File

@ -1765,7 +1765,7 @@ public:
if (!vcpi.enabled) return; if (!vcpi.enabled) return;
/* Install v86-callback that handles interrupts occuring /* Install v86-callback that handles interrupts occurring
in v86 mode, including protection fault exceptions */ in v86 mode, including protection fault exceptions */
call_v86mon.Install(&V86_Monitor,CB_IRET,"V86 Monitor"); call_v86mon.Install(&V86_Monitor,CB_IRET,"V86 Monitor");

View File

@ -372,14 +372,14 @@ graphics_chars:
/* General */ /* General */
case 0x30:/* Get Font Information */ case 0x30:/* Get Font Information */
switch (reg_bh) { switch (reg_bh) {
case 0x00: /* interupt 0x1f vector */ case 0x00: /* interrupt 0x1f vector */
{ {
RealPt int_1f=RealGetVec(0x1f); RealPt int_1f=RealGetVec(0x1f);
SegSet16(es,RealSeg(int_1f)); SegSet16(es,RealSeg(int_1f));
reg_bp=RealOff(int_1f); reg_bp=RealOff(int_1f);
} }
break; break;
case 0x01: /* interupt 0x43 vector */ case 0x01: /* interrupt 0x43 vector */
{ {
RealPt int_43=RealGetVec(0x43); RealPt int_43=RealGetVec(0x43);
SegSet16(es,RealSeg(int_43)); SegSet16(es,RealSeg(int_43));
@ -1173,7 +1173,7 @@ CX 640x480 800x600 1024x768/1280x1024
break; break;
default: default:
LOG(LOG_INT10,LOG_ERROR)("Function %4X not supported",reg_ax); LOG(LOG_INT10,LOG_ERROR)("Function %4X not supported",reg_ax);
// reg_al=0x00; //Successfull, breaks marriage // reg_al=0x00; //Successful, breaks marriage
break; break;
} }
return CBRET_NONE; return CBRET_NONE;

View File

@ -43,7 +43,7 @@ static uint8_t static_functionality[0x10]=
/* 7 */ 0x07, // 200, 350, 400 scan lines /* 7 */ 0x07, // 200, 350, 400 scan lines
/* 8 */ 0x04, // total number of character blocks available in text modes /* 8 */ 0x04, // total number of character blocks available in text modes
/* 9 */ 0x02, // maximum number of active character blocks in text modes /* 9 */ 0x02, // maximum number of active character blocks in text modes
/* a */ 0xff, // Misc Flags Everthing supported /* a */ 0xff, // Misc Flags Everything supported
/* b */ 0x0e, // Support for Display combination, intensity/blinking and video state saving/restoring /* b */ 0x0e, // Support for Display combination, intensity/blinking and video state saving/restoring
/* c */ 0x00, // reserved /* c */ 0x00, // reserved
/* d */ 0x00, // reserved /* d */ 0x00, // reserved

View File

@ -2142,7 +2142,7 @@ dac_text16:
unsigned char s3_mode = 0x00; unsigned char s3_mode = 0x00;
switch (CurMode->type) { switch (CurMode->type) {
case M_LIN4: // <- Theres a discrepance with real hardware on this case M_LIN4: // <- There's a discrepance with real hardware on this
case M_LIN8: case M_LIN8:
case M_LIN15: case M_LIN15:
case M_LIN16: case M_LIN16:
@ -2693,7 +2693,7 @@ public:
void doHelp(void) { void doHelp(void) {
WriteOut("VESAMOED VESA BIOS mode editor utility\n"); WriteOut("VESAMOED VESA BIOS mode editor utility\n");
WriteOut("\n"); WriteOut("\n");
WriteOut("NOTE: Due to architectual limitations of VBE emulation,\n"); WriteOut("NOTE: Due to architectural limitations of VBE emulation,\n");
WriteOut(" Adding new modes is not allowed.\n"); WriteOut(" Adding new modes is not allowed.\n");
WriteOut("\n"); WriteOut("\n");
WriteOut(" -mode <x> VBE video mode to edit.\n"); WriteOut(" -mode <x> VBE video mode to edit.\n");

View File

@ -348,7 +348,7 @@ void INT10_GetDACPage(uint8_t* mode,uint8_t* page) {
} }
/* the operations carried out here blanked the display because of the index (0x10/0x14) without bit 5, /* the operations carried out here blanked the display because of the index (0x10/0x14) without bit 5,
* write a dummy index with bit 5 to reenable the display. Bugfix for "Blue Force" MS-DOS game. * write a dummy index with bit 5 to re-enable the display. Bugfix for "Blue Force" MS-DOS game.
* *
* Note that DOSBox SVN had the same bug without this fix, but appeared to work because the AC blanking * Note that DOSBox SVN had the same bug without this fix, but appeared to work because the AC blanking
* didn't work. DOSBox SVN has a similar fix as of commit r4297. */ * didn't work. DOSBox SVN has a similar fix as of commit r4297. */

View File

@ -1771,7 +1771,7 @@ static Bitu INT33_Handler(void) {
* 04h Swedish * 04h Swedish
* 05h Finnish * 05h Finnish
* 06h Spanish * 06h Spanish
* 07h Portugese * 07h Portuguese
* 08h Italian * 08h Italian
* *
*/ */

View File

@ -142,7 +142,7 @@ typedef struct
/** /**
* \struct Sound_DecoderInfo * \struct Sound_DecoderInfo
* \brief Information about available soudn decoders. * \brief Information about available sound decoders.
* *
* Each decoder sets up one of these structs, which can be retrieved via * Each decoder sets up one of these structs, which can be retrieved via
* the Sound_AvailableDecoders() function. EVERY FIELD IN THIS IS READ-ONLY. * the Sound_AvailableDecoders() function. EVERY FIELD IN THIS IS READ-ONLY.
@ -426,7 +426,7 @@ SNDDECLSPEC void SDLCALL Sound_ClearError(void);
* via Sound_FreeSample(). * via Sound_FreeSample().
* *
* You do not have to keep a reference to (rw) around. If this function * You do not have to keep a reference to (rw) around. If this function
* suceeds, it stores (rw) internally (and disposes of it during the call * succeeds, it stores (rw) internally (and disposes of it during the call
* to Sound_FreeSample()). If this function fails, it will dispose of the * to Sound_FreeSample()). If this function fails, it will dispose of the
* SDL_RWops for you. * SDL_RWops for you.
* *

View File

@ -89,7 +89,7 @@ typedef struct __SOUND_DECODERFUNCTIONS__
* reinitialized, in which case this method will be tried again. * reinitialized, in which case this method will be tried again.
* *
* Note that the decoders quit() method won't be called if this * Note that the decoders quit() method won't be called if this
* method fails, so if you can't intialize, you'll have to clean * method fails, so if you can't initialize, you'll have to clean
* up the half-initialized state in this method. * up the half-initialized state in this method.
*/ */
int (*init)(void); int (*init)(void);

View File

@ -67,7 +67,7 @@ namespace EndianSwapper
public: public:
static T Swap(T v) static T Swap(T v)
{ {
assert(false); // Shoud not be here... assert(false); // Should not be here...
return v; return v;
} }
}; };

View File

@ -261,21 +261,21 @@ Uint64 load_existing_seek_points(const char* filename,
map<Uint64, drmp3_uint64>& pcm_frame_count_table, map<Uint64, drmp3_uint64>& pcm_frame_count_table,
vector<drmp3_seek_point_serial>& seek_points) { vector<drmp3_seek_point_serial>& seek_points) {
// The below sentinals sanity check and read the incoming // The below sentinels sanity check and read the incoming
// file one-by-one until all the data can be trusted. // file one-by-one until all the data can be trusted.
// Sentinal 1: bail if we got a zero-byte file. // Sentinel 1: bail if we got a zero-byte file.
struct stat buffer; struct stat buffer;
if (stat(filename, &buffer) != 0) { if (stat(filename, &buffer) != 0) {
return 0; return 0;
} }
// Sentinal 2: Bail if the file isn't big enough to hold our identifier. // Sentinel 2: Bail if the file isn't big enough to hold our identifier.
if (get_file_size(filename) < static_cast<int64_t>(sizeof(SEEK_TABLE_IDENTIFIER))) { if (get_file_size(filename) < static_cast<int64_t>(sizeof(SEEK_TABLE_IDENTIFIER))) {
return 0; return 0;
} }
// Sentinal 3: Bail if we don't get a matching identifier. // Sentinel 3: Bail if we don't get a matching identifier.
string fetched_identifier; string fetched_identifier;
ifstream infile(filename, ios_base::binary); ifstream infile(filename, ios_base::binary);
Archive<ifstream> deserialize(infile); Archive<ifstream> deserialize(infile);
@ -289,13 +289,13 @@ Uint64 load_existing_seek_points(const char* filename,
deserialize >> seek_points_table >> pcm_frame_count_table; deserialize >> seek_points_table >> pcm_frame_count_table;
infile.close(); infile.close();
// Sentinal 4: does the seek_points table have our stream's hash? // Sentinel 4: does the seek_points table have our stream's hash?
const auto p_seek_points = seek_points_table.find(stream_hash); const auto p_seek_points = seek_points_table.find(stream_hash);
if (p_seek_points == seek_points_table.end()) { if (p_seek_points == seek_points_table.end()) {
return 0; return 0;
} }
// Sentinal 5: does the pcm_frame_count table have our stream's hash? // Sentinel 5: does the pcm_frame_count table have our stream's hash?
const auto p_pcm_frame_count = pcm_frame_count_table.find(stream_hash); const auto p_pcm_frame_count = pcm_frame_count_table.find(stream_hash);
if (p_pcm_frame_count == pcm_frame_count_table.end()) { if (p_pcm_frame_count == pcm_frame_count_table.end()) {
return 0; return 0;

View File

@ -2529,7 +2529,7 @@ char *stb_replaceext(char *output, char *src, char *ext)
// //
// Implementation strategy: // Implementation strategy:
// chunked allocations come from the middle of chunks, and can't // chunked allocations come from the middle of chunks, and can't
// be freed. thefore they do not need to be on a sibling chain. // be freed. therefore they do not need to be on a sibling chain.
// they may need child pointers if they have children. // they may need child pointers if they have children.
// //
// chunked, with-children // chunked, with-children
@ -3088,7 +3088,7 @@ void stb_reassign(void *new_context, void *ptr)
// //
// stb_arr // stb_arr
// //
// An stb_arr is directly useable as a pointer (use the actual type in your // An stb_arr is directly usable as a pointer (use the actual type in your
// definition), but when it resizes, it returns a new pointer and you can't // definition), but when it resizes, it returns a new pointer and you can't
// use the old one, so you have to be careful to copy-in-out as necessary. // use the old one, so you have to be careful to copy-in-out as necessary.
// //
@ -12442,7 +12442,7 @@ STB_EXTERN int stb_bgio_stat (char *filename, stb_bgstat *result)
// //
// This is a clone of TCMalloc, but without the thread support. // This is a clone of TCMalloc, but without the thread support.
// 1. large objects are allocated directly, page-aligned // 1. large objects are allocated directly, page-aligned
// 2. small objects are allocated in homogeonous heaps, 0 overhead // 2. small objects are allocated in homogeoneous heaps, 0 overhead
// //
// We keep an allocation table for pages a la TCMalloc. This would // We keep an allocation table for pages a la TCMalloc. This would
// require 4MB for the entire address space, but we only allocate // require 4MB for the entire address space, but we only allocate

View File

@ -5603,7 +5603,7 @@ int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, in
0.97 - builds under c++ (typecasting, don't use 'class' keyword) 0.97 - builds under c++ (typecasting, don't use 'class' keyword)
0.96 - somehow MY 0.95 was right, but the web one was wrong, so here's my 0.95 rereleased as 0.96, fixes a typo in the clamping code 0.96 - somehow MY 0.95 was right, but the web one was wrong, so here's my 0.95 rereleased as 0.96, fixes a typo in the clamping code
0.95 - clamping code for 16-bit functions 0.95 - clamping code for 16-bit functions
0.94 - not publically released 0.94 - not publicly released
0.93 - fixed all-zero-floor case (was decoding garbage) 0.93 - fixed all-zero-floor case (was decoding garbage)
0.92 - fixed a memory leak 0.92 - fixed a memory leak
0.91 - conditional compiles to omit parts of the API and the infrastructure to support them: STB_VORBIS_NO_PULLDATA_API, STB_VORBIS_NO_PUSHDATA_API, STB_VORBIS_NO_STDIO, STB_VORBIS_NO_INTEGER_CONVERSION 0.91 - conditional compiles to omit parts of the API and the infrastructure to support them: STB_VORBIS_NO_PULLDATA_API, STB_VORBIS_NO_PUSHDATA_API, STB_VORBIS_NO_STDIO, STB_VORBIS_NO_INTEGER_CONVERSION

View File

@ -835,7 +835,7 @@ XXH_PUBLIC_API XXH128_hash_t XXH128(const void* data, size_t len, XXH64_hash_t s
* *
* The check costs one initial branch per hash, which is generally negligible, but not zero. * The check costs one initial branch per hash, which is generally negligible, but not zero.
* Moreover, it's not useful to generate binary for an additional code path * Moreover, it's not useful to generate binary for an additional code path
* if memory access uses same instruction for both aligned and unaligned adresses. * if memory access uses same instruction for both aligned and unaligned addresses.
* *
* In these cases, the alignment check can be removed by setting this macro to 0. * In these cases, the alignment check can be removed by setting this macro to 0.
* Then the code will always use unaligned memory access. * Then the code will always use unaligned memory access.
@ -1044,7 +1044,7 @@ static xxh_u32 XXH_read32(const void* memPtr)
#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ #endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */
/* *** Endianess *** */ /* *** Endianness *** */
typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess; typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess;
/*! /*!

View File

@ -2039,7 +2039,7 @@ bool ScreenSDL::event(SDL_Event &event) {
#if defined(C_SDL2) #if defined(C_SDL2)
/* handle mouse events only if it comes from the mouse. /* handle mouse events only if it comes from the mouse.
* ignore the fake mouse events some OSes generate from the touchscreen. * ignore the fake mouse events some OSes generate from the touchscreen.
* Note that Windows will fake mouse events, Linux/X11 wil not */ * Note that Windows will fake mouse events, Linux/X11 will not */
if (event.type == SDL_MOUSEMOTION || event.type == SDL_MOUSEBUTTONDOWN || event.type == SDL_MOUSEBUTTONUP) { if (event.type == SDL_MOUSEMOTION || event.type == SDL_MOUSEBUTTONDOWN || event.type == SDL_MOUSEBUTTONUP) {
if (event.button.which == SDL_TOUCH_MOUSEID) /* don't handle mouse events faked by touchscreen */ if (event.button.which == SDL_TOUCH_MOUSEID) /* don't handle mouse events faked by touchscreen */
return true;/*eat the event or else it will just keep calling objects until processed*/ return true;/*eat the event or else it will just keep calling objects until processed*/

View File

@ -605,7 +605,7 @@ protected:
Window *const parent; Window *const parent;
/// Child window of last button-down event /// Child window of last button-down event
/** It receives all drag/up/click/doubleclick events until an up event is received */ /** It receives all drag/up/click/double-click events until an up event is received */
Window *mouseChild; Window *mouseChild;
/// \c true if this window is transient (such as menu popus) /// \c true if this window is transient (such as menu popus)
@ -1002,7 +1002,7 @@ public:
/** \brief A 24 bit per pixel RGB framebuffer aligned to 32 bit per pixel. /** \brief A 24 bit per pixel RGB framebuffer aligned to 32 bit per pixel.
* *
* Warning: This framebuffer type varies with CPU endiannes. It is meant as * Warning: This framebuffer type varies with CPU endianness. It is meant as
* a testing/debugging tool. * a testing/debugging tool.
*/ */
class ScreenRGB32le : public Screen { class ScreenRGB32le : public Screen {

View File

@ -104,7 +104,7 @@ static uint8_t ioperm[8192];
static bool isNT = false; static bool isNT = false;
bool initPorttalk() { bool initPorttalk() {
// handles neded for starting service // handles needed for starting service
SC_HANDLE ServiceManager = NULL; SC_HANDLE ServiceManager = NULL;
SC_HANDLE PorttalkService = NULL; SC_HANDLE PorttalkService = NULL;
@ -148,7 +148,7 @@ bool initPorttalk() {
LOG_MSG("Porttalk service is not installed."); LOG_MSG("Porttalk service is not installed.");
break; break;
default: default:
LOG_MSG("Error %d occured accessing porttalk dirver.",retval); LOG_MSG("Error %d occurred accessing porttalk driver.",retval);
break; break;
} }
goto error; goto error;
@ -175,7 +175,7 @@ bool initPorttalk() {
if (porttalkhandle == INVALID_HANDLE_VALUE) { if (porttalkhandle == INVALID_HANDLE_VALUE) {
// bullshit // bullshit
LOG_MSG( LOG_MSG(
"Porttalk driver could not be opened after being started successully."); "Porttalk driver could not be opened after being started successfully.");
return false; return false;
} }

View File

@ -321,7 +321,7 @@ static void PasteInitMapSCToSDLKey()
// Just in case, to keep us from entering an unexpected KB state // Just in case, to keep us from entering an unexpected KB state
const size_t kPasteMinBufExtra = 4; const size_t kPasteMinBufExtra = 4;
/// Sightly inefficient, but who cares /// Slightly inefficient, but who cares
static void GenKBStroke(const UINT uiScanCode, const bool bDepressed, const SDLMod keymods) static void GenKBStroke(const UINT uiScanCode, const bool bDepressed, const SDLMod keymods)
{ {
const SDLKey sdlkey = aryScanCodeToSDLKey[uiScanCode & 0xFF]; const SDLKey sdlkey = aryScanCodeToSDLKey[uiScanCode & 0xFF];
@ -383,7 +383,7 @@ bool PasteClipboardNext() {
(bModCntrlOn ? KMOD_LCTRL : 0) | (bModCntrlOn ? KMOD_LCTRL : 0) |
(bModAltOn ? KMOD_LALT : 0)); (bModAltOn ? KMOD_LALT : 0));
/// \note Currently pasteing a character is a two step affair, because if /// \note Currently pasting a character is a two step affair, because if
/// you do it too quickly DI can miss a key press/release. /// you do it too quickly DI can miss a key press/release.
// Could be made more efficient, but would require tracking of more state, // Could be made more efficient, but would require tracking of more state,
// so let's forgot that for now... // so let's forgot that for now...

View File

@ -526,7 +526,7 @@ FILE *fopen_wrap(const char *path, const char *mode) {
*last = 0; *last = 0;
//If this compare fails, then we are dealing with files in / //If this compare fails, then we are dealing with files in /
//Which is outside the scope, but test anyway. //Which is outside the scope, but test anyway.
//However as realpath only works for exising files. The testing is //However as realpath only works for existing files. The testing is
//in that case not done against new files. //in that case not done against new files.
} }
char* check = realpath(work,NULL); char* check = realpath(work,NULL);

View File

@ -214,7 +214,7 @@ void SlirpEthernetConnection::ClearPortForwards(const bool is_udp, std::map<int,
if (slirp_remove_hostfwd(slirp, is_udp, host_addr, host_port) >= 0) if (slirp_remove_hostfwd(slirp, is_udp, host_addr, host_port) >= 0)
LOG_MSG("SLIRP: Removed old %s port %d:%d forward", protocol, host_port, guest_port); LOG_MSG("SLIRP: Removed old %s port %d:%d forward", protocol, host_port, guest_port);
else else
LOG_MSG("SLIRP: Failed removing old %s port %d:%d foward", protocol, host_port, guest_port); LOG_MSG("SLIRP: Failed removing old %s port %d:%d forward", protocol, host_port, guest_port);
existing_port_forwards.clear(); existing_port_forwards.clear();
} }

View File

@ -110,7 +110,7 @@ class SlirpEthernetConnection : public EthernetConnection {
std::list<int> registered_fds; /*!< File descriptors to watch */ std::list<int> registered_fds; /*!< File descriptors to watch */
// keep track of the ports fowarded // keep track of the ports forwarded
std::map<int, int> forwarded_tcp_ports = {}; std::map<int, int> forwarded_tcp_ports = {};
std::map<int, int> forwarded_udp_ports = {}; std::map<int, int> forwarded_udp_ports = {};
#ifndef WIN32 #ifndef WIN32

View File

@ -768,7 +768,7 @@ int my_miniunz(char ** savefile, const char * savefile2, const char * savedir, c
# endif # endif
strncpy(filename_try, zipfilename,MAXFILENAME-1); strncpy(filename_try, zipfilename,MAXFILENAME-1);
/* strncpy doesnt append the trailing NULL, of the string is too long. */ /* strncpy doesn't append the trailing NULL, of the string is too long. */
filename_try[ MAXFILENAME ] = '\0'; filename_try[ MAXFILENAME ] = '\0';
# ifdef USEWIN32IOAPI # ifdef USEWIN32IOAPI
@ -846,7 +846,7 @@ uLong filetime(char *f, tm_zip *tmzip, uLong *dt)
len = MAXFILENAME; len = MAXFILENAME;
strncpy(name, f,MAXFILENAME-1); strncpy(name, f,MAXFILENAME-1);
/* strncpy doesnt append the trailing NULL, of the string is too long. */ /* strncpy doesn't append the trailing NULL, of the string is too long. */
name[ MAXFILENAME ] = '\0'; name[ MAXFILENAME ] = '\0';
if (name[len - 1] == '/') if (name[len - 1] == '/')

View File

@ -318,7 +318,7 @@ bool Prop_int::CheckValue(Value const& in, bool warn) {
// if (!suggested_values.empty() && Property::CheckValue(in,warn)) return true; // if (!suggested_values.empty() && Property::CheckValue(in,warn)) return true;
if (!suggested_values.empty()) return Property::CheckValue(in,warn); if (!suggested_values.empty()) return Property::CheckValue(in,warn);
//No >= and <= in Value type and == is ambigious //No >= and <= in Value type and == is ambigiuous
int mi = min; int mi = min;
int ma = max; int ma = max;
int va = static_cast<int>(Value(in)); int va = static_cast<int>(Value(in));
@ -722,7 +722,7 @@ bool Section_prop::HandleInputline(string const& gegevens) {
((val[0] == '\"' && val[length - 1] == '\"' ) || ((val[0] == '\"' && val[length - 1] == '\"' ) ||
(val[0] == '\'' && val[length - 1] == '\'')) (val[0] == '\'' && val[length - 1] == '\''))
) val = val.substr(1,length - 2); ) val = val.substr(1,length - 2);
/* trim the results incase there were spaces somewhere */ /* trim the results in case there were spaces somewhere */
trim(name);trim(val); trim(name);trim(val);
for(it tel = properties.begin();tel != properties.end();++tel) { for(it tel = properties.begin();tel != properties.end();++tel) {
if (!strcasecmp((*tel)->propname.c_str(),name.c_str())) { if (!strcasecmp((*tel)->propname.c_str(),name.c_str())) {
@ -797,7 +797,7 @@ bool Config::PrintConfig(char const * const configfilename,int everything,bool n
FILE* outfile = fopen(configfilename,"w+t"); FILE* outfile = fopen(configfilename,"w+t");
if (outfile == NULL) return false; if (outfile == NULL) return false;
/* Print start of configfile and add a return to improve readibility. */ /* Print start of configfile and add a return to improve readability. */
if (!norem) { if (!norem) {
fprintf(outfile,MSG_Get("CONFIGFILE_INTRO"),VERSION); fprintf(outfile,MSG_Get("CONFIGFILE_INTRO"),VERSION);
fprintf(outfile,"\n"); fprintf(outfile,"\n");

View File

@ -353,7 +353,7 @@ static const struct
} }
state_table[] = state_table[] =
{ {
/* Render sates */ /* Render states */
{SC_RENDERSTATE, D3DRS_ZENABLE, "D3DRS_ZENABLE"}, /* 0x0 */ {SC_RENDERSTATE, D3DRS_ZENABLE, "D3DRS_ZENABLE"}, /* 0x0 */
{SC_RENDERSTATE, D3DRS_FILLMODE, "D3DRS_FILLMODE"}, {SC_RENDERSTATE, D3DRS_FILLMODE, "D3DRS_FILLMODE"},
{SC_RENDERSTATE, D3DRS_SHADEMODE, "D3DRS_SHADEMODE"}, {SC_RENDERSTATE, D3DRS_SHADEMODE, "D3DRS_SHADEMODE"},

View File

@ -58,7 +58,7 @@ static double sign(double a) {
/* /*
This function calculates what percentage of a rectangle intersected by a line lies near the center of the This function calculates what percentage of a rectangle intersected by a line lies near the center of the
cordinate system. It is mathematically exact, and well-tested for xcenter > 0 and ycenter > 0 (it's only coordinate system. It is mathematically exact, and well-tested for xcenter > 0 and ycenter > 0 (it's only
used that way). It should be correct for other cases as well, but well... famous last words :) used that way). It should be correct for other cases as well, but well... famous last words :)
*/ */
static double intersect_any(double xcenter, double ycenter, double xsize, double ysize, double yoffset, double gradient) { static double intersect_any(double xcenter, double ycenter, double xsize, double ysize, double yoffset, double gradient) {

View File

@ -221,7 +221,7 @@ Bitu OUTPUT_SURFACE_SetSize()
sdl.deferred_resize = false; sdl.deferred_resize = false;
sdl.must_redraw_all = true; sdl.must_redraw_all = true;
/* Fix a glitch with aspect=true occuring when /* Fix a glitch with aspect=true occurring when
changing between modes with different dimensions */ changing between modes with different dimensions */
SDL_FillRect(sdl.surface, NULL, SDL_MapRGB(sdl.surface->format, 0, 0, 0)); SDL_FillRect(sdl.surface, NULL, SDL_MapRGB(sdl.surface->format, 0, 0, 0));
#if DOSBOXMENU_TYPE == DOSBOXMENU_SDLDRAW #if DOSBOXMENU_TYPE == DOSBOXMENU_SDLDRAW

View File

@ -1003,7 +1003,7 @@ void GFX_EndTextLines(bool force) {
} }
#endif #endif
static uint8_t bcount = 0; static uint8_t bcount = 0;
Uint16 unimap[txtMaxCols+1]; // max+1 charaters in a line Uint16 unimap[txtMaxCols+1]; // max+1 characters in a line
int xmin = ttf.cols; // keep track of changed area int xmin = ttf.cols; // keep track of changed area
int ymin = ttf.lins; int ymin = ttf.lins;
int xmax = -1; int xmax = -1;

View File

@ -160,7 +160,7 @@ void AutoexecObject::Install(const std::string &in) {
//autoexec.bat is normally created AUTOEXEC_Init. //autoexec.bat is normally created AUTOEXEC_Init.
//But if we are already running (first_shell) //But if we are already running (first_shell)
//we have to update the envirionment to display changes //we have to update the environment to display changes
if(first_shell) { if(first_shell) {
//create a copy as the string will be modified //create a copy as the string will be modified

View File

@ -30,7 +30,7 @@ BatchFile::BatchFile(DOS_Shell * host,char const * const resolved_name,char cons
echo=host->echo; echo=host->echo;
shell=host; shell=host;
char totalname[DOS_PATHLENGTH+4]; char totalname[DOS_PATHLENGTH+4];
DOS_Canonicalize(resolved_name,totalname); // Get fullname including drive specificiation DOS_Canonicalize(resolved_name,totalname); // Get fullname including drive specification
cmd = new CommandLine(entered_name,cmd_line); cmd = new CommandLine(entered_name,cmd_line);
filename = totalname; filename = totalname;
@ -49,7 +49,7 @@ BatchFile::~BatchFile() {
} }
bool BatchFile::ReadLine(char * line) { bool BatchFile::ReadLine(char * line) {
//Open the batchfile and seek to stored postion //Open the batchfile and seek to stored position
if (!DOS_OpenFile(filename.c_str(),(DOS_NOT_INHERIT|OPEN_READ),&file_handle)) { if (!DOS_OpenFile(filename.c_str(),(DOS_NOT_INHERIT|OPEN_READ),&file_handle)) {
LOG(LOG_MISC,LOG_ERROR)("ReadLine Can't open BatchFile %s",filename.c_str()); LOG(LOG_MISC,LOG_ERROR)("ReadLine Can't open BatchFile %s",filename.c_str());
delete this; delete this;
@ -132,7 +132,7 @@ emptyline:
/* Not a command line number has to be an environment */ /* Not a command line number has to be an environment */
char * first = strchr(cmd_read,'%'); char * first = strchr(cmd_read,'%');
/* No env afterall. Ignore a single % */ /* No env after all. Ignore a single % */
if (!first) { if (!first) {
/* *cmd_write++ = '%';*/ /* *cmd_write++ = '%';*/
//check if input contains cycles + max/auto and that next character is space or empty //check if input contains cycles + max/auto and that next character is space or empty

View File

@ -1168,7 +1168,7 @@ void DOS_Shell::ProcessCmdLineEnvVarStitution(char *line) {
* ^ WTF? * ^ WTF?
* *
* So the below code has funny conditions to match Win95's weird rules on what * So the below code has funny conditions to match Win95's weird rules on what
* consitutes valid or invalid %variable% names. */ * constitutes valid or invalid %variable% names. */
/* continue scanning for the ending '%'. variable names are apparently meant to be /* continue scanning for the ending '%'. variable names are apparently meant to be
* alphanumeric, start with a letter, without spaces (if Windows 95 COMMAND.COM is * alphanumeric, start with a letter, without spaces (if Windows 95 COMMAND.COM is
@ -1425,7 +1425,7 @@ continue_1:
/* Fill the command line */ /* Fill the command line */
CommandTail cmdtail; CommandTail cmdtail;
cmdtail.count = 0; cmdtail.count = 0;
memset(&cmdtail.buffer,0,CTBUF); //Else some part of the string is unitialized (valgrind) memset(&cmdtail.buffer,0,CTBUF); //Else some part of the string is uninitialized (valgrind)
if (strlen(line)>=CTBUF) line[CTBUF-1]=0; if (strlen(line)>=CTBUF) line[CTBUF-1]=0;
cmdtail.count=(uint8_t)strlen(line); cmdtail.count=(uint8_t)strlen(line);
memcpy(cmdtail.buffer,line,strlen(line)); memcpy(cmdtail.buffer,line,strlen(line));
@ -1434,12 +1434,12 @@ continue_1:
MEM_BlockWrite(SegPhys(ss)+reg_sp+0x100,&cmdtail,CTBUF+1); MEM_BlockWrite(SegPhys(ss)+reg_sp+0x100,&cmdtail,CTBUF+1);
/* Split input line up into parameters, using a few special rules, most notable the one for /AAA => A\0AA /* Split input line up into parameters, using a few special rules, most notable the one for /AAA => A\0AA
* Qbix: It is extremly messy, but this was the only way I could get things like /:aa and :/aa to work correctly */ * Qbix: It is extremely messy, but this was the only way I could get things like /:aa and :/aa to work correctly */
//Prepare string first //Prepare string first
char parseline[258] = { 0 }; char parseline[258] = { 0 };
for(char *pl = line,*q = parseline; *pl ;pl++,q++) { for(char *pl = line,*q = parseline; *pl ;pl++,q++) {
if (*pl == '=' || *pl == ';' || *pl ==',' || *pl == '\t' || *pl == ' ') *q = 0; else *q = *pl; //Replace command seperators with 0. if (*pl == '=' || *pl == ';' || *pl ==',' || *pl == '\t' || *pl == ' ') *q = 0; else *q = *pl; //Replace command separators with 0.
} //No end of string \0 needed as parseline is larger than line } //No end of string \0 needed as parseline is larger than line
for(char* p = parseline; (p-parseline) < 250 ;p++) { //Stay relaxed within boundaries as we have plenty of room for(char* p = parseline; (p-parseline) < 250 ;p++) { //Stay relaxed within boundaries as we have plenty of room