diff --git a/gui/src/main_gui/profiledlg.cpp b/gui/src/main_gui/profiledlg.cpp index 07a22fb5..1a3a24e5 100644 --- a/gui/src/main_gui/profiledlg.cpp +++ b/gui/src/main_gui/profiledlg.cpp @@ -136,15 +136,16 @@ void ProfileDialog::Make(void) CPUFreqTxt=AddTextBox(0,FSKEY_NULL,FsGuiTextBox::HORIZONTAL,"CPU Speed (MHz)",4,YSTRUE); CPUFreqTxt->SetInteger(25); AddStaticText(0,FSKEY_NULL,"(Too-fast frequency rather slows down VM)",YSFALSE); - FPUBtn=AddTextButton(0,FSKEY_NULL,FSGUI_CHECKBOX,"Enable 80387 FPU",YSFALSE); RAMSizeTxt=AddTextBox(0,FSKEY_NULL,FsGuiTextBox::HORIZONTAL,"RAM (MB)",4,YSFALSE); RAMSizeTxt->SetInteger(4); + FPUBtn=AddTextButton(0,FSKEY_NULL,FSGUI_CHECKBOX,"Enable 80387 FPU",YSFALSE); AddStaticText(0,FSKEY_NULL,"CPU Fidelity:",YSTRUE); CPUFidelityDrp=AddEmptyDropList(0,FSKEY_NULL,"",8,20,20,YSFALSE); CPUFidelityDrp->AddString(i486DXCommon::FidelityLevelToStr(i486DXCommon::MID_FIDELITY).c_str(),YSTRUE); CPUFidelityDrp->AddString(i486DXCommon::FidelityLevelToStr(i486DXCommon::HIGH_FIDELITY).c_str(),YSFALSE); CPUFidelityHelpBtn=AddTextButton(0,FSKEY_NULL,FSGUI_PUSHBUTTON,"What's this?",YSFALSE); + pretend386DXBtn=AddTextButton(0,FSKEY_NULL,FSGUI_CHECKBOX,"Pretend 80386DX (for TownsOS V2.1 L10 etc.)",YSFALSE); CDImgBtn=AddTextButton(0,FSKEY_NULL,FSGUI_PUSHBUTTON,"CD Image:",YSTRUE); CDImgTxt=AddTextBox(0,FSKEY_NULL,FsGuiTextBox::HORIZONTAL,"",nShowPath,YSFALSE); @@ -203,9 +204,7 @@ void ProfileDialog::Make(void) townsTypeDrp->AddString(TownsTypeToStr(TOWNSTYPE_2_HC).c_str(),YSFALSE); townsTypeDrp->AddString(TownsTypeToStr(TOWNSTYPE_MARTY).c_str(),YSFALSE); - - pretend386DXBtn=AddTextButton(0,FSKEY_NULL,FSGUI_CHECKBOX,"Pretend 80386DX",YSFALSE); - + scanLineEffectIn15KHzBtn=AddTextButton(0,FSKEY_NULL,FSGUI_CHECKBOX,"Scanline Effect(Only 15khz Screen)",YSFALSE); damperWireLineBtn=AddTextButton(0,FSKEY_NULL,FSGUI_CHECKBOX,"Render Damper-Wire Line (to make you nostalgic)",YSFALSE); startUpStateFNameBtn=AddTextButton(0,FSKEY_NULL,FSGUI_PUSHBUTTON,"Load VM State",YSTRUE); @@ -1294,6 +1293,7 @@ TownsProfile ProfileDialog::GetProfile(void) const } + profile.scanLineEffectIn15KHz=(YSTRUE==scanLineEffectIn15KHzBtn->GetCheck()); profile.damperWireLine=(YSTRUE==damperWireLineBtn->GetCheck()); profile.separateProcess=(YSTRUE==separateProcBtn->GetCheck()); @@ -1535,6 +1535,8 @@ void ProfileDialog::SetProfile(const TownsProfile &profile) strikeCommanderThrottleAxisDrp->Disable(); } + scanLineEffectIn15KHzBtn->SetCheck(profile.scanLineEffectIn15KHz ? YSTRUE : YSFALSE); + damperWireLineBtn->SetCheck(profile.damperWireLine ? YSTRUE : YSFALSE); keyboardModeDrp->SelectByString(TownsKeyboardModeToStr(profile.keyboardMode).c_str()); @@ -1676,7 +1678,7 @@ void ProfileDialog::ExplainCPUFidelity(void) L"Since High-Fidelity CPU needs to check and handle more exceptions, it is slower than Medium-Fidelity\n" L"CPU core.\n" L"\n" - L"Windows 3.1 requires High-Fidelity CPU core.\n", + L"Windows 3.1, Windows 95, Linux, and OSASK requires High-Fidelity CPU core.\n", L"OK",nullptr); AttachModalDialog(dlg); } diff --git a/gui/src/main_gui/profiledlg.h b/gui/src/main_gui/profiledlg.h index 72fab848..032f1804 100644 --- a/gui/src/main_gui/profiledlg.h +++ b/gui/src/main_gui/profiledlg.h @@ -31,6 +31,7 @@ class ProfileDialog : public FsGuiDialog FsGuiButton *ROMDirBtn,*CDImgBtn,*FDImgBtn[TownsProfile::NUM_FDDRIVES],*HDImgBtn[TownsProfile::MAX_NUM_SCSI_DEVICES]; FsGuiButton *FDWriteProtBtn[TownsProfile::NUM_FDDRIVES]; + FsGuiButton *scanLineEffectIn15KHzBtn; FsGuiButton *damperWireLineBtn; FsGuiTextBox *ROMDirTxt,*CDImgTxt,*FDImgTxt[TownsProfile::NUM_FDDRIVES],*HDImgTxt[TownsProfile::MAX_NUM_SCSI_DEVICES]; FsGuiDropList *CDSpeedDrp; diff --git a/gui/src/profile/townsprofile.cpp b/gui/src/profile/townsprofile.cpp index e78a2aff..22bfc538 100644 --- a/gui/src/profile/townsprofile.cpp +++ b/gui/src/profile/townsprofile.cpp @@ -266,6 +266,10 @@ std::vector TownsProfile::Serialize(void) const sstream << "DAMPWIRE " << (damperWireLine ? 1 : 0); text.push_back(sstream.str()); + sstream.str(""); + sstream << "SCANLINE15K " << (scanLineEffectIn15KHz ? 1 : 0); + text.push_back(sstream.str()); + for(auto vk : virtualKeys) { if(""!=vk.townsKey && 0<=vk.physicalId) @@ -706,6 +710,13 @@ bool TownsProfile::Deserialize(const std::vector &text) damperWireLine=(0!=argv[1].Atoi()); } } + else if (0 == argv[0].STRCMP("SCANLINE15K")) + { + if(2<=argv.size()) + { + scanLineEffectIn15KHz=(0!=argv[1].Atoi()); + } + } else if(0==argv[0].STRCMP("FMVOLUME")) { if(2<=argv.size()) @@ -1083,6 +1094,11 @@ std::vector TownsProfile::MakeArgv(void) const argv.push_back("-DAMPERWIRELINE"); } + if(true==scanLineEffectIn15KHz) + { + argv.push_back("-SCANLINE15K"); + } + for(auto vk : virtualKeys) { if(0<=vk.physicalId && ""!=vk.townsKey) diff --git a/src/towns/crtc/crtc.cpp b/src/towns/crtc/crtc.cpp index d77cde07..81856bef 100644 --- a/src/towns/crtc/crtc.cpp +++ b/src/towns/crtc/crtc.cpp @@ -334,7 +334,7 @@ bool TownsCRTC::InHSYNC(const unsigned long long int townsTime) const bool TownsCRTC::First1msOfVerticalPeriod(const unsigned long long int townsTime) const { unsigned int intoFrame=((unsigned long long)townsTime)%VSYNC_CYCLE; - return intoFrame<1000000; + return 1000000>1; - for(int y=0; y+dy>3)*4.7); + linePtr[1]=(unsigned char)((unsigned int)(linePtr[1]>>3)*4.7); + linePtr[2]=(unsigned char)((unsigned int)(linePtr[2]>>3)*4.7); linePtr+=4; } } diff --git a/src/towns/townsthread.cpp b/src/towns/townsthread.cpp index 4c81d2bc..78355198 100644 --- a/src/towns/townsthread.cpp +++ b/src/towns/townsthread.cpp @@ -192,13 +192,13 @@ void TownsThread::VMMainLoopTemplate( } break; } + + CheckRenderingTimer(*townsPtr,*window,outside_world->ImageNeedsFlip()); } } townsPtr->ProcessSound(outside_world); townsPtr->cdrom.UpdateCDDAState(townsPtr->state.townsTime); - CheckRenderingTimer(*townsPtr,*window,outside_world->ImageNeedsFlip()); - outside_world->ProcessAppSpecific(*townsPtr); if(townsPtr->state.nextDevicePollingTimestate.townsTime) {