initial import
[picodrive.git] / platform / gp2x / 940shared.h
1 #include "../../Pico/sound/ym2612.h"\r
2 \r
3 enum _940_job_t {\r
4         JOB940_YM2612INIT = 1,\r
5         JOB940_YM2612RESETCHIP,\r
6         JOB940_YM2612UPDATEONE,\r
7         JOB940_PICOSTATELOAD,\r
8         JOB940_NUMJOBS\r
9 };\r
10 \r
11 \r
12 typedef struct\r
13 {\r
14         YM2612  ym2612;                                 /* current state of the emulated YM2612 */\r
15         int             mix_buffer[44100/50*2]; /* this is where the YM2612 samples will be mixed to */\r
16 } _940_data_t;\r
17 \r
18 \r
19 typedef struct\r
20 {\r
21         int             job;                                    /* a job for second core */\r
22         int             busy;                                   /* busy status of the 940 core */\r
23         int             length;                                 /* number of samples to mix (882 max) */\r
24         int             stereo;                                 /* mix samples as stereo, doubles sample count automatically */\r
25         int             baseclock;                              /* ym2612 settings */\r
26         int             rate;\r
27         int             writebuffsel;                   /* which write buffer to use (from 940 side) */\r
28         UINT16  writebuff0[2048];               /* 1024 for savestates, 1024 extra */\r
29         UINT16  writebuff1[2048];\r
30         int             vstarts[8];                             /* debug: number of starts from each of 8 vectors */\r
31         int             loopc;                                  /* debug: main loop counter */\r
32         int             waitc;                                  /* debug: wait loop counter */\r
33 } _940_ctl_t;\r