~ubuntu-branches/debian/squeeze/stella/squeeze

« back to all changes in this revision

Viewing changes to src/emucore/rsynth/PORTING

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Kitt
  • Date: 2010-07-12 23:49:36 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100712234936-juawrr3etzhr2qpv
Tags: 3.1.2-1
* New maintainer (closes: #532039).
* New upstream version (closes: #461121):
  - includes launcher (closes: #396058).
* Fix the reference to the X Window System in the description (closes:
  #411815).
* Move to main, DFSG-free ROMs are available (see README.Debian).
* Enhance the package description.
* Drop the libslang2-dev dependency (closes: #560274).
* Remove the Encoding entry from stella.desktop.
* Avoid ignoring errors when cleaning.
* Add ${misc:Depends} to the package dependencies.
* Provide a doc-base file to install the documentation using doc-base.
* Switch to debhelper 7 with a simplified rules file.
* Use autotools-dev to provide updated configuration files.
* Update to Standards-Version 3.9.0:
  - Move to menu section Applications/Emulators.
  - Move the homepage declaration.
* Re-write the manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Hopefully most of unix/compiler variant issues should be handled by configure
2
 
process. Thus porting issues should reduce (for UNIX-ish machines at least)
3
 
to writing the audio driver.
4
 
 
5
 
The interface to the driver is defined in hplay.h.
6
 
There are three routines:
7
 
 
8
 
extern int audio_init PROTO((int argc, char *argv[]));
9
 
 
10
 
 Do what ever is necessary to initialize audio.
11
 
 You can process any command line arguments to influence the
12
 
 behaviour. Use getargs() function to make this easy.
13
 
 Where it make sense copy options from other drivers e.g. -r for
14
 
 sample rate.
15
 
 
16
 
 This routine should also define the global variable samp_rate
17
 
 to define sample rate to the core synth.
18
 
 
19
 
 Sample rates in 8 - 12kHz range work best due to as yet unresolved
20
 
 problems with some of the digital filters.
21
 
 
22
 
extern void audio_play PROTO((int n, short *data));
23
 
 
24
 
 Send a block of 'n' 16 bit signed linear samples to the
25
 
 audio device. If your device requires uLaw samples (US telephone standard)
26
 
 then l2u.h defines routines which may help (example is Sun driver).
27
 
 
28
 
extern void audio_term PROTO((void));
29
 
 Close down audio device, probably waiting for buffer(s) to empty.
30
 
 
31
 
To test your driver (which should be called xxxxplay.c where xxxx describes
32
 
the system/hardware), link it to hplay.c, and "make".
33
 
 
34
 
The brave/experienced  might like to obtain and install GNU autoconf-2.0 (or
35
 
latter?) and the GNU m4 it needs (m4-1.3 or latter), and try and get the new
36
 
driver auto configured.
37
 
 
38
 
When you have written your driver please contact me (nick@ing-simmons.net)
39
 
if you are willing to let others use it. Please let me know the output of
40
 
config.guess  script to assist in merging into autoconf.
41
 
 
42
 
------------------------------------------------------------------------
43
 
 
44
 
Perfomance issues.
45
 
 
46
 
For best speed in DSP is done in "float",
47
 
but with strict IEEE-754 compliance turned off where possible.
48
 
This is fastest because in general for modern RISC processors
49
 
(e.g. SPARCs or at least some of them ...)
50
 
 
51
 
  - There is no integer multiply hardware
52
 
  - There IS floating point multiply hardware
53
 
  - Floating point multiply hardware cannot handle "double" in one pass.
54
 
  - Some of IEEE-754 options (e.g. denormals) are handled via software traps.
55
 
 
56
 
Modern x86 (Athlon/P4 do okay with float as well.)
57
 
 
58
 
The computations in opsynth.c should dominate the cpu requirements
59
 
of the other levels.
60
 
 
61