+//
+// Jarek Burczynski's YM2151 emulator
+//
+// Cleaned of most MAMEisms & cleaned up in general by James Hammons
+// (this is mostly a placeholder until I write my own)
+//
+
+#include "ym2151.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdint.h>
-//#include "driver.h"
-#include "ym2151.h"
// Missing shit (from M.A.M.E.)
#if 1
#define PI 3.1415629535897932338
static FILE * errorlog = 0;
-int cpu_scalebyfcount(int);
-void timer_remove(void *);
-void * timer_set(int, int, void (*)(int));
+//int cpu_scalebyfcount(int);
+//void timer_remove(void *);
+//void * timer_set(int, int, void (*)(int));
+
+// Bogus M.A.M.E. shite
+int cpu_scalebyfcount(int f) { return f; }
+void timer_remove(void * foo) { printf("STUB: timer_remove()\n"); }
+void * timer_set(int foo, int bar, void (* baz)(int)) { printf("STUB: timer_set()\n"); return 0; }
+
#endif
** 'rate' is sampling rate and 'bufsiz' is the size of the
** buffer that should be updated at each interval
*/
-int YMInit(int num, int clock, int rate, int sample_bits, int bufsiz, SAMPLE ** buffer)
+int YMInit(int num, int clock, int rate, int sample_bits, int bufsiz)//, SAMPLE ** buffer)
{
int i;
for(i=0; i<YMNumChips; i++)
{
- YMPSG[i].Buf = buffer[i];
+ YMPSG[i].Buf = 0;//buffer[i];
YMPSG[i].bufp = 0;
YMResetChip(i);
}