~ubuntu-branches/ubuntu/raring/vice/raring

« back to all changes in this revision

Viewing changes to src/arch/os2/dialogs/menubar.c

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2009-03-31 00:37:15 UTC
  • mfrom: (1.2.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20090331003715-mzclchtl0dp7fcl0
Tags: upstream-2.1.dfsg
ImportĀ upstreamĀ versionĀ 2.1.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
#include "dlg-fileio.h"      // ViceFileDialog
62
62
#include "video-resources.h" // VIDEO_RESOURCE_PAL_*
63
63
 
64
 
// --------------------------------------------------------------------------
65
 
//#define VIDEO_RESOURCE_PAL_MODE_BLUR  2
66
 
//#define VIDEO_RESOURCE_PAL_MODE_SHARP 1
67
 
//#define VIDEO_RESOURCE_PAL_MODE_FAST  0
68
 
// --------------------------------------------------------------------------
 
64
#ifdef __X64DTV__
 
65
#include "c64dtv-resources.h"
 
66
#endif
69
67
 
70
68
#ifdef __XCBM__
71
69
#include "cbm2mem.h"     // cbm2_set_model
113
111
 
114
112
#if defined HAVE_CRTC && !defined __XCBM__
115
113
static const char *VIDEO_CACHE="CrtcVideoCache";
 
114
#ifdef HAVE_PAL
116
115
static const char *DOUBLE_SIZE="CrtcDoubleSize";
117
116
static const char *DOUBLE_SCAN="CrtcDoubleScan";
118
117
#endif
 
118
#endif
119
119
/*
120
 
#if defined __X64__ || defined __X128__ || defined __XVIC__ || defined __XPLUS4__
 
120
#if defined __X64__ || defined __X128__ || defined __XVIC__ || defined __XPLUS4__ || defined __X64DTV__
121
121
static const char *VIDEO_CACHE="ViciiVideoCache";
122
122
#else // __XPET__ || __XCBM__
123
123
static const char *VIDEO_CACHE="CrtcVideoCache";
400
400
        {
401
401
            int val1, val2;
402
402
            resources_get_int("PALEmulation", &val1);
403
 
            resources_get_int("PALMode",      &val2);
404
403
            if (!val1)
405
404
            {
406
 
                resources_set_int("PALMode",      VIDEO_RESOURCE_PAL_MODE_FAST);
407
405
                resources_set_int("PALEmulation", 1);
408
406
                return;
409
407
            }
412
410
            {
413
411
#ifndef HAVE_TED
414
412
            case 0:
415
 
                resources_set_int("PALMode",      VIDEO_RESOURCE_PAL_MODE_TRUE);
416
413
                resources_set_int("PALEmulation", 1);
417
414
                return;
418
415
#endif
419
416
            case 1:
420
 
                resources_set_int("PALMode",      VIDEO_RESOURCE_PAL_MODE_FAST);
421
417
                resources_set_int("PALEmulation", 0);
422
418
                return;
423
419
            }
426
422
    case IDM_PALOFF:
427
423
        resources_set_int("PALEmulation", 0);
428
424
        return;
429
 
#ifndef HAVE_TED
430
 
    case IDM_PALFAST:
431
 
        resources_set_int("PALMode",      VIDEO_RESOURCE_PAL_MODE_FAST);
432
 
        resources_set_int("PALEmulation", 1);
433
 
        return;
434
 
#endif
435
 
    case IDM_PALON:
436
 
        resources_set_int("PALMode",      VIDEO_RESOURCE_PAL_MODE_TRUE);
437
 
        resources_set_int("PALEmulation", 1);
438
 
        return;
439
 
        /*
440
 
    case IDM_FAKEPAL:
441
 
        toggle("PALEmulation");
442
 
        return;
443
 
     */
444
425
    case IDM_DSIZE:
445
426
        interrupt_maincpu_trigger_trap(toggle_async, (resource_value_t*)DOUBLE_SIZE);
446
427
        return;
483
464
        return;
484
465
#endif
485
466
 
486
 
#if defined __X64__ || defined __X128__ || defined __XVIC__
 
467
#if defined __X64__ || defined __X128__ || defined __XVIC__ || defined __X64DTV__
487
468
    case IDM_PAL:
488
469
        resources_set_int("MachineVideoStandard",
489
470
                          MACHINE_SYNC_PAL);
500
481
#endif // __X64__
501
482
#endif //  __X64__ || __X128__ || __XVIC__
502
483
 
503
 
#if defined __X64__ || defined __X128__
 
484
#if defined __X64__ || defined __X128__ || defined __X64DTV__
504
485
        /*
505
486
    case IDM_KERNALREV0:
506
487
        resources_set_string("KernalRev", "0");
531
512
    case IDM_RAMCART:
532
513
        toggle("RAMCART");
533
514
        return;
 
515
    case IDM_DQBB:
 
516
        toggle("DQBB");
 
517
        return;
 
518
    case IDM_ISEPIC:
 
519
        toggle("Isepic");
 
520
        return;
 
521
    case IDM_ISEPIC_SWITCH:
 
522
        toggle("IsepicSwitch");
 
523
        return;
534
524
    case IDM_DIGIMAX:
535
525
        toggle("DIGIMAX");
536
526
        return;
561
551
        resources_set_int("REUSize", (idm&0xff)<<7);
562
552
        return;
563
553
 
 
554
    case IDM_REUFILE:
 
555
        resources_set_string("REUfilename", ViceFileSelect(hwnd, 1));
 
556
        return;
 
557
 
564
558
    case IDM_GEORAM64:
565
559
    case IDM_GEORAM128:
566
560
    case IDM_GEORAM256:
571
565
        resources_set_int("GEORAMSize", (idm&0xff)<<6);
572
566
        return;
573
567
 
 
568
    case IDM_GEORAMFILE:
 
569
        resources_set_string("GEORAMfilename", ViceFileSelect(hwnd, 1));
 
570
        return;
 
571
 
574
572
    case IDM_RAMCART64:
575
573
    case IDM_RAMCART128:
576
574
        resources_set_int("RAMCARTSize", (idm&0xf)<<6);
577
575
        return;
578
576
 
 
577
    case IDM_RAMCARTFILE:
 
578
        resources_set_string("RAMCARTfilename", ViceFileSelect(hwnd, 1));
 
579
        return;
 
580
 
 
581
    case IDM_DQBBFILE:
 
582
        resources_set_string("DQBBfilename", ViceFileSelect(hwnd, 1));
 
583
        return;
 
584
 
579
585
    case IDM_DIGIMAXDD00:
580
586
        resources_set_int("DIGIMAXbase", 0xdd00);
581
587
        return;
606
612
    case IDM_PLUS60KD100:
607
613
        resources_set_int("PLUS60Kbase", 0xd100);
608
614
        return;
 
615
 
 
616
    case IDM_PLUS60KFILE:
 
617
        resources_set_string("PLUS60Kfilename", ViceFileSelect(hwnd, 1));
 
618
        return;
 
619
 
 
620
    case IDM_PLUS256KFILE:
 
621
        resources_set_string("PLUS256Kfilename", ViceFileSelect(hwnd, 1));
 
622
        return;
 
623
 
609
624
    case IDM_C64_256K_BASEDE00:
610
625
    case IDM_C64_256K_BASEDE80:
611
626
    case IDM_C64_256K_BASEDF00:
612
627
    case IDM_C64_256K_BASEDF80:
613
628
        resources_set_int("C64_256Kbase", ((idm&3)*80)+0xde00);
614
629
        return;
 
630
 
 
631
    case IDM_C64_256KFILE:
 
632
        resources_set_string("C64_256Kfilename", ViceFileSelect(hwnd, 1));
 
633
        return;
615
634
#endif
616
635
 
617
636
#endif // __X64__ || __X128__
 
637
#ifdef __X64DTV__
 
638
    case IDM_C64DTV_FLASHROM_ATTACH:
 
639
        resources_set_string("c64dtvromfilename", ViceFileSelect(hwnd, 0));
 
640
        return;
 
641
    case IDM_C64DTV_FLASHROM_DETACH:
 
642
        resources_set_string("c64dtvromfilename", "");
 
643
        return;
 
644
    case IDM_C64DTV_FLASHROM_RW:
 
645
        toggle("c64dtvromrw");
 
646
        return;
 
647
    case IDM_DTV2:
 
648
        resources_set_int("DtvRevision", 2);
 
649
        return;
 
650
    case IDM_DTV3:
 
651
        resources_set_int("DtvRevision", 3);
 
652
        return;
 
653
    case IDM_HUMMER_USERPORT_NONE:
 
654
        resources_set_int("HummerUserportDevice", HUMMER_USERPORT_NONE);
 
655
        return;
 
656
    case IDM_HUMMER_USERPORT_ADC:
 
657
        resources_set_int("HummerUserportDevice", HUMMER_USERPORT_ADC);
 
658
        return;
 
659
    case IDM_HUMMER_USERPORT_JOY:
 
660
        resources_set_int("HummerUserportDevice", HUMMER_USERPORT_JOY);
 
661
        return;
 
662
    case IDM_HUMMER_JOY1:
 
663
        resources_set_int("HummerUserportJoyPort", 1);
 
664
        return;
 
665
    case IDM_HUMMER_JOY2:
 
666
        resources_set_int("HummerUserportJoyPort", 2);
 
667
        return;
 
668
#endif
618
669
#ifdef __XPET__
619
670
    case IDM_PETREU:
620
671
        toggle("PETREU");
632
683
    case IDM_PETREU2048:
633
684
        resources_set_int("PETREUSize", 2048);
634
685
        return;
 
686
 
 
687
    case IDM_PETREUFILE:
 
688
        resources_set_string("PETREUfilename", ViceFileSelect(hwnd, 1));
 
689
        return;
635
690
#endif
636
691
#ifdef HAVE_MOUSE
637
692
    case IDM_MOUSE:
698
753
    case IDM_VCACHE:
699
754
#ifdef __XCBM__
700
755
        {
701
 
            long val;
 
756
            int val;
702
757
            resources_get_int("UseVicII", &val);
703
758
            toggle(val?VIDEO_CACHE:"CrtcVideoCache");
704
759
        }
1162
1217
    case IDM_VIEW:
1163
1218
        WinEnableMenuItem(hwnd, IDM_LOGWIN,  hwndLog    !=NULLHANDLE);
1164
1219
        WinEnableMenuItem(hwnd, IDM_MONITOR, hwndMonitor!=NULLHANDLE);
1165
 
#if defined __X64__ || defined __X128__
 
1220
#if defined __X64__ || defined __X128__ || defined __X64DTV__
1166
1221
        resources_get_int(EXTERNAL_PALETTE, &val);
1167
1222
        WinEnableMenuItem(hwnd, IDM_COLOR, !val);
1168
1223
#endif
1176
1231
#endif
1177
1232
        return;
1178
1233
 
1179
 
#if defined __X64__ || defined __X128__ || defined __XVIC__
 
1234
#if defined __X64__ || defined __X128__ || defined __XVIC__ || defined __X64DTV__
1180
1235
        /*
1181
1236
         //
1182
1237
         // A change online is not possible yet.
1265
1320
        resources_get_int("REU", &val);
1266
1321
        WinCheckMenuItem(hwnd,  IDM_REU,     val);
1267
1322
        WinEnableMenuItem(hwnd, IDM_REUSIZE, val);
 
1323
        WinEnableMenuItem(hwnd, IDM_REUFILE, val);
1268
1324
        resources_get_int("GEORAM", &val);
1269
1325
        WinCheckMenuItem(hwnd,  IDM_GEORAM,     val);
1270
1326
        WinEnableMenuItem(hwnd, IDM_GEORAMSIZE, val);
 
1327
        WinEnableMenuItem(hwnd, IDM_GEORAMFILE, val);
1271
1328
        resources_get_int("RAMCART", &val);
1272
1329
        WinCheckMenuItem(hwnd,  IDM_RAMCART,     val);
1273
1330
        WinEnableMenuItem(hwnd, IDM_RAMCARTSIZE, val);
 
1331
        WinEnableMenuItem(hwnd, IDM_RAMCARTFILE, val);
1274
1332
        resources_get_int("DIGIMAX", &val);
1275
1333
        WinCheckMenuItem(hwnd,  IDM_DIGIMAX,     val);
1276
1334
        WinEnableMenuItem(hwnd, IDM_DIGIMAXBASE, val);
1277
1335
#endif
1278
1336
#ifdef __X64__
 
1337
        resources_get_int("DQBB", &val);
 
1338
        WinCheckMenuItem(hwnd,  IDM_DQBB,     val);
 
1339
        WinEnableMenuItem(hwnd, IDM_DQBBFILE, val);
 
1340
        resources_get_int("Isepic", &val);
 
1341
        WinCheckMenuItem(hwnd,  IDM_ISEPIC,     val);
 
1342
        resources_get_int("IsepicSwitch", &val);
 
1343
        WinCheckMenuItem(hwnd,  IDM_ISEPIC_SWITCH,     val);
1279
1344
        resources_get_int("PLUS60K", &val);
1280
1345
        WinCheckMenuItem(hwnd,  IDM_PLUS60K,     val);
1281
1346
        WinEnableMenuItem(hwnd, IDM_PLUS60KBASE, val);
 
1347
        WinEnableMenuItem(hwnd, IDM_PLUS60KFILE, val);
1282
1348
        resources_get_int("PLUS256K", &val);
1283
1349
        WinCheckMenuItem(hwnd,  IDM_PLUS256K,     val);
 
1350
        WinEnableMenuItem(hwnd, IDM_PLUS256KFILE, val);
1284
1351
        resources_get_int("C64_256K", &val);
1285
1352
        WinCheckMenuItem(hwnd,  IDM_C64_256K,     val);
1286
1353
        WinEnableMenuItem(hwnd, IDM_C64_256K_BASE, val);
 
1354
        WinEnableMenuItem(hwnd, IDM_C64_256KFILE,  val);
 
1355
#endif
 
1356
#ifdef __X64DTV__
 
1357
        resources_get_int("c64dtvromrw", &val);
 
1358
        WinCheckMenuItem(hwnd,  IDM_C64DTV_FLASHROM_RW,     val);
1287
1359
#endif
1288
1360
#ifdef __XPET__
1289
1361
        resources_get_int("REU", &val);
1290
 
        WinCheckMenuItem(hwnd,  IDM_REU,     val);
1291
 
        WinEnableMenuItem(hwnd, IDM_REUSIZE, val);
 
1362
        WinCheckMenuItem(hwnd,  IDM_PETREU,     val);
 
1363
        WinEnableMenuItem(hwnd, IDM_PETREUSIZE, val);
 
1364
        WinEnableMenuItem(hwnd, IDM_PETREUFILE, val);
1292
1365
        WinCheckRes(hwnd, IDM_CHARSET,  "Basic1Chars");
1293
1366
        WinCheckRes(hwnd, IDM_EOI,      "EoiBlank");
1294
1367
        WinCheckRes(hwnd, IDM_ROMPATCH, "Basic1");
1352
1425
        return;
1353
1426
#endif
1354
1427
 
 
1428
#ifdef __X64DTV__
 
1429
    case IDM_C64DTV_REVISION:
 
1430
        resources_get_int("DtvRevision", &val);
 
1431
        WinCheckMenuItem(hwnd, IDM_DTV2,   val==2);
 
1432
        WinCheckMenuItem(hwnd, IDM_DTV3,   val==3);
 
1433
        return;
 
1434
    case IDM_C64DTV_HUMMER_MAPPED_JOY:
 
1435
        resources_get_int("HummerUserportJoyPort", &val);
 
1436
        WinCheckMenuItem(hwnd, IDM_HUMMER_JOY1,   val==1);
 
1437
        WinCheckMenuItem(hwnd, IDM_HUMMER_JOY2,   val==2);
 
1438
        return;
 
1439
    case IDM_HUMMER_USERPORT_DEVICE:
 
1440
        resources_get_int("HummerUserportDevice", &val);
 
1441
        WinCheckMenuItem(hwnd, IDM_HUMMER_USERPORT_NONE, val==HUMMER_USERPORT_NONE);
 
1442
        WinCheckMenuItem(hwnd, IDM_HUMMER_USERPORT_ADC,  val==HUMMER_USERPORT_ADC);
 
1443
        WinCheckMenuItem(hwnd, IDM_HUMMER_USERPORT_JOY,  val==HUMMER_USERPORT_JOY);
 
1444
        return;
 
1445
#endif
 
1446
 
1355
1447
#if defined __X64__ || defined __X128__
1356
1448
    case IDM_REUSIZE:
1357
1449
        resources_get_int("REUSize", &val);
1490
1582
        }
1491
1583
        return;
1492
1584
#endif // HAVE_RESID
1493
 
#if defined __X64__ || defined __X128__ || defined __XCBM__
 
1585
#if defined __X64__ || defined __X128__ || defined __XCBM__ || defined __X64DTV__
1494
1586
    case IDM_SIDCHIP:
1495
1587
        resources_get_int("SidModel", &val);
1496
1588
        WinCheckMenuItem(hwnd, IDM_SC6581,   val==0);
1568
1660
        int val1, val2;
1569
1661
 
1570
1662
        resources_get_int("PALEmulation", &val1);
1571
 
        resources_get_int("PALMode",      &val2);
1572
1663
 
1573
1664
        WinCheckMenuItem(hwnd, IDM_PALOFF,  !val1);
1574
 
#ifndef HAVE_TED
1575
 
        WinCheckMenuItem(hwnd, IDM_PALFAST, val1 && val2==VIDEO_RESOURCE_PAL_MODE_FAST);
1576
 
#endif
1577
 
        WinCheckMenuItem(hwnd, IDM_PALON,   val1 && val2==VIDEO_RESOURCE_PAL_MODE_TRUE);
1578
1665
    }
1579
1666
    return;
1580
1667
#endif