2003-09-25 16:20:34 +00:00
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// SSSS tt lll lll
|
|
|
|
// SS SS tt ll ll
|
|
|
|
// SS tttttt eeee ll ll aaaa
|
|
|
|
// SSSS tt ee ee ll ll aa
|
|
|
|
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
|
|
|
// SS SS tt ee ll ll aa aa
|
|
|
|
// SSSS ttt eeeee llll llll aaaaa
|
|
|
|
//
|
|
|
|
// Copyright (c) 1995-1998 by Bradford W. Mott
|
|
|
|
//
|
|
|
|
// See the file "license" for information on usage and redistribution of
|
|
|
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
//
|
2005-02-18 21:26:31 +00:00
|
|
|
// $Id: FrameBuffer.hxx,v 1.13 2005-02-18 21:26:31 stephena Exp $
|
2003-09-25 16:20:34 +00:00
|
|
|
//============================================================================
|
|
|
|
|
2003-10-17 18:02:16 +00:00
|
|
|
#ifndef FRAMEBUFFER_HXX
|
|
|
|
#define FRAMEBUFFER_HXX
|
2003-09-25 16:20:34 +00:00
|
|
|
|
|
|
|
#include "bspf.hxx"
|
2003-09-26 00:32:00 +00:00
|
|
|
#include "Event.hxx"
|
2003-10-17 18:02:16 +00:00
|
|
|
#include "MediaSrc.hxx"
|
2003-09-26 17:35:05 +00:00
|
|
|
#include "StellaEvent.hxx"
|
2003-09-25 16:20:34 +00:00
|
|
|
|
|
|
|
class Console;
|
|
|
|
|
|
|
|
/**
|
2003-10-26 19:40:39 +00:00
|
|
|
This class encapsulates the MediaSource and is the basis for the video
|
|
|
|
display in Stella. All ports should derive from this class for
|
|
|
|
platform-specific video stuff.
|
|
|
|
|
|
|
|
This class also implements a MAME-like user interface where Stella settings
|
|
|
|
can be changed.
|
2003-09-25 16:20:34 +00:00
|
|
|
|
|
|
|
@author Stephen Anthony
|
2005-02-18 21:26:31 +00:00
|
|
|
@version $Id: FrameBuffer.hxx,v 1.13 2005-02-18 21:26:31 stephena Exp $
|
2003-09-25 16:20:34 +00:00
|
|
|
*/
|
2003-10-17 18:02:16 +00:00
|
|
|
class FrameBuffer
|
2003-09-25 16:20:34 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
2003-10-17 18:02:16 +00:00
|
|
|
Creates a new Frame Buffer
|
2003-09-25 16:20:34 +00:00
|
|
|
*/
|
2003-10-17 18:02:16 +00:00
|
|
|
FrameBuffer();
|
2003-09-25 16:20:34 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Destructor
|
|
|
|
*/
|
2003-10-26 19:40:39 +00:00
|
|
|
virtual ~FrameBuffer();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Initializes the framebuffer display. This must be called before any
|
|
|
|
calls are made to derived methods.
|
|
|
|
|
|
|
|
@param console The console
|
Broke the dependency between the FrameBuffer and Sound classes
wrt to the MediaSource.
Previously, in the main run loop for a port, you had to call
FrameBuffer::update and then
Sound::updateSound(FrameBuffer::MediaSource). Now, you can call
FrameBuffer::update() and then Sound::update(). But since the
ordering here is important, I've introduced a Console::update()
that does it all. So the main run loop for each port just
got a bit simpler.
Also changed around the Snapshot class a bit. All this is to
reinforce the fact that the MediaSource is owned by the core,
and the FrameBuffer, Sound, and Snapshot classes make use of
it. Previously, it seemed as if the FrameBuffer owned the
MediaSource.
I'm finding all these little inconsistencies because of
writing the Porting.txt document, and trying to explain
why something is being done a certain way (and if I
can't explain it, I rewrite it). So if for no other
reason, the Porting.txt document has already been
valuable.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@214 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-11-19 15:57:11 +00:00
|
|
|
@param mediasrc The mediasource
|
2003-10-26 19:40:39 +00:00
|
|
|
*/
|
|
|
|
void initDisplay(Console* console, MediaSource* mediasrc);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Updates the display. Also draws any pending menus, etc.
|
|
|
|
*/
|
|
|
|
void update();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Shows the main menu onscreen. This will only be called if event
|
|
|
|
remapping has been enabled in the event handler.
|
|
|
|
|
|
|
|
@param show Show/hide the menu based on the boolean value
|
|
|
|
*/
|
Huge changes across the map. Lets see if I can remember it all ...
There is now an SDL OpenGL port with filtering and alpha-blending.
It's a work in progress right now, but is already quite stable.
It's not as optimized as the software version yet, but this will
change as well. For now, you have to compile the SDL version in
either normal software mode or OpenGL mode. This will change
before the 1.4 release.
When entering menu mode, the emulation is now suspended. And when
pause is pressed, you can't enter menu mode. Because of these changes,
CPU use has dropped dramatically when viewing menus. This will benefit
all ports, since menus are now redrawn only when necessary, instead of
at the current framerate.
For a reference, on a Pentium-IV 2.4GHz, the software SDL version
maxes CPU usage at 9%, and the SDL OpenGL version at 13.5%. This is
at 60 fps and a zoomlevel of 4. While some small improvements can
(possibly) be made to the OpenGL version, I think we'll soon be hitting
the glass ceiling.
Work on the Porting.txt document is progressing, and I estimate it to
be 45% complete.
The Windows version still doesn't compile, and I still haven't looked
at it. Rest assured that it will be done before 1.4. There will be
a simultaneous release, even if the Linux versions are finished.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@200 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-11-06 22:22:33 +00:00
|
|
|
void showMenu(bool show);
|
2003-10-26 19:40:39 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Shows a message onscreen.
|
|
|
|
|
|
|
|
@param message The message to be shown
|
|
|
|
*/
|
|
|
|
void showMessage(const string& message);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the current width of the framebuffer.
|
|
|
|
Note that this will take into account the current scaling (if any).
|
|
|
|
|
|
|
|
@return The current width
|
|
|
|
*/
|
|
|
|
uInt32 width() { return myWidth; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the current height of the framebuffer.
|
|
|
|
Note that this will take into account the current scaling (if any).
|
|
|
|
|
|
|
|
@return The current height
|
|
|
|
*/
|
|
|
|
uInt32 height() { return myHeight; }
|
2003-09-25 16:20:34 +00:00
|
|
|
|
2003-09-26 17:35:05 +00:00
|
|
|
/**
|
|
|
|
Send a keyboard event to the user interface.
|
2003-09-25 16:20:34 +00:00
|
|
|
|
2003-10-26 19:40:39 +00:00
|
|
|
@param code The StellaEvent code
|
|
|
|
@param state The StellaEvent state
|
2003-09-26 17:35:05 +00:00
|
|
|
*/
|
|
|
|
void sendKeyEvent(StellaEvent::KeyCode code, Int32 state);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Send a joystick button event to the user interface.
|
2003-09-25 16:20:34 +00:00
|
|
|
|
2003-09-26 17:35:05 +00:00
|
|
|
@param stick The joystick activated
|
|
|
|
@param code The StellaEvent joystick code
|
|
|
|
@param state The StellaEvent state
|
|
|
|
*/
|
|
|
|
void sendJoyEvent(StellaEvent::JoyStick stick, StellaEvent::JoyCode code,
|
|
|
|
Int32 state);
|
|
|
|
|
2003-11-12 19:36:25 +00:00
|
|
|
/**
|
|
|
|
Sets the pause status. While pause is selected, the
|
|
|
|
MediaSource will not be updated.
|
|
|
|
|
|
|
|
@param status Toggle pause based on status
|
|
|
|
*/
|
|
|
|
void pause(bool status);
|
|
|
|
|
2003-11-24 14:51:06 +00:00
|
|
|
/**
|
|
|
|
Indicates that a redraw should be done, since the window contents
|
|
|
|
are dirty.
|
2005-02-18 21:26:31 +00:00
|
|
|
|
|
|
|
@param now Determine if the refresh should be done right away or in
|
|
|
|
the next frame
|
2003-11-24 14:51:06 +00:00
|
|
|
*/
|
2005-02-18 21:26:31 +00:00
|
|
|
void refresh(bool now = false)
|
|
|
|
{
|
|
|
|
theRedrawEntireFrameIndicator = true;
|
|
|
|
if(now)
|
|
|
|
drawMediaSource();
|
|
|
|
}
|
2003-11-24 14:51:06 +00:00
|
|
|
|
2003-10-17 18:02:16 +00:00
|
|
|
public:
|
2003-10-26 19:40:39 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
// The following methods are system-specific and must be implemented
|
|
|
|
// in derived classes.
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
2003-10-17 18:02:16 +00:00
|
|
|
/**
|
|
|
|
This routine should be called once the console is created to setup
|
|
|
|
the video system for us to use. Return false if any operation fails,
|
|
|
|
otherwise return true.
|
|
|
|
*/
|
2003-10-26 19:40:39 +00:00
|
|
|
virtual bool init() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
This routine should be called anytime the MediaSource needs to be redrawn
|
|
|
|
to the screen.
|
|
|
|
*/
|
|
|
|
virtual void drawMediaSource() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
This routine should be called to draw a rectangular box with sides
|
|
|
|
at the specified coordinates.
|
|
|
|
|
|
|
|
@param x The x coordinate
|
|
|
|
@param y The y coordinate
|
|
|
|
@param w The width of the box
|
|
|
|
@param h The height of the box
|
|
|
|
*/
|
2003-11-09 23:53:20 +00:00
|
|
|
virtual void drawBoundedBox(uInt32 x, uInt32 y, uInt32 w, uInt32 h) = 0;
|
2003-10-26 19:40:39 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
This routine should be called to draw text at the specified coordinates.
|
|
|
|
|
|
|
|
@param x The x coordinate
|
|
|
|
@param y The y coordinate
|
|
|
|
@param message The message text
|
|
|
|
*/
|
2003-11-09 23:53:20 +00:00
|
|
|
virtual void drawText(uInt32 x, uInt32 y, const string& message) = 0;
|
2003-10-26 19:40:39 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
This routine should be called to draw character 'c' at the specified coordinates.
|
|
|
|
|
|
|
|
@param x The x coordinate
|
|
|
|
@param y The y coordinate
|
|
|
|
@param c The character to draw
|
|
|
|
*/
|
2003-11-09 23:53:20 +00:00
|
|
|
virtual void drawChar(uInt32 x, uInt32 y, uInt32 c) = 0;
|
2003-10-26 19:40:39 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
This routine is called before any drawing is done (per-frame).
|
|
|
|
*/
|
|
|
|
virtual void preFrameUpdate() = 0;
|
2003-10-17 18:02:16 +00:00
|
|
|
|
|
|
|
/**
|
2003-10-26 19:40:39 +00:00
|
|
|
This routine is called after any drawing is done (per-frame).
|
2003-10-17 18:02:16 +00:00
|
|
|
*/
|
2003-10-26 19:40:39 +00:00
|
|
|
virtual void postFrameUpdate() = 0;
|
2003-10-17 18:02:16 +00:00
|
|
|
|
|
|
|
/**
|
2003-11-12 19:36:25 +00:00
|
|
|
This routine is called when the emulation has received
|
|
|
|
a pause event.
|
2003-10-26 19:40:39 +00:00
|
|
|
|
2003-11-12 19:36:25 +00:00
|
|
|
@param status The received pause status
|
2003-10-17 18:02:16 +00:00
|
|
|
*/
|
2003-11-12 19:36:25 +00:00
|
|
|
virtual void pauseEvent(bool status) = 0;
|
2003-10-17 18:02:16 +00:00
|
|
|
|
2004-06-20 23:30:48 +00:00
|
|
|
/**
|
|
|
|
This routine is called to get the width of the onscreen image.
|
|
|
|
*/
|
2004-06-23 00:15:32 +00:00
|
|
|
virtual uInt32 imageWidth() = 0;
|
2004-06-20 23:30:48 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
This routine is called to get the height of the onscreen image.
|
|
|
|
*/
|
2004-06-23 00:15:32 +00:00
|
|
|
virtual uInt32 imageHeight() = 0;
|
2004-06-20 23:30:48 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
This routine is called to get the specified scanline data.
|
|
|
|
|
|
|
|
@param row The row we are looking for
|
|
|
|
@param data The actual pixel data (in bytes)
|
|
|
|
*/
|
|
|
|
virtual void scanline(uInt32 row, uInt8* data) = 0;
|
|
|
|
|
2003-10-17 18:02:16 +00:00
|
|
|
protected:
|
2003-10-26 19:40:39 +00:00
|
|
|
// The Console for the system
|
|
|
|
Console* myConsole;
|
|
|
|
|
|
|
|
// The Mediasource for the system
|
|
|
|
MediaSource* myMediaSource;
|
|
|
|
|
|
|
|
// Bounds for the window frame
|
|
|
|
uInt32 myWidth, myHeight;
|
|
|
|
|
|
|
|
// Indicates if the entire frame should be redrawn
|
|
|
|
bool theRedrawEntireFrameIndicator;
|
|
|
|
|
|
|
|
// Table of bitmapped fonts.
|
|
|
|
static const uInt8 ourFontData[2048];
|
|
|
|
|
2003-11-09 23:53:20 +00:00
|
|
|
// Holds the foreground and background color table indices
|
|
|
|
uInt8 myFGColor, myBGColor;
|
|
|
|
|
2003-10-26 19:40:39 +00:00
|
|
|
private:
|
2003-09-26 17:35:05 +00:00
|
|
|
// Enumeration representing the different types of user interface widgets
|
2003-10-26 19:40:39 +00:00
|
|
|
enum Widget { W_NONE, MAIN_MENU, REMAP_MENU, INFO_MENU };
|
2003-09-26 17:35:05 +00:00
|
|
|
|
|
|
|
Widget currentSelectedWidget();
|
|
|
|
Event::Type currentSelectedEvent();
|
|
|
|
|
2003-10-17 18:02:16 +00:00
|
|
|
// Add binding between a StellaEvent key and a core event
|
|
|
|
void addKeyBinding(Event::Type event, StellaEvent::KeyCode key);
|
|
|
|
|
|
|
|
// Add binding between a StellaEvent joystick and a core event
|
|
|
|
void addJoyBinding(Event::Type event, StellaEvent::JoyStick stick,
|
|
|
|
StellaEvent::JoyCode code);
|
|
|
|
|
|
|
|
// Remove all bindings for this core event
|
|
|
|
void deleteBinding(Event::Type event);
|
|
|
|
|
2003-10-26 19:40:39 +00:00
|
|
|
// Draw the main menu
|
|
|
|
void drawMainMenu();
|
|
|
|
|
|
|
|
// Draw the remap menu
|
|
|
|
void drawRemapMenu();
|
|
|
|
|
|
|
|
// Draw the info menu
|
|
|
|
void drawInfoMenu();
|
|
|
|
|
2003-11-09 23:53:20 +00:00
|
|
|
// Move the cursor up 'amt' lines, possibly scrolling the list of items
|
|
|
|
void moveCursorUp(uInt32 amt);
|
2003-09-25 16:20:34 +00:00
|
|
|
|
2003-11-09 23:53:20 +00:00
|
|
|
// Move the cursor down 'amt' lines, possibly scrolling the list of items
|
|
|
|
void moveCursorDown(uInt32 amt);
|
2003-09-30 01:22:45 +00:00
|
|
|
|
The first version of a GUI for event remapping is here!
Now for the things that aren't finished yet:
- Only the most basic functions can be remapped. If you
erase the mapping for those that can't yet be remapped,
you'll have to delete the 'keymap' line from stellarc and
start over.
- Core events can only be remapped to other keys on the keyboard.
I haven't got the joystick remapping working yet (but it should
be easy to do).
- The TIA needs to be modified to show 320 pixels horizontally.
Right now, I'm using 8 pixel-width fonts on a framebuffer of
160 pixels, so there's not a lot of horizontal real estate.
So text will probably overwrite other stuff. This is cosmetic,
and WILL be fixed.
- Modification of the TIA will break every frontends rendering
code. It had to be done sometime ...
- I haven't yet added any user feedback mechanism for the user. So when
you go into remap mode and are about to remap a key, you won't
know it :) I'll be adding arrows (like in XMAME) ...
I've added a "Game Information" menu, which shows things like Game name,
manufacturer, rarity, type, etc. Basically stuff from the stella.pro file.
It has no purpose other than for coolness :)
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@193 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-09-28 21:59:24 +00:00
|
|
|
// scan the mapping arrays and update the remap menu
|
|
|
|
void loadRemapMenu();
|
|
|
|
|
2003-10-26 19:40:39 +00:00
|
|
|
private:
|
2003-10-01 19:01:02 +00:00
|
|
|
// Indicates the current framerate of the system
|
|
|
|
uInt32 myFrameRate;
|
|
|
|
|
2003-11-12 19:36:25 +00:00
|
|
|
// Indicates the current pause status
|
|
|
|
bool myPauseStatus;
|
|
|
|
|
The first version of a GUI for event remapping is here!
Now for the things that aren't finished yet:
- Only the most basic functions can be remapped. If you
erase the mapping for those that can't yet be remapped,
you'll have to delete the 'keymap' line from stellarc and
start over.
- Core events can only be remapped to other keys on the keyboard.
I haven't got the joystick remapping working yet (but it should
be easy to do).
- The TIA needs to be modified to show 320 pixels horizontally.
Right now, I'm using 8 pixel-width fonts on a framebuffer of
160 pixels, so there's not a lot of horizontal real estate.
So text will probably overwrite other stuff. This is cosmetic,
and WILL be fixed.
- Modification of the TIA will break every frontends rendering
code. It had to be done sometime ...
- I haven't yet added any user feedback mechanism for the user. So when
you go into remap mode and are about to remap a key, you won't
know it :) I'll be adding arrows (like in XMAME) ...
I've added a "Game Information" menu, which shows things like Game name,
manufacturer, rarity, type, etc. Basically stuff from the stella.pro file.
It has no purpose other than for coolness :)
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@193 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-09-28 21:59:24 +00:00
|
|
|
// Structure used for main menu items
|
|
|
|
struct MainMenuItem
|
|
|
|
{
|
|
|
|
Widget widget;
|
|
|
|
string action;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Structure used for remap menu items
|
|
|
|
struct RemapMenuItem
|
|
|
|
{
|
|
|
|
Event::Type event;
|
|
|
|
string action;
|
|
|
|
string key;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Table of strings representing the various StellaEvent codes
|
|
|
|
static const char* ourEventName[StellaEvent::LastKCODE];
|
2003-09-25 16:20:34 +00:00
|
|
|
|
2003-09-26 17:35:05 +00:00
|
|
|
// Type of interface item currently slated for redraw
|
|
|
|
Widget myCurrentWidget;
|
|
|
|
|
|
|
|
// Indicates that an event is currently being remapped
|
|
|
|
bool myRemapEventSelectedFlag;
|
|
|
|
|
|
|
|
// Indicates the current selected event being remapped
|
|
|
|
Event::Type mySelectedEvent;
|
|
|
|
|
Huge changes across the map. Lets see if I can remember it all ...
There is now an SDL OpenGL port with filtering and alpha-blending.
It's a work in progress right now, but is already quite stable.
It's not as optimized as the software version yet, but this will
change as well. For now, you have to compile the SDL version in
either normal software mode or OpenGL mode. This will change
before the 1.4 release.
When entering menu mode, the emulation is now suspended. And when
pause is pressed, you can't enter menu mode. Because of these changes,
CPU use has dropped dramatically when viewing menus. This will benefit
all ports, since menus are now redrawn only when necessary, instead of
at the current framerate.
For a reference, on a Pentium-IV 2.4GHz, the software SDL version
maxes CPU usage at 9%, and the SDL OpenGL version at 13.5%. This is
at 60 fps and a zoomlevel of 4. While some small improvements can
(possibly) be made to the OpenGL version, I think we'll soon be hitting
the glass ceiling.
Work on the Porting.txt document is progressing, and I estimate it to
be 45% complete.
The Windows version still doesn't compile, and I still haven't looked
at it. Rest assured that it will be done before 1.4. There will be
a simultaneous release, even if the Linux versions are finished.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@200 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-11-06 22:22:33 +00:00
|
|
|
// Indicates if we are in menu mode
|
|
|
|
bool myMenuMode;
|
|
|
|
|
|
|
|
// Indicates if the menus should be redrawn
|
|
|
|
bool theMenuChangedIndicator;
|
|
|
|
|
The first version of a GUI for event remapping is here!
Now for the things that aren't finished yet:
- Only the most basic functions can be remapped. If you
erase the mapping for those that can't yet be remapped,
you'll have to delete the 'keymap' line from stellarc and
start over.
- Core events can only be remapped to other keys on the keyboard.
I haven't got the joystick remapping working yet (but it should
be easy to do).
- The TIA needs to be modified to show 320 pixels horizontally.
Right now, I'm using 8 pixel-width fonts on a framebuffer of
160 pixels, so there's not a lot of horizontal real estate.
So text will probably overwrite other stuff. This is cosmetic,
and WILL be fixed.
- Modification of the TIA will break every frontends rendering
code. It had to be done sometime ...
- I haven't yet added any user feedback mechanism for the user. So when
you go into remap mode and are about to remap a key, you won't
know it :) I'll be adding arrows (like in XMAME) ...
I've added a "Game Information" menu, which shows things like Game name,
manufacturer, rarity, type, etc. Basically stuff from the stella.pro file.
It has no purpose other than for coolness :)
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@193 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-09-28 21:59:24 +00:00
|
|
|
// The maximum number of vertical lines of text that can be onscreen
|
2003-11-09 23:53:20 +00:00
|
|
|
Int32 myMaxRows;
|
|
|
|
|
|
|
|
// The maximum number of characters of text in a row
|
|
|
|
Int32 myMaxColumns;
|
The first version of a GUI for event remapping is here!
Now for the things that aren't finished yet:
- Only the most basic functions can be remapped. If you
erase the mapping for those that can't yet be remapped,
you'll have to delete the 'keymap' line from stellarc and
start over.
- Core events can only be remapped to other keys on the keyboard.
I haven't got the joystick remapping working yet (but it should
be easy to do).
- The TIA needs to be modified to show 320 pixels horizontally.
Right now, I'm using 8 pixel-width fonts on a framebuffer of
160 pixels, so there's not a lot of horizontal real estate.
So text will probably overwrite other stuff. This is cosmetic,
and WILL be fixed.
- Modification of the TIA will break every frontends rendering
code. It had to be done sometime ...
- I haven't yet added any user feedback mechanism for the user. So when
you go into remap mode and are about to remap a key, you won't
know it :) I'll be adding arrows (like in XMAME) ...
I've added a "Game Information" menu, which shows things like Game name,
manufacturer, rarity, type, etc. Basically stuff from the stella.pro file.
It has no purpose other than for coolness :)
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@193 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-09-28 21:59:24 +00:00
|
|
|
|
|
|
|
// Keep track of current selected main menu item
|
|
|
|
uInt32 myMainMenuIndex, myMainMenuItems;
|
|
|
|
|
|
|
|
// Keep track of current selected remap menu item
|
2003-11-09 23:53:20 +00:00
|
|
|
Int32 myRemapMenuIndex, myRemapMenuLowIndex, myRemapMenuHighIndex;
|
|
|
|
Int32 myRemapMenuItems, myRemapMenuMaxLines;
|
The first version of a GUI for event remapping is here!
Now for the things that aren't finished yet:
- Only the most basic functions can be remapped. If you
erase the mapping for those that can't yet be remapped,
you'll have to delete the 'keymap' line from stellarc and
start over.
- Core events can only be remapped to other keys on the keyboard.
I haven't got the joystick remapping working yet (but it should
be easy to do).
- The TIA needs to be modified to show 320 pixels horizontally.
Right now, I'm using 8 pixel-width fonts on a framebuffer of
160 pixels, so there's not a lot of horizontal real estate.
So text will probably overwrite other stuff. This is cosmetic,
and WILL be fixed.
- Modification of the TIA will break every frontends rendering
code. It had to be done sometime ...
- I haven't yet added any user feedback mechanism for the user. So when
you go into remap mode and are about to remap a key, you won't
know it :) I'll be adding arrows (like in XMAME) ...
I've added a "Game Information" menu, which shows things like Game name,
manufacturer, rarity, type, etc. Basically stuff from the stella.pro file.
It has no purpose other than for coolness :)
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@193 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-09-28 21:59:24 +00:00
|
|
|
|
2003-09-26 17:35:05 +00:00
|
|
|
// Message timer
|
|
|
|
Int32 myMessageTime;
|
2003-09-26 00:32:00 +00:00
|
|
|
|
2003-09-26 17:35:05 +00:00
|
|
|
// Message text
|
|
|
|
string myMessageText;
|
2003-09-26 22:39:36 +00:00
|
|
|
|
2004-06-23 03:43:47 +00:00
|
|
|
// Number of times menu have been drawn
|
|
|
|
uInt32 myMenuRedraws;
|
|
|
|
|
The first version of a GUI for event remapping is here!
Now for the things that aren't finished yet:
- Only the most basic functions can be remapped. If you
erase the mapping for those that can't yet be remapped,
you'll have to delete the 'keymap' line from stellarc and
start over.
- Core events can only be remapped to other keys on the keyboard.
I haven't got the joystick remapping working yet (but it should
be easy to do).
- The TIA needs to be modified to show 320 pixels horizontally.
Right now, I'm using 8 pixel-width fonts on a framebuffer of
160 pixels, so there's not a lot of horizontal real estate.
So text will probably overwrite other stuff. This is cosmetic,
and WILL be fixed.
- Modification of the TIA will break every frontends rendering
code. It had to be done sometime ...
- I haven't yet added any user feedback mechanism for the user. So when
you go into remap mode and are about to remap a key, you won't
know it :) I'll be adding arrows (like in XMAME) ...
I've added a "Game Information" menu, which shows things like Game name,
manufacturer, rarity, type, etc. Basically stuff from the stella.pro file.
It has no purpose other than for coolness :)
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@193 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-09-28 21:59:24 +00:00
|
|
|
// The width of the information menu, determined by the longest string
|
2003-11-09 23:53:20 +00:00
|
|
|
Int32 myInfoMenuWidth;
|
The first version of a GUI for event remapping is here!
Now for the things that aren't finished yet:
- Only the most basic functions can be remapped. If you
erase the mapping for those that can't yet be remapped,
you'll have to delete the 'keymap' line from stellarc and
start over.
- Core events can only be remapped to other keys on the keyboard.
I haven't got the joystick remapping working yet (but it should
be easy to do).
- The TIA needs to be modified to show 320 pixels horizontally.
Right now, I'm using 8 pixel-width fonts on a framebuffer of
160 pixels, so there's not a lot of horizontal real estate.
So text will probably overwrite other stuff. This is cosmetic,
and WILL be fixed.
- Modification of the TIA will break every frontends rendering
code. It had to be done sometime ...
- I haven't yet added any user feedback mechanism for the user. So when
you go into remap mode and are about to remap a key, you won't
know it :) I'll be adding arrows (like in XMAME) ...
I've added a "Game Information" menu, which shows things like Game name,
manufacturer, rarity, type, etc. Basically stuff from the stella.pro file.
It has no purpose other than for coolness :)
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@193 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-09-28 21:59:24 +00:00
|
|
|
|
2003-09-26 22:39:36 +00:00
|
|
|
// Holds information about the current selected ROM image
|
Huge changes across the map. Lets see if I can remember it all ...
There is now an SDL OpenGL port with filtering and alpha-blending.
It's a work in progress right now, but is already quite stable.
It's not as optimized as the software version yet, but this will
change as well. For now, you have to compile the SDL version in
either normal software mode or OpenGL mode. This will change
before the 1.4 release.
When entering menu mode, the emulation is now suspended. And when
pause is pressed, you can't enter menu mode. Because of these changes,
CPU use has dropped dramatically when viewing menus. This will benefit
all ports, since menus are now redrawn only when necessary, instead of
at the current framerate.
For a reference, on a Pentium-IV 2.4GHz, the software SDL version
maxes CPU usage at 9%, and the SDL OpenGL version at 13.5%. This is
at 60 fps and a zoomlevel of 4. While some small improvements can
(possibly) be made to the OpenGL version, I think we'll soon be hitting
the glass ceiling.
Work on the Porting.txt document is progressing, and I estimate it to
be 45% complete.
The Windows version still doesn't compile, and I still haven't looked
at it. Rest assured that it will be done before 1.4. There will be
a simultaneous release, even if the Linux versions are finished.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@200 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-11-06 22:22:33 +00:00
|
|
|
string ourPropertiesInfo[9];
|
2003-09-26 22:39:36 +00:00
|
|
|
|
The first version of a GUI for event remapping is here!
Now for the things that aren't finished yet:
- Only the most basic functions can be remapped. If you
erase the mapping for those that can't yet be remapped,
you'll have to delete the 'keymap' line from stellarc and
start over.
- Core events can only be remapped to other keys on the keyboard.
I haven't got the joystick remapping working yet (but it should
be easy to do).
- The TIA needs to be modified to show 320 pixels horizontally.
Right now, I'm using 8 pixel-width fonts on a framebuffer of
160 pixels, so there's not a lot of horizontal real estate.
So text will probably overwrite other stuff. This is cosmetic,
and WILL be fixed.
- Modification of the TIA will break every frontends rendering
code. It had to be done sometime ...
- I haven't yet added any user feedback mechanism for the user. So when
you go into remap mode and are about to remap a key, you won't
know it :) I'll be adding arrows (like in XMAME) ...
I've added a "Game Information" menu, which shows things like Game name,
manufacturer, rarity, type, etc. Basically stuff from the stella.pro file.
It has no purpose other than for coolness :)
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@193 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-09-28 21:59:24 +00:00
|
|
|
// Holds static strings for the main menu
|
2003-10-26 19:40:39 +00:00
|
|
|
static MainMenuItem ourMainMenu[2];
|
The first version of a GUI for event remapping is here!
Now for the things that aren't finished yet:
- Only the most basic functions can be remapped. If you
erase the mapping for those that can't yet be remapped,
you'll have to delete the 'keymap' line from stellarc and
start over.
- Core events can only be remapped to other keys on the keyboard.
I haven't got the joystick remapping working yet (but it should
be easy to do).
- The TIA needs to be modified to show 320 pixels horizontally.
Right now, I'm using 8 pixel-width fonts on a framebuffer of
160 pixels, so there's not a lot of horizontal real estate.
So text will probably overwrite other stuff. This is cosmetic,
and WILL be fixed.
- Modification of the TIA will break every frontends rendering
code. It had to be done sometime ...
- I haven't yet added any user feedback mechanism for the user. So when
you go into remap mode and are about to remap a key, you won't
know it :) I'll be adding arrows (like in XMAME) ...
I've added a "Game Information" menu, which shows things like Game name,
manufacturer, rarity, type, etc. Basically stuff from the stella.pro file.
It has no purpose other than for coolness :)
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@193 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-09-28 21:59:24 +00:00
|
|
|
|
|
|
|
// Holds static strings for the remap menu
|
2004-07-28 23:54:39 +00:00
|
|
|
static RemapMenuItem ourRemapMenu[57];
|
The first version of a GUI for event remapping is here!
Now for the things that aren't finished yet:
- Only the most basic functions can be remapped. If you
erase the mapping for those that can't yet be remapped,
you'll have to delete the 'keymap' line from stellarc and
start over.
- Core events can only be remapped to other keys on the keyboard.
I haven't got the joystick remapping working yet (but it should
be easy to do).
- The TIA needs to be modified to show 320 pixels horizontally.
Right now, I'm using 8 pixel-width fonts on a framebuffer of
160 pixels, so there's not a lot of horizontal real estate.
So text will probably overwrite other stuff. This is cosmetic,
and WILL be fixed.
- Modification of the TIA will break every frontends rendering
code. It had to be done sometime ...
- I haven't yet added any user feedback mechanism for the user. So when
you go into remap mode and are about to remap a key, you won't
know it :) I'll be adding arrows (like in XMAME) ...
I've added a "Game Information" menu, which shows things like Game name,
manufacturer, rarity, type, etc. Basically stuff from the stella.pro file.
It has no purpose other than for coolness :)
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@193 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-09-28 21:59:24 +00:00
|
|
|
|
|
|
|
// Holds the current key mappings
|
|
|
|
Event::Type* myKeyTable;
|
|
|
|
|
|
|
|
// Holds the number of items in the keytable array
|
|
|
|
uInt32 myKeyTableSize;
|
|
|
|
|
|
|
|
// Holds the current joystick mappings
|
|
|
|
Event::Type* myJoyTable;
|
|
|
|
|
|
|
|
// Holds the number of items in the joytable array
|
|
|
|
uInt32 myJoyTableSize;
|
2003-09-25 16:20:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|