How to increase size of DOSBox window? - dosbox

I am running Turbo C on DOSBox in Ubuntu 12.04.
The problem is that two black stripes are coming on either of screen. I want to remove them.
My computer is a Dell Studio 15z with screen resolution 1366x768. I don't have a problem even if distortion occurs.
Relevant part of my dosbox.conf file:
[sdl]
fullscreen=true
fulldouble=false
fullresolution=1366x768
windowresolution=1366x768
output=overlay
autolock=true
sensitivity=100
waitonerror=true
priority=higher,normal
mapperfile=mapper-0.74.map
usescancodes=true

go to dosbox installation directory (on my machine that is C:\Program Files (x86)\DOSBox-0.74 ) as you see the version number is part of the installation directory name.
run "DOSBox 0.74 Options.bat"
the script starts notepad with configuration file: here change
windowresolution=1600x800
output=ddraw
NOTE: Non-windows users will want to use output=opengl instead.
(the resolution can't be changed if output=surface - that's the default).
safe configuration file changes.

For using DOSBox with SDL, you will need to set or change the following:
[sdl]
windowresolution=1280x960
output=opengl
Here is three options to put those settings:
Edit user's default configuration, for example, using vi:
$ dosbox -printconf
/home/USERNAME/.dosbox/dosbox-0.74.conf
$ vi "$(dosbox -printconf)"
$ dosbox
For temporary resize, create a new configuration with the three lines above, say newsize.conf:
$ dosbox -conf newsize.conf
You can use -conf to load multiple configuration and/or with -userconf for default configuration, for example:
$ dosbox -userconf -conf newsize.conf
[snip]
---
CONFIG:Loading primary settings from config file /home/USERNAME/.dosbox/dosbox-0.74.conf
CONFIG:Loading additional settings from config file newsize.conf
[snip]
Create a dosbox.conf under current directory, DOSBox loads it as default.
DOSBox should start up and resize to 1280x960 in this case.
Note that you probably would not get any size you desired, for instance, I set 1280x720 and I got 1152x720.

Here's how to change the dosbox.conf file in Linux to increase the size of the window. I actually DID what follows, so I can say it works (in 32-bit PCLinuxOS fullmontyKDE, anyway). The question's answer is in the .conf file itself.
You find this file in Linux at /home/(username)/.dosbox . In Konqueror or Dolphin, you must first check 'Hidden files' or you won't see the folder. Open it with KWrite superuser or your fav editor.
Save the file with another name like 'dosbox-0.74original.conf' to preserve the original file in case you need to restore it.
Search on 'resolution' and carefully read what the conf file says about changing it. There are essentially two variables: resolution and output. You want to leave fullresolution alone for now. Your question was about WINDOW, not full. So look for windowresolution, see what the comments in conf file say you can do. The best suggestion is to use a bigger-window resolution like 900x800 (which is what I used on a 1366x768 screen), but NOT the actual resolution of your machine (which would make the window fullscreen, and you said you didn't want that). Be specific, replacing the 'windowresolution=original' with 'windowresolution=900x800' or other dimensions. On my screen, that doubled the window size just as it does with the max Font tab in Windows Properties (for the exe file; as you'll see below the ==== marks, 32-bit Windows doesn't need Dosbox).
Then, search on 'output', and as the instruction in the conf file warns, if and only if you have 'hardware scaling', change the default 'output=surface' to something else; he then lists the optional other settings. I changed it to 'output=overlay'. There's one other setting to test: aspect. Search the file for 'aspect', and change the 'false' to 'true' if you want an even bigger window. When I did this, the window took up over half of the screen. With 'false' left alone, I had a somewhat smaller window (I use widescreen monitors, whether laptop or desktop, maybe that's why).
So after you've made the changes, save the file with the original name of dosbox-0.74.conf . Then, type dosbox at the command line or create a Launcher (in KDE, this is a right click on the desktop) with the command dosbox. You still have to go through the mount command (i.e., mount c~ c:\123 if that's the location and file you'll execute). I'm sure there's a way to make a script, but haven't yet learned how to do that.

Looking again at your question, I think I see what's wrong with your conf file. You set:
fullresolution=1366x768
windowresolution=1366x768
That's why you're getting the letterboxing (black on either side). You've essentially told Dosbox that your screen is the same size as your window, but your screen is actually bigger, 1600x900 (or higher) per the Googled specs for that computer. So the 'difference' shows up in black. So you either should change fullresolution to your actual screen resolution, or revert to fullresolution=original default, and only specify the window resolution.
So now I wonder if you really want fullscreen, though your question asks about only a window. For you are getting a window, but you sized it short of your screen, hence the two black stripes (letterboxing). If you really want fullscreen, then you need to specify the actual resolution of your screen. 1366x768 is not big enough.
The next issue is, what's the resolution of the program itself? It won't go past its own resolution. So if the program/game is (natively) say 1280x720 (HD), then your window resolution setting shouldn't be bigger than that (remember, it's fixed not dynamic when you use AxB as windowresolution).
Example: DOS Lotus 123 will only extend eight columns and 20 rows. The bigger the Dosbox, the bigger the text, but not more columns and rows. So setting a higher windowresolution for that, only results in bigger text, not more columns and rows. After that you'll have letterboxing.
Hope this helps you better.

Related

Sublime text build system, using ~ and /home/username directories

I have my own build system for perl test files, and it works just fine except when capturing input. If I have an open file called, e.g., ~/projects/something.pm, on error the output of the build system will be something like Failed test at /home/username/projects/something.pm line 66.
The regex for capturing works fine, the problem is that sublime thinks that the two files are in different paths, so it opens a new tab, and I just want the open file to be brought up front.
Is there any setting to make this "match"?
EDIT: My .sublime-build file is generated every time I run the build, to support the fact that I may want to run a single test instead of all the file.
I have my own plugin that detects which test I'm using the cursor position and appends that to the command line. It makes no difference though, since the behaviour is always the same, even with a "standard" build.
The contents of the .sublime-build file are like this:
{
"shell_cmd" : "prove $file_path/$file_name" ,
"working_dir" : "/home/username/projects/",
"file_regex": " at (.*.pm) line ([0-9]*)",
}
I've tried replacing /home/username with the ~ character, but for some reason this breaks the build system, and when building I just get a black output panel, with the status bar saying "Building...".
I've found the real problem with a workaround anyway, posted that as an answer.
The problem in this case was that I didn't notice that the main directory of the project (which is generated beforehand), is actually a link to a directory of another user.
This means that if you add a folder to your project and that folder is a link, in the output you'll get the "real" directory, not the link.
Solved by removing the symbolic link folder from the project and adding the destination of the link as a folder to the project and now it works fine.

How do I change the font size in NCSIM gui?

We are using specman with NCSIM (IUS 12.2) in GUI mode.
I saw the answer on how to change the specview gui font settings, it works with Specview but not with the NCSIM gui.
How can we make the same thing for the simulator?
Currently there is no Simvision command or menu selection that will change the font size.
However, there is an alternate approach that you can use. Look for a file called
'Xdefaults' under your .simvision directory in your home directory ($HOME).
i.e. ~/.simvision/Xdefaults
If not, do the following:
There is a file called SimVision under
/share/cdssetup/simvision/app-defaults/
Copy the file 'SimVision' to ~/.simvision and name it 'Xdefaults'.
Now edit this Xdefaults file. It will have a section which looks like this,
! global settings
Simvision*foreground: black
Simvision*background: #dfdfdf
Simvision*Font: -adobe-helvetica-medium-r-normal--12-------*
Change the last line above to:
Simvision*Font: -adobe-helvetica-medium-r-normal--18-------*
or any other suitable number besides the default 12 to suit your needs.
Save this file and now invoke SimVision - you should see the font sizes increased.
In general, you can review and edit the Xdefaults file above to change the fonts of various windows.
For example - to change the font of the Source Browser - you can locate the following line in the Xdefaults file and edit it :
Simvision*SrcBrowser.fixedFont: --courier-medium-r-normal--12-
Simvision*SrcBrowser.valueFont: --courier-medium-r-normal--10-
Change Fonts of 'Cursor' & 'Cursor - Baseline'on Waveform Browser by adding following in /.simvision/Xdefaults
Simvision*WaveSet.deltaFont:
Change Fonts of 'Current time in the simulator'on Waveform Browser by adding following in ~/.simvision/Xdefaults

how to set -A flag in screenrc

The screen man says
‘-A’
Adapt the sizes of all windows to the size of the display. By
default, screen may try to restore its old window sizes when attaching
to resizable terminals (those with ‘WS’ in their descriptions, e.g.
suncmd or some varieties of xterm).
This works when you start off a screen with the -A flag. But, how do I set it in screenrc so that all my screen sessions get it by default?
fit
Change the window size to the size of the current region. This command is needed
because screen doesn't adapt the window size automatically if the window is dis-
played more than once.
Default key binding for fit is C-a F.

Beyond Compare 3 editing disabled

With BC2, when i click the Show differences... option in SourceGear Vault. It allow me to copy from the repository to the working version and save but I can't do this with BC3. It doesn't allow copying to the otherside (right) and have the editing disabled showing at the bottom of the BC3. It is even the same with DiffMerge. What am I not understanding here?
Can someone explain to me why the changes in BC3 and is there a workaround?
Beyond Compare will disable editing of a file for any of the following reasons:
It's one of the input files in a 3-way merge
The comparison was cancelled
The comparison encountered an error (corrupt file, invalid character encoding, out of memory, gamma rays, etc)
The file format's conversion settings don't support converting back to the original format (MS Word, PDF)
The file is on a read-only "filesystem" (7zip/RAR/CHM archives, CD/DVD-ROMs)
A file or parent folder had editing explicitly disabled by the user in the session settings or using the /ro command line switches
The viewer itself doesn't support editing (eg, Hex Compare prior to v4)
Also, the Full Edit (F2) toggle in the Text Compare View menu switches between inline editing and line-based mode. If it's disabled you can copy/delete whole lines and type in the line details edits at the bottom of the window, but the main windows won't have a cursor, typing is disabled, and it will always select whole lines. Unlike the above items, this doesn't show "Editing Disabled" in the status bar.
there must be a flag on the command line to call BC such as /ro# or /#ro or /(side)readonly (where side is left or right), it prevents editing.
these flags are there because differs are often called with temporary files to diff, in particular from SCC. and Vault probably has a single "external diff" command, thus you have to choose whether the flags are always there, it protects you from unexpectly editing a temporary file and loose this work when closing the diff tool, or not.
The few reasons I have found are:
If the encoding of the file is different than the default. In this case change the encoding to the expected one. (Japanese-ShiftJIS in my case)
If a refresh of files is in progress.

CFBuilder:- File dissappears from the SS/workspace off and on

What is the issue with CFBuilder?
I am trying to Check out a file from SS/CFBuilder and all i get is the message
80020009: Network not found.[src=SourceSafe,guid=null]
In fact even perfectly working files that are months old,suddenly become "removed from SS".As a result of which I have only "Team/Commit Changes" option for a given file.The "Team/CheckIn ..CheckOut" options are blanked out.
Also when I am trying to click the "Show Local History",for an pretty old/often used file, it throws an message
No local History available for selected resource!
The Same message is coming for each and every file.
Please help.
Vas
The issue is likely in Eclipse. Eclipse allows you to store local history for the files that have a size lower than 1 MB.
Goto Window >Preferences >General >Workspace >Local History
Increase the Maximum file size so that it is higher than the size of your files.
After applying the change, the next time the file is saved, Eclipse will create a history.