Pressing 'Ctrl e' now starts/stops event recording (key is temporary and
will probably change). An state file is then generated containing the
state when recording started, and the eventstream up to the point when
recording stopped.
Next I'll work on loading the event state file and replaying the events.
This one is a little harder, since it has to override EventHandler::poll()
and use events from the eventstream. Hopefully rudimentary support will
be there by the end of the weekend.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@906 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
many places other than the GUI code.
As a diversion from the joystick stuff, I'm experimenting with event
recording. Eventually, this will allow one to record a state + events,
and then load that INP file again. When loaded, Stella will replay the
events, and you'll be able to see exactly what happened before. Since
this is based on frames, the replaying can speed up and slow
down by changing the emulation framerate. And it can be exited at any
point, and normal emulation can continue. Or at least that's how I
want it to work.
A preliminary spec for the event stream is -X A B A B ... -X ...,
where X represents how many frames to wait, and 'A B' are event/value
pairs representing an event in Stella. I think this is very similar
to the scheme that Thomas J. recently added to z26, so converting to
a Stella eventstream should be easy.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@905 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
simulated paddles for now. I got it working, but I'm not sure how
useful it will be. Maybe it's better to just add joystick emulation
for paddle events, and not care whether the axis are digital or analog
(it would certainly be easier code-wise), using something like JoyMouse??
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@904 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
an axis is analog or digital (but this may prove to be insufficient).
This will be useful for the paddle emulation code. If a paddle event
is detected *and* the axis is analog, then the eventhandler will generate
true analog values, which are more accurate than digital. Otherwise,
paddle events associated with a digital axis will have the analog values
emulated by use of a JoyMouse-type structure.
Eventually, this code can be extended to deal with other analog-type events
(lightgun, etc) or other analog axis (trackballs).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@903 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
complete, since I can play a two player game of River Raid with one
gamepad (P1 using D-pad and button 0, P2 using analog stick and
button 1). Still TODO is add support for remapping paddles, but
this will be quite easy. After that, maybe the ability to use
keys for paddle movement. This one is a bit harder, so I may leave
it for a future release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@902 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
infrastructure is now ready, but I can't test that yet since I don't
have a joystick at work :)
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@901 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
in the emulator, including paddle events. Analog and digital sticks will
be supported. Currently, axis handling is completely broken.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@900 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
cheats. There's still some error checking to do, to make sure that
cheats don't contain characters that are reserved for the cheat file
(comma, colon, quote, etc).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@897 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
works correctly, and inserts the cheats for whatever ROM happens to be
loaded.
The CheatCodeDialog now communicates with CheatManager, meaning that
cheats can be seen in the dialog, and enabled/disabled with their
respective checkboxes. Still TODO is add support for adding/removing/
deleting cheats, and for one-shot cheats.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@896 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
'stella.cht' file, where each line/record consists of a ROM md5sum
and a comma-separated list of cheats. Each cheat is specified as a
colon-separated string, defined as "NAME:CODE:ENABLE".
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@895 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
where each cheat can be toggled on or off. Of course, it doesn't
actually do anything yet, since it isn't connected to the
CheatManager. For now, input of cheats from the GUI is completely
disabled. Commandline should still work, though.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@894 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
instead of being possibly 'massaged' by EventHandler::handleEvent().
This should result in slightly faster operation, and also allow
more accurate emulation of the Stelladaptor joysticks (ie, pressing down
hard on a joystick and activating all four directions will do exactly
what a real 2600 would do).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@892 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
switch/case, hopefully making things faster.
Fixed bug while in pause mode and commands still being processed when
they shouldn't be.
Fixed annoying long-standing bug with the emulation core receiving
both joystick left/right and/or up/down events at the same time.
This results in lockups in Astroblast, and 'losing' the gun in Berserk.
A real 2600 doesn't allow this, so we shouldn't emulate it either.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@886 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
made no sense to restrict Stella to only work with two joysticks, since
there's no reason one couldn't use four devices, with each one emulating
a paddle (once I get paddle remapping done). So I've removed that
restriction, and also removed the 'leftport' and 'rightport' arguments.
The one case where remapping a joystick *does* make sense is for
multiple Stelladaptors. In that case, there might only be one
Stelladaptor installed, but you'd like it to emulate the right virtual
port. Previously this wasn't possible, but now it is with the addition
of the 'sa1' and 'sa2' commandline arguments. These arguments accept
either 'left' or 'right', specifying which virtual port to emulate.
Updated the InputDialog virtual device tab for remapping Stelladaptors.
Shortened some keynames in EventHandler, so that the actual character is
used (for example, ? instead of QUESTION).
Some fixes for the OS/2 port.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@884 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
to select which joysticks are mapped to which virtual port.
Some work on the mouse/paddle emulation. It now uses a slider instead
of a dropdown widget. Added slider for paddle sensitivity, but it's
not tied to the core yet, and doesn't do anything.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@881 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
InputDialog. This new class will include all things related to Stella
input. For now, the old eventmapper is on one tab, and the 'mouse is
paddle' setting is on the other. The latter tab will be expanded to
include SDL to Stella joystick enumeration (currently done by the
leftport and rightport commandline arguments), as well as the ability
to set mouse sensitivity for paddle emulation.
Note, there's still a bug in the interaction between the eventmapper
tab and focusing on the event list. Focusing only takes effect after
switching to a new tab, then back to the remapper.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@879 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
Fixed bug where Escape key (by default assigned to enter Launcher)
couldn't be remapped to anything else.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@878 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
the executable will now be slightly smaller in this case.
Moved common 'type()' method from children of the Controller
base class back to the parent. There was no need to have separate
methods for each different type.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@876 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
little faster than before, and it makes the code much easier to understand.
Made Stelladaptor devices only send events based on which type of
controller is connected to the emulated port (Joystick, Paddles, Driving).
Since we can't detect which type of controller is attached to a
Stelladaptor, previously the code just sent events for all three types.
This causes problems with some games that don't know how to deal with
events that cannot possibly happen at the same time on a real machine
(ie, paddle 0 *and* joystick 0 being operated).
Added code to 'swallow' garbage events generated when Stella is first
launched, usually caused by jitter in the joystick or mouse. This fixes
some weird problems with internal Stella events being set before we
even enter the main gaming loop.
Still TODO is add support for joystick hats and trackballs, once I can
locate a device which has these items.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@875 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
Currently they must be 4 hex characters long, and do not support
compare before writing (direct-write, not compare-write). These
codes are also executed per-frame.
Changed 'cheetah' commandline/debugger argument to 'cheat', and any type
of cheat may be specified here. Currently supported are 4 char RAM,
6 char Cheetah, and 8 char Stella extended Cheetah.
Still TODO is add load/save of cheats, add one-shot and compare-write
cheats, and finally add a dialog to do all this from within Stella.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@874 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
were accessible from the launcher, and were causing a segfault when pressed.
Fixed bug where 'mouse is paddle xxx' number wasn't being set when
starting Stella for the first time.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@873 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
Added 'leftport' and 'rightport' commandline arguments, which specify
which SDL joystick devices to use for each port. These arguments are
basically indices into the internal SDL joystick array. Joystick
handling has changed somewhat, in that there are now only ever two
joysticks used by Stella (J0 - left and J1 - right). The port
arguments serve to specify which stick is J0, and which is J1.
This means the tie between SDL enumeration of joysticks is broken,
and (for example) a Stelladaptor which has SDL index of 1 (second
stick found) can emulate the left 2600 port, and an SDL joystick 0 can
emulate the right 2600 port. This fixes a long-standing bug whereby the
only way to break SDL joystick enumeration was to remap all associated
events in the Event Mapper.
Still TODO is add joystick hat/ball detection to the event handler, and
allow those events to be remapped (perhaps to emulate the paddles).
Also TODO is add a GUI for selecting the joystick ports from a list of
SDL joysticks.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@872 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
types in state file handling. Added '--x-libraries' option to configure,
to specify different locations for X11 (only affects UNIX port).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@869 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
Fixed bug with Cheetah codes not working from the commandline or prompt.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@868 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
--disable-xxx ones.
Some misc. updates and documentation fixes for the 2.0.1 release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@864 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
Brad, I think the extra work put in by the other Stella members warrants
a mention in the Author list.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@861 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
keep it all in one file, and not have to maintain separate SPEC files
for each RPM distro.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@858 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba