Installing and Running DOSBox on PS Vita (PSP Emulator) on TN-V8 Exploit

I missed DOS games. And luckily PS Vita has an emulator ported from DOSBox allowing you run DOS game on the go.

There are many builds of DOSBox for PSP available, with the immediate search showing the following versions (DD/MM/YY)


03/08/08, 26/07/08, 07/06/08, 25/06/08, 02/01/08, 29/01/08, 26/11/07



However, I noticed that not all builds will work on the PSP emulator in PS Vita exploited using TN-V.

Perhaps I should rephrase, all the builds will run fine without selecting core=dynamic options. Unfortunately, this option is essential and a MUST to run the game smoothly while other options such as simple and normal is not enough. From my testing thus far, the only build that work fine with core=dynamic option is a build from 26/11/07.

Enough with the introduction, let's get started to install DOSBox on your PSP.


First, grab a build of DOSBox from a list here and install it on your PSP. I highly recommend to download the build from 26/11/07 here.

* Follow my previous tutorial on how to install homebrew on PSP here if you do not know how to do so.

Next, launch DOSBox and make sure you do not encounter any error such as 'bus error', 'inst error', or 'data error'. As mentioned, these error will only occur if you select core=dynamic options in other builds except 2007 ones here.

Error image

A successful launch will look similar to the screenshot below:
Success image

You may have noticed now that there is no on-screen keyboard to enter any input. So what is the way to do that? Well, the most common way is to create a dosbox.conf file and insert the commands that you want to input in the [autoexec] section.

Following shows a fresh standard dosbox.conf:

* The bolded text is the most commonly tweak settings.

[sdl]
# fullscreen -- Start dosbox directly in fullscreen.
# fulldouble -- Use double buffering in fullscreen.
# fullresolution -- What resolution to use for fullscreen: original or fixed size (e.g. 1024x768).
# windowresolution -- Scale the window to this size IF the output device supports hardware scaling.
# output -- What to use for output: surface,overlay,opengl,openglnb,ddraw.
# autolock -- Mouse will automatically lock, if you click on the screen.
# sensitiviy -- Mouse sensitivity.
# waitonerror -- Wait before closing the console if dosbox has an error.
# priority -- Priority levels for dosbox: lowest,lower,normal,higher,highest,pause (when not focussed).
#   Second entry behind the comma is for when dosbox is not focused/minimized.
# mapperfile -- File used to load/save the key/event mappings from.
# usescancodes -- Avoid usage of symkeys, might not work on all operating systems.

fullscreen=true
fulldouble=false
fullresolution=original
windowresolution=original
output=surface
autolock=true
sensitivity=35
waitonerror=true
INPUTMAP up up 
INPUTMAP right right 
INPUTMAP down down 
INPUTMAP left left 
INPUTMAP triangle d 
INPUTMAP square lshift
INPUTMAP cross lctrl
INPUTMAP circle laltpriority=higher,normal
mapperfile=mapper.txt
usescancodes=true
keyhint=true

[dosbox]
# language -- Select another language file.
# memsize -- Amount of memory dosbox has in megabytes.
# machine -- The type of machine tries to emulate:hercules,cga,tandy,pcjr,vga.
# captures -- Directory where things like wave,midi,screenshot get captured.

language=
machine=vga
captures=capture
memsize=10

[render]
# frameskip -- How many frames dosbox skips before drawing one.
# aspect -- Do aspect correction, if your output method doesn't support scaling this can slow things down!.
# scaler -- Scaler used to enlarge/enhance low resolution modes.
# Supported are none,normal2x,normal3x,advmame2x,advmame3x,hq2x,hq3x,
# 2xsai,super2xsai,supereagle,advinterp2x,advinterp3x,
# tv2x,tv3x,rgb2x,rgb3x,scan2x,scan3x.

frameskip=0
aspect=false
scaler=normal2x

[cpu]
# core -- CPU Core used in emulation: normal,simple,dynamic,auto.
#    auto switches from normal to dynamic if appropriate.
# cycles -- Amount of instructions dosbox tries to emulate each millisecond.
# Setting this value too high results in sound dropouts and lags.
# You can also let DOSBox guess the correct value by setting it to max.
# The default setting (auto) switches to max if appropriate.
# cycleup   -- Amount of cycles to increase/decrease with keycombo.
# cycledown    Setting it lower than 100 will be a percentage.

core=dynamic
cycles=sync
cycleup=2500
cycledown=400
autocycle=true
mincycles=600
maxcycles=3000

[mixer]
# nosound -- Enable silent mode, sound is still emulated though.
# rate -- Mixer sample rate, setting any devices higher than this will
#    probably lower their sound quality.
# blocksize -- Mixer block size, larger blocks might help sound stuttering
#    but sound will also be more lagged.
# prebuffer -- How many milliseconds of data to keep on top of the blocksize.

nosound=false
rate=22050
blocksize=2048
prebuffer=10

[midi]
# mpu401 -- Type of MPU-401 to emulate: none, uart or intelligent.
# device -- Device that will receive the MIDI data from MPU-401.
# This can be default,alsa,oss,win32,coreaudio,none.
# config -- Special configuration options for the device. In Windows put
# the id of the device you want to use. See README for details.

mpu401=intelligent
device=default
config=

[sblaster]
# sbtype -- Type of sblaster to emulate:none,sb1,sb2,sbpro1,sbpro2,sb16.
# sbbase,irq,dma,hdma -- The IO/IRQ/DMA/High DMA address of the soundblaster.
# mixer -- Allow the soundblaster mixer to modify the dosbox mixer.
# oplmode -- Type of OPL emulation: auto,cms,opl2,dualopl2,opl3.
#  On auto the mode is determined by sblaster type.
#  All OPL modes are 'Adlib', except for CMS.
# oplrate -- Sample rate of OPL music emulation.

sbtype=sb16
sbbase=220
irq=7
dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=22050

[gus]
# gus -- Enable the Gravis Ultrasound emulation.
# gusbase,irq1,irq2,dma1,dma2 -- The IO/IRQ/DMA addresses of the 
#  Gravis Ultrasound. (Same IRQ's and DMA's are OK.)
# gusrate -- Sample rate of Ultrasound emulation.
# ultradir -- Path to Ultrasound directory.  In this directory
#   there should be a MIDI directory that contains
#   the patch files for GUS playback.  Patch sets used
#   with Timidity should work fine.

gus=true
gusrate=22050
gusbase=240
irq1=5
irq2=5
dma1=3
dma2=3
ultradir=C:\ULTRASND

[speaker]
# pcspeaker -- Enable PC-Speaker emulation.
# pcrate -- Sample rate of the PC-Speaker sound generation.
# tandy -- Enable Tandy Sound System emulation (off,on,auto).
# For auto Tandysound emulation is present only if machine is set to tandy.
# tandyrate -- Sample rate of the Tandy 3-Voice generation.
# disney -- Enable Disney Sound Source emulation.

pcspeaker=true
pcrate=22050
tandy=auto
tandyrate=22050
disney=true

[joystick]
# joysticktype -- Type of joystick to emulate: auto (default), none,
#  2axis (supports two joysticks), 4axis,
#  fcs (Thrustmaster), ch (CH Flightstick).
#  none disables joystick emulation.
#  auto chooses emulation depending on real joystick(s).
# timed -- enable timed intervals for axis. (false is old style behaviour).
# autofire -- continuously fires as long as you keep the button pressed.
# swap34 -- swap the 3rd and the 4th axis. can be useful for certain joysticks.
# buttonwrap -- enable button wrapping at the number of emulated buttons.

joysticktype=2axis
timed=false
autofire=false
swap34=false
buttonwrap=true

[serial]
# serial1-4 -- set type of device connected to com port.
#    Can be disabled, dummy, modem, nullmodem, directserial.
#    Additional parameters must be in the same line in the form of
#    parameter:value. Parameter for all types is irq.
#    for directserial: realport (required), rxdelay (optional).
#    for modem: listenport (optional).
#    for nullmodem: server, rxdelay, txdelay, telnet, usedtr,
#    transparent, port, inhsocket (all optional).
#    Example: serial1=modem listenport:5000

serial1=dummy
serial2=dummy
serial3=disabled
serial4=disabled

[dos]
# xms -- Enable XMS support.
# ems -- Enable EMS support.
# umb -- Enable UMB support.
# keyboardlayout -- Language code of the keyboard layout (or none).

xms=true
ems=true
umb=true
keyboardlayout=none

[ipx]
# ipx -- Enable ipx over UDP/IP emulation.

ipx=false

[autoexec]
# Lines in this section will be run at startup.
SYSOPT clock 333

This config file is used to tweak the DOSBox emulator environment such as CPU type, CPU speed, memory, sound. Fortunately, the default settings works fine without the need for any modification.

There are several important things to note:
- You CANNOT allocate more than 10MB of memory. Anything larger than that will cause a permanent blank screen when launching DOSBox. Fortunately the CPU speed matters most compared to the memory size.

- You can only use the core=dynamic option with the 2007 build. Having this option set with other build will result in exception error such as 'bus error', 'inst error', or 'data error', like the figure below:
- DOSBox on PS Vita do not have any on-screen virtual keyboard. The most convenience way is map the button input from PS Vita to the keyboard in DOSBox using the INPUTMAP.

- Any command that you typed in [autoexec] section will be executed when launching DOSBox. Usually commands like mount and INPUTMAPPER are put here.

Following show a series of commands that I want DOSBox to execute upon launch. Assuming that I had MARIO.EXE placed in ms0:/dosbox/. In particular, it will mount my ms0:/dosbox as the C: drive. Go to C: drive. And then execute MARIO.EXE game.

[autoexec]
mount c ms0:/dosbox
c:
mario.exe

As you joyfully bashing the buttons, you will find that none of the buttons that you pressed works. The reason is simple, we haven't map our buttons to the keyboard in DOSBox yet! To do this, we are going to use the INPUTMAP command placed in [autoexec] section.


Mapping the Inputs (PS Vita Buttons <-> DOSBox Keyboard)

The command syntax to map button using INPUTMAP is as follows
INPUTMAP <PS Vita Button> <Keyboard Button>

In particular, the command INPUTMAP square lshift will map the Square button of your PS Vita to the keyboard button Left Shift in DOSBox.


[autoexec]

INPUTMAP up up 
INPUTMAP right right 
INPUTMAP down down 
INPUTMAP left left 
INPUTMAP triangle d 
INPUTMAP square lshift
INPUTMAP cross lctrl
INPUTMAP circle lalt


mount c ms0:/dosbox
c:
mario.exe



Now launching DOSBox again and the input still does not work. This is a very fatal common mistake that people made. Don't mistaken me. The mapping is correct. However, we didn't really 'tell' the game to use the mapping.

The correct way to do is to execute the game using the INPUTMAP EXEC command rather than launching the game directly.

[autoexec]

INPUTMAP up up 
INPUTMAP right right 
INPUTMAP down down 
INPUTMAP left left 
INPUTMAP triangle d 
INPUTMAP square lshift
INPUTMAP cross lctrl
INPUTMAP circle lalt


mount c ms0:/dosbox
c:
INPUTMAP EXEC mario.exe


Now you may noticed that every time I want to change the game I have to modify the dosbox.conf files, which is practically inconvenient and unaccessible when you are on the go without any computer nearby. Luckily people had thought of it and created a program called DosBox Navigator. This program is essentially a file browser allowing you to browse and open any files within its root folder.

To start, grab a copy of DosBox Navigator here and extract the contents somewhere on your PS Vita memory stick. For convenience I simply put it on ms0:/dosbox/doscore

The executable for DosNavigator is DN.COM. So we will have to modify our dosbox.conf accordingly.
[autoexec]
mount c ms0:/dosbox/doscore
c:
dn.com

This will launch DosNavigator every time we launch the DosBox application.

Creating Different Input Key Profile for Each Game

Now another question arise, we will have to create a different input profile for different games since not every game will use the same key binding. For instance, some game will require additional key such as WSAD for movement instead of the arrow key.

The solution to this is to create a .bat file (batch file) for each game. For example, I will have a .bat file for Mario and another one for Prince of Persia. These .bat file shall contain all the commands for INPUTMAP and mount point for launching the game.

mario.bat - For running Mario
@ECHO ON
INPUTMAP up up
INPUTMAP right right
INPUTMAP down down
INPUTMAP left left
INPUTMAP triangle d
INPUTMAP square lshift
INPUTMAP cross lctrl
INPUTMAP circle lalt
mount c ms0:/dosbox/game/mario
c:
INPUTMAP exec mario.exe


prince.bat - For running Prince of Persia 1
@ECHO ON
INPUTMAP up up
INPUTMAP right right
INPUTMAP down down
INPUTMAP left left
INPUTMAP triangle down
INPUTMAP square lshift
INPUTMAP cross up
INPUTMAP circle circle
INPUTMAP start enter
INPUTMAP select esc
mount c ms0:/dosbox/game/pop1
c:
INPUTMAP exec prince

Using DosNavigator, I can then simply open these .bat file and they should launch the game for me using the right input map as defined in the .bat file.

FAQ

Q: Can I run legacy windows such as Windows 95 on DOSBox for PSP?
A: I had tried but encounter 'Out of Memory' error since I couldn't allocate more than 10 MB in any of the DOSBox for PSP build that I tried.

Q: Can I allocate more than 10MB of memory for DOSBox?
A: No. Allocating any memory greater than that will result in a permanent blank screen on DOSBox. Don't worry though 10MB is enough to run most of the DOS games. The only thing matter is the CPU speed, which the 333MHz on PSP is capable to handle.




5 comments

Hiv disease for the last 3 years and had pain hard to eat and cough are nightmares,especially the first year At this stage, the immune system is severely weakened, and the risk of contracting opportunistic infections is much greater. However, not everyone with HIV will go on to develop AIDS. The earlier you receive treatment, the better your outcome will be.I started taking ARV to avoid early death but I had faith in God that i would be healed someday.As a Hiv patent we are advise to be taking antiretroviral treatments to reduce our chance of transmitting the virus to others , few weeks ago i came on search on the internet if i could get any information on Hiv treatment with herbal medicine, on my search i saw a testimony of someone who has been healed from Hiv her name was Achima Abelard and other Herpes Virus patent Tasha Moore also giving testimony about this same man,Called Dr Itua Herbal Center.I was moved by the testimony and i contacted him by his Email.drituaherbalcenter@gmail.com We chatted and he send me a bottle of herbal medicine I drank it as he instructed me to.After drinking it he ask me to go for a test that how i ended my suffering life of Hiv patent,I'm cured and free of Arv Pills.I'm forever grateful to him Drituaherbalcenter.Here his contact Number +2348149277967...He assure me he can cure the following disease..Hiv,Cancer,Herpes Virus,Epilepsy, fibromyalgia ,ALS,Hepatitis,Copd,Parkinson disease.Diabetes,Fibroid...

Reply

Oh why oh why oh why are all the amazing doctors with magical healing powers living in Nigeria the home of the scam artists? it seems so unfair!! At least if they can get in contact with Americans they can maybe make some money as they are as gullible as a 2 year old child.

Not an albino child though, the ones you can chop up to make magic potions out of, no! just a regular child that believes in santa, the tooth fairy and little baby jesus.

Reply

Are you stupid, and when are your immune system giving up? Either this drop comment is just a lie to get stupid people to call or u need seek a doctor quickly

Reply

Geez stop the spam

Reply

How to fix HP printer not printing color correctly?

You should check the printer driver to fix HP printer not printing color correctly. The driver acts as a translator between your computer and the printer. If there is an issue with the driver, the printer may not be able to interpret the information correctly and thus not be able to print in color. To ensure that the correct driver is installed, ensure it is up-to-date and matches your printer model. Finally, it is always a good idea to do a test print to ensure everything works correctly. Load some blank paper into your printer and send a test page. This should be a full page with color images or text to see if the printer is correctly interpreting the information from your computer and producing quality output. If the test page looks dull or faded, it is likely an issue with either the settings or the driver.

Steps to Turn Off Incognito Mode iPhone Chrome

Incognito mode in Chrome on your iPhone device will run separately from Chrome browser. To turn off incognito mode Chrome iPhone then check out the steps mentioned below. To start with, open Chrome browser on iPhone device and then tap to three-horizontal dots to view more options. Here, users will find out incognito mode and then click on it to open it. Lastly, it will open up new window that is a private window. This is how users can successfully disable incognito mode on your Chrome browser.

Why is the Outlook email search not working?

If you use Microsoft Outlook for your email, you may be familiar with its search feature. It’s a great way to quickly find emails in your inbox, contacts, and other folders. Unfortunately, this feature may sometimes not work as expected. This can be caused by various factors, from the computer not being connected to the Internet to a corrupt index file. The most common reason Outlook email search not working is that the indexing of the program hasn't been completed yet. The indexing process looks through your Outlook items (emails, contacts, notes, etc.) and makes them easily accessible for quick search results. If you've recently added items to your Outlook or updated the settings, it might take some time before the indexing is finished.

How does Verizon talk to a person?

Verizon customer service representatives can be reached through several channels, such as phone, email, live chat, and social media. To speak to a live agent, customers should call Verizon’s customer service number or start a live chat session for Verizon talk to a person. When starting a live chat session, customers will be connected to a customer service representative in real-time and be able to have their questions answered efficiently. When chatting with the customer service representative, customers will be asked to provide basic information such as their name, email address, and phone number. Then, the customer service representative will work to answer the customer’s questions and provide solutions to any issues they may have.

Reply

Post a Comment

If you found this article or post helpful to you, feel free to enter your comments below ;)