Difference between revisions of "LeapFrog Pollux Platform: sdlDoom"

From eLinux.org
Jump to: navigation, search
(Software Needed)
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
sdl doom quick tutorial
+
== Summary ==
 +
This is a quick tutorial on getting sdlDoom up and running.
  
requires:
+
== Prerequisites ==
 +
[[LeapFrog_Pollux_Platform:_Build_Environment| Set Up Build Environment]]
  
SDL
+
[[Didj_and_Explorer_libSDL| Install libSDL]]
  Framebuffer driver
+
   
properly set environment vars
+
[[Leapster_Explorer_Framebuffer_Driver| 2.6.31 Kernel Frame Buffer]]
  
Download sdldoom and the wad from http://www.libsdl.org/projects/doom/
+
== Software Needed ==
 +
[http://www.libsdl.org/projects/doom/src/sdldoom-1.10.tar.gz sdlDoom Sources]
  
wget http://www.libsdl.org/projects/doom/src/sdldoom-1.10.tar.gz
+
[http://www.libsdl.org/projects/doom/data/doom1.wad.gz sdlDoom Wad File]
tar -xvf sdldoom-1.10.tar.gz
 
cd sdldoom-1-10
 
wget http://www.libsdl.org/projects/doom/data/doom1.wad.gz
 
tar -xvf doom1.wad.gz
 
./autogen.sh
 
./configure
 
make -j5
 
  
copy the doom file to /usr/bin on your didj/lx
+
You will also need the SDL libs/headers on your host PC
  
copy the wad file to a folder on your didj/lx, somewhere like /LF/Bulk/doom on the lx or /Didj/doom on the didj
+
[http://github.com/Reggi3/ExplorerDoom sdlDoom Preconfigured] (git repo) Just compile.
  
browse to the folder where you put the wad file
+
== Hardware Needed ==
 +
[[LeapFrog_Pollux_Platform:_Console_Access| Console Access]]
  
run doom:
 
doom
 
  
as it stands the buttons don't do anything (dpad up/down/left/right and l/r shoulder move stuff around in the menus but thats it)
+
== Configure and Compile==
 +
Download and extract the source files.
  
fix this by editing doomdef.h
+
You'll need to fix some button mappings edit doomdef.h
 +
#define KEY_ESCAPE 109 // 'home button'
 +
#define KEY_ENTER 120 // 'brightness button'
  
change 2 lines to look like the following:
+
To get sound working a bit better as there is a possible sample rate issue, edit i_sound.c and change line 56:
 +
#define SAMPLERATE 44100
  
  #define KEY_ESCAPE 109 // 'home button'
+
Make sure your Build Environment is set up and run the configure program then make. Change -j5 to reflect the number of cores on your cpu +1:
  #define KEY_ENTER 97 // 'a button'
+
  ./configure
 +
  make -j5
  
recompile.
+
Copy the doom file to /usr/bin on your device
  
now we can get into the game, yay but we still can't shoot stuff :( boo
+
Copy the wad file to a folder on your device, somewhere like /LF/Bulk/doom on the Explorers or /Didj/doom on the Didj.
  
make a blank text file called doomconfig
+
This will allow control for all things but shooting, to configure we need to make a config file.
  
save it in the same folder as your doom wad on the lx
+
Browse to the folder where you put the wad file and make a blank text file called doomconfig:
 +
# echo > doomconfig
  
run doom, using the following on the command line:
+
Run doom, using the following on the command line:
 
  doom -config doomconfig
 
  doom -config doomconfig
  
load a new game, run around and pick up something (not sure if this is entirely necessary), go to the menu and save the game, doomconfig should now be populated
+
Load a new game, run around and pick up something (not sure if this is entirely necessary), go to the menu and save the game, doomconfig should now be populated.
  
 
Edit doomconfig, change these 2 lines to the following:
 
Edit doomconfig, change these 2 lines to the following:
  key_fire 98
+
  key_fire 97
  key_use 112
+
key_use  98
 +
 
 +
Alternatively you can copy and paste the following into your doomconfig file replacing anything that's in there, A= fire, B=use, R should = strafe right, weapon switching doesn't currently work, nor does strafe left or backwards:
 +
 
 +
mouse_sensitivity 5
 +
sfx_volume 15
 +
music_volume 15
 +
show_messages 1
 +
key_right 174
 +
key_left 172
 +
key_up 173
 +
key_down 175
 +
key_strafeleft 99
 +
key_straferight 114
 +
key_fire 97
 +
key_use 98
 +
  key_strafe 184
 +
key_speed 999
 +
use_mouse 1
 +
mouseb_fire 0
 +
mouseb_strafe 1
 +
mouseb_forward         2
 +
use_joystick 0
 +
joyb_fire 0
 +
joyb_strafe 1
 +
joyb_use 3
 +
joyb_speed 2
 +
screenblocks 10
 +
detaillevel 0
 +
snd_channels 3
 +
usegamma 0
 +
chatmacro0 "No"
 +
chatmacro1 "I'm ready to kick butt!"
 +
chatmacro2 "I'm OK."
 +
chatmacro3 "I'm not looking too good!"
 +
chatmacro4 "Help!"
 +
chatmacro5 "You suck!"
 +
chatmacro6 "Next time, scumbag..."
 +
chatmacro7 "Come here!"
 +
chatmacro8 "I'll take care of it."
 +
chatmacro9 "Yes"
 +
 
  
this will give you 'fire' on the B button and 'use' on the pause key
+
This will give you 'fire' on the A button and 'use' on the B button
  
 
Other buttons either don't work or don't work as expected if you try and change them via doomconfig, doomdef.h or m_misc.c (defaults get defined here if the config file isn't found), not sure why its behaving like this.
 
Other buttons either don't work or don't work as expected if you try and change them via doomconfig, doomdef.h or m_misc.c (defaults get defined here if the config file isn't found), not sure why its behaving like this.
  
Sound sort of works, looks like it gets the samplerate wrong when doom/sdl opens it :/
+
[[Category:Didj]]
 +
[[Category:Leapster Explorer]]
 +
[[Category:LeapPad Explorer]]
 +
[[Category:LeapFrog Pollux Platform]]

Latest revision as of 17:33, 31 August 2011

Summary

This is a quick tutorial on getting sdlDoom up and running.

Prerequisites

Set Up Build Environment

Install libSDL

2.6.31 Kernel Frame Buffer

Software Needed

sdlDoom Sources

sdlDoom Wad File

You will also need the SDL libs/headers on your host PC

sdlDoom Preconfigured (git repo) Just compile.

Hardware Needed

Console Access


Configure and Compile

Download and extract the source files.

You'll need to fix some button mappings edit doomdef.h

#define KEY_ESCAPE 109 // 'home button'
#define KEY_ENTER 120 // 'brightness button'

To get sound working a bit better as there is a possible sample rate issue, edit i_sound.c and change line 56:

#define SAMPLERATE 44100

Make sure your Build Environment is set up and run the configure program then make. Change -j5 to reflect the number of cores on your cpu +1:

./configure
make -j5

Copy the doom file to /usr/bin on your device

Copy the wad file to a folder on your device, somewhere like /LF/Bulk/doom on the Explorers or /Didj/doom on the Didj.

This will allow control for all things but shooting, to configure we need to make a config file.

Browse to the folder where you put the wad file and make a blank text file called doomconfig:

# echo > doomconfig

Run doom, using the following on the command line:

doom -config doomconfig

Load a new game, run around and pick up something (not sure if this is entirely necessary), go to the menu and save the game, doomconfig should now be populated.

Edit doomconfig, change these 2 lines to the following:

key_fire  97
key_use   98

Alternatively you can copy and paste the following into your doomconfig file replacing anything that's in there, A= fire, B=use, R should = strafe right, weapon switching doesn't currently work, nor does strafe left or backwards:

mouse_sensitivity	5
sfx_volume		15
music_volume		15
show_messages		1
key_right		174
key_left		172
key_up			173
key_down		175
key_strafeleft		99
key_straferight	114
key_fire		97
key_use 		98
key_strafe		184
key_speed		999
use_mouse		1
mouseb_fire		0
mouseb_strafe		1
mouseb_forward	        2
use_joystick		0
joyb_fire		0
joyb_strafe		1
joyb_use		3
joyb_speed		2
screenblocks		10
detaillevel		0
snd_channels		3
usegamma		0
chatmacro0		"No"
chatmacro1		"I'm ready to kick butt!"
chatmacro2		"I'm OK."
chatmacro3		"I'm not looking too good!"
chatmacro4		"Help!"
chatmacro5		"You suck!"
chatmacro6		"Next time, scumbag..."
chatmacro7		"Come here!"
chatmacro8		"I'll take care of it."
chatmacro9		"Yes"


This will give you 'fire' on the A button and 'use' on the B button

Other buttons either don't work or don't work as expected if you try and change them via doomconfig, doomdef.h or m_misc.c (defaults get defined here if the config file isn't found), not sure why its behaving like this.