]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2820b2
authorToni Wilen <twilen@winuae.net>
Thu, 10 Jul 2014 14:19:04 +0000 (17:19 +0300)
committerToni Wilen <twilen@winuae.net>
Thu, 10 Jul 2014 14:19:04 +0000 (17:19 +0300)
newcpu.cpp
od-win32/mp3decoder.cpp
od-win32/mp3decoder.h
od-win32/resources/resource.h
od-win32/resources/winuae.rc
od-win32/win32.h
od-win32/win32_scaler.cpp
od-win32/win32gfx.cpp
od-win32/win32gui.cpp
od-win32/winuae_msvc11/winuae_msvc.vcxproj
od-win32/winuae_msvc11/winuae_msvc.vcxproj.filters

index 1c573b3cfce3e19363131e542948687e34f27a3b..497a69a9dd3842b1b3d25515b166dc3b1f03b2d4 100644 (file)
@@ -4740,7 +4740,7 @@ void m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr pc, uaecptr *nextpc, int cn
                } else if (lookup->mnemo == i_MOVES) {
                        TCHAR *p;
                        pc += 2;
-                       if (extra & 0x1000) {
+                       if (!(extra & 0x1000)) {
                                pc = ShowEA(0, pc, opcode, dp->dreg, dp->dmode, dp->size, instrname, &seaddr2, safemode);
                                p = instrname + _tcslen(instrname);
                                _stprintf(p, _T(",%c%d"), (extra & 0x8000) ? 'A' : 'D', (extra >> 12) & 7);
index edf2735519bb9a2496af69bb06f0f16a65ea2d78..64987bc77164b4f45250aec46448831b34af0cd0 100644 (file)
@@ -38,6 +38,104 @@ static int mp3_samplesperframe[] = {
        1152,  576,  576
 };
 
+struct mpegaudio_header
+{
+       int ver;
+       int layer;
+       int bitrate;
+       int freq;
+       int padding;
+       int iscrc;
+       int samplerate;
+       int channelmode;
+       int modeext;
+       int isstereo;
+       int framesize;
+       int firstframe;
+};
+
+static int get_header(struct zfile *zf, struct mpegaudio_header *head, bool keeplooking)
+{
+       for (;;) {
+               int bitindex, bitrateidx;
+               uae_u8 header[4];
+
+               if (zfile_fread(header, sizeof header, 1, zf) != 1)
+                       return -1;
+               if (header[0] != 0xff || ((header[1] & (0x80 | 0x40 | 0x20)) != (0x80 | 0x40 | 0x20))) {
+                       zfile_fseek(zf, -3, SEEK_CUR);
+                       if (keeplooking)
+                               continue;
+                       return 0;
+               }
+               if (head->firstframe < 0)
+                       head->firstframe = zfile_ftell(zf);
+
+               head->ver = (header[1] >> 3) & 3;
+               if (head->ver == 1) {
+                       write_log(_T("MP3: ver==1?!\n"));
+                       return 0;
+               }
+               if (head->ver == 0)
+                       head->ver = 2;
+               else if (head->ver == 2)
+                       head->ver = 1;
+               else if (head->ver == 3)
+                       head->ver = 0;
+               head->layer = 4 - ((header[1] >> 1) & 3);
+               if (head->layer == 4) {
+                       write_log(_T("MP3: layer==4?!\n"));
+                       if (keeplooking)
+                               continue;
+                       return 0;
+               }
+               head->iscrc = ((header[1] >> 0) & 1) ? 0 : 2;
+               bitrateidx = (header[2] >> 4) & 15;
+               head->freq = mp3_frequencies[(header[2] >> 2) & 3];
+               if (!head->freq) {
+                       write_log(_T("MP3: reserved frequency?!\n"));
+                       if (keeplooking)
+                               continue;
+                       return 0;
+               }
+               head->channelmode = (header[3] >> 6) & 3;
+               head->modeext = (header[3] >> 4) & 3;
+               head->isstereo = head->channelmode != 3;
+               if (head->ver == 0) {
+                       bitindex = head->layer - 1;
+               } else {
+                       if (head->layer == 1)
+                               bitindex = 3;
+                       else
+                               bitindex = 4;
+               }
+               head->bitrate = mp3_bitrates[bitindex * 16 + bitrateidx] * 1000;
+               if (head->bitrate <= 0) {
+                       write_log(_T("MP3: reserved bitrate?!\n"));
+                       return 0;
+               }
+               head->padding = (header[2] >> 1) & 1;
+               head->samplerate = mp3_samplesperframe[(head->layer - 1) * 3 + head->ver];
+               switch (head->layer)
+               {
+               case 1:
+                       head->framesize = (12 * head->bitrate / head->freq + head->padding) * 4;
+                       break;
+               case 2:
+               case 3:
+                       head->framesize = 144 * head->bitrate / head->freq + head->padding;
+                       break;
+               }
+               if (head->framesize <= 4) {
+                       write_log(_T("MP3: too small frame size?!\n"));
+                       if (keeplooking)
+                               continue;
+                       return 0;
+               }
+               return 1;
+       }
+}
+
 mp3decoder::~mp3decoder()
 {
        if (g_mp3stream)
@@ -45,6 +143,82 @@ mp3decoder::~mp3decoder()
        g_mp3stream = NULL;
 }
 
+mp3decoder::mp3decoder(struct zfile *zf)
+{
+       MMRESULT mmr;
+       LPWAVEFORMATEX waveFormat, inwave;
+       LPMPEGLAYER3WAVEFORMAT mp3format;
+       LPMPEG1WAVEFORMAT mp2format;
+       DWORD maxFormatSize;
+       struct mpegaudio_header head;
+
+       if (get_header(zf, &head, true) <= 0) {
+               write_log(_T("MPA: couldn't find mpeg audio header\n"));
+               throw exception();
+       }
+       // find the biggest format size
+       maxFormatSize = 0;
+       mmr = acmMetrics(NULL, ACM_METRIC_MAX_SIZE_FORMAT, &maxFormatSize);
+
+       // define desired output format
+       waveFormat = (LPWAVEFORMATEX)LocalAlloc(LPTR, maxFormatSize);
+       waveFormat->wFormatTag = WAVE_FORMAT_PCM;
+       waveFormat->nChannels = head.isstereo ? 2 : 1;
+       waveFormat->nSamplesPerSec = 44100;
+       waveFormat->wBitsPerSample = 16; // 16 bits
+       waveFormat->nBlockAlign = 2 * waveFormat->nChannels;
+       waveFormat->nAvgBytesPerSec = waveFormat->nBlockAlign * waveFormat->nSamplesPerSec; // byte-rate
+       waveFormat->cbSize = 0; // no more data to follow
+
+       if (head.layer == 3) {
+               // define MP3 input format
+               mp3format = (LPMPEGLAYER3WAVEFORMAT)LocalAlloc(LPTR, maxFormatSize);
+               inwave = &mp3format->wfx;
+               inwave->cbSize = MPEGLAYER3_WFX_EXTRA_BYTES;
+               inwave->wFormatTag = WAVE_FORMAT_MPEGLAYER3;
+               mp3format->fdwFlags = MPEGLAYER3_FLAG_PADDING_OFF;
+               mp3format->nBlockSize = MP3_BLOCK_SIZE;             // voodoo value #1
+               mp3format->nFramesPerBlock = 1;                     // MUST BE ONE
+               mp3format->nCodecDelay = 1393;                      // voodoo value #2
+               mp3format->wID = MPEGLAYER3_ID_MPEG;
+       } else {
+               // There is no Windows MP2 ACM codec. This code is totally useless.
+               mp2format = (LPMPEG1WAVEFORMAT)LocalAlloc(LPTR, maxFormatSize);
+               inwave = &mp2format->wfx;
+               mp2format->dwHeadBitrate = head.bitrate;
+               mp2format->fwHeadMode = head.isstereo ? (head.channelmode == 1 ? ACM_MPEG_JOINTSTEREO : ACM_MPEG_STEREO) : ACM_MPEG_SINGLECHANNEL;
+               mp2format->fwHeadLayer = head.layer == 1 ? ACM_MPEG_LAYER1 : ACM_MPEG_LAYER2;
+               mp2format->fwHeadFlags = ACM_MPEG_ID_MPEG1;
+               mp2format->fwHeadModeExt = 0x0f;
+               mp2format->wHeadEmphasis = 1;
+               inwave->cbSize = sizeof(MPEG1WAVEFORMAT) - sizeof(WAVEFORMATEX);
+               inwave->wFormatTag = WAVE_FORMAT_MPEG;
+       }
+       inwave->nBlockAlign = 1;
+       inwave->wBitsPerSample = 0;                  // MUST BE ZERO
+       inwave->nChannels = head.isstereo ? 2 : 1;
+       inwave->nSamplesPerSec = head.freq;
+       inwave->nAvgBytesPerSec = head.bitrate / 8;
+
+       mmr = acmStreamOpen((LPHACMSTREAM)&g_mp3stream,               // open an ACM conversion stream
+               NULL,                       // querying all ACM drivers
+               (LPWAVEFORMATEX)inwave,         // converting from MP3
+               waveFormat,                 // to WAV
+               NULL,                       // with no filter
+               0,                          // or async callbacks
+               0,                          // (and no data for the callback)
+               0                           // and no flags
+               );
+
+       LocalFree(mp3format);
+       LocalFree(mp2format);
+       LocalFree(waveFormat);
+       if (mmr != MMSYSERR_NOERROR) {
+               write_log(_T("MP3: couldn't open ACM mp3 decoder, %d\n"), mmr);
+               throw exception();
+       }
+}
+
 mp3decoder::mp3decoder()
 {
        MMRESULT mmr;
@@ -214,81 +388,26 @@ uae_u32 mp3decoder::getsize (struct zfile *zf)
                zfile_fseek(zf, -(int)sizeof id3, SEEK_CUR);
        }
 
-
        for (;;) {
-               int ver, layer, bitrate, freq, padding, bitindex, iscrc;
-               int samplerate, framelen, bitrateidx, channelmode;
-               int isstereo;
-               uae_u8 header[4];
-
-               if (zfile_fread(header, sizeof header, 1, zf) != 1)
+               struct mpegaudio_header mh;
+               mh.firstframe = -1;
+               int v = get_header(zf, &mh, true);
+               if (v < 0)
                        return size;
-               if (header[0] != 0xff || ((header[1] & (0x80 | 0x40 | 0x20)) != (0x80 | 0x40 | 0x20))) {
-                       zfile_fseek (zf, -3, SEEK_CUR);
-                       continue;
-               }
-               if (firstframe < 0)
-                       firstframe = zfile_ftell (zf);
-
-               ver = (header[1] >> 3) & 3;
-               if (ver == 1) {
-                       write_log (_T("MP3: ver==1?!\n"));
-                       return 0;
-               }
-               if (ver == 0)
-                       ver = 2;
-               else if (ver == 2)
-                       ver = 1;
-               else if (ver == 3)
-                       ver = 0;
-               layer = 4 - ((header[1] >> 1) & 3);
-               if (layer == 4) {
-                       write_log (_T("MP3: layer==4?!\n"));
-                       return 0;
-               }
-               iscrc = ((header[1] >> 0) & 1) ? 0 : 2;
-               bitrateidx = (header[2] >> 4) & 15;
-               freq = mp3_frequencies[(header[2] >> 2) & 3];
-               if (!freq) {
-                       write_log (_T("MP3: reserved frequency?!\n"));
-                       return 0;
-               }
-               channelmode = (header[3] >> 6) & 3;
-               isstereo = channelmode != 3;
-               if (ver == 0) {
-                       bitindex = layer - 1;
-               } else {
-                       if (layer == 1)
-                               bitindex = 3;
-                       else
-                               bitindex = 4;
-               }
-               bitrate = mp3_bitrates[bitindex * 16 + bitrateidx] * 1000;
-               if (bitrate <= 0) {
-                       write_log (_T("MP3: reserved bitrate?!\n"));
-                       return 0;
-               }
-               padding = (header[2] >> 1) & 1;
-               samplerate = mp3_samplesperframe[(layer - 1) * 3 + ver];
-               framelen = ((samplerate / 8 * bitrate) / freq) + padding;
-               if (framelen <= 4) {
-                       write_log (_T("MP3: too small frame size?!\n"));
-                       return 0;
-               }
-               zfile_fseek(zf, framelen - 4, SEEK_CUR);
+               zfile_fseek(zf, mh.framesize - 4, SEEK_CUR);
                frames++;
                if (timelen > 0) {
-                       size = ((uae_u64)timelen * freq * 2 * (isstereo ? 2 : 1)) / 1000;
+                       size = ((uae_u64)timelen * mh.freq * 2 * (mh.isstereo ? 2 : 1)) / 1000;
                        break;
                }
-               size += samplerate * 2 * (isstereo ? 2 : 1);
-               if (bitrate != oldbitrate) {
-                       oldbitrate = bitrate;
+               size += mh.samplerate * 2 * (mh.isstereo ? 2 : 1);
+               if (mh.bitrate != oldbitrate) {
+                       oldbitrate = mh.bitrate;
                        sameframes++;
                }
                if (sameframes == 0 && frames > 100) {
                        // assume this is CBR MP3
-                       size = samplerate * 2 * (isstereo ? 2 : 1) * ((zfile_size (zf) - firstframe) / ((samplerate / 8 * bitrate) / freq));
+                       size = mh.samplerate * 2 * (mh.isstereo ? 2 : 1) * ((zfile_size(zf) - firstframe) / ((mh.samplerate / 8 * mh.bitrate) / mh.freq));
                        break;
                }
        }
index 0fa1d9264bcabb6c4fc15aacd65ac9fadf518dc7..4ccb01f2356349194589442f96240e2555a3856f 100644 (file)
@@ -3,6 +3,7 @@ class mp3decoder
 {
        void *g_mp3stream;
 public:
+       mp3decoder::mp3decoder(struct zfile *zf);
        mp3decoder();
        ~mp3decoder();
        uae_u8 *get(struct zfile *zf, uae_u8 *, int maxsize);
index 710d7fd65f6a4a6ba2487a7a3729332628b15a32..b3397d9d19a8d7de0f1887f4cfe560f3b678b76c 100644 (file)
 #define IDC_CS_DMAC2                    1769
 #define IDC_CS_A4091                    1770
 #define IDC_CS_CDTVSCSI                 1771
+#define IDC_CS_A4092                    1771
+#define IDC_CS_CD32FMV                  1771
 #define IDC_CS_SCSIMODE                 1772
 #define IDC_DF0ENABLE                   1773
 #define IDC_DF1ENABLE                   1774
 #define ID_ST_CDEJECTALL                40047
 #define ID_CDDRIVES_CD                  40048
 #define ID_ST_CD0                       40049
+#define IDC_STATIC                      -1
 
 // Next default values for new objects
 // 
index 099c1d621ce37aea718797c9996a2191579544f2..2e33091d0b3f632d2bcea08fc582bc558c25250d 100644 (file)
@@ -1108,15 +1108,16 @@ BEGIN
     CONTROL         "uaescsi.device",IDC_SCSIDEVICE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,229,147,11
     CONTROL         "A590/A2091 WD33C93 SCSI",IDC_CS_A2091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,242,147,11
     CONTROL         "A4091 NCR53C710 SCSI",IDC_CS_A4091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,255,151,11
-    CONTROL         "Include host SCSI devices",IDC_CS_SCSIMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,268,147,11
+    CONTROL         "Include host SCSI devices",IDC_CS_SCSIMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,271,147,11
     GROUPBOX        "Network",IDC_STATIC,181,197,213,86
     CONTROL         "bsdsocket.library [] bsdsocket network library emulation.",IDC_SOCKETS,
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,216,187,11
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,215,187,11
     CONTROL         "uaenet.device [] Sana 2 compatible network device emulation.",IDC_SANA2,
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,229,187,11
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,228,187,11
     CONTROL         "A2065 Z2 [] A2065 Ethernet Zorro II card emulation.",IDC_A2065,
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,242,187,11
-    COMBOBOX        IDC_NETDEVICE,202,257,178,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,241,187,11
+    COMBOBOX        IDC_NETDEVICE,202,256,178,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "CD32 Full Motion Video cartridge",IDC_CS_CD32FMV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,268,151,11
 END
 
 IDD_INPUTMAP DIALOGEX 0, 0, 421, 341
@@ -1817,7 +1818,7 @@ BEGIN
     IDS_QS_MODEL_A600       "Basic non-expanded configuration\nThe A600 is smaller than the A500+ and has an updated 2.0 ROM.\n2 MB Chip RAM expanded configuration\n\n4 MB Fast RAM expanded configuration\n"
     IDS_QS_MODEL_A1000      "512 KB Chip RAM\nThe A1000 was the first model produced, with a configuration equivalent to that of an A500 with OCS chipset. You normally don't need to use this configuration, unless you are nostalgic and would like to hear the short A1000 boot tune\n""ICS"" Denise without EHB support\nVery first A1000 models had Denise without EHB capability.\n256 KB Chip RAM\n Unexpanded A1000. All later A1000 models were sold with a 256 KB RAM expansion built-in."
     IDS_QS_MODEL_A1200      "Basic non-expanded configuration\nUse this configuration to run most AGA demos and games\n4 MB Fast RAM expanded configuration\nSome newer AGA games and demos need an expanded A1200 to run."
-    IDS_QS_MODEL_CD32       "CD32\nThe CD32 was one the first 32-bit consoles on the market. It is basically an A1200 with a built-in CD-ROM drive. Insert your CD32 or CDTV CD-ROM into a free CD-ROM drive before starting the emulation.\nCD32 + MPEG Full Motion Video Cartridge (not emulated yet)\n"
+    IDS_QS_MODEL_CD32       "CD32\nThe CD32 was one the first 32-bit consoles on the market. It is basically an A1200 with a built-in CD-ROM drive. Insert your CD32 or CDTV CD-ROM into a free CD-ROM drive before starting the emulation.\nCD32 with Full Motion Video cartridge\n"
     IDS_QS_MODEL_CDTV       "CDTV\nThe CDTV was the first model with a built-in CD-ROM drive. Looking like a black CD player, it featured a configuration equivalent to that of an A500 with 1 MB RAM and an ECS chipset.\nFloppy drive and 64KB SRAM card expanded CDTV\n"
 END
 
index c6cccfa27b031901f16620968a88f635bd413ddc..e2f1238d144c9ee986826fd7dcd8a7a2044d3c01 100644 (file)
 #define LANG_DLL_FULL_VERSION_MATCH 1
 
 #if WINUAEPUBLICBETA
-#define WINUAEBETA _T("1")
+#define WINUAEBETA _T("2")
 #else
 #define WINUAEBETA _T("")
 #endif
 
-#define WINUAEDATE MAKEBD(2014, 7, 3)
+#define WINUAEDATE MAKEBD(2014, 7, 10)
 
 //#define WINUAEEXTRA _T("AmiKit Preview")
 //#define WINUAEEXTRA _T("Amiga Forever Edition")
index 478d90c79ac8775c18e71e8405a2d35f1fe07024..11a86c0af4f5110a6d9caa657231862ae37bf561 100644 (file)
@@ -1006,12 +1006,13 @@ void S2X_render (void)
        } else { /* null */
 
                if (amiga_depth == dst_depth) {
+                       uae_u8 *d = dptr, *s = sptr;
                        int y;
                        int w = aw * dst_depth / 8;
-                       for (y = 0; y < ah && dptr + w <= enddptr; y++) {
-                               memcpy (dptr, sptr, w);
-                               sptr += vb->rowbytes;
-                               dptr += pitch;
+                       for (y = 0; y < ah && d + w <= enddptr; y++) {
+                               memcpy (d, s, w);
+                               s += vb->rowbytes;
+                               d += pitch;
                        }
                }
                ok = 1;
index b3478055a6ef9382b2339f5a730f881591f40bc1..1b0f18436201512d3ccc6b82cf4fa50762c0fdba 100644 (file)
@@ -1780,6 +1780,8 @@ int check_prefs_changed_gfx (void)
                c |= gf->gfx_filter_contrast != gfc->gfx_filter_contrast ? (1) : 0;
                c |= gf->gfx_filter_saturation != gfc->gfx_filter_saturation ? (1) : 0;
                c |= gf->gfx_filter_gamma != gfc->gfx_filter_gamma ? (1) : 0;
+               if (j && gf->gfx_filter_autoscale != gfc->gfx_filter_autoscale)
+                       c |= 8 | 64;
                //c |= gf->gfx_filter_ != gfc->gfx_filter_ ? (1|8) : 0;
        }
 
@@ -4185,7 +4187,7 @@ static BOOL doInit (void)
                        allocsoftbuffer (_T("draw"), &gfxvidinfo.drawbuffer, currentmode->flags,
                                1600, 1280, currentmode->current_depth);
                }
-               if (currprefs.monitoremu) {
+               if (currprefs.monitoremu || currprefs.cs_cd32fmv) {
                        allocsoftbuffer (_T("monemu"), &gfxvidinfo.tempbuffer, currentmode->flags,
                                currentmode->amiga_width > 1024 ? currentmode->amiga_width : 1024,
                                currentmode->amiga_height > 1024 ? currentmode->amiga_height : 1024,
index 4f7360d99e4876bcf74db4c793e35760782e7a7c..0b3ee0a1ead1aa9f1262c6dd27185a08ab7e65a8 100644 (file)
@@ -1613,6 +1613,7 @@ static void show_rom_list (void)
                16, 46, 31, 13, 12, -1, -1, // A4000
                17, -1, -1, // A4000T
                18, -1, 19, -1, -1, // CD32
+               18, -1, 19, -1, 74, 23, -1, -1,  // CD32 FMV
                20, 21, 22, -1, 6, 32, -1, -1, // CDTV
                49, 50, 75, 51, 76, 77, -1, 5, 4, -1, -1, // ARCADIA
                46, 16, 17, 31, 13, 12, -1, -1, // highend, any 3.x A4000
@@ -1625,7 +1626,7 @@ static void show_rom_list (void)
        WIN32GUI_LoadUIString (IDS_ROM_UNAVAILABLE, unavail, sizeof (avail) / sizeof (TCHAR));
        _tcscat (avail, _T("\n"));
        _tcscat (unavail, _T("\n"));
-       p1 = _T("A500 Boot ROM 1.2\0A500 Boot ROM 1.3\0A500+\0A600\0A1000\0A1200\0A3000\0A4000\0A4000T\0\nCD32\0CDTV\0Arcadia Multi Select\0High end WinUAE\0\nA590/A2091 SCSI Boot ROM\0A4091 SCSI Boot ROM\0\0");
+       p1 = _T("A500 Boot ROM 1.2\0A500 Boot ROM 1.3\0A500+\0A600\0A1000\0A1200\0A3000\0A4000\0A4000T\0CD32\0CD32 FMV\0CDTV\0Arcadia Multi Select\0High end WinUAE\0A590/A2091 SCSI Boot ROM\0A4091 SCSI Boot ROM\0\0");
 
        p = xmalloc (TCHAR, 100000);
        if (!p)
@@ -1635,14 +1636,11 @@ static void show_rom_list (void)
 
        rp = romtable;
        while(rp[0]) {
-               int ok = 0;
+               int ok = 1;
                p2 = p1 + _tcslen (p1) + 1;
                _tcscat (p, _T(" "));
                _tcscat (p, p1); _tcscat (p, _T(": "));
-               if (listrom (rp))
-                       ok = 1;
-               while(*rp++ != -1);
-               if (*rp != -1) {
+               while (*rp != -1) {
                        if (ok) {
                                ok = 0;
                                if (listrom (rp))
@@ -1652,7 +1650,9 @@ static void show_rom_list (void)
                }
                rp++;
                if (ok)
-                       _tcscat (p, avail); else _tcscat (p, unavail);
+                       _tcscat (p, avail);
+               else
+                       _tcscat (p, unavail);
                p1 = p2;
        }
 
@@ -7012,8 +7012,8 @@ static INT_PTR CALLBACK ChipsetDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR
                WIN32GUI_LoadUIString(IDS_GENERIC, buffer, sizeof buffer / sizeof (TCHAR));
                SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_ADDSTRING, 0, (LPARAM)buffer);
                SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_ADDSTRING, 0, (LPARAM)_T("CDTV"));
-               SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_ADDSTRING, 0, (LPARAM)_T("CD32"));
-               SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_ADDSTRING, 0, (LPARAM)_T("A500"));
+               SendDlgItemMessage(hDlg, IDC_CS_EXT, CB_ADDSTRING, 0, (LPARAM)_T("CD32"));
+               SendDlgItemMessage(hDlg, IDC_CS_EXT, CB_ADDSTRING, 0, (LPARAM)_T("A500"));
                SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_ADDSTRING, 0, (LPARAM)_T("A500+"));
                SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_ADDSTRING, 0, (LPARAM)_T("A600"));
                SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_ADDSTRING, 0, (LPARAM)_T("A1000"));
@@ -7769,6 +7769,7 @@ static void enable_for_expansiondlg (HWND hDlg)
        ShowWindow (GetDlgItem(hDlg, IDC_CS_SCSIMODE), SW_HIDE);
        ew (hDlg, IDC_CS_A2091, en);
        ew (hDlg, IDC_CS_A4091, en);
+       ew(hDlg, IDC_CS_CD32FMV, en);
        ew (hDlg, IDC_CS_SCSIMODE, FALSE);
 }
 
@@ -7782,8 +7783,9 @@ static void values_to_expansiondlg (HWND hDlg)
        CheckDlgButton (hDlg, IDC_SANA2, workprefs.sana2);
        CheckDlgButton (hDlg, IDC_A2065, workprefs.a2065name[0] ? 1 : 0);
        CheckDlgButton (hDlg, IDC_CS_A2091, workprefs.a2091);
-       CheckDlgButton (hDlg, IDC_CS_A4091, workprefs.a4091);
-       CheckDlgButton (hDlg, IDC_CS_SCSIMODE, workprefs.scsi == 2);
+       CheckDlgButton(hDlg, IDC_CS_A4091, workprefs.a4091);
+       CheckDlgButton(hDlg, IDC_CS_CD32FMV, workprefs.cs_cd32fmv);
+       CheckDlgButton(hDlg, IDC_CS_SCSIMODE, workprefs.scsi == 2);
        SendDlgItemMessage (hDlg, IDC_RTG_BUFFERCNT, CB_SETCURSEL, workprefs.gfx_apmode[1].gfx_backbuffers == 0 ? 0 : workprefs.gfx_apmode[1].gfx_backbuffers - 1, 0);
        cw = catweasel_detect ();
        ew (hDlg, IDC_CATWEASEL, cw);
@@ -7953,7 +7955,10 @@ static INT_PTR CALLBACK ExpansionDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LP
                                workprefs.a2091 = ischecked (hDlg, IDC_CS_A2091) ? 1 : 0;
                                break;
                        case IDC_CS_A4091:
-                               workprefs.a4091 = ischecked (hDlg, IDC_CS_A4091) ? 1 : 0;
+                               workprefs.a4091 = ischecked(hDlg, IDC_CS_A4091) ? 1 : 0;
+                               break;
+                       case IDC_CS_CD32FMV:
+                               workprefs.cs_cd32fmv = ischecked(hDlg, IDC_CS_CD32FMV) ? 1 : 0;
                                break;
                        }
                        if (HIWORD (wParam) == CBN_SELENDOK || HIWORD (wParam) == CBN_KILLFOCUS || HIWORD (wParam) == CBN_EDITCHANGE)  {
@@ -11233,8 +11238,12 @@ static void addfloppyhistory (HWND hDlg)
                        f_text = floppybuttons[n][0];
                else
                        f_text = IDC_DISKTEXT;
-               if (f_text >= 0)
-                       addhistorymenu (hDlg, workprefs.floppyslots[n].df, f_text, iscd (n) ? HISTORY_CD : HISTORY_FLOPPY, true);
+               if (f_text >= 0) {
+                       TCHAR *name = workprefs.floppyslots[n].df;
+                       if (iscd(n))
+                               name = workprefs.cdslots[0].name;
+                       addhistorymenu (hDlg, name, f_text, iscd (n) ? HISTORY_CD : HISTORY_FLOPPY, true);
+               }
        }
 }
 
index c36dd620abc821e35af76cb50623ca177859ce85..bebd7529528fee1c3b6d06ff82522085e8d29659 100644 (file)
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;libpng15.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;enet.lib;lzmalib.lib;prowizard.lib;libFLAC_static.lib;Avrt.lib;hid.lib;zlibstat.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;libpng15.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;enet.lib;lzmalib.lib;prowizard.lib;libFLAC_static.lib;Avrt.lib;hid.lib;zlibstat.lib;Iphlpapi.lib;luastatic.lib;libmpeg2_ff.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;libpng15.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;enet.lib;lzmalib.lib;prowizard.lib;libFLAC_static.lib;Avrt.lib;hid.lib;zlibstat.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;libpng15.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;enet.lib;lzmalib.lib;prowizard.lib;libFLAC_static.lib;Avrt.lib;hid.lib;zlibstat.lib;Iphlpapi.lib;luastatic.lib;libmpeg2_ff.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng15.lib;lglcd.lib;wtsapi32.lib;wntab32x.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng15.lib;lglcd.lib;wtsapi32.lib;wntab32x.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;libmpeg2_ff;%(AdditionalDependencies)</AdditionalDependencies>
       <ShowProgress>NotSet</ShowProgress>
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng15.lib;lglcd.lib;wtsapi32.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng15.lib;lglcd.lib;wtsapi32.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;libmpeg2_ff;%(AdditionalDependencies)</AdditionalDependencies>
       <ShowProgress>NotSet</ShowProgress>
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;libpng15.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;avrt.lib;enet.lib;prowizard.lib;lzmalib.lib;libFLAC_static.lib;Avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;winio.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;libpng15.lib;lglcd.lib;wpcap.lib;packet.lib;openal32.lib;portaudio_x86.lib;vfw32.lib;wtsapi32.lib;avrt.lib;enet.lib;prowizard.lib;lzmalib.lib;libFLAC_static.lib;Avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;libmpeg2_ff;%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
       <Culture>0x0409</Culture>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng15.lib;lglcd.lib;wtsapi32.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng15.lib;lglcd.lib;wtsapi32.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;libmpeg2_ff;%(AdditionalDependencies)</AdditionalDependencies>
       <ShowProgress>NotSet</ShowProgress>
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
       <SuppressStartupBanner>true</SuppressStartupBanner>
     <ClCompile Include="..\..\archivers\lha\uae_lha.cpp" />
     <ClCompile Include="..\..\archivers\lha\util.cpp" />
     <ClCompile Include="..\..\archivers\lzx\unlzx.cpp" />
+    <ClCompile Include="..\..\archivers\mp2\kjmp2.cpp" />
     <ClCompile Include="..\..\archivers\wrp\warp.cpp" />
     <ClCompile Include="..\..\archivers\zip\unzip.cpp" />
     <ClCompile Include="..\..\aros.rom.cpp" />
     <ClCompile Include="..\..\calc.cpp" />
+    <ClCompile Include="..\..\cd32_fmv_genlock.cpp" />
     <ClCompile Include="..\..\cpuemu_13.cpp" />
     <ClCompile Include="..\..\cpuemu_21.cpp" />
     <ClCompile Include="..\..\cpuemu_22.cpp" />
index c9881f2239f5ee130f5c40dd824b130bd3d1dab8..02d5ea872c5a08bf2a92c58de7d329ea55171131 100644 (file)
@@ -50,6 +50,9 @@
     <Filter Include="qemu">
       <UniqueIdentifier>{fc42f311-daf2-48de-a851-8ad3a4aad22e}</UniqueIdentifier>
     </Filter>
+    <Filter Include="unpackers\mp2">
+      <UniqueIdentifier>{61d78a16-0513-4885-b23d-534829071ac0}</UniqueIdentifier>
+    </Filter>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\ahidsound_dsonly.cpp">
     <ClCompile Include="..\..\tabletlibrary.cpp">
       <Filter>common</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\archivers\mp2\kjmp2.cpp">
+      <Filter>unpackers\mp2</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\cd32_fmv_genlock.cpp">
+      <Filter>common</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\resources\35floppy.ico">