S9xConsole: Patch to Snes9X 1.42 to add a Quake-style console and command-line interpreter.
What it can do (as of 00010):
(Updated as of diff 00010)
First of all, the patch only hooks up with the X11 version.
On startup, the console pops open
(due to a bug, key-repeat mode is off at this moment. Close and re-open the console to restore key-repeat).
Press backspark (`) to close the console.
Press backspark (`) again to open the console.
Notice the console prompt (]), and the shark (^) underneath to indicate the cursor.
All command entry at the console prompt start with slat (/) or backslat (\).
Text that does not start with either are treated as chat text (which currently does nothing useful, as there's nowhere to send chat).
Type in "
Type in "
Type in "
Type in "
Type in "
Type in "
Type in "
Type in "
Type in "
Type in "
Type in "
Type in "
Again, type in "
Type in "
Press backspark (`) again to close the console and start playing.
Currently these keys are bound:
Binding 'y' to be P1 B:
Press backspark (`) to open the console.
Type in "
Binding 'Pause' to be game pause:
Open the console.
Type in "
Binding '.' to be pause-while-hold:
Open the console.
Command "
When all is done, press ESC to quit out of Snes9x.
Or open the console, and give the command "
To reset the emulator, command "
Downloads
2004.01.11 s9xconsole-00010.diff.gz
Unified diff against snes9x 1.42 from http://www.lysator.liu.se/snes9x/.
2003.04.06 s9xconsole-00005.diff.gz
Unified diff against what looks like snes9x 1.39a from Debian archives.
2003.02.05 s9xconsole-00004.diff.gz
Unified diff against what looks like snes9x 1.39a from Debian archives.
2003.02.04 s9xconsole-00003.diff.gz
Unified diff against what looks like snes9x 1.39a from Debian arcvhies.
2003.02.03 s9xconsole-00002.diff.gz
Unified diff against what looks like snes9x 1.39a from Debian archives.
2003.02.01 s9xconsole-00001.diff.gz
Unified diff against what looks like snes9x 1.39a from Debian archives.
TODO (as of 00010)
Miscellaneous Notes (as of 00010)
Quickstart/Tour
/echo hello world
" and press Enter.
The console displays "hello world", a nice friendly message.
/cvarlist
" and press Enter.
The console displays the list of cvars.
Use PageUp and PageDown (navigation keys only for now) to scroll up and down.
When you scroll up, notice the rows of sharks (^) just above the prompt, indicating scrollback mode.
/clear
" and press Enter.
The console clears, leaving a solitary prompt.
/set foo 0
" and press Enter.
This command creates a new cvar named "foo", with a value of 0.
/foo
" and press Enter.
This command displays the cvar name and the current value of "foo".
/foo 42
" and press Enter.
This command silently sets the value of "foo" to 42.
This command works since "foo" exists now.
If "foo" did not exist, this command would fail (error message).
/foo
" and press Enter.
This command now displays the new value of "foo".
/baz
" and press Enter.
The console shows an error message, since "baz" does not exist as either cvar nor command.
/.load foo; .push 4; .add; .store foo; foo; .load foo; .push -2; .add; .store foo; foo
" and press Enter.
This sequence of commands increments "foo" by 4, displays the value of "foo", decrements "foo" by 2, then displays the value of "foo" again.
/cvarlist foo
" and press Enter.
The console displays the value of foo again, but in a more verbose manner.
/set bar echo Hello World
" and press Enter.
This command sets the value of "bar" to be "echo Hello World".
Type in "/bar
" and press Enter, to see the value of bar.
Now type in "/vstr bar
" and press Enter.
The console shows a nice friendly message again.
/editbindlist
" and press Enter.
This command shows keybindings for edit-mode.
These binds are in effect when the console is visible (edit mode).
Scroll up and down to browse more of the list.
/clear
" and press Enter, to clear the console.
/bindlist
" and press Enter.
Now the console displays binds during play-mode.
These binds are in effect when the console is invisible (game mode).
Scroll up and down to browse more of the list, then scroll all the way back down, or type in "/clear
" and press Enter.
/bind y +joypad1B
" and press Enter.
Close the console and test that 'y' acts as the SNES B button.
/bind PAUSE toggle cpu_paused
" and press Enter.
Close the console, test the Pause key.
Toggle the console while in paused mode.
To force unpause, the command is "/set cpu_paused 0
".
/alias +holdpause set cpu_paused 1
".
Then "/alias -holdpause set cpu_paused 0
".
Then "/bind . +holdpause
".
Close the console and test the '.' key.
Snes9x pauses while the '.' key is held.
(The commands can also be done in one line as "/alias +holdpause cpu_paused 1; alias -holdpause cpu_paused 0; bind . +holdpause
")
/quit
".
/reset
".
Sources of inspiration
Date when I last bothered to record the date: 2004.01.11
--PhaethonH < phaethon . linux . ucla . edu >