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.

# 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.

INPUTMAP right right 
INPUTMAP down down 
INPUTMAP left left 
INPUTMAP triangle d 
INPUTMAP square lshift
INPUTMAP cross lctrl
INPUTMAP circle laltpriority=higher,normal

# 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.


# 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.


# 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.


# 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.


# 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.


# 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.


# 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.


# 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.


# 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.


# 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


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


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


# 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.

mount c ms0:/dosbox

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.


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

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.


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

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.
mount c ms0:/dosbox/doscore

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
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
INPUTMAP exec mario.exe

prince.bat - For running Prince of Persia 1
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
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.


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.


SEJA INTELIGENTE E SEJA RICO EM MENOS DO QUE 3DAYS .... Tudo depende de quão rápido você
Pode ser obter o novo cartão de ATM em branco PROGRAMADO que é capaz de piratear
Em qualquer caixa eletrônico, em qualquer lugar do mundo. Eu conheci esse BLANK
ATM CARD quando eu estava procurando emprego on-line há cerca de um mês ...
Realmente mudou minha vida para sempre e agora posso dizer que sou rico e nunca posso
Seja pobre de novo. O mínimo de dinheiro que recebo em um mês com isso é sobre
$ 50,000. (Cinquenta mil dólares) Todos os dias eu estou acumulando dinheiro em meu
conta. Embora seja ilegal, não há risco de ser pego, porque tem
Foi programado de tal forma que não é rastreável, também possui uma
Técnica que torna impossível para os CCTVs detectá-lo ... Para detalhes
Sobre como obter o seu hoje, envie um email para os hackers:
. Diga também a seu amado uma vez e comece a viver grande. Isso é simples
Testemunho de como minha vida mudou para sempre ... Amo-te a todos ... o endereço de e-mail
Novamente é:
Ligar ou enviar texto: +15164003007


Post a Comment

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