click noise fixed when 940 was used
authornotaz <notasas@gmail.com>
Thu, 26 Jun 2008 20:04:33 +0000 (20:04 +0000)
committernotaz <notasas@gmail.com>
Thu, 26 Jun 2008 20:04:33 +0000 (20:04 +0000)
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@498 be3aeb3a-fb24-0410-a615-afba39da0efa

Pico/Memory.c
platform/gp2x/940ctl.c

index 99f7846..88e3a32 100644 (file)
@@ -839,7 +839,7 @@ int ym2612_write_local(u32 a, u32 d, int is_from_z80)
 \r
           if ((d ^ old_mode) & 0xc0) {\r
 #ifdef __GP2X__\r
-            if (PicoOpt & POPT_EXT_FM) YM2612Write_940(a, d, get_scanline(is_from_z80));\r
+            if (PicoOpt & POPT_EXT_FM) return YM2612Write_940(a, d, get_scanline(is_from_z80));\r
 #endif\r
             return 1;\r
           }\r
index b372d92..ee250f8 100644 (file)
@@ -82,10 +82,6 @@ int YM2612Write_940(unsigned int a, unsigned int v, int scanline)
                        upd = 0;\r
                        break;\r
 \r
-               case 1: /* data port 0    */\r
-                       if (ST_address == 0x2b) upd = 0; /* DAC sel */\r
-                       break;\r
-\r
                case 2: /* address port 1 */\r
                        if (addr_A1 == 1 && ST_address == v)\r
                                return 0;\r
@@ -403,8 +399,8 @@ int YM2612UpdateOne_940(int *buffer, int length, int stereo, int is_buf_empty)
 \r
        /* predict sample counter for next frame */\r
        if (PsndLen_exc_add) {\r
-               if (PsndLen_exc_cnt + PsndLen_exc_add >= 0x10000) length = PsndLen + 1;\r
-               else length = PsndLen;\r
+               length = PsndLen;\r
+               if (PsndLen_exc_cnt + PsndLen_exc_add >= 0x10000) length++;\r
        }\r
 \r
        /* give 940 ym job */\r