Remove HAS_YMF262 conditional code
PATCH 1/1 Remove HAS_YMF262 conditional code
HAS_YMF262 is not defined anywhere, and use functinos that are not in the tree.
--- hw/adlib.c | 39 --------------------------------------- vl.c | 4 ---- 2 files changed, 0 insertions(+), 43 deletions(-)
hw/adlib.c +0 -39
@@ -42,14 +42,8 @@#define ldebug (...)#endif -#ifdef HAS_YMF262 -#include "ymf262.h" -void YMF262UpdateOneQEMU (int which,INT16 *dst,int length); -#define SHIFT 2 -#else #include "fmopl.h" #define SHIFT 1 -#endif #define IO_READ_PROTO (name) \ uint32_t name (void *opaque, uint32_t nport)
@@ -75,20 +69,14 @@ typedef struct {SWVoiceOut *voice;int left, pos, samples;QEMUAudioTimeStamp ats; -#ifndef HAS_YMF262 FM_OPL *opl; -#endif } AdlibState;static AdlibState glob_adlib;static void adlib_stop_opl_timer (AdlibState *s,size_t n) { -#ifdef HAS_YMF262 -YMF262TimerOver (0 , n); -#else OPLTimerOver (s->opl, n); -#endif s->ticking[n] =0 ; }
@@ -126,11 +114,7 @@ static IO_WRITE_PROTO (adlib_write)adlib_kill_timers (s); -#ifdef HAS_YMF262 - status =YMF262Write (0 , a, val); -#else status =OPLWrite (s->opl, a, val); -#endif }static IO_READ_PROTO (adlib_read)
@@ -141,11 +125,7 @@ static IO_READ_PROTO (adlib_read)adlib_kill_timers (s); -#ifdef HAS_YMF262 - data =YMF262Read (0 , a); -#else data =OPLRead (s->opl, a); -#endif return data; }
@@ -235,11 +215,7 @@ static void adlib_callback (void *opaque, int free)return ; } -#ifdef HAS_YMF262 -YMF262UpdateOneQEMU (0 , s->mixbuf + s->pos *2 , samples); -#else YM3812UpdateOne (s->opl, s->mixbuf + s->pos, samples); -#endif while (samples) { written =write_audio (s, samples);
@@ -258,14 +234,10 @@ static void adlib_callback (void *opaque, int free)static void Adlib_fini (AdlibState *s) { -#ifdef HAS_YMF262 -YMF262Shutdown (); -#else if (s->opl) {OPLDestroy (s->opl); s->opl =NULL ; } -#endif if (s->mixbuf) {qemu_free (s->mixbuf);
@@ -281,16 +253,6 @@ int Adlib_init (qemu_irq *pic)AdlibState *s = &glob_adlib;struct audsettings as; -#ifdef HAS_YMF262 -if (YMF262Init (1 ,14318180 , conf.freq)) { -dolog ("YMF262Init %d failed\n" , conf.freq); -return -1 ; - } -else { -YMF262SetTimerHandler (0 , timer_handler,0 ); - s->enabled =1 ; - } -#else s->opl =OPLCreate (OPL_TYPE_YM3812 ,3579545 , conf.freq);if (!s->opl) {dolog ("OPLCreate %d failed\n" , conf.freq);
@@ -300,7 +262,6 @@ int Adlib_init (qemu_irq *pic)OPLSetTimerHandler (s->opl, timer_handler,0 ); s->enabled =1 ; } -#endif as.freq = conf.freq; as.nchannels =SHIFT ;
vl.c +0 -4
@@ -4443,11 +4443,7 @@ struct soundhw soundhw[] = {#ifdef CONFIG_ADLIB {"adlib" , -#ifdef HAS_YMF262 -"Yamaha YMF262 (OPL3)" , -#else"Yamaha YM3812 (OPL2)" , -#endif0 ,1 , { .init_isa = Adlib_init }
Signature · 1 line
1.6.2.5
Quoted 2 lines · Juan Quintela
HAS_YMF262is not defined anywhere, and use functinos that are not in the tree.
It doesn't hurt anyone, and should stay for those who want OPL3.
[..snip..]
Signature · 1 line
mailto:[email protected]
Quoted 8 lines · malc
Quoted 2 lines · Juan Quintela
HAS_YMF262is not defined anywhere, and use functinos that are not in the tree.It doesn't hurt anyone, and should stay for those who want OPL3.
[..snip..]
We don't have the functions that they protect from.
Later, Juan.
Quoted 11 lines · Juan Quintela
Quoted 8 lines · malc
Quoted 2 lines · Juan Quintela
HAS_YMF262is not defined anywhere, and use functinos that are not in the tree.It doesn't hurt anyone, and should stay for those who want OPL3.
[..snip..]
We don't have the functions that they protect from.
What?
Signature · 1 line
mailto:[email protected]
Quoted 20 lines · malc
Quoted 11 lines · Juan Quintela
Quoted 8 lines · malc
Quoted 2 lines · Juan Quintela
HAS_YMF262is not defined anywhere, and use functinos that are not in the tree.It doesn't hurt anyone, and should stay for those who want OPL3.
[..snip..]
We don't have the functions that they protect from.
hw/adlib.c +0
-0
hw/adlib.c line 46
Quoted 5 lines
hw/adlib.c +0
-2@@ -42,14 +42,8 @@#define ldebug (...)#endif -#ifdef HAS_YMF262 -#include "ymf262.h"
$ find . -type f -name "ymf262.h" $
hw/adlib.c line 47
Quoted 1 line
hw/adlib.c +0
-1-void YMF262UpdateOneQEMU (int which,INT16 *dst,int length);
$ find . -type f -name "*.[ch]" | xargs grep YMF262UpdateOneQEMU ./hw/adlib.c:void YMF262UpdateOneQEMU (int which, INT16 *dst, int length); ./hw/adlib.c: YMF262UpdateOneQEMU (0, s->mixbuf + s->pos * 2, samples); $
hw/adlib.c typedef struct { · line 88
Quoted 1 line
hw/adlib.c +0
-1-YMF262TimerOver (0 , n);
$ find . -type f -name "*.[ch]" | xargs grep YMF262TimerOver ./hw/adlib.c: YMF262TimerOver (0, n); $
hw/adlib.c static IO_WRITE_PROTO (adlib_write) · line 130
Quoted 1 line
hw/adlib.c +0
-1- status =YMF262Write (0 , a, val);
$ find . -type f -name "*.[ch]" | xargs grep YMF262Write ./hw/adlib.c: status = YMF262Write (0, a, val); $
I.e. We don't have defined that functions anywhere in the source code. Are I missing something obvious?
Later, Juan.
Quoted 16 lines · Juan Quintela
Quoted 13 lines · malc
Quoted 11 lines · Juan Quintela
Quoted 8 lines · malc
Quoted 2 lines · Juan Quintela
HAS_YMF262is not defined anywhere, and use functinos that are not in the tree.It doesn't hurt anyone, and should stay for those who want OPL3.
[..snip..]
We don't have the functions that they protect from.
[..snip..]
Quoted 3 lines
I.e. We don't have defined that functions anywhere in the source code. Are I missing something obvious?
It doesn't exist inside the tree due to ymf262.c being under MAME license which is [L]GPL incompatible, i.e. the combination is non distributable, which does not, however, preclude the user from getting ymf262 elsehwere and building QEMU on his/her own.
Signature · 1 line
mailto:[email protected]
Quoted 20 lines · malc
Quoted 16 lines · Juan Quintela
Quoted 13 lines · malc
Quoted 11 lines · Juan Quintela
Quoted 8 lines · malc
Quoted 2 lines · Juan Quintela
HAS_YMF262is not defined anywhere, and use functinos that are not in the tree.It doesn't hurt anyone, and should stay for those who want OPL3.
[..snip..]
We don't have the functions that they protect from.
[..snip..]
Quoted 1 line
Quoted 7 lines
Quoted 2 lines
I.e. We don't have defined that functions anywhere in the source code. Are I missing something obvious?
It doesn't exist inside the tree due to
ymf262.cbeing under MAME license which is [L]GPL incompatible, i.e. the combination is non distributable, which does not, however, preclude the user from getting ymf262 elsehwere and building QEMU on his/her own.
I am not a Lawyer, but that looks fishy at least.
Later, Juan.