mirror of https://github.com/stella-emu/stella.git
Cyberstella finally compiles! After a year of inactivity, I decided that
someone had to look at the code and do something with it. As of now, joysticks and mouse aren't working. Settings aren't saved. And sound support is patchy. Definitely a work-in-progress. It looks like I'll be the maintainer for this as well, at least until we can find someone who is willing to take over full time. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@185 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
e25d504c02
commit
dd6d7f7981
|
@ -1,12 +1,7 @@
|
|||
Cyberstella V1.2
|
||||
What needs to be done ASAP (will be done eventually):
|
||||
|
||||
Urgent:
|
||||
- Reasonably reduce the appearance of advertisment MessgageBoxes.
|
||||
- Check if games are running without stella.pro (?!?)
|
||||
|
||||
Later:
|
||||
- More Columns / Advanced sorting
|
||||
- Make whole screen resizable
|
||||
- More Columns / Advanced sorting
|
||||
- Make whole screen resizable
|
||||
like this:
|
||||
|
||||
void CViewList::OnSize(UINT nType, int cx, int cy)
|
||||
|
@ -15,80 +10,40 @@ Later:
|
|||
if ( m_listCtrl.m_hWnd ) m_listCtrl.MoveWindow (0, 0, cx, cy);
|
||||
}
|
||||
???????
|
||||
- Check other versions command line params
|
||||
- Check other versions keyboard mapping
|
||||
- Add Screenshots - F12
|
||||
- Add Pause - F3
|
||||
- Add Fullscreen / Windowed mode -F4
|
||||
- Check Direct Draw implementation / upgrade to DX8
|
||||
- Integrate manuals for the built in games
|
||||
- Think about french localisation
|
||||
- Add Fullscreen / Windowed mode - Alt-Enter
|
||||
- Check Direct Draw implementation / upgrade to DX8
|
||||
- Improve the DirectSound support
|
||||
- Can you have two PC controllers connected?
|
||||
- Make all dialog boxes resizable for any size text
|
||||
|
||||
ToDos from Brad Mott:
|
||||
- Is the keyboard mapping correct (e.g., do both of the Joysticks
|
||||
Integrated into the core, but not necessarily active in Cyberstella:
|
||||
|
||||
- Check other versions command line params
|
||||
- Check other versions keyboard mapping
|
||||
- Add Screenshots - F12
|
||||
- Add Pause - Pause
|
||||
- Is the keyboard mapping correct (e.g., do both of the Joysticks
|
||||
work via the keyboard)
|
||||
- Can you have two PC controllers connected?
|
||||
- Finish the windowed version of StellaX (e.g., so that it'll run in
|
||||
a window as well as fullscreen)
|
||||
- Improve the DirectSound support
|
||||
- Provide custom keyboard / controller mapping (e.g., be able to
|
||||
- Provide custom keyboard / controller mapping (e.g., be able to
|
||||
map joystick buttons to the 2600 Select/Reset as well as the
|
||||
other 2600 functions...)
|
||||
|
||||
ToDos from Stephen Anthony:
|
||||
1) In the information dialog box, could you change the
|
||||
Stella homepage to
|
||||
stella.sourceforge.net, and change the mailing list to
|
||||
stella-main@lists.sourceforge.net? These are the new
|
||||
addresses, and the
|
||||
older ones you have used will be eventually phased out.
|
||||
Future / never (depending on user enthusiasm and developer availability):
|
||||
|
||||
2) Sometimes, when resizing the window, the inner file-
|
||||
list contents aren't
|
||||
resized. Maybe you haven't associated the resize event
|
||||
with the resize
|
||||
listview event?
|
||||
|
||||
3) There seems to be some lines of text missing in the
|
||||
various dialog boxes.
|
||||
I'm not sure if that is a problem with the version of
|
||||
Windows I using (Win98
|
||||
under VMWare) or not.
|
||||
|
||||
ToDos from Thomas Jetzsch:
|
||||
-> Private Mail + (Update path earlier, etc...)
|
||||
>> Maybe just adding some friendly game-info menu, that
|
||||
>> doesn't pop-up on remote at all.
|
||||
|
||||
>Auch 'ne gute Idee, könnte man auch schön mit den Anleitungen
|
||||
>kombinieren. Und bei jedem Spiel vielleicht nur einmalig darauf
|
||||
>verweisen.
|
||||
|
||||
Own Ideas:
|
||||
- Add a Sprite/Animation Editor
|
||||
- Add a PF Editor
|
||||
- Add a Sourcecode Editor
|
||||
- Either Support DASM as frontend or integrate a 6507
|
||||
Assembler
|
||||
- Either Support Distella as frontend or integrate a
|
||||
6507 Disassembler
|
||||
- AVI/MPEG export
|
||||
- WAV/MP3 export
|
||||
- Client/Server networked play for up to 4 Computers via
|
||||
LAN/Internet
|
||||
- Tracking Hiscores
|
||||
- Record and Playback games - not as real movie, but by
|
||||
logging Input/RAM/processor states in given intervals.
|
||||
- Cheatcodes
|
||||
|
||||
Suggestions from Brian Luttrull:
|
||||
Are you planning or would you be interested in adding
|
||||
more features to the front end of Stella? For
|
||||
example, the ability to display screenshots, cart
|
||||
pics, docs, details, etc. The Kstella frontend has
|
||||
these features and the very friendly and helpful
|
||||
author, Stephen Anthony, said you would be free to
|
||||
take ideas and code from his frontend (under GPL).
|
||||
- Add a Sprite/Animation Editor
|
||||
- Add a PF Editor
|
||||
- Add a Sourcecode Editor
|
||||
- Either Support DASM as frontend or integrate a 6507 Assembler
|
||||
- Either Support Distella as frontend or integrate a 6507 Disassembler
|
||||
- AVI/MPEG export
|
||||
- WAV/MP3 export
|
||||
- Client/Server networked play for up to 4 Computers via LAN/Internet
|
||||
- Tracking Hiscores
|
||||
- Record and Playback games - not as real movie, but by logging
|
||||
Input/RAM/processor states in given intervals.
|
||||
- Cheatcodes
|
||||
- Improve frontend by adding snapshots, labels, manuals, etc.
|
||||
Like KStella for Linux. (Suggestion from Brian Luttrull)
|
||||
|
||||
Suggestions from Glenn Saunders:
|
||||
A couple things I'd like to see in a 2600 emulator that Brad was working on
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: CartMC.cxx,v 1.3 2002-12-01 15:59:47 stephena Exp $
|
||||
// $Id: CartMC.cxx,v 1.4 2003-09-21 14:33:33 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -222,6 +222,7 @@ void CartridgeMC::poke(uInt16 address, uInt8 value)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartridgeMC::save(Serializer& out)
|
||||
{
|
||||
uInt32 i;
|
||||
string cart = name();
|
||||
|
||||
try
|
||||
|
@ -230,12 +231,12 @@ bool CartridgeMC::save(Serializer& out)
|
|||
|
||||
// The currentBlock array
|
||||
out.putLong(4);
|
||||
for(uInt32 i = 0; i < 4; ++i)
|
||||
for(i = 0; i < 4; ++i)
|
||||
out.putLong(myCurrentBlock[i]);
|
||||
|
||||
// The 32K of RAM
|
||||
out.putLong(32 * 1024);
|
||||
for(uInt32 i = 0; i < 32 * 1024; ++i)
|
||||
for(i = 0; i < 32 * 1024; ++i)
|
||||
out.putLong(myRAM[i]);
|
||||
}
|
||||
catch(char *msg)
|
||||
|
@ -255,6 +256,7 @@ bool CartridgeMC::save(Serializer& out)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartridgeMC::load(Deserializer& in)
|
||||
{
|
||||
uInt32 i;
|
||||
string cart = name();
|
||||
|
||||
try
|
||||
|
@ -266,12 +268,12 @@ bool CartridgeMC::load(Deserializer& in)
|
|||
|
||||
// The currentBlock array
|
||||
limit = (uInt32) in.getLong();
|
||||
for(uInt32 i = 0; i < limit; ++i)
|
||||
for(i = 0; i < limit; ++i)
|
||||
myCurrentBlock[i] = (uInt8) in.getLong();
|
||||
|
||||
// The 32K of RAM
|
||||
limit = (uInt32) in.getLong();
|
||||
for(uInt32 i = 0; i < limit; ++i)
|
||||
for(i = 0; i < limit; ++i)
|
||||
myRAM[i] = (uInt8) in.getLong();
|
||||
}
|
||||
catch(char *msg)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: EventHandler.cxx,v 1.7 2003-09-19 15:45:01 stephena Exp $
|
||||
// $Id: EventHandler.cxx,v 1.8 2003-09-21 14:33:33 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <algorithm>
|
||||
|
@ -37,20 +37,22 @@ EventHandler::EventHandler(Console* console)
|
|||
: myConsole(console),
|
||||
myCurrentState(0)
|
||||
{
|
||||
Int32 i;
|
||||
|
||||
// Create the event object which will be used for this handler
|
||||
myEvent = new Event();
|
||||
|
||||
// Erase the KeyEvent array
|
||||
for(Int32 i = 0; i < StellaEvent::LastKCODE; ++i)
|
||||
for(i = 0; i < StellaEvent::LastKCODE; ++i)
|
||||
myKeyTable[i] = Event::LastType;
|
||||
|
||||
// Erase the JoyEvent array
|
||||
for(Int32 i = 0; i < StellaEvent::LastJSTICK; ++i)
|
||||
for(i = 0; i < StellaEvent::LastJSTICK; ++i)
|
||||
for(Int32 j = 0; j < StellaEvent::LastJCODE; ++j)
|
||||
myJoyTable[i][j] = Event::LastType;
|
||||
|
||||
// Erase the Message array
|
||||
for(Int32 i = 0; i < Event::LastType; ++i)
|
||||
for(i = 0; i < Event::LastType; ++i)
|
||||
ourMessageTable[i] = "";
|
||||
|
||||
// Set unchanging messages
|
||||
|
@ -215,7 +217,6 @@ void EventHandler::setKeymap()
|
|||
|
||||
if(isValidList(list, StellaEvent::LastKCODE))
|
||||
{
|
||||
Event::Type event;
|
||||
istringstream buf(list);
|
||||
string key;
|
||||
|
||||
|
@ -240,7 +241,6 @@ void EventHandler::setJoymap()
|
|||
|
||||
if(isValidList(list, StellaEvent::LastJSTICK*StellaEvent::LastJCODE))
|
||||
{
|
||||
Event::Type event;
|
||||
istringstream buf(list);
|
||||
string key;
|
||||
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Settings.cxx,v 1.5 2003-09-19 15:45:01 stephena Exp $
|
||||
// $Id: Settings.cxx,v 1.6 2003-09-21 14:33:33 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <assert.h>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
|
||||
|
@ -138,7 +139,21 @@ void Settings::saveConfig()
|
|||
return;
|
||||
}
|
||||
|
||||
out << "fps = " << theDesiredFrameRate << endl
|
||||
out << "; Stella configuration file" << endl
|
||||
<< ";" << endl
|
||||
<< "; Lines starting with ';' are comments and are ignored." << endl
|
||||
<< "; Spaces and tabs are ignored." << endl
|
||||
<< ";" << endl
|
||||
<< "; Format MUST be as follows:" << endl
|
||||
<< "; command = value" << endl
|
||||
<< ";" << endl
|
||||
<< "; Commmands are the same as those specified on the commandline," << endl
|
||||
<< "; without the '-' character." << endl
|
||||
<< ";" << endl
|
||||
<< "; Values are the same as those allowed on the commandline." << endl
|
||||
<< "; Boolean values are specified as 1 (for true) and 0 (for false)" << endl
|
||||
<< ";" << endl
|
||||
<< "fps = " << theDesiredFrameRate << endl
|
||||
<< "zoom = " << theZoomLevel << endl
|
||||
<< "keymap = " << myConsole->eventHandler().getKeymap() << endl
|
||||
<< "joymap = " << myConsole->eventHandler().getJoymap() << endl
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: TIA.cxx,v 1.19 2002-11-19 04:33:48 bwmott Exp $
|
||||
// $Id: TIA.cxx,v 1.20 2003-09-21 14:33:33 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <cassert>
|
||||
|
@ -656,9 +656,10 @@ void TIA::drawMessageText()
|
|||
}
|
||||
|
||||
// Then, draw the text
|
||||
for(uInt8 x = 0; x < length; ++x)
|
||||
//FIXME - change back to x
|
||||
for(uInt8 x1 = 0; x1 < length; ++x1)
|
||||
{
|
||||
char letter = myMessageText[x];
|
||||
char letter = myMessageText[x1];
|
||||
|
||||
if((letter >= 'A') && (letter <= 'Z'))
|
||||
data = ourFontData[(int)letter - 65];
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
; Stella configuration file
|
||||
;
|
||||
; Lines starting with ';' are comments and are ignored.
|
||||
; Spaces and tabs are ignored.
|
||||
;
|
||||
; Format MUST be as follows:
|
||||
; command = value
|
||||
;
|
||||
; Commmands are the same as those specified on the commandline,
|
||||
; without the '-' character.
|
||||
;
|
||||
; Values are the same as those allowed on the commandline.
|
||||
; Boolean values are specified as 1 (for true) and 0 (for false)
|
||||
;
|
||||
; LINUX VERSION
|
||||
; This file can be put in "/etc/stellarc" for system-wide access
|
||||
; or in "$HOME/.stella/stellarc" for individual users.
|
||||
|
||||
;display = <display>
|
||||
;fps = <number>
|
||||
;owncmap = <0|1>
|
||||
;zoom = <size>
|
||||
;grabmouse = <0|1>
|
||||
;hidecursor = <0|1>
|
||||
;center = <0|1>
|
||||
;volume = <number>
|
||||
;paddle = <0|1|2|3|real>
|
||||
;showinfo = <0|1>
|
||||
;fullscreen = <0|1>
|
||||
;ssdir = <pathname>
|
||||
;ssname = <romname|md5sum>
|
||||
;sssingle = <0|1>
|
||||
;accurate = <0|1>
|
||||
;sound = <0|oss|sdl>
|
||||
;Dmerge = <0|1>
|
|
@ -52,16 +52,16 @@ BOOL AboutDlg::OnInitDialog()
|
|||
CDialog::OnInitDialog();
|
||||
|
||||
m_hlMail_JSM.SubclassDlgItem(IDC_EMAIL_JEFFMILL, this);
|
||||
m_hlMail_JSM.SetURL( _T("mailto:miller@zipcon.net?Subject=StellaX") );
|
||||
m_hlMail_JSM.SetURL( _T("mailto:stephena@users.sourceforge.net?Subject=Cyberstella") );
|
||||
|
||||
m_hlWWW_JSM.SubclassDlgItem(IDC_WEB_JEFFMILL, this);
|
||||
m_hlWWW_JSM.SetURL( _T("http://www.emuunlim.com/stellax/") );
|
||||
m_hlWWW_JSM.SetURL( _T("http://minbar.org") );
|
||||
|
||||
m_hlMail_Stella.SubclassDlgItem(IDC_EMAIL_STELLA, this);
|
||||
m_hlMail_Stella.SetURL( _T("mailto:stella@csc.ncsu.edu") );
|
||||
m_hlMail_Stella.SetURL( _T("mailto:stella-main@lists.sourceforge.net") );
|
||||
|
||||
m_hlWWW_Stella.SubclassDlgItem(IDC_WEB_STELLA, this);
|
||||
m_hlWWW_Stella.SetURL( _T("http://stella.atari.org/") );
|
||||
m_hlWWW_Stella.SetURL( _T("http://stella.sourceforge.net") );
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
|
|
|
@ -40,9 +40,10 @@ RSC=rc.exe
|
|||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\games" /I "..\..\build" /I "..\..\emucore" /I "..\..\emucore\m6502\src" /I "..\..\emucore\m6502\src\bspf\src" /I "..\sound" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "BSPF_WIN32" /FR /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\games" /I "..\..\build" /I "..\..\emucore" /I "..\..\emucore\m6502\src" /I "..\..\emucore\m6502\src\bspf\src" /I "..\sound" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "BSPF_WIN32" /D DIRECTINPUT_VERSION=0x0800 /FR /FD /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
|
@ -53,7 +54,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 dxguid.lib ddraw.lib dsound.lib /nologo /subsystem:windows /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "Cyberstella - Win32 Debug"
|
||||
|
||||
|
@ -69,7 +70,7 @@ LINK32=link.exe
|
|||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\games" /I "..\..\build" /I "..\..\emucore" /I "..\..\emucore\m6502\src" /I "..\..\emucore\m6502\src\bspf\src" /I "..\sound" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "BSPF_WIN32" /FR /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\games" /I "..\..\build" /I "..\..\emucore" /I "..\..\emucore\m6502\src" /I "..\..\emucore\m6502\src\bspf\src" /I "..\sound" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "BSPF_WIN32" /D DIRECTINPUT_VERSION=0x0800 /FR /FD /GZ /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
|
@ -80,7 +81,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 dxguid.lib ddraw.lib dsound.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
@ -97,10 +98,6 @@ SOURCE=.\AboutDlg.cpp
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AudioStream.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CRegBinding.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -157,6 +154,10 @@ SOURCE=.\pch.cxx
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SettingsWin32.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SoundWin32.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -177,10 +178,6 @@ SOURCE=.\AboutDlg.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AudioStream.hxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CRegBinding.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -237,6 +234,10 @@ SOURCE=.\Resource.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SettingsWin32.hxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SoundWin32.hxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -257,10 +258,6 @@ SOURCE=.\res\Cyberstella.rc2
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Dir.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\Dir.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -269,10 +266,6 @@ SOURCE=.\res\Stella.ico
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Stella.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\Toolbar.bmp
|
||||
# End Source File
|
||||
# End Group
|
||||
|
@ -361,6 +354,14 @@ SOURCE=..\..\emucore\CartE7.hxx
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\emucore\CartF4.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\emucore\CartF4.hxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\emucore\CartF4SC.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -473,6 +474,14 @@ SOURCE=..\..\emucore\Event.hxx
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\emucore\EventHandler.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\emucore\EventHandler.hxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\emucore\Joystick.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -553,6 +562,14 @@ SOURCE=..\..\emucore\Serializer.hxx
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\emucore\Settings.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\emucore\Settings.hxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\emucore\Sound.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -561,6 +578,10 @@ SOURCE=..\..\emucore\Sound.hxx
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\emucore\StellaEvent.hxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\emucore\Switches.cxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -575,6 +596,14 @@ SOURCE=..\..\emucore\TIA.cxx
|
|||
|
||||
SOURCE=..\..\emucore\TIA.hxx
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\emucore\TIASound.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\emucore\TIASound.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "M6502"
|
||||
|
||||
|
@ -636,38 +665,6 @@ SOURCE=..\..\emucore\m6502\src\System.cxx
|
|||
SOURCE=..\..\emucore\m6502\src\System.hxx
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Sound"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\sound\TIASound.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\sound\TIASound.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Games"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\games\Gunfight.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\games\Jammed.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\games\Qb.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\games\Thrust.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\emucore\m6502\src\bspf\src\bspf.hxx
|
||||
|
@ -676,13 +673,5 @@ SOURCE=..\..\emucore\m6502\src\bspf\src\bspf.hxx
|
|||
|
||||
SOURCE=..\..\..\CyberstellaTodo.txt
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\build\M6502Hi.ins
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\build\M6502Low.ins
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
|
|
|
@ -129,13 +129,6 @@ BEGIN
|
|||
BEGIN
|
||||
MENUITEM "&Cyberstella", IDC_CONFIG
|
||||
END
|
||||
POPUP "&Games"
|
||||
BEGIN
|
||||
MENUITEM "&Gunfight", IDG_GUNFIGHT
|
||||
MENUITEM "&Jammed", IDG_JAMMED
|
||||
MENUITEM "&QB", IDG_QB
|
||||
MENUITEM "&Thrust", IDG_THRUST
|
||||
END
|
||||
POPUP "&Help"
|
||||
BEGIN
|
||||
MENUITEM "&About Cyberstella...", ID_APP_ABOUT
|
||||
|
@ -173,7 +166,7 @@ END
|
|||
|
||||
IDD_CYBERSTELLA_FORM DIALOGEX 0, 0, 409, 169
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Shell Dlg"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "&Files found in:",-1,"Static",SS_LEFTNOWORDWRAP |
|
||||
WS_GROUP,7,7,44,8
|
||||
|
@ -185,29 +178,29 @@ BEGIN
|
|||
SS_NOPREFIX | WS_GROUP,57,7,254,8
|
||||
END
|
||||
|
||||
IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 390, 133
|
||||
IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 285, 128
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Information"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "You must own legal copies of all ROM images you are using. Neither Manuel Polik nor the rest of the Stella team can tell you where to find ROM images so DON'T ASK. All requests will either be deleted or sent to the appropriate authorities.",
|
||||
-1,7,27,376,18,SS_NOPREFIX
|
||||
LTEXT "You must own legal copies of all ROM images you are using. The Stella team cannot tell you where to find ROM images, so DON'T ASK. All requests will either be deleted or sent to the appropriate authorities.",
|
||||
-1,7,21,266,26,SS_NOPREFIX
|
||||
LTEXT "If you have a question or a problem with Cyberstella, please try one of these contacts:",
|
||||
-1,7,58,376,8,SS_NOPREFIX
|
||||
LTEXT "Manuel Polik:",-1,7,76,62,8,SS_NOPREFIX
|
||||
LTEXT "cybergoth@nexgo.de",IDC_EMAIL_JEFFMILL,73,76,103,8,
|
||||
-1,7,58,271,8,SS_NOPREFIX
|
||||
LTEXT "Stephen Anthony",-1,7,76,62,8,SS_NOPREFIX
|
||||
LTEXT "stephena@users.sourceforge.net",IDC_EMAIL_MAINTAINER,73,
|
||||
76,103,8,SS_NOPREFIX | SS_NOTIFY
|
||||
LTEXT "http://minbar.org",IDC_WEB_MAINTAINER,190,76,82,8,
|
||||
SS_NOPREFIX | SS_NOTIFY
|
||||
LTEXT "http://www.emuunlim.com/stellax/",IDC_WEB_JEFFMILL,178,
|
||||
76,110,8,SS_NOPREFIX | SS_NOTIFY
|
||||
LTEXT "Stella dev team:",-1,7,88,52,8,SS_NOPREFIX
|
||||
LTEXT "stella@csc.ncsu.edu",IDC_EMAIL_STELLA,73,88,67,8,
|
||||
SS_NOPREFIX | SS_NOTIFY
|
||||
LTEXT "http://stella.atari.org",IDC_WEB_STELLA,178,88,65,8,
|
||||
SS_NOPREFIX | SS_NOTIFY
|
||||
LTEXT "Cyberstella is free software. It may not be sold or offered as part of a collection for sale without permission from Manuel Polik. When distributing Cyberstella, the original distribution (the .zip file) must not be altered.",
|
||||
-1,7,7,376,19,SS_NOPREFIX
|
||||
CONTROL "",-1,"Static",SS_ETCHEDHORZ,7,50,375,1
|
||||
PUSHBUTTON "&Continue",IDC_CONTINUE,136,111,118,14
|
||||
LTEXT "Stella dev team:",-1,7,89,52,8,SS_NOPREFIX
|
||||
LTEXT "stella-main@lists.sourceforge.net",IDC_EMAIL_STELLA,73,
|
||||
89,105,8,SS_NOPREFIX | SS_NOTIFY
|
||||
LTEXT "http://stella.sourceforge.net",IDC_WEB_STELLA,190,89,88,
|
||||
8,SS_NOPREFIX | SS_NOTIFY
|
||||
LTEXT "Cyberstella v1.4 is GPL software.",-1,7,7,271,9,
|
||||
SS_NOPREFIX
|
||||
CONTROL "",-1,"Static",SS_ETCHEDHORZ,7,50,268,1
|
||||
PUSHBUTTON "&Continue",IDC_CONTINUE,112,107,60,14
|
||||
END
|
||||
|
||||
IDD_CONFIG_PAGE DIALOG DISCARDABLE 0, 0, 390, 112
|
||||
|
@ -239,8 +232,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEVERSION 1,0,0,0
|
||||
PRODUCTVERSION 1,0,0,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -253,17 +246,20 @@ VS_VERSION_INFO VERSIONINFO
|
|||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904B0"
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "\0"
|
||||
VALUE "CompanyName", "\0"
|
||||
VALUE "FileDescription", "Cyberstella MFC Application\0"
|
||||
VALUE "FileVersion", "1, 0, 0, 1\0"
|
||||
VALUE "FileVersion", "1.4\0"
|
||||
VALUE "InternalName", "Cyberstella\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2002\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2003\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "Cyberstella.EXE\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "Cyberstella Application\0"
|
||||
VALUE "ProductVersion", "1, 0, 0, 1\0"
|
||||
VALUE "ProductVersion", "1.4\0"
|
||||
VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -294,9 +290,9 @@ BEGIN
|
|||
IDD_ABOUTBOX, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 383
|
||||
RIGHTMARGIN, 278
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 126
|
||||
BOTTOMMARGIN, 121
|
||||
END
|
||||
|
||||
IDD_CONFIG_PAGE, DIALOG
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "StellaConfig.h"
|
||||
#include "Console.hxx"
|
||||
#include "SoundWin32.hxx"
|
||||
#include "SettingsWin32.hxx"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
|
@ -41,10 +42,6 @@ BEGIN_MESSAGE_MAP(CCyberstellaView, CFormView)
|
|||
ON_BN_CLICKED(IDC_CONFIG, OnConfig)
|
||||
ON_BN_CLICKED(IDC_PLAY, OnPlay)
|
||||
ON_WM_DESTROY()
|
||||
ON_COMMAND(IDG_GUNFIGHT, OnGunfight)
|
||||
ON_COMMAND(IDG_JAMMED, OnJammed)
|
||||
ON_COMMAND(IDG_QB, OnQb)
|
||||
ON_COMMAND(IDG_THRUST, OnThrust)
|
||||
ON_MESSAGE(MSG_GAMELIST_UPDATE, updateListInfos)
|
||||
ON_MESSAGE(MSG_GAMELIST_DISPLAYNOTE, displayNote)
|
||||
ON_MESSAGE(MSG_VIEW_INITIALIZE, initialize)
|
||||
|
@ -142,6 +139,10 @@ LRESULT CCyberstellaView::initialize(WPARAM wParam, LPARAM lParam)
|
|||
// Create a properties set for us to use
|
||||
m_pPropertiesSet = new PropertiesSet();
|
||||
|
||||
// Create SettingsWin32 object
|
||||
pSettings = new SettingsWin32();
|
||||
pSettings->loadConfig();
|
||||
|
||||
// Set up the image list.
|
||||
HICON hFolder, hAtari;
|
||||
|
||||
|
@ -212,34 +213,6 @@ LRESULT CCyberstellaView::displayNote(WPARAM wParam, LPARAM lParam)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void CCyberstellaView::OnGunfight()
|
||||
{
|
||||
MessageBox("To avoid probable GPL violations by including non-GPL games into this project, this function is currently disabled. We're working on a GPL conform solution though, so check back soon.", "Sorry, currently not available!", MB_OK);
|
||||
//playRom(IDG_GUNFIGHT);
|
||||
//MessageBox("If you'd like to play Gunfight on a real VCS, you can order a cartridge for only $16\nfrom http://webpages.charter.net/hozervideo!", "Commercial Break", MB_OK);
|
||||
}
|
||||
|
||||
void CCyberstellaView::OnJammed()
|
||||
{
|
||||
MessageBox("To avoid probable GPL violations by including non-GPL games into this project, this function is currently disabled. We're working on a GPL conform solution though, so check back soon.", "Sorry, currently not available!", MB_OK);
|
||||
//playRom(IDG_JAMMED);
|
||||
//MessageBox("If you'd like to play Jammed on a real VCS, you can order a cartridge for only $16\nfrom http://webpages.charter.net/hozervideo!", "Commercial Break", MB_OK);
|
||||
}
|
||||
|
||||
void CCyberstellaView::OnQb()
|
||||
{
|
||||
MessageBox("To avoid probable GPL violations by including non-GPL games into this project, this function is currently disabled. We're working on a GPL conform solution though, so check back soon.", "Sorry, currently not available!", MB_OK);
|
||||
//playRom(IDG_QB);
|
||||
//MessageBox("If you'd like to play Qb on a real VCS, you can order a cartridge for only $16\nfrom http://webpages.charter.net/hozervideo!", "Commercial Break", MB_OK);
|
||||
}
|
||||
|
||||
void CCyberstellaView::OnThrust()
|
||||
{
|
||||
MessageBox("To avoid probable GPL violations by including non-GPL games into this project, this function is currently disabled. We're working on a GPL conform solution though, so check back soon.", "Sorry, currently not available!", MB_OK);
|
||||
//playRom(IDG_THRUST);
|
||||
//MessageBox("If you'd like to play Thrust on a real VCS, you can order a cartridge for only $25\nfrom http://webpages.charter.net/hozervideo!", "Commercial Break", MB_OK);
|
||||
}
|
||||
|
||||
void CCyberstellaView::playRom(LONG gameID)
|
||||
{
|
||||
|
||||
|
@ -254,94 +227,40 @@ void CCyberstellaView::playRom(LONG gameID)
|
|||
CString fileName;
|
||||
BYTE* pImage = NULL;
|
||||
LPCTSTR pszFileName = NULL;
|
||||
Console* pConsole = NULL;
|
||||
Sound* pSound = NULL;
|
||||
DWORD dwImageSize;
|
||||
DWORD dwActualSize;
|
||||
Event rEvent;
|
||||
Console* pConsole = NULL;
|
||||
|
||||
// Create Sound driver object
|
||||
// (Will be initialized once we have a window handle below)
|
||||
if (m_pGlobalData->bNoSound)
|
||||
if(m_pGlobalData->bNoSound)
|
||||
{
|
||||
TRACE("Creating Sound driver");
|
||||
pSound = new Sound;
|
||||
pSound = new Sound();
|
||||
}
|
||||
else
|
||||
{
|
||||
TRACE("Creating SoundWin32 driver");
|
||||
pSound = new SoundWin32;
|
||||
pSound = new SoundWin32();
|
||||
}
|
||||
if ( pSound == NULL )
|
||||
{
|
||||
goto exit;
|
||||
}
|
||||
|
||||
// Special handling for special games
|
||||
switch(gameID)
|
||||
{
|
||||
case IDG_GUNFIGHT:
|
||||
{
|
||||
/*pszFileName = "Gunfight";
|
||||
dwActualSize = sizeof gunfight;
|
||||
pImage = new BYTE[dwActualSize];
|
||||
for(int i=0; i<dwActualSize; i++)
|
||||
{
|
||||
pImage[i] = gunfight[i]^(pszFileName[i%strlen(pszFileName)]);
|
||||
}*/
|
||||
break;
|
||||
}
|
||||
case IDG_JAMMED:
|
||||
{
|
||||
/*pszFileName = "Jammed";
|
||||
dwActualSize = sizeof jammed;
|
||||
pImage = new BYTE[dwActualSize];
|
||||
for(int i=0; i<dwActualSize; i++)
|
||||
{
|
||||
pImage[i] = jammed[i]^(pszFileName[i%strlen(pszFileName)]);
|
||||
}*/
|
||||
break;
|
||||
}
|
||||
case IDG_QB:
|
||||
{
|
||||
/*pszFileName = "Qb";
|
||||
dwActualSize = sizeof qb;
|
||||
pImage = new BYTE[dwActualSize];
|
||||
for(int i=0; i<dwActualSize; i++)
|
||||
{
|
||||
pImage[i] = qb[i]^(pszFileName[i%strlen(pszFileName)]);
|
||||
}*/
|
||||
break;
|
||||
}
|
||||
case IDG_THRUST:
|
||||
{
|
||||
/*pszFileName = "Thrust";
|
||||
dwActualSize = sizeof thrust;
|
||||
pImage = new BYTE[dwActualSize];
|
||||
for(int i=0; i<dwActualSize; i++)
|
||||
{
|
||||
pImage[i] = thrust[i]^(pszFileName[i%strlen(pszFileName)]);
|
||||
}*/
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
|
||||
fileName = m_List.getCurrentFile();
|
||||
|
||||
// Safety Bail Out
|
||||
if(fileName.GetLength() <= 0) return;
|
||||
if(fileName.GetLength() <= 0)
|
||||
return;
|
||||
|
||||
// Load the rom file
|
||||
HANDLE hFile;
|
||||
hFile = ::CreateFile( fileName,
|
||||
GENERIC_READ,
|
||||
FILE_SHARE_READ,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL );
|
||||
hFile = ::CreateFile( fileName, GENERIC_READ, FILE_SHARE_READ, NULL,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
if(hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
DWORD dwLastError = ::GetLastError();
|
||||
|
||||
|
@ -387,9 +306,7 @@ void CCyberstellaView::playRom(LONG gameID)
|
|||
|
||||
pImage = new BYTE[dwImageSize + 1];
|
||||
if ( pImage == NULL )
|
||||
{
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if ( ! ::ReadFile( hFile, pImage, dwImageSize, &dwActualSize, NULL ) )
|
||||
{
|
||||
|
@ -401,7 +318,7 @@ void CCyberstellaView::playRom(LONG gameID)
|
|||
}
|
||||
|
||||
VERIFY( ::CloseHandle(hFile) );
|
||||
}
|
||||
|
||||
// get just the filename
|
||||
pszFileName = _tcsrchr( fileName, _T('\\') );
|
||||
if ( pszFileName )
|
||||
|
@ -412,22 +329,15 @@ void CCyberstellaView::playRom(LONG gameID)
|
|||
{
|
||||
pszFileName = fileName;
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// If this throws an exception, then it's probably a bad cartridge
|
||||
pConsole = new Console( pImage,
|
||||
dwActualSize,
|
||||
pszFileName,
|
||||
rEvent,
|
||||
*m_pPropertiesSet,
|
||||
*pSound );
|
||||
pConsole = new Console( pImage, dwActualSize, pszFileName, *pSettings,
|
||||
*m_pPropertiesSet, 31400 );
|
||||
if ( pConsole == NULL )
|
||||
{
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
||||
|
@ -438,18 +348,12 @@ void CCyberstellaView::playRom(LONG gameID)
|
|||
}
|
||||
|
||||
#ifdef USE_FS
|
||||
pwnd = new CDirectXFullScreen( m_pGlobalData,
|
||||
pConsole,
|
||||
rEvent );
|
||||
pwnd = new CDirectXFullScreen( m_pGlobalData, pConsole, pSound );
|
||||
#else
|
||||
pwnd = new CDirectXWindow( m_pGlobalData,
|
||||
pConsole,
|
||||
rEvent );
|
||||
pwnd = new CDirectXWindow( m_pGlobalData, pConsole, pSound );
|
||||
#endif
|
||||
if ( pwnd == NULL )
|
||||
{
|
||||
if( pwnd == NULL )
|
||||
goto exit;
|
||||
}
|
||||
|
||||
HRESULT hr;
|
||||
|
||||
|
@ -475,20 +379,14 @@ void CCyberstellaView::playRom(LONG gameID)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (!m_pGlobalData->bNoSound)
|
||||
if(!m_pGlobalData->bNoSound)
|
||||
{
|
||||
//
|
||||
// 060499: Pass pwnd->GetHWND() in instead of hwnd as some systems
|
||||
// will not play sound if this isn't set to the active window
|
||||
//
|
||||
|
||||
SoundWin32* pSoundWin32 = static_cast<SoundWin32*>( pSound );
|
||||
|
||||
hr = pSoundWin32->Initialize( *pwnd );
|
||||
if ( FAILED(hr) )
|
||||
hr = pSoundWin32->Initialize(*pwnd);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
TRACE( "Sndwin32 Initialize failed, err = %X", hr );
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -502,7 +400,9 @@ exit:
|
|||
delete pwnd;
|
||||
delete pConsole;
|
||||
delete pSound;
|
||||
if (pImage) delete pImage;
|
||||
|
||||
if(pImage)
|
||||
delete pImage;
|
||||
|
||||
EnableWindow(TRUE);
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#include "GlobalData.hxx"
|
||||
#include "PropsSet.hxx"
|
||||
#include "Sound.hxx"
|
||||
#include "SettingsWin32.hxx"
|
||||
#include "GameList.h"
|
||||
|
||||
class CCyberstellaView : public CFormView
|
||||
|
@ -60,10 +62,6 @@ protected:
|
|||
afx_msg void OnConfig();
|
||||
afx_msg void OnPlay();
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnGunfight();
|
||||
afx_msg void OnJammed();
|
||||
afx_msg void OnQb();
|
||||
afx_msg void OnThrust();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
|
@ -78,6 +76,8 @@ private:
|
|||
|
||||
// members
|
||||
PropertiesSet* m_pPropertiesSet;
|
||||
Sound* pSound;
|
||||
SettingsWin32* pSettings;
|
||||
bool m_bIsPause;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,17 +1,31 @@
|
|||
//============================================================================
|
||||
//
|
||||
// StellaX
|
||||
// Jeff Miller 05/01/2000
|
||||
// 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
|
||||
//
|
||||
#ifndef DIRECTIN_H
|
||||
#define DIRECTIN_H
|
||||
// Copyright (c) 1995-1999 by Bradford W. Mott
|
||||
//
|
||||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: DirectInput.hxx,v 1.2 2003-09-21 14:33:34 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef DIRECT_INPUT_HXX
|
||||
#define DIRECT_INPUT_HXX
|
||||
|
||||
class CDirectInput
|
||||
{
|
||||
public:
|
||||
|
||||
public:
|
||||
CDirectInput( HWND hwnd, DWORD dwDevType, int nButtonCount );
|
||||
virtual ~CDirectInput( );
|
||||
|
||||
public:
|
||||
virtual HRESULT Initialize( void );
|
||||
|
||||
virtual HRESULT Update( void ) = 0;
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
// StellaX
|
||||
// Jeff Miller 05/12/2000
|
||||
//
|
||||
#define STRICT
|
||||
|
||||
#include "pch.hxx"
|
||||
#include "DirectXFullScreen.hxx"
|
||||
#include "resource.h"
|
||||
|
@ -10,7 +12,9 @@
|
|||
|
||||
#include "bspf.hxx"
|
||||
#include "Console.hxx"
|
||||
#include "Event.hxx"
|
||||
#include "EventHandler.hxx"
|
||||
#include "StellaEvent.hxx"
|
||||
#include "Sound.hxx"
|
||||
#include "MediaSrc.hxx"
|
||||
|
||||
/*
|
||||
|
@ -30,11 +34,11 @@ LPCTSTR CDirectXFullScreen::pszClassName = _T("StellaXClass");
|
|||
CDirectXFullScreen::CDirectXFullScreen(
|
||||
const CGlobalData* rGlobalData,
|
||||
const Console* pConsole,
|
||||
Event& rEvent
|
||||
Sound* pSound
|
||||
) : \
|
||||
m_rGlobalData( rGlobalData ),
|
||||
m_pConsole( pConsole ),
|
||||
m_rEvent( rEvent ),
|
||||
m_pSound( pSound ),
|
||||
|
||||
m_fInitialized( FALSE ),
|
||||
m_hwnd( NULL ),
|
||||
|
@ -635,6 +639,9 @@ DWORD CDirectXFullScreen::Run(
|
|||
break;
|
||||
}
|
||||
|
||||
// FIXME - clean up this logic here, make it more like main in mainSDL
|
||||
m_pSound->updateSound(rMediaSource);
|
||||
|
||||
//
|
||||
// Check for keyboard, mouse, joystick input
|
||||
//
|
||||
|
@ -695,108 +702,101 @@ DWORD CDirectXFullScreen::Run(
|
|||
return msg.wParam;
|
||||
}
|
||||
|
||||
// FIXME - Event handling should be stripped out of this class
|
||||
// This class should only be a Display class, similar to DisplaySDL
|
||||
// or DisplayX11
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Event Handling
|
||||
// VK_* is defined in winuser.h
|
||||
|
||||
struct KeyEventStruct
|
||||
{
|
||||
int nVirtKey;
|
||||
int nAsyncVirtKey;
|
||||
Event::Type eventCode;
|
||||
StellaEvent::KeyCode keyCode;
|
||||
};
|
||||
|
||||
|
||||
static KeyEventStruct KeyEventMap[] =
|
||||
{
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* left keypad */
|
||||
{ DIK_F1, VK_F1, StellaEvent::KCODE_F1 },
|
||||
{ DIK_F2, VK_F2, StellaEvent::KCODE_F2 },
|
||||
{ DIK_F3, VK_F3, StellaEvent::KCODE_F3 },
|
||||
{ DIK_F4, VK_F4, StellaEvent::KCODE_F4 },
|
||||
{ DIK_F5, VK_F5, StellaEvent::KCODE_F5 },
|
||||
{ DIK_F6, VK_F6, StellaEvent::KCODE_F6 },
|
||||
{ DIK_F7, VK_F7, StellaEvent::KCODE_F7 },
|
||||
{ DIK_F8, VK_F8, StellaEvent::KCODE_F8 },
|
||||
{ DIK_F9, VK_F9, StellaEvent::KCODE_F9 },
|
||||
{ DIK_F10, VK_F10, StellaEvent::KCODE_F10 },
|
||||
{ DIK_F11, VK_F11, StellaEvent::KCODE_F11 },
|
||||
{ DIK_F12, VK_F12, StellaEvent::KCODE_F12 },
|
||||
|
||||
{ DIK_1, '1', Event::KeyboardZero1 },
|
||||
{ DIK_2, '2', Event::KeyboardZero2 },
|
||||
{ DIK_3, '3', Event::KeyboardZero3 },
|
||||
{ DIK_Q, 'Q', Event::KeyboardZero4 },
|
||||
{ DIK_W, 'W', Event::KeyboardZero5 },
|
||||
{ DIK_E, 'E', Event::KeyboardZero6 },
|
||||
{ DIK_A, 'A', Event::KeyboardZero7 },
|
||||
{ DIK_S, 'S', Event::KeyboardZero8 },
|
||||
{ DIK_D, 'D', Event::KeyboardZero9 },
|
||||
{ DIK_Z, 'Z', Event::KeyboardZeroStar },
|
||||
{ DIK_X, 'X', Event::KeyboardZero0 },
|
||||
{ DIK_C, 'C', Event::KeyboardZeroPound },
|
||||
{ DIK_UP, VK_UP, StellaEvent::KCODE_UP },
|
||||
{ DIK_DOWN, VK_DOWN, StellaEvent::KCODE_DOWN },
|
||||
{ DIK_LEFT, VK_LEFT, StellaEvent::KCODE_LEFT },
|
||||
{ DIK_RIGHT, VK_RIGHT, StellaEvent::KCODE_RIGHT },
|
||||
{ DIK_SPACE, VK_SPACE, StellaEvent::KCODE_SPACE },
|
||||
{ DIK_LCONTROL, VK_CONTROL, StellaEvent::KCODE_CTRL },
|
||||
{ DIK_RCONTROL, VK_CONTROL, StellaEvent::KCODE_CTRL },
|
||||
// FIXME
|
||||
// { SDLK_LALT, StellaEvent::KCODE_ALT },
|
||||
// { SDLK_RALT, StellaEvent::KCODE_ALT },
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* right keypad */
|
||||
{ DIK_A, 'A', StellaEvent::KCODE_a },
|
||||
{ DIK_B, 'B', StellaEvent::KCODE_b },
|
||||
{ DIK_C, 'C', StellaEvent::KCODE_c },
|
||||
{ DIK_D, 'D', StellaEvent::KCODE_d },
|
||||
{ DIK_E, 'E', StellaEvent::KCODE_e },
|
||||
{ DIK_F, 'F', StellaEvent::KCODE_f },
|
||||
{ DIK_G, 'G', StellaEvent::KCODE_g },
|
||||
{ DIK_H, 'H', StellaEvent::KCODE_h },
|
||||
{ DIK_I, 'I', StellaEvent::KCODE_i },
|
||||
{ DIK_J, 'J', StellaEvent::KCODE_j },
|
||||
{ DIK_K, 'K', StellaEvent::KCODE_k },
|
||||
{ DIK_L, 'L', StellaEvent::KCODE_l },
|
||||
{ DIK_M, 'M', StellaEvent::KCODE_m },
|
||||
{ DIK_N, 'N', StellaEvent::KCODE_n },
|
||||
{ DIK_O, 'O', StellaEvent::KCODE_o },
|
||||
{ DIK_P, 'P', StellaEvent::KCODE_p },
|
||||
{ DIK_Q, 'Q', StellaEvent::KCODE_q },
|
||||
{ DIK_R, 'R', StellaEvent::KCODE_r },
|
||||
{ DIK_S, 'S', StellaEvent::KCODE_s },
|
||||
{ DIK_T, 'T', StellaEvent::KCODE_t },
|
||||
{ DIK_U, 'U', StellaEvent::KCODE_u },
|
||||
{ DIK_V, 'V', StellaEvent::KCODE_v },
|
||||
{ DIK_W, 'W', StellaEvent::KCODE_w },
|
||||
{ DIK_X, 'X', StellaEvent::KCODE_x },
|
||||
{ DIK_Y, 'Y', StellaEvent::KCODE_y },
|
||||
{ DIK_Z, 'Z', StellaEvent::KCODE_z },
|
||||
|
||||
{ DIK_8, '8', Event::KeyboardOne1 },
|
||||
{ DIK_9, '9', Event::KeyboardOne2 },
|
||||
{ DIK_0, '0', Event::KeyboardOne3 },
|
||||
{ DIK_I, 'I', Event::KeyboardOne4 },
|
||||
{ DIK_O, 'O', Event::KeyboardOne5 },
|
||||
{ DIK_P, 'P', Event::KeyboardOne6 },
|
||||
{ DIK_K, 'K', Event::KeyboardOne7 },
|
||||
{ DIK_L, 'L', Event::KeyboardOne8 },
|
||||
{ DIK_SEMICOLON,';', Event::KeyboardOne9 },
|
||||
{ DIK_COMMA, ',', Event::KeyboardOneStar },
|
||||
{ DIK_PERIOD, '.', Event::KeyboardOne0 },
|
||||
{ DIK_SLASH, '/', Event::KeyboardOnePound },
|
||||
{ DIK_0, '0', StellaEvent::KCODE_0 },
|
||||
{ DIK_1, '1', StellaEvent::KCODE_1 },
|
||||
{ DIK_2, '2', StellaEvent::KCODE_2 },
|
||||
{ DIK_3, '3', StellaEvent::KCODE_3 },
|
||||
{ DIK_4, '4', StellaEvent::KCODE_4 },
|
||||
{ DIK_5, '5', StellaEvent::KCODE_5 },
|
||||
{ DIK_6, '6', StellaEvent::KCODE_6 },
|
||||
{ DIK_7, '7', StellaEvent::KCODE_7 },
|
||||
{ DIK_8, '8', StellaEvent::KCODE_8 },
|
||||
{ DIK_9, '9', StellaEvent::KCODE_9 },
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* left joystick */
|
||||
// FIXME - add keypad codes here ...
|
||||
|
||||
{ DIK_DOWN, VK_DOWN, Event::JoystickZeroDown },
|
||||
{ DIK_UP, VK_UP, Event::JoystickZeroUp },
|
||||
{ DIK_LEFT, VK_LEFT, Event::JoystickZeroLeft },
|
||||
{ DIK_RIGHT, VK_RIGHT, Event::JoystickZeroRight },
|
||||
{ DIK_SPACE, VK_SPACE, Event::JoystickZeroFire },
|
||||
|
||||
/* left joystick (alt.) */
|
||||
|
||||
{ DIK_W, 'W', Event::JoystickZeroUp },
|
||||
{ DIK_S, 'S', Event::JoystickZeroDown },
|
||||
{ DIK_A, 'A', Event::JoystickZeroLeft },
|
||||
{ DIK_D, 'D', Event::JoystickZeroRight },
|
||||
{ DIK_TAB, VK_TAB, Event::JoystickZeroFire },
|
||||
|
||||
/* I added this one (for my powerramp joystick) */
|
||||
|
||||
{ DIK_LCONTROL, VK_CONTROL, Event::JoystickZeroFire },
|
||||
|
||||
/* left joystick booster-grip */
|
||||
|
||||
{ DIK_Z, 'Z', Event::BoosterGripZeroTrigger },
|
||||
{ DIK_X, 'X', Event::BoosterGripZeroBooster },
|
||||
|
||||
/* left joystick booster-grip (alt.) */
|
||||
|
||||
{ DIK_1, '1', Event::BoosterGripZeroTrigger },
|
||||
{ DIK_2, '2', Event::BoosterGripZeroBooster },
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* right joystick */
|
||||
|
||||
{ DIK_L, 'L', Event::JoystickOneDown },
|
||||
{ DIK_O, 'O', Event::JoystickOneUp },
|
||||
{ DIK_K, 'K', Event::JoystickOneLeft },
|
||||
{ DIK_SEMICOLON,';', Event::JoystickOneRight },
|
||||
{ DIK_J, 'J', Event::JoystickOneFire },
|
||||
|
||||
/* right joystick booster-grip */
|
||||
|
||||
{ DIK_N, 'N', Event::BoosterGripOneTrigger },
|
||||
{ DIK_M, 'M', Event::BoosterGripOneBooster },
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* console controls */
|
||||
|
||||
{ DIK_F1, VK_F1, Event::ConsoleSelect },
|
||||
{ DIK_F2, VK_F2, Event::ConsoleReset },
|
||||
{ DIK_F3, VK_F3, Event::ConsoleColor },
|
||||
{ DIK_F4, VK_F4, Event::ConsoleBlackWhite },
|
||||
{ DIK_F5, VK_F5, Event::ConsoleLeftDifficultyA },
|
||||
{ DIK_F6, VK_F6, Event::ConsoleLeftDifficultyB },
|
||||
{ DIK_F7, VK_F7, Event::ConsoleRightDifficultyA },
|
||||
{ DIK_F8, VK_F8, Event::ConsoleRightDifficultyB }
|
||||
// FIXME - get rest of codes ...
|
||||
// { SDLK_BACKSPACE, StellaEvent::KCODE_BACKSPACE },
|
||||
{ DIK_TAB, VK_TAB, StellaEvent::KCODE_TAB },
|
||||
// { SDLK_RETURN, StellaEvent::KCODE_RETURN },
|
||||
// { SDLK_PAUSE, StellaEvent::KCODE_PAUSE },
|
||||
// { SDLK_ESCAPE, StellaEvent::KCODE_ESCAPE },
|
||||
{ DIK_COMMA, ',', StellaEvent::KCODE_COMMA },
|
||||
{ DIK_PERIOD, '.', StellaEvent::KCODE_PERIOD },
|
||||
{ DIK_SLASH, '/', StellaEvent::KCODE_SLASH },
|
||||
// { SDLK_BACKSLASH, StellaEvent::KCODE_BACKSLASH },
|
||||
{ DIK_SEMICOLON,';', StellaEvent::KCODE_SEMICOLON }
|
||||
// { SDLK_QUOTE, StellaEvent::KCODE_QUOTE },
|
||||
// { SDLK_BACKQUOTE, StellaEvent::KCODE_BACKQUOTE },
|
||||
// { SDLK_LEFTBRACKET, StellaEvent::KCODE_LEFTBRACKET},
|
||||
// { SDLK_RIGHTBRACKET,StellaEvent::KCODE_RIGHTBRACKET}
|
||||
};
|
||||
|
||||
void CDirectXFullScreen::UpdateEvents(
|
||||
|
@ -808,9 +808,9 @@ void CDirectXFullScreen::UpdateEvents(
|
|||
// and I don't want to undo a set i may have done earlier in the loop
|
||||
//
|
||||
|
||||
const int nEventCount = Event::LastType;
|
||||
long rgEventState[ nEventCount ];
|
||||
ZeroMemory( rgEventState, nEventCount * sizeof(long) );
|
||||
const int nSize = _countof(KeyEventMap);
|
||||
// long rgKeyEventState[ nSize ];
|
||||
// ZeroMemory( rgKeyEventState, nSize * sizeof(StellaEvent::KeyCode) );
|
||||
|
||||
int i;
|
||||
|
||||
|
@ -820,25 +820,20 @@ void CDirectXFullScreen::UpdateEvents(
|
|||
|
||||
if (m_pDirectKeyboard->Update() == S_OK)
|
||||
{
|
||||
int nSize = _countof(KeyEventMap);
|
||||
|
||||
for (i = 0; i < nSize; ++i)
|
||||
{
|
||||
rgEventState[KeyEventMap[i].eventCode] |=
|
||||
m_pDirectKeyboard->IsButtonPressed(KeyEventMap[i].nVirtKey);
|
||||
int state = (m_pDirectKeyboard->IsButtonPressed(KeyEventMap[i].nVirtKey)) ? 1 : 0;
|
||||
m_pConsole->eventHandler().sendKeyEvent(KeyEventMap[i].keyCode, state);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback -- if Keyboard update failed (most likely due to
|
||||
// DirectInput not being available), then use the old async
|
||||
|
||||
int nSize = _countof(KeyEventMap);
|
||||
|
||||
for (i = 0; i < nSize; ++i)
|
||||
{
|
||||
rgEventState[KeyEventMap[i].eventCode] |=
|
||||
(::GetAsyncKeyState(KeyEventMap[i].nAsyncVirtKey) ? 1: 0);
|
||||
int state = (::GetAsyncKeyState(KeyEventMap[i].nAsyncVirtKey)) ? 1 : 0;
|
||||
m_pConsole->eventHandler().sendKeyEvent(KeyEventMap[i].keyCode, state);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -846,6 +841,7 @@ void CDirectXFullScreen::UpdateEvents(
|
|||
// Update joystick
|
||||
//
|
||||
|
||||
/* FIXME - add multiple joysticks
|
||||
if (m_pDirectJoystick->Update() == S_OK)
|
||||
{
|
||||
rgEventState[Event::JoystickZeroFire] |=
|
||||
|
@ -871,7 +867,7 @@ void CDirectXFullScreen::UpdateEvents(
|
|||
{
|
||||
rgEventState[Event::JoystickZeroDown] = 1;
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
//
|
||||
// Update mouse
|
||||
|
@ -886,19 +882,19 @@ void CDirectXFullScreen::UpdateEvents(
|
|||
|
||||
// Mouse resistance is measured between 0...1000000
|
||||
|
||||
rgEventState[ m_rGlobalData->PaddleResistanceEvent() ] = (999-x)*1000;
|
||||
// rgEventState[ m_rGlobalData->PaddleResistanceEvent() ] = (999-x)*1000;
|
||||
|
||||
rgEventState[ m_rGlobalData->PaddleFireEvent() ] |= m_pDirectMouse->IsButtonPressed(0);
|
||||
// rgEventState[ m_rGlobalData->PaddleFireEvent() ] |= m_pDirectMouse->IsButtonPressed(0);
|
||||
}
|
||||
|
||||
//
|
||||
// Write new event state
|
||||
//
|
||||
|
||||
for (i = 0; i < nEventCount; ++i)
|
||||
{
|
||||
m_rEvent.set( (Event::Type)i, rgEventState[i] );
|
||||
}
|
||||
// for (i = 0; i < nEventCount; ++i)
|
||||
// {
|
||||
// m_rEvent.set( (Event::Type)i, rgEventState[i] );
|
||||
// }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
class Console;
|
||||
class MediaSource;
|
||||
class Sound;
|
||||
|
||||
class CDirectInput;
|
||||
|
||||
|
@ -16,11 +17,9 @@ class CDirectInput;
|
|||
|
||||
class CDirectXFullScreen
|
||||
{
|
||||
public:
|
||||
|
||||
CDirectXFullScreen( const CGlobalData* rGlobalData,
|
||||
const Console* pConsole,
|
||||
Event& rEvent );
|
||||
public:
|
||||
CDirectXFullScreen(const CGlobalData* rGlobalData, const Console* pConsole,
|
||||
Sound* pSound);
|
||||
~CDirectXFullScreen();
|
||||
|
||||
HRESULT Initialize( int cx = 0, int cy = 0 );
|
||||
|
@ -56,9 +55,8 @@ private:
|
|||
// Stella objects
|
||||
|
||||
const Console* m_pConsole;
|
||||
Event& m_rEvent;
|
||||
|
||||
const CGlobalData* m_rGlobalData;
|
||||
Sound* m_pSound;
|
||||
SIZE m_sizeGame;
|
||||
BYTE m_rgbPixelDataTable[256];
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,63 @@
|
|||
//============================================================================
|
||||
//
|
||||
// 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-2002 by Bradford W. Mott
|
||||
//
|
||||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: SettingsWin32.cxx,v 1.1 2003-09-21 14:33:34 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include "bspf.hxx"
|
||||
#include "SettingsWin32.hxx"
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SettingsWin32::SettingsWin32()
|
||||
{
|
||||
mySettingsInputFilename = "stellarc";
|
||||
mySettingsOutputFilename = "stellarc";
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SettingsWin32::~SettingsWin32()
|
||||
{
|
||||
cerr << "SettingsWin32::~SettingsWin32()\n";
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SettingsWin32::setArgument(string& key, string& value)
|
||||
{
|
||||
cerr << "SettingsWin32::setArgument()\n";
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string SettingsWin32::getArguments()
|
||||
{
|
||||
cerr << "SettingsWin32::getArguments()\n";
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string SettingsWin32::stateFilename(uInt32 state)
|
||||
{
|
||||
cerr << "SettingsWin32::stateFilename()\n";
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string SettingsWin32::snapshotFilename()
|
||||
{
|
||||
cerr << "SettingsWin32::snapshotFilename()\n";
|
||||
|
||||
return "";
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
//============================================================================
|
||||
//
|
||||
// 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-2002 by Bradford W. Mott
|
||||
//
|
||||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: SettingsWin32.hxx,v 1.1 2003-09-21 14:33:34 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef SETTINGS_WIN32_HXX
|
||||
#define SETTINGS_WIN32_HXX
|
||||
|
||||
#include "bspf.hxx"
|
||||
#include "Settings.hxx"
|
||||
|
||||
class SettingsWin32 : public Settings
|
||||
{
|
||||
public:
|
||||
SettingsWin32();
|
||||
virtual ~SettingsWin32();
|
||||
|
||||
public:
|
||||
virtual void setArgument(string& key, string& value);
|
||||
virtual string getArguments();
|
||||
virtual string stateFilename(uInt32 state);
|
||||
virtual string snapshotFilename();
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,173 +1,162 @@
|
|||
//============================================================================
|
||||
//
|
||||
// StellaX
|
||||
// Jeff Miller 04/26/2000
|
||||
// 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
|
||||
//
|
||||
#include "pch.hxx"
|
||||
// Copyright (c) 1995-2002 by Bradford W. Mott
|
||||
//
|
||||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: SoundWin32.cxx,v 1.2 2003-09-21 14:33:34 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <dsound.h>
|
||||
|
||||
#include "bspf.hxx"
|
||||
#include "MediaSrc.hxx"
|
||||
#include "SoundWin32.hxx"
|
||||
#include "resource.h"
|
||||
|
||||
#include "AudioStream.hxx"
|
||||
|
||||
SoundWin32::SoundWin32(
|
||||
) :
|
||||
m_fInitialized( FALSE ),
|
||||
m_pass( NULL ),
|
||||
m_pasCurrent( NULL )
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SoundWin32::SoundWin32()
|
||||
: myIsInitializedFlag(false),
|
||||
myBufferSize(512),
|
||||
mySampleRate(31400),
|
||||
myDSBuffer(NULL)
|
||||
{
|
||||
TRACE("SoundWin32::SoundWin32");
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SoundWin32::~SoundWin32()
|
||||
{
|
||||
closeDevice();
|
||||
}
|
||||
|
||||
|
||||
HRESULT SoundWin32::Initialize(
|
||||
HWND hwnd
|
||||
)
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
HRESULT SoundWin32::Initialize(HWND hWnd)
|
||||
{
|
||||
TRACE( "SoundWin32::Initialize hwnd=%08X", hwnd );
|
||||
HRESULT hr;
|
||||
|
||||
if ( m_fInitialized )
|
||||
// Create IDirectSound using the primary sound device
|
||||
if( FAILED( hr = DirectSoundCreate8( NULL, &myDSDevice, NULL ) ) )
|
||||
{
|
||||
TRACE( "SoundWin32::Initialize - already initialized" );
|
||||
return S_OK;
|
||||
SoundError("DirectSoundCreate8");
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
m_pass = new AudioStreamServices;
|
||||
if ( m_pass == NULL )
|
||||
// Set DirectSound coop level
|
||||
if( FAILED(hr = myDSDevice->SetCooperativeLevel(hWnd, DSSCL_PRIORITY)) )
|
||||
{
|
||||
hr = E_OUTOFMEMORY;
|
||||
goto cleanup;
|
||||
SoundError("SetCooperativeLevel");
|
||||
return hr;
|
||||
}
|
||||
|
||||
if ( ! m_pass->Initialize( hwnd ) )
|
||||
{
|
||||
TRACE( "ASS Initialize failed" );
|
||||
MessageBox( (HINSTANCE)::GetWindowLong( hwnd, GWL_HINSTANCE ),
|
||||
hwnd,
|
||||
IDS_ASS_FAILED );
|
||||
hr = E_FAIL;
|
||||
goto cleanup;
|
||||
}
|
||||
// Set up the static sound buffer
|
||||
WAVEFORMATEX wfx;
|
||||
DSBUFFERDESC dsbdesc;
|
||||
|
||||
m_pasCurrent = new AudioStream;
|
||||
if ( m_pasCurrent == NULL )
|
||||
{
|
||||
hr = E_OUTOFMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
ZeroMemory(&wfx, sizeof(wfx));
|
||||
wfx.wFormatTag = WAVE_FORMAT_PCM;
|
||||
wfx.nChannels = 1;
|
||||
wfx.nSamplesPerSec = mySampleRate;
|
||||
wfx.wBitsPerSample = 8;
|
||||
wfx.nBlockAlign = 1; //wfx.wBitsPerSample / 8 * wfx.nChannels;
|
||||
wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
|
||||
|
||||
if ( ! m_pasCurrent->Create( m_pass ) )
|
||||
{
|
||||
TRACE( "PAS Create failed" );
|
||||
MessageBox( (HINSTANCE)::GetWindowLong( hwnd, GWL_HINSTANCE ),
|
||||
hwnd,
|
||||
IDS_PAS_FAILED );
|
||||
hr = E_FAIL;
|
||||
goto cleanup;
|
||||
}
|
||||
ZeroMemory(&dsbdesc, sizeof(dsbdesc));
|
||||
dsbdesc.dwSize = sizeof(DSBUFFERDESC);
|
||||
dsbdesc.dwFlags = DSBCAPS_CTRLVOLUME;
|
||||
dsbdesc.dwBufferBytes = myBufferSize;
|
||||
dsbdesc.lpwfxFormat = &wfx;
|
||||
|
||||
m_pasCurrent->Play();
|
||||
|
||||
m_fInitialized = TRUE;
|
||||
cleanup:
|
||||
|
||||
if ( FAILED(hr) )
|
||||
{
|
||||
if ( m_pasCurrent )
|
||||
{
|
||||
m_pasCurrent->Destroy();
|
||||
delete m_pasCurrent;
|
||||
m_pasCurrent = NULL;
|
||||
}
|
||||
|
||||
if ( m_pass )
|
||||
{
|
||||
delete m_pass;
|
||||
m_pass = NULL;
|
||||
}
|
||||
}
|
||||
hr = myDSDevice->CreateSoundBuffer(&dsbdesc, &myDSBuffer, NULL);
|
||||
if(SUCCEEDED(hr))
|
||||
myIsInitializedFlag = true;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
SoundWin32::~SoundWin32(
|
||||
)
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundWin32::closeDevice()
|
||||
{
|
||||
TRACE("SoundWin32::~SoundWin32");
|
||||
|
||||
if ( m_pasCurrent )
|
||||
{
|
||||
m_pasCurrent->Destroy();
|
||||
delete m_pasCurrent;
|
||||
m_pasCurrent = NULL;
|
||||
}
|
||||
|
||||
delete m_pass;
|
||||
m_pass = NULL;
|
||||
}
|
||||
|
||||
|
||||
void SoundWin32::set(Sound::Register reg, uInt8 value)
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt32 SoundWin32::getSampleRate() const
|
||||
{
|
||||
if ( ! m_fInitialized )
|
||||
{
|
||||
TRACE( "SoundWin32::set -- not initialized" );
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Process TIA data
|
||||
//
|
||||
|
||||
switch( reg )
|
||||
{
|
||||
case AUDC0:
|
||||
Update_tia_sound( 0x15, value );
|
||||
break;
|
||||
|
||||
case AUDC1:
|
||||
Update_tia_sound( 0x16, value );
|
||||
break;
|
||||
|
||||
case AUDF0:
|
||||
Update_tia_sound( 0x17, value );
|
||||
break;
|
||||
|
||||
case AUDF1:
|
||||
Update_tia_sound( 0x18, value );
|
||||
break;
|
||||
|
||||
case AUDV0:
|
||||
Update_tia_sound( 0x19, value );
|
||||
break;
|
||||
|
||||
case AUDV1:
|
||||
Update_tia_sound( 0x1A, value );
|
||||
break;
|
||||
}
|
||||
|
||||
return myIsInitializedFlag ? mySampleRate : 0;
|
||||
}
|
||||
|
||||
void SoundWin32::mute(
|
||||
bool mute
|
||||
)
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool SoundWin32::isSuccessfullyInitialized() const
|
||||
{
|
||||
if ( ! m_fInitialized )
|
||||
{
|
||||
TRACE( "SoundWin32::mute -- not initialized" );
|
||||
return;
|
||||
}
|
||||
return myIsInitializedFlag;
|
||||
}
|
||||
|
||||
if ( m_pasCurrent )
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundWin32::setSoundVolume(Int32 percent)
|
||||
{
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundWin32::updateSound(MediaSource& mediaSource)
|
||||
{
|
||||
if(myIsInitializedFlag)
|
||||
{
|
||||
if ( mute )
|
||||
HRESULT hr;
|
||||
uInt8 periodCount = 0;
|
||||
uInt8* buffer = new uInt8[myBufferSize];
|
||||
|
||||
// Dequeue samples as long as full fragments are available
|
||||
while(mediaSource.numberOfAudioSamples() >= myBufferSize)
|
||||
{
|
||||
m_pasCurrent->Stop();
|
||||
mediaSource.dequeueAudioSamples(buffer, myBufferSize);
|
||||
|
||||
LPVOID lpvWrite;
|
||||
DWORD dwLength;
|
||||
hr = myDSBuffer->Lock(0, 0, &lpvWrite, &dwLength, NULL, NULL, DSBLOCK_ENTIREBUFFER);
|
||||
if(hr == DS_OK)
|
||||
{
|
||||
memcpy(lpvWrite, buffer, dwLength);
|
||||
myDSBuffer->Unlock(lpvWrite, dwLength, NULL, 0);
|
||||
myDSBuffer->SetCurrentPosition(0);
|
||||
myDSBuffer->Play(0, 0, 0);
|
||||
periodCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pasCurrent->Play();
|
||||
}
|
||||
delete[] buffer;
|
||||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SoundWin32::SoundError(const char* message)
|
||||
{
|
||||
cout << "ERROR in SOUND: " << message << endl;
|
||||
myIsInitializedFlag = false;
|
||||
}
|
||||
|
||||
/* // Fill any unused fragments with silence so that we have a lower
|
||||
// risk of having playback underruns
|
||||
for(int i = 0; i < 1-periodCount; ++i)
|
||||
{
|
||||
frames = snd_pcm_avail_update(myPcmHandle);
|
||||
if (frames > 0)
|
||||
{
|
||||
uInt8 buffer[frames];
|
||||
memset((void*)buffer, 0, frames);
|
||||
snd_pcm_writei(myPcmHandle, buffer, frames);
|
||||
}
|
||||
else if(frames == -EPIPE) // this should never happen
|
||||
{
|
||||
cerr << "EPIPE after write\n";
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
|
|
|
@ -1,109 +1,117 @@
|
|||
//============================================================================
|
||||
//
|
||||
// StellaX
|
||||
// Jeff Miller 05/01/2000
|
||||
// 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
|
||||
//
|
||||
#ifndef SNDWIN32_H
|
||||
#define SNDWIN32_H
|
||||
// Copyright (c) 1995-2002 by Bradford W. Mott
|
||||
//
|
||||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: SoundWin32.hxx,v 1.2 2003-09-21 14:33:34 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef SOUND_WIN32_HXX
|
||||
#define SOUND_WIN32_HXX
|
||||
|
||||
#include <dsound.h>
|
||||
|
||||
#include "bspf.hxx"
|
||||
#include "MediaSrc.hxx"
|
||||
#include "Sound.hxx"
|
||||
#include "TIASound.h"
|
||||
|
||||
/**
|
||||
This class implements a sound class using the
|
||||
Win32 DirectSound API.
|
||||
|
||||
class AudioStreamServices;
|
||||
class AudioStream;
|
||||
|
||||
#define SAMPLES_PER_SEC 22050
|
||||
#define NUM_CHANNELS 1
|
||||
#define BITS_PER_SAMPLE 8
|
||||
|
||||
class WaveFile
|
||||
{
|
||||
public:
|
||||
|
||||
WaveFile( void )
|
||||
{
|
||||
ZeroMemory( &wfx, sizeof(wfx) );
|
||||
wfx.cbSize = sizeof( wfx );
|
||||
wfx.wFormatTag = WAVE_FORMAT_PCM;
|
||||
wfx.nChannels = NUM_CHANNELS;
|
||||
wfx.nSamplesPerSec = SAMPLES_PER_SEC;
|
||||
wfx.wBitsPerSample = BITS_PER_SAMPLE;
|
||||
wfx.nBlockAlign = wfx.wBitsPerSample / 8 * wfx.nChannels;
|
||||
wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
|
||||
|
||||
}
|
||||
|
||||
~WaveFile( void )
|
||||
{
|
||||
}
|
||||
|
||||
BOOL Open( void )
|
||||
{
|
||||
Tia_sound_init( 31400, wfx.nSamplesPerSec );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL Cue( void )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void Read( BYTE* pbDest, UINT cbSize )
|
||||
{
|
||||
Tia_process ( pbDest, cbSize );
|
||||
}
|
||||
|
||||
UINT GetAvgDataRate (void)
|
||||
{
|
||||
return wfx.nAvgBytesPerSec;
|
||||
}
|
||||
|
||||
BYTE GetSilenceData (void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
WAVEFORMATEX* GetWaveFormatEx( void )
|
||||
{
|
||||
return &wfx;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
WAVEFORMATEX wfx;
|
||||
|
||||
WaveFile( const WaveFile& ); // no implementation
|
||||
void operator=( const WaveFile& ); // no implementation
|
||||
};
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: SoundWin32.hxx,v 1.2 2003-09-21 14:33:34 stephena Exp $
|
||||
*/
|
||||
class SoundWin32 : public Sound
|
||||
{
|
||||
public:
|
||||
|
||||
public:
|
||||
/**
|
||||
Create a new sound object
|
||||
*/
|
||||
SoundWin32();
|
||||
|
||||
/**
|
||||
Destructor
|
||||
*/
|
||||
virtual ~SoundWin32();
|
||||
|
||||
HRESULT Initialize( HWND hwnd );
|
||||
public:
|
||||
/**
|
||||
Closes the sound device
|
||||
*/
|
||||
void closeDevice();
|
||||
|
||||
//
|
||||
// base class virtuals
|
||||
//
|
||||
/**
|
||||
Return the playback sample rate for the sound device.
|
||||
|
||||
virtual void set(Sound::Register reg, uInt8 value);
|
||||
@return The playback sample rate
|
||||
*/
|
||||
uInt32 getSampleRate() const;
|
||||
|
||||
virtual void mute( bool state );
|
||||
/**
|
||||
Return true iff the sound device was successfully initlaized.
|
||||
|
||||
private:
|
||||
@return true iff the sound device was successfully initlaized.
|
||||
*/
|
||||
bool isSuccessfullyInitialized() const;
|
||||
|
||||
BOOL m_fInitialized;
|
||||
/**
|
||||
Sets the volume of the sound device to the specified level. The
|
||||
volume is given as a percentage from 0 to 100. A -1 indicates
|
||||
that the volume shouldn't be changed at all.
|
||||
|
||||
AudioStreamServices* m_pass;
|
||||
AudioStream* m_pasCurrent;
|
||||
@param percent The new volume percentage level for the sound device
|
||||
*/
|
||||
void setSoundVolume(Int32 percent);
|
||||
|
||||
SoundWin32( const SoundWin32& ); // no implementation
|
||||
void operator=( const SoundWin32& ); // no implementation
|
||||
/**
|
||||
Update the sound device using the audio sample from the specified
|
||||
media source.
|
||||
|
||||
@param mediaSource The media source to get audio samples from.
|
||||
*/
|
||||
void updateSound(MediaSource& mediaSource);
|
||||
|
||||
/**
|
||||
Initialize the DirectSound subsystem/
|
||||
|
||||
@return The result of initialization.
|
||||
*/
|
||||
HRESULT Initialize(HWND hwnd);
|
||||
|
||||
private:
|
||||
// Print error messages and clean up
|
||||
void SoundError(const char* message);
|
||||
|
||||
// Indicates if the sound device was successfully initialized
|
||||
bool myIsInitializedFlag;
|
||||
|
||||
// DirectSound device
|
||||
LPDIRECTSOUND8 myDSDevice;
|
||||
|
||||
// DirectSound secondary buffer
|
||||
LPDIRECTSOUNDBUFFER myDSBuffer;
|
||||
|
||||
// Mixer file descriptor
|
||||
int myMixerFd;
|
||||
|
||||
// Original mixer volume when the sound device was opened
|
||||
int myOriginalVolume;
|
||||
|
||||
// PCM buffer size
|
||||
uInt32 myBufferSize;
|
||||
|
||||
// DSP sample rate
|
||||
uInt32 mySampleRate;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
@ -40,12 +40,12 @@
|
|||
#define IDS_ROM_LOAD_FAILED 304
|
||||
#define IDS_NO_ITEM_SELECTED 305
|
||||
#define IDC_CONTINUE 1000
|
||||
#define IDC_EMAIL_JEFFMILL 1002
|
||||
#define IDC_EMAIL_MAINTAINER 1002
|
||||
#define IDC_EMAIL_STELLA 1003
|
||||
#define IDC_PLAY 1005
|
||||
#define IDC_ROMCOUNT 1006
|
||||
#define IDC_ROMLIST 1007
|
||||
#define IDC_WEB_JEFFMILL 1010
|
||||
#define IDC_WEB_MAINTAINER 1010
|
||||
#define IDC_WEB_STELLA 1011
|
||||
#define IDC_ROMPATH 1013
|
||||
#define IDC_CONFIG 1015
|
||||
|
|
Loading…
Reference in New Issue