extensive sdl cleanup

see the changelog.txt for details
This commit is contained in:
punkrockguy318 2008-08-10 13:38:39 +00:00
parent d8a5bbeac8
commit 88b1fffe9d
15 changed files with 2448 additions and 740 deletions

View File

@ -67,8 +67,8 @@ Driver maintenance and refactoring
>= 2.0 - These guys concentrated on keeping fceux the premiere
linux-portable nes emu
Lukas Sabota - punkrockguy318 at comcast.net (sf:punkrockguy318)
Build system, sdl maintenance, testing, and cleanup
Lukas Sabota - ltsmooth42 at comcast.net (sf:punkrockguy318)
Head SDL developer
Soules - gimmedonutnow at gmail dot com (sf:gimmedonutnow)
Linux SDL driver maintenance

View File

@ -1,17 +1,17 @@
import os
import sys
# XXX path separator fixed right now
opts = Options()
opts.AddOptions(
BoolOption('FRAMESKIP', 'Enable frameskipping', 1),
BoolOption('OPENGL', 'Enable OpenGL support (SDL only)', 1)
BoolOption('OPENGL', 'Enable OpenGL support', 1),
BoolOption('DEBUG', 'Build with debugging symbols', 0)
)
env = Environment(options = opts)
# Default compiler flags:
env.Append(CCFLAGS = ['-Wall', '-Wno-write-strings', '-Wno-sign-compare'])
env.Append(CCFLAGS = ['-Wall', '-Wno-write-strings', '-Wno-sign-compare', '-O2'])
if os.environ.has_key('PLATFORM'):
env.Replace(PLATFORM = os.environ['PLATFORM'])
@ -85,10 +85,6 @@ else:
env.Append(LINKFLAGS = "-llua5.1")
env = conf.Finish()
# Build for this system's endianness, if not overriden
#if env.has_key('LSB_FIRST'):
# if env['LSB_FIRST']:
# env.Append(CPPDEFINES = ['LSB_FIRST'])
if sys.byteorder == 'little' or env['PLATFORM'] == 'win32':
env.Append(CPPDEFINES = ['LSB_FIRST'])
@ -98,14 +94,9 @@ if env['FRAMESKIP']:
print "base CPPDEFINES:",env['CPPDEFINES']
print "base CCFLAGS:",env['CCFLAGS']
# Split into release and debug environments:
#release_env = env.Clone(CCFLAGS = ['-O3', '-fomit-frame-pointer'], CPPDEFINES=["NDEBUG"])
#debug_env = env.Clone(CCFLAGS = ['-O', '-g'], CPPDEFINES=["_DEBUG"])
# THAT FAILED! Compromise:
#env.Append(CCFLAGS = ['-O3', '-g'], CPPDEFINES = ["_DEBUG"])
if env['DEBUG']:
env.Append(CPPDEFINES=["_DEBUG"], CCFLAGS = ['-g'])
#SConscript('src/SConscript', build_dir='release', exports={'env':release_env})
#SConscript('src/SConscript', build_dir='release', exports={'env':debug_env})
Export('env')
SConscript('src/SConscript')
@ -114,10 +105,6 @@ exe_suffix = ''
if env['PLATFORM'] == 'win32':
exe_suffix = '.exe'
#fceux_r_src = 'src/release/fceux' + exe_suffix
#fceux_r_dst = 'bin/fceuxREL' + exe_suffix
#fceux_d_src = 'src/debug/fceux' + exe_suffix
#fceux_d_dst = 'bin/fceuxDBG' + exe_suffix
fceux_src = 'src/fceux' + exe_suffix
fceux_dst = 'bin/fceux' + exe_suffix

View File

@ -1,512 +1,3 @@
0.98.12:
Win32: Fixed the behavior of the sound logging function.
Fixed a bug that was causing 2xscale/3xscale to be broken
when clipping the leftmost and rightmost 8 columns.
Added an iNES header correction entry for JustBreed.
Modified the MMC5 "ELROM" board emulation to not emulate WRAM.
Corrected various pieces of code that were causing compiler warnings.
Win32: Scaling settings(x, y, stretch to fill screen) are now respected while
using a special scaler in full screen mode, though if x or y scale is
less than what is needed for a particular scaler, it will be
adjusted.
Win32: The window will be reblitted when it becomes invalidated while
a game is loaded(such as when you're resizing the window).
When the PPU is in a "dead" state after starting up, the graphics
buffer is now cleared. Previously, particularly in the Windows port, when
a game was closed, and a new game was loaded, the last image from
the previous game would be displayed for a short time.
Win32: Blit skipping will now occur when sound is disabled and FCE Ultra is
running behind the desired frame rate.
Win32: Blit-skipping behavior can now be configured to some extent in the "Timing" configuration
window.
Win32: Added a "Recent Directories" submenu to the "File" menu.
Removed some debugging code that shouldn't have been enabled in 0.98.11.
0.98.11:
Win32: Special scalers are now also supported in windowed mode. For Scale2x/Scale3x,
the fastest "desktop" bit depth is 16bpp. For hq2x/hq3x, it is 32bpp.
The shared video blitting code(drivers/common/vidblit.c) can now blit using Scale2x
and Scale3x to any target bit depth(8bpp, 16bpp, 24bpp, and 32bpp) instead of just
8bpp, as it was before.
HQ2x and HQ3x can now blit to 16bpp, 24bpp(untested), and 32bpp. The 16bpp and
24bpp targets are done doing post-processing conversion, after HQ2x/HQ3x, which
really does hurt speed.
Changed a few names in the credits section of the documentation to their
aliases. Names you didn't get to pick to have are so troublesome. :b
I also made various fixes/updates to the documentation.
Updated the FAQ with some information regard video mode bit depths and speed.
SDL: Disabled the fast-forward-key speed-limiting code. I thought I had
done this before...
Fixed a major bug in the movie recording code, and added some code to automatically detect
and fix playback of broken movies from earlier versions.
Did a little swapping thing with mapper 90 and 209. I moved back Mortal Kombat 3
to mapper 90, and moved Shin Samurai Spirits 2 to mapper 209. Sorry for any confusion.
Mapper 90 should be considered as having the fancy nametable select mode disabled, with
mapper 209 having it enabled.
Added support for mapper 160, which turns out to be the same hardware as mapper
90. Joy.
Improved mapper 90 emulation. This mapper really needs low-level
emulation for IRQs to work right, though. :/
Win32: Fixed the "hide left/right 8 video columns" feature.
Since FCE Ultra is ending(or has already exceeded? :b) its actively-updated life,
I've gone ahead and added per-game hacks for "Kick Master" and the PAL version
of "Star Wars". See the documentation for more details.
Minor optimizations to the high-quality sound emulation code. The FIR filter
code is the bottleneck, though, so these changes won't have much of an effect
on overall speed.
Altered MMC3 IRQ emulation(and the hooks in ppu.c for it).
Fixed a rather major typo in the VRC7-emulation code.
0.98.10:
Reimplemented network play. It now requires a standalone network play server, which
will be released as a later time. For fun, "starmen.net" is running this server,
which is publicly accessible.
I also made various code fixes/improvements to allow for network play, particularly
with the command handling code.
Reworked much of the VS Unisystem emulation code, partially based on information from
MAME. The following games are now supported:
Battle City
Castlevania
Clu Clu Land
Dr. Mario
Duck Hunt
Excitebike
Excitebike (Japanese)
Freedom Force
Goonies, The
Gradius
Gumshoe
Hogan's Alley
Ice Climber
Ladies Golf
Mach Rider
Mach Rider (Japanese)
Mighty Bomb Jack (Japanese)
Ninja Jajamaru Kun (Japanese)
Pinball
Pinball (Japanese)
Platoon
RBI Baseball
Slalom
Soccer
Star Luster
Stroke and Match Golf
Stroke and Match Golf - Ladies
Stroke and Match Golf (Japanese)
Super Mario Bros.
Super Sky Kid
Super Xevious
Tetris
TKO Boxing
Top Gun
Win32-native: Fixed a bug in the debugger's breakpoint list that appeared when
one tried to delete a breakpoint(the control accidentally had auto-sort enabled,
causing a discrepancy between what was displayed and what was contained in internal
data structures).
The current disk image XOR original disk image is now stored in save states. This
should greatly increase compressability(important for network play), and make
it a little more legal to distribute such save states now.
Modified the save state format to allow for more precise and larger version numbers.
Various minor code changes.
Fixed initialization of the FCEUGameInfo structure, which previously led
to problems with sound output on the SexyAL-using ports(Linux).
Apparently I added support for mapper 255 a while back. Documentation updated.
Added iNES header correction information for Armored Scrum Object and Alpha Mission.
Merged banksw.h into ines.c, fixed some of its prototypes in ines.h.
0.98.9:
Win32-native: Fixed the speed throttling used when sound is disabled. In previous
0.98.x Win32-native releases, emulation was running at 1/2 the speed it should
have been when sound was disabled.
Win32-native: Moved settings in the "Miscellaneous" configuration window
to where they should have been in the first place, and added "GUI" and "Timing"
configuration windows to accommodate some.
Win32-native: Fixed the handling of the "Scroll Lock" key used to disable and
enable Family BASIC Keyboard input.
Updated documentation to handle some slight differences in the Win32-native
port("Win32-native" is what the Win32 port using native APIs, as opposed to something
like GTK+ and SDL, will be referred to in documentation now). I also made
some other minor wording adjustments to the documentation.
Added an iNES header correction for Dragonball.
0.98.8:
Fixed a typo in sound.c that caused only part of the sound registers
to be saved in save states.
Win32: Switched over to the DirectDraw7 interface, from DirectDraw4's.
The surface Flip() method will now block, which results in somewhat
smoother animation/scrolling, especially when combined with the
auto blit-skip implemented in 0.98.6 when sound is enabled.
Win32: Undid a change made in the last release that limited the
speed of fast-forwarding when using the tilde key. I really do
need to implement some sort of unified timing/blit skip system...
Win32: Added an option, disabled by default, to ask for confirmation
before exiting FCE Ultra.
Win32: Added an option, enabled by default, to disable the system
screen saver while a game is loaded.
Win32: Added a new video synchronization mode, a "lazy" wait for
vblank/vertical retrace. It calls Sleep(0) in its wait loop. This
still uses all available cpu cycles, but it is much more friendly
to other processes than the old-style wait for vblank.
Win32: Added support for joystick POV hats.
0.98.7:
Fixed a bug in the debugger's disassembler when disassembling
opcode 0xBC.
Fixed the behavior of the right mouse button with zapper emulation, to
correspond with what it is documented as doing.
Win32: Added proper support for maximizing the window.
Win32: Rewrote most of the input and input configuration code.
Win32: Changed the configurable aspect ratio to something sensical, the current
display's pixel aspect ratio, default of 1:1(square pixels).
Win32: Made the default full-screen video mode the custom video mode. I should have
done this a long time ago to make custom video mode configuration more straighforward
for users...
Added some JACK audio code to be used by the SDL build. I'll test it and complete
it later.
0.98.6: Made several code modifications to work with older versions of gcc.
Fixed more header file network play #ifdef-age.
Fixed a typo in cart.h.
Fixed some funky code in FCEU_memmove().
Fixed some source code causing compiler warnings.
Fixed SexyAL's format conversion code to not rely on deprecated casting semantics.
Readded the native Win32 code, and made many improvements. The major thing
that needs to be done now with it is to rewrite the input handling code and input
configuration code.
0.98.5:
Added LL to the 64-bit integer constants in ines.c
Fixed OpenGL support under Mac OS X.
Added the ability to hide background and/or sprites with the F4 key.
0.98.4:
Moved NETWORK #ifdef's to netplay.c to simplify things.
Fixed gzip file loading code(I think). I'm still a bit unsure about the semantics
of dup() and close(), though.
Corrected FDS code to try loading the FDS image before loading the BIOS.
Readded "native" SDL sound code, used for Mac OS X(and maybe BeOS).
0.98.3:
Removed the wxWindows GUI code. GTK+ 2 code will take its place,
once it is ready.
Added reset and power commands to the movie format. More commands(such as insert
disk, eject disk, flip dip switch, etc.) will be added simultaneously as work
on network play continues.
Modified SexyAL OSS code to not adjust the number of fragments to a power of 2.
It works fine on my card, allowing finer-grained buffer size control,
but I'm not sure it will work with all chips.
Fixed parsing of the "-specialfs" command-line argument.
Added the hq3x scaler.
Updated to the latest Scale2x code. I also added the Scale3x scaler.
Changed the keyboard assignments for toggling full screen to "Alt" + "Enter".
FCEUI_SaveState() and FCEUI_LoadState() changed. Porters should read
driver.h.
Miscellaneous changes to accommodate new network play plan. It's not close
to being finished.
Altered RTI emulation. In Paris Dakar Rally's NMI handler, it does "CLI ; RTI".
Previously, FCE Ultra would generate an interrupt right after RTI occured, due to the
presumed latency that RTI had with the I flag. I changed it so there is no latency, so
no interrupt will occur in this case(interrupts kill this game). The interrupt source
is the "frame IRQ", which it never disables, if anyone cares.
This change does break the "Stars SE" demo, though. Hmm.
"FCEUGameInfo" is now a pointer, rather than just a statically-allocated structure.
This may cause some null-dereferencing-related crashes, but it should help keep
code a little cleaner(maybe?).
Played around with the FDS FM code some more. It's still not right. Bah.
Hacked in support for entering Datach/Barcode World barcodes without a GUI, using the
F8 key and the numeric keys.
Added code to save/load movies. Movie support will only record/play back the
states of the four emulated gamepads.
Modified the sound code to use timestamp/timestampbase differently. In addition,
timestampbase is now saved in save states("timestamp" doesn't need to be saved, since
it's reset to 0 at the end of each emulated frame).
0.98.2:
Fixed a few problems with the SDL command-line build code
for Win32. Also, SDL 1.2.7 seems to have a bug that breaks FCE Ultra's
full-screen/windowed switching capabilities(at least under Win32).
Stupid everything.
Minor SexyAL changes.
Updated documentation.
0.98.1:
Increased the volume of the FME07 sound channels.
Fixed a bug in the SexyAL endian conversion code.
Made the SexyAL chunk conversion loop work.
Replaced the old OPL2 emulator with a modified version of
Mitsutaka Okazaki's YM2413 emulator for the VRC7 sound emulation.
Decreased the pitch of the FME 07 expansion sound channels by one octave.
Decreased volume of output of $5011 in MMC5 emulation code.
0.98.0: Some changes I made aren't listed below. Ah well. The magnitude
of the changes was too great...
Default sound volume is 100(%), which makes a lot more sense than 75%, but not much.
It's multiplied by 3/4 internally now.
Added support for the Datach barcode reader(GUI interface only). The emulation code
was adapted from the VirtuaNES source code.
Reassigned the Datach games to mapper 157, from 16, with CRC32 checks.
Increased the maximum number of screen snapshots in the snapshots directory
to 99999(from 999).
Reassigned the following games to mapper 210, using CRC32 checks:
Chibi Maruko Chan
Dream Master
Family Circuit '91
Famista '92
Famista '93
Famista '94
Heisei Tensai Bakabon
Top Striker
Wagyan Land 2
Wagyan Land 3
If you use a hack/translation of one or more of these games, you will of course
need to manually change the mapper number in the header for it to work properly in
FCE Ultra. Family Circuit '91 still may not fit in with the rest of these games,
but it's definitely not a "stock" mapper 19 setup.
Fixed an OpenGL palette bug when using scanlines(previously, I think it was
setting the palette of the scanlines overlay texture instead of the actual image
texture in some instances). The bug showed up on games that make use of the color
deemphasis bits.
Rewrote a lot of the PPU background rendering code to be more accurate(and
obfuscated!). This eliminates the X-offset hack I made earlier.
Removed some of the NSF visualization code, and altered the look of the NSF
display slightly. The NSF waveform visualization code will now take into
account the current volume setting.
Changed the default key bindings for the standard emulated gamepad
to something more compatible with window managers. I may change it back, but probably
not, since it is easily configurable now.
Updated the MMC5, VRC6, and FME07 low-quality sound emulation code
with the compatible parts of the high-quality sound emulation code for those chips.
Adjusted timing of horizontal scroll update(near the beginning of hblank. I made
it occur sooner). I also added a hack to allow X-offset(fine X scroll) changes mid
scanline, however, it is extremely ugly, and may not work correctly for everything
(doing it correctly would probably kill speed).
I mainly did it to fix games like F-1 Race and Mach Rider, and other racing
games that are extremely sensitive to horizontal scrolling timing.
Some FDS IRQ emulation changes to fix some screen corruption problems
in "Kaettekita Mario Bros".
Removed zlib(the code, not support).
I also removed support for compiling without zlib(it's small, simple, provides
very useful functions, and may provide critical features for fceu in the future).
*undone, breaks debugger, FIXME.* Replaced some inline functions with macros in x6502.c.
Increased the speed of Namco 106 sound emulation in HQ sound mode.
Many many sound emulation changes and adjustments based on blargg's tests.
The default sound volume is about 150% what it was before, because the sound range
has changed(now -soundvol 100 is like -soundvol 200 on older builds), and the
default "soundvol" setting is 75. 100 clips on some Namco games, and 200 clips
on many games, so I'll probably have the configurable volume range as [0:125].
What exactly is "%" supposed to mean in this case.... 100% of what?!
When using low-quality sound emulation mode, total emulation speed is about 10%
less than previous builds. The change in speed for high-quality sound emulation
mode is significantly less.
Added beginnings of SexyAL to source code tree, removed SDL sound support, and
old OSS code.
Copied over some autoconf/automake stuff from phamicom. It stills needs a bit
of work...
Fixed DMC IRQ emulation. Fixes many CodeMasters games. Finally. ^_^
Restructured a lot of files, changed the interface between driver and
emulator code slightly.
* Insert stuff here *
November 28, 2003 - Snapshot
Removed the DOS, Linux SVGAlib, and Win32 targets. *GASP*
Win32 support will return(eventually), using SDL + wxWindows.
SDL can use svgalib or GGI anyway, so it shouldn't be a huge loss.
DOS support will only return if someone ports SDL to DOS. ^_^
It would be nice if SDL could accept modelines. Maybe in SDL 2.0...
Merged fce.c and svga.c into fceu.c, and fce.h and svga.h into fceu.h.
Reassigned "Mortal Kombat 3 - Special 56 Peoples" to mapper 209.
Added emulation of the "Oeka Kids" tablet.
Added emulation of the Family Trainer.
Added emulation of the "Ultimate Quiz King" buzzers.
Added emulation of the Mahjong controller.
Added emulation of HyperShot controllers.
Fixed loading of NSFs with load addresses below $8000.
Cleaned and simplified some of the NES APU code.
Altered mapper 65 emulation. Fixes Kaiketsu Yanchamaru 3. Does it break anything?
Wrote a small FAQ file.
Fixed displaying of garbage and other unpleasantness on the first scanline. I need
to clean up that code, though.
Fixed color deemphasis emulation when all bits are set. For some
reason, I had commented out the code. Bleh.
NSF player now writes $C0 to $4017 if the FDS is being used(the FDS
BIOS writes $C0 to $4017). $40 for all other NSFs.
Added support for iNES mapper 58(nnnesterj).
Added support for iNES mapper 208.
Reassigned "Fudou Myouou Den" to mapper 207(CRC32 checks).
Reassigned "Karnov" to mapper 206(CRC32 checks).
Fixed the mapper 95 code, which was horribly broken.
Differentiated between mappers 33 and 48. Added CRC checks to assign
some games to mapper 48. "Flintstones 2" and "Don Doko Don 2" are
the games that need to be assigned to 48. Are there others?
Replaced usage of TriggerIRQ to X6502_IRQBegin/X6502_IRQEnd combos in
various mapper emulation files. 67, 33/48, 40, 73, 42, 65, 6, 182
Removed function TriggerIRQ() from x6502.c
Fixed the sound volume of the VRC7 emulation in high-quality sound mode.
Decreased(slightly) the volume of VRC7 emulation in both high-quality sound modes.
Decreased the volume of the MMC5 expansion sound channels.
Decreased the volume of the FME-7/mapper 69 expansion sound channels.
Added FCEU_gmalloc(), which will call exit() if memory allocation fails,
otherwise it is guaranteed to return a memory block.
This will be used in the mapper code mainly. It should only
be used for small memory chunks. The reasoning is that if 64 some like KB of
RAM or less can't be allocated, for example, it'd probably be best to
exit the emulator ASAP. It also helps to simplify code logic, and
help (me) with modularization.
The behavior of this may change in the future. I still need to think about it.
I should probably save the configuration file regularly(or much better,
use the registry) on the Windows port, though.
Cleaned up the save-state saving/loading code a bit, and added
support for linked save state structures for better modularity and
less code duplication.
Merged the iNES and UNIF MMC1, MMC3, and MMC5 code more completely.
I may need to sanify CHR RAM and WRAM allocation for pedanticness,
though. Also worked on Tengen RAMBO-1 emulation, and mapper 90 emulation.
***THIS MAKES SAVE STATES FOR GAMES THAT USE THESE EXPANSION CHIPS INCOMPATIBLE
WITH PREVIOUS VERSIONS***
I plan on doing the same thing with other mappers/boards in the future, though.
Always on the quest for 1.0...
November 12, 2003 - 0.97.5 Release
Windows: Added limited support for arguments that change configuration

2183
attic/ChangeLog.older Normal file

File diff suppressed because it is too large Load Diff

30
attic/authors Normal file
View File

@ -0,0 +1,30 @@
A list of people who have contributed code to FCE Ultra follows.
Please note that the "Code Contributions" field may not be all inclusive;
the coder may have done more than what is listed.
Name/Alias Code Contributions Contact Information
------------------------------------------------------------------------------
Aaron Oneal Many changes to compile http://www.morphgear.com
with MSVC and first frame
skipping code.
BERO Base FCE code. bero@geocities.co.jp
CaH4e3 Some mapper code. CaH4e3 at mail dot ru
\Firebug\ VGA register setting code. ??
Joe Nahmias man pages.
LULU SDL network play code. ??
Paul Various code for the official kuliniew@purdue.edu
Kuliniewicz SDL port.
Quietust VRC7 "translation" code. quietust@ircN.org
Tatsuyuki OPL2 emulator. ??
Satoh
Xodnizel Most of the FCE Ultra code. http://xodnizel.net/

135
attic/fceu-svga.6 Normal file
View File

@ -0,0 +1,135 @@
.\" t Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH FCEU-SVGA 6 "March 27, 2003"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
fceu-svga \- An emulator for the original (8-bit) Nintendo game console.
.SH SYNOPSIS
.B fceu-svga
.RI [ options ]
"filename"
.SH DESCRIPTION
.B FCE Ultra
is an emulator for the original (8-bit) Nintendo Entertainment System (NES).
It has a robust color palette rendering engine that is fully customizable,
along with excellent sound and joystick support, and even includes TCP/IP based
network playing for head-to-head gaming with your friends!
.PP
The emulator is available in two versions for Linux (there are also versions
for DOS and Windows): an SDL-based version, and one based on SVGALIB. The two
versions are essentially the same \-\- use the SVGALIB version for the Linux
console, and the SDL version for playing in X.
.SH OPTIONS
These are some of the more frequently used options in FCE Ultra SVGALIB. Run
fceu-svga without any options for a larger list, or see the README for the full
list.
.TP
.BI \-gg
Enable Game Genie emulation support.
.TP
.BI "\-cpalette " <file>
Use the custom palette in <file>.
.TP
.BI "\-soundvol " <percentage>
Sets the sound volume to the given percentage.
.TP
.BI "\-sound " <rate>
Set the sound playback sample rate (0 == off).
.TP
.BI "\-connect " <server>
Connect as a client (player 2) to <server> for TCP/IP network play.
.TP
.BI \-server
Be a host server (player 1) for a TCP/IP network game.
.TP
.BI "\-netport " <portnum>
Use <portnum> for TCP/IP network play.
.SH KEYBOARD COMMANDS
.B FCE Ultra
has a number of commands available within the emulator.
It also includes default keyboard bindings when emulating game pads or power pads.
.SS Gamepad Keyboard Bindings
.TS
center box;
cb | cb, c | ci.
NES Gamepad Keyboard
=
Arrows Cursor Arrows
A Left ALT
B Left CTRL
Select TAB
Start ENTER
.TE
.SS Other Commands
.PP
.TP 15
.BI <F2>
Activate cheat interface.
.TP 15
.BI <F3>
Lock virtual console.
.TP 15
.BI <F4>
Unlock virtual console.
.TP 15
.BI <F5>
Save game state into current slot (set using number keys).
.TP 15
.BI <F7>
Restore game state from current slot (set using number keys).
.TP 15
.BI <F9>
Save screen snapshot.
.TP 15
.BI <F10>
Reset NES.
.TP 15
.BI <F11>
Toggle power to NES.
.TP 15
.BR <F12> ", " <ESC>
Quit
.B FCE Ultra.
.SH NOTES
This program needs permisison to the video hardware, this normally requires
root access. One way to accomplish this is by making
.BI "fceu-svga " suid-root.
An easy way to do this is using the
.BR dpkg-statoverride
command. For example, as root on a
.I Debian
system run:
.PP
.B dpkg-statoverride --update --add root games 04755 /usr/games/fceu-svga
.PP
This will ensure that the setuid bit is preserved across package upgrades.
.SH SEE ALSO
.BR dpkg-statoverride "(8), " fceu-sdl (6)
.TP
.I /usr/share/doc/fceu-doc/readme-linux.txt.gz
The
.B FCE Ultra README
for linux, available from the
.I fceu-doc
Debian package.
.TP
.I http://fceultra.sourceforge.net/
The
.B FCE Ultra
project homepage.
.SH AUTHOR
This manual page was written by Joe Nahmias <joe@nahmias.net>,
for the Debian GNU/Linux system (but may be used by others).

32
attic/readme Normal file
View File

@ -0,0 +1,32 @@
FCE Ultra was developed with gcc and GNU make in mind. MSVC will probably
compile the Windows source code with a few modifications, but you'll still
need to make a project file.
Several pre-made makefiles are provided:
Makefile.beos - BeOS(with SDL and SDL_net)
Makefile.unixsdl - UN*X(FreeBSD/Linux/etc, with SDL)
Makefile.linuxvga - Linux(with svgalib)
Makefile.dos - (MS/PC/DR) DOS
Makefile.win - MS Windows 9x/Me/Xp/2000/etc.(with DirectX).
Makefile.macosx - Mac OS X(with SDL)
If you want to use Makefile.beos or Makefile.unixsdl for a cpu type other
than 80x86, you will need to remove "-DC80x86" from the defines line
and also remove "-DLSB_FIRST" if your target cpu uses MSB first ordering.
You'll also need to remove/change "-mcpu=xxx".
For the Windows port, I use MINGW32. http://www.mingw.org
To compile the DOS port, you'll need to download the DJGPP package.
Any version of gcc >=2.95.3 should compile the code without changes, BUT
the DJGPP versions of gcc have some problems:
gcc 2.95.3 sometimes breaks when compiling the code. gcc 3.0.2 seems to
produce bad code for sound.c. So, I recommend using gcc 3.0.4 for
compiling the DOS version.
Modifying the "-mcpu=i686" string in the makefiles, to optimize more effectively
for your cpu type, is a good idea.
Always do a "make -f Makefile.<platform> clean" before compiling for a
different platform or if you update via cvs and if you have stale object
files lying around.

View File

@ -1,10 +1,14 @@
---version 2.0.2 released---
10-aug-2008 - punkrockguy318 - SDL: Changed default A/B from numpad 2/3 to j/k.
10-aug-2008 - punkrockguy318 - SDL: Cleanup of usage
10-aug-2008 - punkrockguy318 - SDL: --no8lim option renamed to --nospritelim
10-aug-2008 - punkrockguy318 - SDL: --color option renamed to --ntsccolor
10-aug-2008 - punkrockguy318 - SDL: Screenshots now always prepend the game name.
10-aug-2008 - punkrockguy318 - SDL: Changed default A/B from numpad 2 and 3 to j and k.
10-aug-2008 - punkrockguy318 - SDL: Enable frameskip by default
10-aug-2008 - punkrockguy318 - SDL: Fixed a bug that would crash fceux if the emulation speed was overincreased
10-aug-2008 - punkrockguy318 - SDL: New default hotkeys to more closely match win32 defaults
10-aug-2008 - punkrockguy318 - SDL: Added lua script loading hotkey (f3). Non win32 SDL requires zenity for this to function.
10-aug-2008 - punkrockguy318 - SDL: Build script cleanup
10-aug-2008 - punkrockguy318 - SDL: Build script cleanup; also added option for DEBUG builds.
10-aug-2008 - zeromus - SF [ 2030405 ] Avi recording: no sound b0rks format
10-aug-2008 - zeromus - SF [ 2037878 ] Convert .fcm doesn't do special characters
09-aug-2008 - zeromus - SF [ 2040463 ] Add an "author" text field in the record movie dialog

View File

@ -82,7 +82,7 @@ void FCEUI_UseInputPreset(int preset);
//New interface functions
//0 to order screen snapshots numerically(0.png), 1 to order them file base-numerically(smb3-0.png).
void FCEUI_SetSnapName(int a);
void FCEUI_SetSnapName(bool a);
//0 to keep 8-sprites limitation, 1 to remove it
void FCEUI_DisableSpriteLimitation(int a);

View File

@ -130,16 +130,14 @@ InitConfig()
config->addOption("lowpass", "SDL.LowPass", 0);
config->addOption("pal", "SDL.PAL", 0);
config->addOption("frameskip", "SDL.Frameskip", 0);
config->addOption("snapname", "SDL.SnapName", 0);
config->addOption("clipsides", "SDL.ClipSides", 0);
config->addOption("nothrottle", "SDL.NoThrottle", 0);
config->addOption("no8lim", "SDL.DisableSpriteLimit", 0);
config->addOption("nospritelim", "SDL.DisableSpriteLimit", 1);
// color control
config->addOption('p', "palette", "SDL.Palette", "");
config->addOption("tint", "SDL.Tint", 56);
config->addOption("hue", "SDL.Hue", 72);
config->addOption("color", "SDL.Color", 0);
config->addOption("ntsccolor", "SDL.Color", 0);
// scanline settings
config->addOption("slstart", "SDL.ScanLineStart", 0);
@ -152,7 +150,7 @@ InitConfig()
config->addOption('b', "bpp", "SDL.BitsPerPixel", 32);
config->addOption("doublebuf", "SDL.DoubleBuffering", 0);
config->addOption("autoscale", "SDL.AutoScale", 1);
config->addOption("keepaspect", "SDL.KeepAspect", 1);
config->addOption("keepratio", "SDL.KeepRatio", 1);
config->addOption("xscale", "SDL.XScale", 1.0);
config->addOption("yscale", "SDL.YScale", 1.0);
config->addOption("xstretch", "SDL.XStretch", 0);
@ -165,26 +163,27 @@ InitConfig()
config->addOption("SDL.SpecialFilter", 0);
config->addOption("SDL.SpecialFX", 0);
// network play options
// network play options - netplay is broken
/*
config->addOption('n', "net", "SDL.NetworkServer", "");
config->addOption('u', "user", "SDL.NetworkUsername", "");
config->addOption('w', "pass", "SDL.NetworkPassword", "");
config->addOption('k', "netkey", "SDL.NetworkGameKey", "");
config->addOption( 0, "port", "SDL.NetworkPort", 4046);
config->addOption('l', "players", "SDL.NetworkNumPlayers", 1);
*/
// input configuration options
config->addOption("SDL.Input.0", "GamePad.0");
config->addOption("SDL.Input.1", "GamePad.1");
config->addOption("SDL.Input.2", "None");
// Allow for input configuration
// allow for input configuration
config->addOption('i', "inputcfg", "SDL.InputCfg", InputCfg);
// video playback
config->addOption("playmov", "SDL.Movie", "");
// lua
// load lua script
config->addOption("loadlua", "SDL.LuaScript", "");
// GamePad 0 - 3
@ -324,8 +323,8 @@ UpdateEMUCore(Config *config)
config->getOption("SDL.DisableSpriteLimit", &flag);
FCEUI_DisableSpriteLimitation(flag ? 1 : 0);
config->getOption("SDL.DisableSpriteLimit", &flag);
FCEUI_SetSnapName(flag ? 1 : 0);
// config->getOption("SDL.SnapName", &flag);
// FCEUI_SetSnapName(flag ? true : false);
config->getOption("SDL.ScanLineStart", &start);
config->getOption("SDL.ScanLineEnd", &end);

View File

@ -1195,92 +1195,6 @@ InputCfg(const std::string &text)
}
/**
* Specify a FamiCom Expansion device as the 3rd input device. Takes
* a text string describing the device.
*/
/*
static void
FCExp(char *text)
{
static char *fccortab[11]={"none","arkanoid","shadow","4player","fkb","hypershot",
"mahjong","quizking","ftrainera","ftrainerb","oekakids"};
static int fccortabi[11]={SIFC_NONE,SIFC_ARKANOID,SIFC_SHADOW,
SIFC_4PLAYER,SIFC_FKB,SIFC_HYPERSHOT,SIFC_MAHJONG,SIFC_QUIZKING,
SIFC_FTRAINERA,SIFC_FTRAINERB,SIFC_OEKAKIDS};
int y;
for(y = 0; y < 11; y++) {
if(!strcmp(fccortab[y], text)) {
UsrInputType[2] = fccortabi[y];
}
}
}
static char *cortab[6]={"none","gamepad","zapper","powerpada","powerpadb","arkanoid"};
static int cortabi[6]={SI_NONE,SI_GAMEPAD,
SI_ZAPPER,SI_POWERPADA,SI_POWERPADB,SI_ARKANOID};
*/
/**
* Set the 1st user-specified input device. Specified as a text
* string.
*/
/*
static void
Input1(char *text)
{
int y;
for(y = 0; y < 6; y++) {
if(!strcmp(cortab[y], text)) {
UsrInputType[0] = cortabi[y];
}
}
}
*/
/**
* Set the 2nd user-specified input device. Specified as a text
* string.
*/
/*
static void
Input2(char *text)
{
int y;
for(y = 0; y < 6; y++) {
if(!strcmp(cortab[y], text)) {
UsrInputType[1] = cortabi[y];
}
}
}
*/
/** GLOBALS **/
#if 0
CFGSTRUCT InputConfig[]={
ACA(UsrInputType),
AC(powerpadsc),
AC(QuizKingButtons),
AC(FTrainerButtons),
AC(HyperShotButtons),
AC(MahjongButtons),
AC(GamePadConfig),
AC(fkbmap),
ENDCFGSTRUCT
};
ARGPSTRUCT InputArgs[]={
{"-inputcfg",0,(void *)InputCfg,0x2000},
{"-fcexp",0,(void *)FCExp,0x2000},
{"-input1",0,(void *)Input1,0x2000},
{"-input2",0,(void *)Input2,0x2000},
{0,0,0,0}
};
#endif
/**
* Hack to map the new configuration onto the existing button
* configuration management. Will probably want to change this in the

View File

@ -220,22 +220,22 @@ InitVideo(FCEUGI *gi)
double auto_yscale = GetYScale(yres);
double native_ratio = ((double)NWIDTH) / s_tlines;
double screen_ratio = ((double)xres) / yres;
int keep_aspect;
int keep_ratio;
g_config->getOption("SDL.KeepAspect", &keep_aspect);
g_config->getOption("SDL.KeepRatio", &keep_ratio);
// Try to choose resolution
if (screen_ratio < native_ratio)
{
// The screen is narrower than the original. Maximizing width will not clip
auto_xscale = auto_yscale = GetXScale(xres);
if (keep_aspect)
if (keep_ratio)
auto_yscale = GetYScale(yres);
}
else
{
auto_yscale = auto_xscale = GetYScale(yres);
if (keep_aspect)
if (keep_ratio)
auto_xscale = GetXScale(xres);
}
s_exs = auto_xscale;

View File

@ -35,12 +35,6 @@
#include <windows.h>
#endif
#ifdef OPENGL
int sdlhaveogl;
#endif
extern int32 g_fpsScale;
int CloseGame(void);
@ -54,48 +48,48 @@ static void DriverKill(void);
static int DriverInitialize(FCEUGI *gi);
int gametype = 0;
char *DriverUsage=
"--pal x Uses PAL timing.\n\
--gamegenie x, -g x Enables emulated Game Genie if x is nonzero.\n\
--no8lim x Disables the 8 sprites per scanline limitation, if x is nonzero.\n\
--nothrottle x Disables artificial speed throttling, if x is nonzero.\n\
char *DriverUsage="\
--pal {0|1} Uses PAL timing.\n\
--gamegenie {0|1} Enables emulated Game Genie.\n\
--nospritelim {0|1} Disables the 8 sprites per scanline limitation.\n\
--frameskip x Sets # of frames to skip per emulated frame.\n\
--(x/y)res x, -(x/y) x Sets horizontal/vertical resolution to x for full screen mode.\n\
--autoscale x Enables autoscaling in fullscreen if x in nonzero. \n\
--keepratio x Keeps native NES ratio when autoscaling if x is nonzero. \n\
--xres x Sets horizontal resolution to x for full screen mode.\n\
--yres x Sets vertical resolution to x for full screen mode.\n\
--autoscale {0|1} Enables autoscaling in fullscreen if x in nonzero. \n\
--keepratio {0|1} Keeps native NES ratio when autoscaling. \n\
--(x/y)scale x Multiplies width/height by x (Real numbers >0 with OpenGL, otherwise integers >0).\n\
--(x/y)stretch x Stretchess to fill surface on x/y axis (fullscreen, only with OpenGL).\n\
--bpp x, -b x Sets bits per pixel for SDL surface(and video mode in fs). 8, 16, 32.\n\
--opengl x Enables OpenGL support if x is nonzero.\n\
--doublebuf xEnables SDL double-buffering if x is nonzero.\n\
--fullscreen x, -f x Selects full screen mode if x is nonzero.\n\
--clipsides x Clips left- and rightmost 8 columns of pixels if x is nonzero.\n\
--noframe x Hides title bar and window decorations.\n\
--slstart x Sets the first drawn emulated scanline. Valid values for x are\n\
0 through 239.\n\
--slend x Sets the last drawn emulated scanline. Valid values for x are\n\
0 through 239.\n\
--color x Emulates an NTSC TV's colors, if x is nonzero.\n\
--hue x Sets parameter for NTSC color emulation.\n\
--tint x Sets parameter for NTSC color emulation.\n\
--palette s, -p s Loads a custom global palette from file s.\n\
--sound x, -s x Enables sound if x is nonzero.\n\
--(x/y)stretch {0|1} Stretches to fill surface on x/y axis (fullscreen, only with OpenGL).\n\
--bpp {8|16|32} Sets bits per pixel.\n\
--opengl {0|1} Enables OpenGL support.\n\
--doublebuf {0|1} Enables SDL double-buffering if x is nonzero.\n\
--fullscreen {0|1} Enables full screen mode.\n\
--clipsides {0|1} Clips left and rightmost 8 columns of pixels.\n\
--noframe {0|1} Hides title bar and window decorations.\n\
--slstart {0 - 239} Sets the first drawn emulated scanline.\n\
--slend {0 - 239} Sets the last drawn emulated scanline.\n\
--ntsccolor {0|1} Emulates an NTSC TV's colors.\n\
--hue x Sets hue for NTSC color emulation.\n\
--tint x Sets tint for NTSC color emulation.\n\
--palette f Loads a custom global palette from file f.\n\
--sound {0|1} Enables sound.\n\
--soundrate x Sets sound playback rate to x Hz.\n\
--soundq x Sets sound quality: 0 for low, 1 for high.\n\
--soundq {0|1} Enables high sound quality.\n\
--soundbufsize x Sets sound buffer size to x ms.\n\
--volume x Sets volume to x%.\n\
--lowpass x Enables low-pass filter if x is nonzero.\n\
--soundrecord s Records sound to file s.\n\
--snapname x Prepends the game's name to (numeric) snapshot filenames, if x is nonzero.\n\
--inputcfg, -i Configures input device(s) on startup.\n\
--volume {0 - 100} Sets volume.\n\
--lowpass {0|1} Enables low-pass filter if x is nonzero.\n\
--soundrecord f Records sound to file f.\n\
--inputcfg d Configures input device d on startup (gamepad1, gamepad2).\n\
--playmov f Plays back a recorded movie from filename f.\n\
--loadlua f Loads lua script from filename f.\n";
/* Moved network options out while netplay is broken.
--net s, -n s Connects to server 's' for TCP/IP network play.\n\
--port x, -p x Uses TCP/IP port x for network play.\n\
--user s, -u s Sets the nickname to use in network play.\n\
--pass s, -w s Sets password to use for connecting to the server.\n\
--netkey s, -k s Uses key 's' to create a unique session for the game loaded.\n\
--players x, -l x Sets the number of local players.\n\
--playmov f Plays back a recorded movie from filename f.\n\
--loadlua f Loads lua script from filename f\n";
*/
// global configuration object
@ -106,17 +100,6 @@ static void ShowUsage(char *prog)
printf("\nUsage is as follows:\n%s <options> filename\n\n",prog);
puts("Options:");
puts(DriverUsage);
// These options are basically not going to work...
#if 0
puts("\
--inputx str Select device mapped to virtual input port x(1-2).\n\
str may be: none, gamepad, zapper, powerpada, powerpadb,\n\
arkanoid\n\
--fcexp str Select Famicom expansion port device.\n\
str may be: none, shadow, arkanoid, 4player, fkb\n\
--nofs x Disables Four-Score emulation if x is 1.\n\
");
#endif
}
/**
@ -136,51 +119,6 @@ void FCEUD_Message(char *s)
fputs(s, stdout);
}
#ifndef WIN32
/**
* Capture and handle signals sent to FCEU.
*/
static void
SetSignals(void (*t)(int))
{
// XXX soules - why do we capture these? Seems unnecessary.
int sigs[11]={SIGINT,SIGTERM,SIGHUP,SIGPIPE,SIGSEGV,SIGFPE,SIGKILL,SIGALRM,SIGABRT,SIGUSR1,SIGUSR2};
int x;
for(x = 0; x < 11; x++) {
signal(sigs[x], t);
}
}
static void
CloseStuff(int signum)
{
// XXX soules - again, not clear why this is necessary
DriverKill();
printf("\nSignal %d has been caught and dealt with...\n",signum);
switch(signum) {
case SIGINT:printf("How DARE you interrupt me!\n");break;
case SIGTERM:printf("MUST TERMINATE ALL HUMANS\n");break;
case SIGHUP:printf("Reach out and hang-up on someone.\n");break;
case SIGPIPE:printf("The pipe has broken! Better watch out for floods...\n");break;
case SIGSEGV:printf("Iyeeeeeeeee!!! A segmentation fault has occurred. Have a fluffy day.\n");break;
/* So much SIGBUS evil. */
#ifdef SIGBUS
#if(SIGBUS!=SIGSEGV)
case SIGBUS:printf("I told you to be nice to the driver.\n");break;
#endif
#endif
case SIGFPE:printf("Those darn floating points. Ne'er know when they'll bite!\n");break;
case SIGALRM:printf("Don't throw your clock at the meowing cats!\n");break;
case SIGABRT:printf("Abort, Retry, Ignore, Fail?\n");break;
case SIGUSR1:
case SIGUSR2:printf("Killing your processes is not nice.\n");break;
}
exit(1);
}
#endif
/**
* Loads a game, given a full path/filename. The driver code must be
* initialized after the game is loaded, because the emulator code
@ -470,12 +408,7 @@ main(int argc,
}
#ifdef OPENGL
#ifdef APPLEOPENGL
sdlhaveogl = 1; /* Stupid something... Hack. */
#else
if(!SDL_GL_LoadLibrary(0)) sdlhaveogl=1;
else sdlhaveogl=0;
#endif
SDL_GL_LoadLibrary(0);
#endif
// Initialize the configuration system

View File

@ -785,7 +785,7 @@ void FCEUI_SetGameGenie(bool a)
FSettings.GameGenie = a;
}
void FCEUI_SetSnapName(int a)
void FCEUI_SetSnapName(bool a)
{
FSettings.SnapName=a;
}

View File

@ -80,7 +80,7 @@ typedef struct {
int UsrFirstSLine[2];
int UsrLastSLine[2];
int SnapName;
bool SnapName;
uint32 SndRate;
int soundq;
int lowpass;