~ubuntu-branches/ubuntu/saucy/dosbox/saucy

« back to all changes in this revision

Viewing changes to debian/patches/remove_ymf262_code.patch

  • Committer: Bazaar Package Importer
  • Author(s): Jan Dittberner
  • Date: 2009-12-05 19:37:29 UTC
  • mfrom: (1.1.7 upstream) (4.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091205193729-aa7a0joau2x907p8
Tags: 0.73+dfsg1-1
* remove src/hardware/ymf262.c, src/hardware/ymf262.h, add
  debian/patches/remove_ymf262_code.patch to remove dependencies on
  ymf262.{c,h}, update debian/patches/series and debian/README.source
  (Closes: #559443)
* debian/copyright: refer to GPL-2 explicitly
* debian/watch: add opts=dversionmangle to calculate correct upstream
  version
* incorporate upstream suggestions:
  - remove debian/patches/bios_keyboard.cpp.patch, upstream uses
    putenv("SDL_DISABLE_LOCK_KEYS=1") in src/gui/sdlmain.cpp, update
    debian/patches/series
  - remove debian/dosbox.conf.example because dosbox creates a
    configuration file automatically if it does not exist, update
    debian/docs and debian/README.Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Author: Jan Dittberner <jandd@debian.org>
 
2
Subject: Remove dependencies on non-free ymf262.c and ymf262.h
 
3
Bug: http://sourceforge.net/tracker/?func=detail&aid=2905763&group_id=52551&atid=467232
 
4
Debian-Bug: http://bugs.debian.org/559443
 
5
Last-Update: 2009-12-05
 
6
--- a/src/dosbox.cpp
 
7
+++ b/src/dosbox.cpp
 
8
@@ -509,10 +509,10 @@
 
9
        Pstring->Set_values(oplmodes);
 
10
        Pstring->Set_help("Type of OPL emulation. On 'auto' the mode is determined by sblaster type. All OPL modes are Adlib-compatible, except for 'cms'.");
 
11
 
 
12
-       const char* oplemus[]={ "default", "compat", "fast", "old", 0};
 
13
+       const char* oplemus[]={ "default", "compat", "fast", 0};
 
14
        Pstring = secprop->Add_string("oplemu",Property::Changeable::WhenIdle,"default");
 
15
        Pstring->Set_values(oplemus);
 
16
-       Pstring->Set_help("Provider for the OPL emulation. compat or old might provide better quality (see oplrate as well).");
 
17
+       Pstring->Set_help("Provider for the OPL emulation. compat might provide better quality (see oplrate as well).");
 
18
 
 
19
        Pint = secprop->Add_int("oplrate",Property::Changeable::WhenIdle,22050);
 
20
        Pint->Set_values(oplrates);
 
21
--- a/src/hardware/Makefile.am
 
22
+++ b/src/hardware/Makefile.am
 
23
@@ -2,7 +2,7 @@
 
24
 
 
25
 SUBDIRS = serialport
 
26
 
 
27
-EXTRA_DIST = opl.cpp opl.h ymf262.h ymf262.c adlib.h dbopl.h
 
28
+EXTRA_DIST = opl.cpp opl.h adlib.h dbopl.h
 
29
 
 
30
 noinst_LIBRARIES = libhardware.a
 
31
 
 
32
--- a/src/hardware/adlib.cpp
 
33
+++ b/src/hardware/adlib.cpp
 
34
@@ -115,41 +115,6 @@
 
35
 #undef OSD_CPU_H
 
36
 #undef TL_TAB_LEN
 
37
 
 
38
-namespace old_OPL3 {
 
39
-       #define OPL3_INTERNAL_FREQ    14318180  // The OPL3 operates at ~14.3MHz
 
40
-       #define HAS_YMF262 1
 
41
-       #include "ymf262.c"
 
42
-
 
43
-       struct Handler : public Adlib::Handler {
 
44
-               virtual void WriteReg( Bit32u reg, Bit8u val ) {
 
45
-                       OPL3WriteReg( YMF262[0], reg, val );
 
46
-               }
 
47
-               virtual Bit32u WriteAddr( Bit32u port, Bit8u val ) {
 
48
-                       OPL3Write( YMF262[0], port, val );
 
49
-                       return YMF262[0]->address;
 
50
-               }
 
51
-               virtual void Generate( MixerChannel* chan, Bitu samples ) {
 
52
-                       Bit16s buf[2][1024];
 
53
-                       while( samples > 0 ) {
 
54
-                               Bitu todo = samples > 1024 ? 1024 : samples;
 
55
-                               samples -= todo;
 
56
-                               YMF262UpdateOne( 0, buf[0], todo );
 
57
-                               chan->AddSamples_s16( todo, buf[0] );
 
58
-                       }
 
59
-               }
 
60
-               virtual void Init( Bitu rate ) {
 
61
-                       if ( YMF262Init( 1, OPL3_INTERNAL_FREQ, rate )) {
 
62
-                               E_Exit("Can't create OPL3 Emulator");   
 
63
-                       };
 
64
-               }
 
65
-               ~Handler() {
 
66
-                       YMF262Shutdown();
 
67
-               }
 
68
-       };
 
69
-}
 
70
-
 
71
-
 
72
-
 
73
 #define RAW_SIZE 1024
 
74
 
 
75