Previous 15994 Revisions Next

r1826 Sunday 2nd March, 2008 at 15:35:01 UTC by Nathan Woods
Removed MESS_DEVINFO_INT_NOT_WORKING
[src/mess]device.c device.h
[src/mess/drivers]apple2gs.c primo.c
[src/mess/machine]apple2.c
[src/mess/osd/windows]menu.c

src/mess/device.c
r1825r1826
266266         devices[i].reset_on_load      = mess_device_get_info_int(&devices[i].devclass, MESS_DEVINFO_INT_RESET_ON_LOAD) ? 1 : 0;
267267         devices[i].must_be_loaded      = mess_device_get_info_int(&devices[i].devclass, MESS_DEVINFO_INT_MUST_BE_LOADED) ? 1 : 0;
268268         devices[i].load_at_init         = mess_device_get_info_int(&devices[i].devclass, MESS_DEVINFO_INT_LOAD_AT_INIT) ? 1 : 0;
269         devices[i].not_working         = mess_device_get_info_int(&devices[i].devclass, MESS_DEVINFO_INT_NOT_WORKING) ? 1 : 0;
270269
271270         devices[i].init               = (device_init_handler) mess_device_get_info_fct(&devices[i].devclass, MESS_DEVINFO_PTR_INIT);
272271         devices[i].exit               = (device_exit_handler) mess_device_get_info_fct(&devices[i].devclass, MESS_DEVINFO_PTR_EXIT);
src/mess/device.h
r1825r1826
3636   MESS_DEVINFO_INT_MUST_BE_LOADED,
3737   MESS_DEVINFO_INT_RESET_ON_LOAD,
3838   MESS_DEVINFO_INT_LOAD_AT_INIT,
39   MESS_DEVINFO_INT_NOT_WORKING,
4039   MESS_DEVINFO_INT_CREATE_OPTCOUNT,
4140
4241   MESS_DEVINFO_INT_DEV_SPECIFIC = 0x08000,               /* R/W: Device-specific values start here */
r1825r1826
248247   unsigned int reset_on_load : 1;
249248   unsigned int must_be_loaded : 1;
250249   unsigned int load_at_init : 1;
251   unsigned int not_working : 1;
252250
253251   /* image handling callbacks */
254252   device_init_handler init;
src/mess/osd/windows/menu.c
r1825r1826
13511351      {
13521352         img = image_from_device_and_index(dev, i);
13531353
1354         if (!dev->not_working)
1355         {
1356            new_item = ID_DEVICE_0 + (image_absolute_index(img) * DEVOPTION_MAX);
1357            flags_for_exists = MF_STRING;
1354         new_item = ID_DEVICE_0 + (image_absolute_index(img) * DEVOPTION_MAX);
1355         flags_for_exists = MF_STRING;
13581356
1359            if (!image_exists(img))
1360               flags_for_exists |= MF_GRAYED;
1357         if (!image_exists(img))
1358            flags_for_exists |= MF_GRAYED;
13611359
1362            flags_for_writing = flags_for_exists;
1363            if (!image_is_writable(img))
1364               flags_for_writing |= MF_GRAYED;
1360         flags_for_writing = flags_for_exists;
1361         if (!image_is_writable(img))
1362            flags_for_writing |= MF_GRAYED;
13651363
1366            sub_menu = CreateMenu();
1367            append_menu_uistring(sub_menu, MF_STRING,      new_item + DEVOPTION_OPEN,      UI_mount);
1364         sub_menu = CreateMenu();
1365         append_menu_uistring(sub_menu, MF_STRING,      new_item + DEVOPTION_OPEN,      UI_mount);
13681366
1369            if (dev->creatable)
1370               append_menu_uistring(sub_menu, MF_STRING,   new_item + DEVOPTION_CREATE,   UI_create);
1367         if (dev->creatable)
1368            append_menu_uistring(sub_menu, MF_STRING,   new_item + DEVOPTION_CREATE,   UI_create);
13711369
1372            append_menu_uistring(sub_menu, flags_for_exists,   new_item + DEVOPTION_CLOSE,   UI_unmount);
1370         append_menu_uistring(sub_menu, flags_for_exists,   new_item + DEVOPTION_CLOSE,   UI_unmount);
13731371
13741372#if HAS_WAVE
1375            if ((dev->type == IO_CASSETTE) && !strcmp(dev->file_extensions, "wav"))
1376            {
1377               cassette_state state;
1378               state = image_exists(img) ? (cassette_get_state(img) & CASSETTE_MASK_UISTATE) : CASSETTE_STOPPED;
1379               append_menu_uistring(sub_menu, MF_SEPARATOR, 0, -1);
1380               append_menu_uistring(sub_menu, flags_for_exists   | ((state == CASSETTE_STOPPED)   ? MF_CHECKED : 0),   new_item + DEVOPTION_CASSETTE_STOPPAUSE,   UI_pauseorstop);
1381               append_menu_uistring(sub_menu, flags_for_exists   | ((state == CASSETTE_PLAY)      ? MF_CHECKED : 0),   new_item + DEVOPTION_CASSETTE_PLAY,         UI_play);
1382               append_menu_uistring(sub_menu, flags_for_writing   | ((state == CASSETTE_RECORD)   ? MF_CHECKED : 0),   new_item + DEVOPTION_CASSETTE_RECORD,      UI_record);
1373         if ((dev->type == IO_CASSETTE) && !strcmp(dev->file_extensions, "wav"))
1374         {
1375            cassette_state state;
1376            state = image_exists(img) ? (cassette_get_state(img) & CASSETTE_MASK_UISTATE) : CASSETTE_STOPPED;
1377            append_menu_uistring(sub_menu, MF_SEPARATOR, 0, -1);
1378            append_menu_uistring(sub_menu, flags_for_exists   | ((state == CASSETTE_STOPPED)   ? MF_CHECKED : 0),   new_item + DEVOPTION_CASSETTE_STOPPAUSE,   UI_pauseorstop);
1379            append_menu_uistring(sub_menu, flags_for_exists   | ((state == CASSETTE_PLAY)      ? MF_CHECKED : 0),   new_item + DEVOPTION_CASSETTE_PLAY,         UI_play);
1380            append_menu_uistring(sub_menu, flags_for_writing   | ((state == CASSETTE_RECORD)   ? MF_CHECKED : 0),   new_item + DEVOPTION_CASSETTE_RECORD,      UI_record);
13831381#if USE_TAPEDLG
1384               append_menu_uistring(sub_menu, flags_for_exists,                                          new_item + DEVOPTION_CASSETTE_DIALOG,      UI_tapecontrol);
1382            append_menu_uistring(sub_menu, flags_for_exists,                                          new_item + DEVOPTION_CASSETTE_DIALOG,      UI_tapecontrol);
13851383#else
1386               append_menu_uistring(sub_menu, flags_for_exists,                                          new_item + DEVOPTION_CASSETTE_REWIND,      UI_rewind);
1387               append_menu_uistring(sub_menu, flags_for_exists,                                          new_item + DEVOPTION_CASSETTE_FASTFORWARD,   UI_fastforward);
1384            append_menu_uistring(sub_menu, flags_for_exists,                                          new_item + DEVOPTION_CASSETTE_REWIND,      UI_rewind);
1385            append_menu_uistring(sub_menu, flags_for_exists,                                          new_item + DEVOPTION_CASSETTE_FASTFORWARD,   UI_fastforward);
13881386#endif
1389            }
1390#endif /* HAS_WAVE */
1391            s = image_exists(img) ? image_filename(img) : ui_getstring(UI_emptyslot);
1392            flags = MF_POPUP;
13931387         }
1394         else
1395         {
1396            sub_menu = NULL;
1397            s = "Not working";
1398            flags = MF_DISABLED | MF_GRAYED;
1399         }
1388#endif /* HAS_WAVE */
1389         s = image_exists(img) ? image_filename(img) : ui_getstring(UI_emptyslot);
1390         flags = MF_POPUP;
14001391
14011392         snprintf(buf, sizeof(buf) / sizeof(buf[0]), "%s: %s", image_typename_id(img), s);
14021393         append_menu_utf8(device_menu, flags, (UINT_PTR) sub_menu, buf);
src/mess/machine/apple2.c
r1825r1826
14441444   for (dev = Machine->devices; dev->type < IO_COUNT; dev++)
14451445   {
14461446      if (!strcmp(dev->tag, "sonydriv"))
1447         apple2_fdc_has_35 = !dev->not_working;
1447         apple2_fdc_has_35 = 1;
14481448      else if (!strcmp(dev->tag, "apple525driv"))
1449         apple2_fdc_has_525 = !dev->not_working;
1449         apple2_fdc_has_525 = 1;
14501450   }
14511451
14521452   applefdc_init(&intf);
src/mess/drivers/apple2gs.c
r1825r1826
241241   switch(state)
242242   {
243243      /* --- the following bits of info are returned as 64-bit signed integers --- */
244      case MESS_DEVINFO_INT_NOT_WORKING:               /* info->i = 1; */ break;
245244      case MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVIDEND:   info->i = 15; break;
246245      case MESS_DEVINFO_INT_APPLE525_SPINFRACT_DIVISOR:   info->i = 16; break;
247246
src/mess/drivers/primo.c
r1825r1826
408408   }
409409}
410410
411#ifdef UNUSED_FUNCTION
411412static void primo_floppy_getinfo(const device_class *devclass, UINT32 state, union devinfo *info)
412413{
413414   /* snapshot */
414415   switch(state)
415416   {
416      /* --- the following bits of info are returned as 64-bit signed integers --- */
417      case MESS_DEVINFO_INT_NOT_WORKING:               info->i = 1; break;
418
419417      default:                              cbmfloppy_device_getinfo(devclass, state, info); break;
420418   }
421419}
420#endif /* UNUSED_FUNCTION */
422421
423422SYSTEM_CONFIG_START( primoa )
424423   CONFIG_DEVICE(primo_cassette_getinfo)
r1825r1826
429428
430429SYSTEM_CONFIG_START( primob )
431430   CONFIG_IMPORT_FROM( primoa )
432   CONFIG_DEVICE(primo_floppy_getinfo)
431   //CONFIG_DEVICE(primo_floppy_getinfo)
433432SYSTEM_CONFIG_END
434433
435434/*     YEAR  NAME      PARENT    COMPAT MACHINE   INPUT  INIT     CONFIG COMPANY  FULLNAME */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team