Previous 15994 Revisions Next

r11248 Tuesday 19th April, 2011 at 18:08:12 UTC by Miodrag Milanović
Source cleanup (no whatsnew)
[src/mess]hashfile.c mess.lst mess.mak tiny.lst
[src/mess/drivers]68ksbc.c a5105.c a6809.c a7800.c abc1600.c ami1200.c apple1.c applix.c argo.c at.c atarist.c c128.c c16.c cbmb.c compis.c cosmicos.c dgn_beta.c einstein.c eti660.c fidelz80.c fmtowns.c gb.c gba.c genpc.c glasgow.c homelab.c homez80.c hp9k.c ibmpc.c kaypro.c kc.c lc80.c lcmate2.c lisa.c m20.c mac.c mc1000.c mephisto.c mikrosha.c mirage.c multi8.c mycom.c mz2000.c mz700.c nc.c nes.c next.c pasopia.c pc.c pc6001.c pc8001.c pc8401a.c pc8801.c pc88va.c pc9801.c pce.c pcw.c pdp11.c pegasus.c pes.c pet.c pocketc.c pockstat.c polgar.c prof80.c px8.c ql.c qx10.c sacstate.c scorpion.c smc777.c sms.c special.c supercon.c terak.c tmc1800.c trs80m2.c tsispch.c tx0.c v1050.c votrtnt.c x1.c
[src/mess/formats]ap_dsk35.c d88_dsk.c timex_dck.c
[src/mess/includes]abc1600.h beta.h c80.h cgc7900.h compis.h cosmicos.h e01.h eti660.h genpc.h jtc.h lc80.h mc1000.h mpf1.h mz700.h newbrain.h pc8001.h pc8401a.h pes.h poly880.h px8.h ql.h tmc1800.h tmc2000e.h trs80m2.h tsispch.h
[src/mess/machine]64h156.c 6525tpi.c 8530scc.c a7800.c abc77.c abc830.c abc99.c abc99.h abcbus.c abcbus.h amigafdc.c apple2gs.c at_keybc.c at_keybc.h ataricrt.c ay3600.c c128.c c1541.c c1551.c c1551.h c1571.c c1581.c c1581.h c2040.c c64.c coco.c comx35.c comxpl80.c cs4031.c cs4031.h cybiko.c genpc.c hp48.c isa.c isa.h isa_adlib.c isa_adlib.h isa_com.c isa_com.h isa_fdc.c isa_fdc.h isa_gblaster.c isa_gblaster.h isa_hdc.c isa_hdc.h isa_sblaster.c isa_sblaster.h kb3600.c lux10828.c lux10828.h lux21046.c lux21046.h lynx.c mbee.c mboard.c mpc105.c mpc105.h msx_slot.c nes.c psxcard.c psxcd.c psxcd.h psxcddrv.c psxcddrv.h s1410.c tf20.c upd765.c vic1112.c vic1112.h wd17xx.c
[src/mess/machine/ti99]hsgpl.c
[src/mess/video]abc1600.c cirrus.c cirrus.h gba.c ibm_vga.c ibm_vga.h isa_mda.c isa_mda.h pc8401a.c pc_aga.c pc_cga.c pc_t1t.c pc_vga_mess.c pcw.c poly88.c upd7220.c
[src/osd/winui]columnedit.c datafile.c datamap.c dialogs.c dijoystick.c directdraw.c directinput.c directories.c dirwatch.c dxdecode.c help.c history.c layout.c messui.c mui_audit.c mui_opts.c mui_util.c picker.c properties.c screenshot.c softwarepicker.c splitters.c swconfig.c treeview.c winui.c winui.mak

src/osd/winui/history.c
r11247r11248
1010  that you have read the license and understand and accept it fully.
1111
1212 ***************************************************************************/
13
13
1414/***************************************************************************
1515
1616  history.c
src/osd/winui/messui.c
r11247r11248
333333            hIcon = LoadIconFromFile(buffer);
334334            if (hIcon)
335335               break;
336           
336
337337            int cl = driver_list::clone(*drv);
338338            if (cl!=-1) drv = &driver_list::driver(cl); else drv = NULL;
339339         }
src/osd/winui/datamap.c
r11247r11248
708708
709709      case CT_TRACKBAR:
710710         // do we need to set the trackbar options?
711/*         if (!entry->use_trackbar_options)
712         {
713            switch(options_get_range_type(opts, option_name))
714            {
715               case OPTION_RANGE_NONE:
716                  // do nothing
717                  break;
711/*          if (!entry->use_trackbar_options)
712            {
713                switch(options_get_range_type(opts, option_name))
714                {
715                    case OPTION_RANGE_NONE:
716                        // do nothing
717                        break;
718718
719               case OPTION_RANGE_INT:
720                  options_get_range_int(opts, option_name, &minval_int, &maxval_int);
721                  entry->use_trackbar_options = TRUE;
722                  entry->trackbar_min = minval_int;
723                  entry->trackbar_max = maxval_int;
724                  entry->trackbar_increments = 1;
725                  break;
719                    case OPTION_RANGE_INT:
720                        options_get_range_int(opts, option_name, &minval_int, &maxval_int);
721                        entry->use_trackbar_options = TRUE;
722                        entry->trackbar_min = minval_int;
723                        entry->trackbar_max = maxval_int;
724                        entry->trackbar_increments = 1;
725                        break;
726726
727               case OPTION_RANGE_FLOAT:
728                  options_get_range_float(opts, option_name, &minval_float, &maxval_float);
729                  entry->use_trackbar_options = TRUE;
730                  entry->trackbar_min = minval_float;
731                  entry->trackbar_max = maxval_float;
732                  entry->trackbar_increments = (float)0.05;
733                  break;
734            }
735         }
736      */
727                    case OPTION_RANGE_FLOAT:
728                        options_get_range_float(opts, option_name, &minval_float, &maxval_float);
729                        entry->use_trackbar_options = TRUE;
730                        entry->trackbar_min = minval_float;
731                        entry->trackbar_max = maxval_float;
732                        entry->trackbar_increments = (float)0.05;
733                        break;
734                }
735            }
736        */
737737
738738         // do we specify default options for this control?  if so, we need to specify
739739         // the range
src/osd/winui/dijoystick.c
r11247r11248
5050    External variables
5151 ***************************************************************************/
5252
53const struct OSDJoystick  DIJoystick =
53const struct OSDJoystick  DIJoystick =
5454{
5555   DIJoystick_init,                /* init              */
5656   DIJoystick_exit,                /* exit              */
r11247r11248
122122static const GUID guidNULL = {0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}};
123123
124124/***************************************************************************
125    External OSD functions 
125    External OSD functions
126126 ***************************************************************************/
127127/*
128    put here anything you need to do when the program is started. Return 0 if
128    put here anything you need to do when the program is started. Return 0 if
129129    initialization was successful, nonzero otherwise.
130130*/
131131static int DIJoystick_init(void)
r11247r11248
167167      /*ErrorMsg("DirectInput EnumDevices didn't find any joysticks");*/
168168      return 0;
169169   }
170   
170
171171   return 0;
172172}
173173
174174/*
175   put here cleanup routines to be executed when the program is terminated.
175    put here cleanup routines to be executed when the program is terminated.
176176*/
177177static void DIJoystick_exit(void)
178178{
r11247r11248
185185
186186   for (i = 0; i < This.num_joysticks; i++)
187187      ExitJoystick(&This.joysticks[i]);
188   
188
189189   This.num_joysticks = 0;
190190}
191191
r11247r11248
193193{
194194   HRESULT hr;
195195   DWORD   i;
196   
196
197197   This.m_bCoinSlot = 0;
198198
199199   for (i = 0; i < This.num_joysticks; i++)
r11247r11248
224224}
225225
226226/*
227   check if the DIJoystick is moved in the specified direction, defined in
228   osdepend.h. Return 0 if it is not pressed, nonzero otherwise.
227    check if the DIJoystick is moved in the specified direction, defined in
228    osdepend.h. Return 0 if it is not pressed, nonzero otherwise.
229229*/
230230
231231static int DIJoystick_is_joy_pressed(int joycode)
r11247r11248
246246   if (joy_num == 0 || This.num_joysticks < joy_num)
247247      return 0;
248248   joy_num--;
249   
249
250250   if (This.joysticks[joy_num].use_joystick == FALSE)
251251      return 0;
252252
r11247r11248
305305   }
306306
307307   /* sticks */
308   
308
309309   axis = GET_JOYCODE_AXIS(joycode);
310310   dir  = GET_JOYCODE_DIR(joycode);
311   
311
312312   if (axis == 0 || This.joysticks[joy_num].num_axes < axis)
313313      return 0;
314314   axis--;
r11247r11248
404404}
405405
406406/***************************************************************************
407   Internal functions
407    Internal functions
408408 ***************************************************************************/
409409
410410BOOL CALLBACK DIJoystick_EnumDeviceProc(LPDIDEVICEINSTANCE pdidi, LPVOID pv)
r11247r11248
461461             DirectXDecodeError(hr));
462462   }
463463#endif
464   
464
465465   /* Set axis dead zone to 0; we need accurate #'s for analog joystick reading. */
466466
467467   hr = SetDIDwordProperty(joystick->did, DIPROP_DEADZONE, lpddoi->dwOfs, DIPH_BYOFFSET, 0);
r11247r11248
533533      ErrorMsg("DirectInput CreateDevice() joystick failed: %s\n", DirectXDecodeError(hr));
534534      return;
535535   }
536   
536
537537   /* get a did2 interface to work with polling (most) joysticks */
538538   hr = IDirectInputDevice_QueryInterface(didTemp,
539539                                 IID_IDirectInputDevice2,
r11247r11248
551551      return;
552552   }
553553
554   
554
555555   hr = IDirectInputDevice2_SetCooperativeLevel(joystick->did, GetMainWindow(),
556556                                     DISCL_NONEXCLUSIVE | DISCL_BACKGROUND);
557557   if (FAILED(hr))
r11247r11248
622622   }
623623
624624   hr = IDirectInputDevice2_Acquire(joystick->did);
625   if (FAILED(hr))
625   if (FAILED(hr))
626626   {
627627      ErrorMsg("DirectInputDevice Acquire joystick failed!\n");
628628      return;
r11247r11248
638638static void ExitJoystick(joystick_type *joystick)
639639{
640640   DWORD i;
641   
641
642642   if (joystick->did != NULL)
643643   {
644644      IDirectInputDevice_Unacquire(joystick->did);
645645      IDirectInputDevice_Release(joystick->did);
646646      joystick->did = NULL;
647647   }
648   
648
649649   for (i = 0; i < joystick->num_axes; i++)
650650   {
651651      if (joystick->axes[i].name)
652652         free(joystick->axes[i].name);
653653      joystick->axes[i].name = NULL;
654654   }
655   
655
656656   if (joystick->name != NULL)
657657   {
658658      free(joystick->name);
src/osd/winui/directories.c
r11247r11248
135135}
136136
137137/***************************************************************************
138   Internal function definitions
138    Internal function definitions
139139 ***************************************************************************/
140140
141141static BOOL IsMultiDir(int nType)
r11247r11248
196196static TCHAR * FixSlash(TCHAR *s)
197197{
198198   int len = 0;
199   
199
200200   if (s)
201201      len = _tcslen(s);
202202
r11247r11248
249249static void Directories_OnSelChange(HWND hDlg)
250250{
251251   UpdateDirectoryList(hDlg);
252   
252
253253   if (ComboBox_GetCurSel(GetDlgItem(hDlg, IDC_DIR_COMBO)) == 0
254254   ||   ComboBox_GetCurSel(GetDlgItem(hDlg, IDC_DIR_COMBO)) == 1)
255255   {
r11247r11248
302302   memset(&LVCol, 0, sizeof(LVCOLUMN));
303303   LVCol.mask     = LVCF_WIDTH;
304304   LVCol.cx     = rectClient.right - rectClient.left - GetSystemMetrics(SM_CXHSCROLL);
305   
305
306306   res = ListView_InsertColumn(GetDlgItem(hDlg, IDC_DIR_LIST), 0, &LVCol);
307307
308308   /* Keep a temporary copy of the directory strings in g_pDirInfo. */
r11247r11248
494494      /* Last item is placeholder for append */
495495      if (nItem == ListView_GetItemCount(hList) - 1)
496496      {
497         Directories_OnInsert(hDlg);
497         Directories_OnInsert(hDlg);
498498         return;
499499      }
500500   }
r11247r11248
541541   }
542542
543543   UpdateDirectoryList(hDlg);
544   
545544
545
546546   nCount = ListView_GetItemCount(hList);
547547   if (nCount <= 1)
548548      return;
r11247r11248
710710
711711/**************************************************************************
712712
713   Use the shell to select a Directory.
713    Use the shell to select a Directory.
714714
715715 **************************************************************************/
716716
717717static int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
718718{
719719   /*
720      Called just after the dialog is initialized
721      Select the dir passed in BROWSEINFO.lParam
722   */
720        Called just after the dialog is initialized
721        Select the dir passed in BROWSEINFO.lParam
722    */
723723   if (uMsg == BFFM_INITIALIZED)
724724   {
725725      if ((const char*)lpData != NULL)
r11247r11248
729729   return 0;
730730}
731731
732BOOL BrowseForDirectory(HWND hwnd, LPCTSTR pStartDir, TCHAR* pResult)
732BOOL BrowseForDirectory(HWND hwnd, LPCTSTR pStartDir, TCHAR* pResult)
733733{
734734   BOOL      bResult = FALSE;
735735   IMalloc*   piMalloc = 0;
736736   BROWSEINFO   Info;
737737   LPITEMIDLIST pItemIDList = NULL;
738738   TCHAR      buf[MAX_PATH];
739   
739
740740   if (!SUCCEEDED(SHGetMalloc(&piMalloc)))
741741      return FALSE;
742742
src/osd/winui/screenshot.c
r11247r11248
1414/***************************************************************************
1515
1616  Screenshot.c
17 
17
1818    Win32 DIB handling.
19   
19
2020      Created 7/1/98 by Mike Haaland (mhaaland@hypertech.com)
21     
21
2222***************************************************************************/
2323
2424// standard windows headers
r11247r11248
145145      HDC hdc = GetDC(GetMainWindow());
146146      m_hDDB = DIBToDDB(hdc, m_hDIB, NULL);
147147      ReleaseDC(GetMainWindow(),hdc);
148     
148
149149      current_image_game = nGame;
150150      current_image_type = nType;
151151
r11247r11248
198198   new_filename = (char*)malloc(strlen(filename) + 1);
199199   if (!new_filename)
200200      return NULL;
201   
201
202202   // change all backslashes to forward slashes
203203   for (i = 0; filename[i]; i++)
204204      new_filename[i] = (filename[i] != '\\') ? filename[i] : '/';
r11247r11248
365365   nColors = lpbi->biClrUsed ? lpbi->biClrUsed : 1 << lpbi->biBitCount;
366366
367367   if (bmInfo->bmiHeader.biBitCount > 8)
368      lpDIBBits = (LPVOID)((LPDWORD)(bmInfo->bmiColors +
369         bmInfo->bmiHeader.biClrUsed) +
368      lpDIBBits = (LPVOID)((LPDWORD)(bmInfo->bmiColors +
369         bmInfo->bmiHeader.biClrUsed) +
370370         ((bmInfo->bmiHeader.biCompression == BI_BITFIELDS) ? 3 : 0));
371371   else
372372      lpDIBBits = (LPVOID)(bmInfo->bmiColors + nColors);
r11247r11248
380380   }
381381
382382   hBM = CreateDIBitmap(hDC,                 /* handle to device context */
383                  (LPBITMAPINFOHEADER)lpbi, /* pointer to bitmap info header   */
383                  (LPBITMAPINFOHEADER)lpbi, /* pointer to bitmap info header  */
384384                  (LONG)CBM_INIT,         /* initialization flag */
385385                  lpDIBBits,              /* pointer to initialization data  */
386386                  (LPBITMAPINFO)lpbi,      /* pointer to bitmap info */
r11247r11248
419419   pixel_ptr = 0;
420420   row      = p->height - 1;
421421   lineWidth = p->width;
422   
422
423423   if (p->color_type != 2 && p->num_palette <= 256)
424424      nColors =  p->num_palette;
425425
426   bi.biSize         = sizeof(BITMAPINFOHEADER);
426   bi.biSize         = sizeof(BITMAPINFOHEADER);
427427   bi.biWidth         = p->width;
428428   bi.biHeight       = p->height;
429429   bi.biPlanes       = 1;
430430   bi.biBitCount      = (p->color_type == 3) ? 8 : 24; /* bit_depth; */
431   
432   bi.biCompression   = BI_RGB;
433   bi.biSizeImage      = 0;
434   bi.biXPelsPerMeter   = 0;
435   bi.biYPelsPerMeter   = 0;
431
432   bi.biCompression   = BI_RGB;
433   bi.biSizeImage      = 0;
434   bi.biXPelsPerMeter   = 0;
435   bi.biYPelsPerMeter   = 0;
436436   bi.biClrUsed      = nColors;
437437   bi.biClrImportant   = nColors;
438   
438
439439   effWidth = (long)(((long)lineWidth*bi.biBitCount + 31) / 32) * 4;
440   
440
441441   dibSize = (effWidth * bi.biHeight);
442442   hDIB = GlobalAlloc(GMEM_FIXED, bi.biSize + (nColors * sizeof(RGBQUAD)) + dibSize);
443   
443
444444   if (!hDIB)
445445   {
446446      return FALSE;
r11247r11248
454454   {
455455      int i;
456456      /*
457        Convert a PNG palette (3 byte RGBTRIPLEs) to a new
458        color table (4 byte RGBQUADs)
459      */
457          Convert a PNG palette (3 byte RGBTRIPLEs) to a new
458          color table (4 byte RGBQUADs)
459        */
460460      for (i = 0; i < nColors; i++)
461461      {
462462         RGBQUAD rgb;
463         
463
464464         rgb.rgbRed      = p->palette[i * 3 + 0];
465465         rgb.rgbGreen   = p->palette[i * 3 + 1];
466466         rgb.rgbBlue    = p->palette[i * 3 + 2];
467467         rgb.rgbReserved = (BYTE)0;
468         
469         pRgb[i] = rgb;
470      }
471   }
472   
468
469         pRgb[i] = rgb;
470      }
471   }
472
473473   bmInfo = (LPBITMAPINFO)hDIB;
474   
474
475475   /* Create a halftone palette if colors > 256. */
476476   if (0 == nColors || nColors > 256)
477477   {
r11247r11248
484484      UINT nSize = sizeof(LOGPALETTE) + (sizeof(PALETTEENTRY) * nColors);
485485      LOGPALETTE *pLP = (LOGPALETTE *)malloc(nSize);
486486      int  i;
487     
487
488488      pLP->palVersion    = 0x300;
489489      pLP->palNumEntries   = nColors;
490     
490
491491      for (i = 0; i < nColors; i++)
492492      {
493493         pLP->palPalEntry[i].peRed   = bmInfo->bmiColors[i].rgbRed;
494         pLP->palPalEntry[i].peGreen = bmInfo->bmiColors[i].rgbGreen;
494         pLP->palPalEntry[i].peGreen = bmInfo->bmiColors[i].rgbGreen;
495495         pLP->palPalEntry[i].peBlue   = bmInfo->bmiColors[i].rgbBlue;
496496         pLP->palPalEntry[i].peFlags = 0;
497497      }
498     
498
499499      *pPal = CreatePalette(pLP);
500     
500
501501      free (pLP);
502502   }
503   
503
504504   copy_size = dibSize;
505505   pixel_ptr = (char*)lpDIBBits;
506506   *phDIB = hDIB;
r11247r11248
513513   png_info p;
514514   UINT32 i;
515515   int bytespp;
516   
516
517517   if (png_read_file((core_file*)mfile, &p) != PNGERR_NONE)
518518      return 0;
519519
r11247r11248
529529      png_free(&p);
530530      return 0;
531531   }
532
532
533533   /* Convert < 8 bit to 8 bit */
534534   png_expand_buffer_8bit(&p);
535   
535
536536   if (!AllocatePNG(&p, phDIB, pPAL))
537537   {
538538      logerror("Unable to allocate memory for artwork\n");
r11247r11248
558558            ptr[2] = bTmp;
559559            ptr += 3;
560560         }
561      }   
561      }
562562      store_pixels(p.image + i * (p.width * bytespp), p.width * bytespp);
563563   }
564564
src/osd/winui/mui_opts.c
r11247r11248
294294   { MUIOPTION_OFFSET_CLONES,            "0",        OPTION_BOOLEAN,    NULL },
295295   { MUIOPTION_STRETCH_SCREENSHOT_LARGER,   "0",        OPTION_BOOLEAN,    NULL },
296296   { MUIOPTION_CYCLE_SCREENSHOT,         "0",        OPTION_INTEGER,                 NULL },
297    { MUIOPTION_SCREENSHOT_BORDER_SIZE,      "11",       OPTION_INTEGER,                 NULL },
298    { MUIOPTION_SCREENSHOT_BORDER_COLOR,   "-1",       OPTION_INTEGER,                 NULL },
297   { MUIOPTION_SCREENSHOT_BORDER_SIZE,      "11",       OPTION_INTEGER,                 NULL },
298   { MUIOPTION_SCREENSHOT_BORDER_COLOR,   "-1",       OPTION_INTEGER,                 NULL },
299299   { MUIOPTION_EXEC_COMMAND,            "",         OPTION_STRING,                 NULL },
300300   { MUIOPTION_EXEC_WAIT,               "0",        OPTION_INTEGER,                 NULL },
301301
r11247r11248
316316   { MUIOPTION_MAMEINFO_FILE,            MUIMAMEINFO_FILE, OPTION_STRING,             NULL },
317317
318318   { NULL,                           NULL,       OPTION_HEADER,     "NAVIGATION KEY CODES" },
319   { MUIOPTION_UI_KEY_UP,               "KEYCODE_UP",                   OPTION_STRING,          NULL },
319   { MUIOPTION_UI_KEY_UP,               "KEYCODE_UP",                  OPTION_STRING,          NULL },
320320   { MUIOPTION_UI_KEY_DOWN,            "KEYCODE_DOWN",                OPTION_STRING,          NULL },
321321   { MUIOPTION_UI_KEY_LEFT,            "KEYCODE_LEFT",                OPTION_STRING,          NULL },
322   { MUIOPTION_UI_KEY_RIGHT,            "KEYCODE_RIGHT",                OPTION_STRING,          NULL },
323   { MUIOPTION_UI_KEY_START,            "KEYCODE_ENTER NOT KEYCODE_LALT",   OPTION_STRING,          NULL },
322   { MUIOPTION_UI_KEY_RIGHT,            "KEYCODE_RIGHT",               OPTION_STRING,          NULL },
323   { MUIOPTION_UI_KEY_START,            "KEYCODE_ENTER NOT KEYCODE_LALT",   OPTION_STRING,         NULL },
324324   { MUIOPTION_UI_KEY_PGUP,            "KEYCODE_PGUP",                OPTION_STRING,          NULL },
325325   { MUIOPTION_UI_KEY_PGDWN,            "KEYCODE_PGDN",                OPTION_STRING,          NULL },
326326   { MUIOPTION_UI_KEY_HOME,            "KEYCODE_HOME",                OPTION_STRING,          NULL },
327   { MUIOPTION_UI_KEY_END,               "KEYCODE_END",                   OPTION_STRING,          NULL },
328   { MUIOPTION_UI_KEY_SS_CHANGE,         "KEYCODE_INSERT",                OPTION_STRING,          NULL },
329   { MUIOPTION_UI_KEY_HISTORY_UP,         "KEYCODE_DEL",                   OPTION_STRING,          NULL },
330   { MUIOPTION_UI_KEY_HISTORY_DOWN,      "KEYCODE_LALT KEYCODE_0",          OPTION_STRING,         NULL },
327   { MUIOPTION_UI_KEY_END,               "KEYCODE_END",                  OPTION_STRING,          NULL },
328   { MUIOPTION_UI_KEY_SS_CHANGE,         "KEYCODE_INSERT",               OPTION_STRING,          NULL },
329   { MUIOPTION_UI_KEY_HISTORY_UP,         "KEYCODE_DEL",                  OPTION_STRING,          NULL },
330   { MUIOPTION_UI_KEY_HISTORY_DOWN,      "KEYCODE_LALT KEYCODE_0",         OPTION_STRING,        NULL },
331331
332332   { MUIOPTION_UI_KEY_CONTEXT_FILTERS,      "KEYCODE_LCONTROL KEYCODE_F", OPTION_STRING, NULL },
333333   { MUIOPTION_UI_KEY_SELECT_RANDOM,      "KEYCODE_LCONTROL KEYCODE_R", OPTION_STRING, NULL },
r11247r11248
431431
432432/*static void memory_error(const char *message)
433433{
434   win_message_box_utf8(NULL, message, NULL, MB_OK);
435   exit(-1);
434    win_message_box_utf8(NULL, message, NULL, MB_OK);
435    exit(-1);
436436}
437437*/
438438/*
439439
440440void AddOptions(winui_options *opts, const options_entry *entrylist, BOOL is_global)
441441{
442   static const char *blacklist[] =
443   {
444      WINOPTION_SCREEN,
445      WINOPTION_ASPECT,
446      WINOPTION_RESOLUTION,
447      WINOPTION_VIEW
448   };
449   options_entry entries[2];
450   BOOL good_option;
451   int i;
442    static const char *blacklist[] =
443    {
444        WINOPTION_SCREEN,
445        WINOPTION_ASPECT,
446        WINOPTION_RESOLUTION,
447        WINOPTION_VIEW
448    };
449    options_entry entries[2];
450    BOOL good_option;
451    int i;
452452
453   for ( ; entrylist->name != NULL || (entrylist->flags & OPTION_HEADER); entrylist++)
454   {
455      good_option = TRUE;
453    for ( ; entrylist->name != NULL || (entrylist->flags & OPTION_HEADER); entrylist++)
454    {
455        good_option = TRUE;
456456
457      // check blacklist
458      if (entrylist->name != NULL)
459      {
460         for (i = 0; i < ARRAY_LENGTH(blacklist); i++)
461         {
462            if (!strcmp(entrylist->name, blacklist[i]))
463            {
464               good_option = FALSE;
465               break;
466            }
467         }
468      }
457        // check blacklist
458        if (entrylist->name != NULL)
459        {
460            for (i = 0; i < ARRAY_LENGTH(blacklist); i++)
461            {
462                if (!strcmp(entrylist->name, blacklist[i]))
463                {
464                    good_option = FALSE;
465                    break;
466                }
467            }
468        }
469469#ifndef MESS
470      // if is_global is FALSE, blacklist global options
471      if (entrylist->name && !is_global && IsGlobalOption(entrylist->name))
472         good_option = FALSE;
470        // if is_global is FALSE, blacklist global options
471        if (entrylist->name && !is_global && IsGlobalOption(entrylist->name))
472            good_option = FALSE;
473473#endif
474      if (good_option)
475      {
476         memcpy(entries, entrylist, sizeof(options_entry));
477         memset(&entries[1], 0, sizeof(entries[1]));
478         //options_add_entries(opts, entries);
479      }
480   }
474        if (good_option)
475        {
476            memcpy(entries, entrylist, sizeof(options_entry));
477            memset(&entries[1], 0, sizeof(entries[1]));
478            //options_add_entries(opts, entries);
479        }
480    }
481481}
482482
483483*/
r11247r11248
506506   // create a memory pool for our data
507507   //options_memory_pool = pool_alloc_lib(memory_error);
508508   //if (!options_memory_pool)
509//      return FALSE;
509//      return FALSE;
510510
511511   // set up the MAME32 settings (these get placed in MAME32ui.ini
512512   //settings = options_create(memory_error);
r11247r11248
528528         {
529529            options_entry entry[2] = { { 0 }, { 0 } };
530530            snprintf(buffer, ARRAY_LENGTH(buffer), "%s%s", driver_list::driver(i).name, perGameOptions[j].name);
531           
531
532532            entry[0].name = core_strdup(buffer);
533533            entry[0].defvalue = perGameOptions[j].defvalue;
534534            entry[0].flags = perGameOptions[j].flags;
r11247r11248
652652
653653static input_seq *options_get_input_seq(winui_options &opts, const char *name)
654654{
655/*   static input_seq seq;
656   const char *seq_string;
655/*  static input_seq seq;
656    const char *seq_string;
657657
658   seq_string = opts.value( name);
659   input_seq_from_tokens(NULL, seq_string, &seq);   // HACK
660   return &seq;*/
658    seq_string = opts.value( name);
659    input_seq_from_tokens(NULL, seq_string, &seq);  // HACK
660    return &seq;*/
661661   return NULL;
662662}
663663
r11247r11248
11511151
11521152void SetHistoryTab(int tab, BOOL show)
11531153{
1154   astring error_string;   
1154   astring error_string;
11551155   if (show)
11561156      settings.set_value(MUIOPTION_HISTORY_TAB, tab, OPTION_PRIORITY_CMDLINE,error_string);
11571157   else
r11247r11248
23742374{
23752375   file_error filerr;
23762376   core_file *file;
2377   
23782377
2378
23792379   filerr = core_fopen(filename, OPEN_FLAG_READ, &file);
23802380   if (filerr == FILERR_NONE)
23812381   {
r11247r11248
23892389{
23902390   file_error filerr;
23912391   core_file *file;
2392   
23932392
2393
23942394   filerr = core_fopen(filename, OPEN_FLAG_READ, &file);
23952395   if (filerr == FILERR_NONE)
23962396   {
r11247r11248
24132413      if (filerr == FILERR_NONE)
24142414      {
24152415         astring inistring;
2416         #ifdef MESS     
2417         opts.output_ini(inistring);         
2416         #ifdef MESS
2417         opts.output_ini(inistring);
24182418         #else
24192419         opts.output_ini(inistring,baseopts);
24202420         #endif
r11247r11248
24232423      }
24242424   }
24252425   /*else
2426   {
2427      filerr = osd_rmfile(filename);
2428   }*/
2426    {
2427        filerr = osd_rmfile(filename);
2428    }*/
24292429
24302430   return filerr;
24312431}
r11247r11248
24402440      if (filerr == FILERR_NONE)
24412441      {
24422442         astring inistring;
2443         #ifdef MESS     
2444         opts.output_ini(inistring);         
2443         #ifdef MESS
2444         opts.output_ini(inistring);
24452445         #else
24462446         opts.output_ini(inistring,baseopts);
24472447         #endif
r11247r11248
24502450      }
24512451   }
24522452   /*else
2453   {
2454      filerr = osd_rmfile(filename);
2455   }*/
2453    {
2454        filerr = osd_rmfile(filename);
2455    }*/
24562456
24572457   return filerr;
24582458}
r11247r11248
25622562   LPTREEFOLDER lpFolder;
25632563   int i;
25642564   options_entry entries[2] = { { 0 }, { 0 } };
2565   
2565
25662566   memcpy(entries, filterOptions, sizeof(filterOptions));
25672567
25682568   numFolders = GetNumFolders();
r11247r11248
27262726
27272727BOOL IsGlobalOption(const char *option_name)
27282728{
2729/*   static const char *global_options[] =
2730   {
2731      OPTION_ROMPATH,
2732      OPTION_HASHPATH,
2733      OPTION_SAMPLEPATH,
2734      OPTION_ARTPATH,
2735      OPTION_CTRLRPATH,
2736      OPTION_INIPATH,
2737      OPTION_FONTPATH,
2738      OPTION_CFG_DIRECTORY,
2739      OPTION_NVRAM_DIRECTORY,
2740      OPTION_MEMCARD_DIRECTORY,
2741      OPTION_INPUT_DIRECTORY,
2742      OPTION_STATE_DIRECTORY,
2743      OPTION_SNAPSHOT_DIRECTORY,
2744      OPTION_DIFF_DIRECTORY,
2745      OPTION_COMMENT_DIRECTORY
2746   };
2747   int i;
2748   char command_name[128];
2749   char *s;
2729/*  static const char *global_options[] =
2730    {
2731        OPTION_ROMPATH,
2732        OPTION_HASHPATH,
2733        OPTION_SAMPLEPATH,
2734        OPTION_ARTPATH,
2735        OPTION_CTRLRPATH,
2736        OPTION_INIPATH,
2737        OPTION_FONTPATH,
2738        OPTION_CFG_DIRECTORY,
2739        OPTION_NVRAM_DIRECTORY,
2740        OPTION_MEMCARD_DIRECTORY,
2741        OPTION_INPUT_DIRECTORY,
2742        OPTION_STATE_DIRECTORY,
2743        OPTION_SNAPSHOT_DIRECTORY,
2744        OPTION_DIFF_DIRECTORY,
2745        OPTION_COMMENT_DIRECTORY
2746    };
2747    int i;
2748    char command_name[128];
2749    char *s;
27502750
2751   // determine command name
2752   snprintf(command_name, ARRAY_LENGTH(command_name), "%s", option_name);
2753   s = strchr(command_name, ';');
2754   if (s)
2755      *s = '\0';
2751    // determine command name
2752    snprintf(command_name, ARRAY_LENGTH(command_name), "%s", option_name);
2753    s = strchr(command_name, ';');
2754    if (s)
2755        *s = '\0';
27562756
2757   for (i = 0; i < ARRAY_LENGTH(global_options); i++)
2758   {
2759      if (!strcmp(command_name, global_options[i]))
2760         return TRUE;
2761   }*/
2757    for (i = 0; i < ARRAY_LENGTH(global_options); i++)
2758    {
2759        if (!strcmp(command_name, global_options[i]))
2760            return TRUE;
2761    }*/
27622762   return FALSE;
27632763}
27642764
r11247r11248
27812781   const game_driver *driver = NULL;
27822782
27832783   CreateGameOptions(opts, game_num);
2784   // Copy over the defaults
2784   // Copy over the defaults
27852785   ui_parse_ini_file(opts, CONFIGNAME);
27862786
27872787   if (opt_type == OPTIONS_GLOBAL)
r11247r11248
27892789      return;
27902790   }
27912791
2792   // debug builds: parse "debug.ini" as well
2792   // debug builds: parse "debug.ini" as well
27932793#ifdef MAME_DEBUG
27942794   ui_parse_ini_file(opts, "debug");
27952795#endif
r11247r11248
27982798      driver = &driver_list::driver(game_num);
27992799   }
28002800
2801   // if we have a valid game driver, parse game-specific INI files
2801   // if we have a valid game driver, parse game-specific INI files
28022802   if (driver != NULL)
28032803   {
28042804      const game_driver *parent = NULL;
r11247r11248
28102810      if (parent != NULL) {
28112811         if (gp!=-1) gparent= &driver_list::driver(gp);
28122812      }
2813     
28142813
2814
28152815      astring *basename;
28162816      astring *srcname;
28172817      machine_config config(*driver,opts);
28182818
2819      // parse "vector.ini" for vector games
2819      // parse "vector.ini" for vector games
28202820      if (isDriverVector(&config))
28212821      {
28222822         ui_parse_ini_file(opts, "vector");
r11247r11248
28252825      {
28262826         return;
28272827      }
2828      // parse "horizont.ini" for horizontal games
2828      // parse "horizont.ini" for horizontal games
28292829      if (!DriverIsVertical(game_num))
28302830      {
28312831         ui_parse_ini_file(opts, "horizont");
r11247r11248
28342834      {
28352835         return;
28362836      }
2837      // parse "vertical.ini" for vertical games
2837      // parse "vertical.ini" for vertical games
28382838      if (DriverIsVertical(game_num))
28392839      {
28402840         ui_parse_ini_file(opts, "vertical");
r11247r11248
28452845      }
28462846
28472847
2848      // then parse "<sourcefile>.ini"
2848      // then parse "<sourcefile>.ini"
28492849      basename = core_filename_extract_base(astring_alloc(), driver->source_file, TRUE);
28502850      srcname = astring_assemble_3(astring_alloc(), "source", PATH_SEPARATOR, astring_c(basename));
28512851      ui_parse_ini_file(opts, astring_c(srcname));
r11247r11248
28572857         return;
28582858      }
28592859
2860      // then parent the grandparent, parent, and game-specific INIs
2860      // then parent the grandparent, parent, and game-specific INIs
28612861      if (gparent != NULL)
28622862         ui_parse_ini_file(opts, gparent->name);
28632863      if (parent != NULL)
r11247r11248
28922892   const game_driver *driver = NULL;
28932893   astring *filename = NULL;
28942894
2895/*   if (OPTIONS_GLOBAL != opt_type) // && NULL != opts && !options_equal(opts, global))
2896   {
2897      if (OPTIONS_VERTICAL == opt_type) {
2898         //since VERTICAL and HORIZONTAL are equally ranked
2899         //we need to subtract 2 from vertical to also get to global
2900         load_options(baseopts,(OPTIONS_TYPE)(opt_type - 2), game_num);
2901      }
2902      else {
2903         load_options(baseopts,(OPTIONS_TYPE)(opt_type - 1), game_num);
2904      }
2905   }*/
2895/*  if (OPTIONS_GLOBAL != opt_type) // && NULL != opts && !options_equal(opts, global))
2896    {
2897        if (OPTIONS_VERTICAL == opt_type) {
2898            //since VERTICAL and HORIZONTAL are equally ranked
2899            //we need to subtract 2 from vertical to also get to global
2900            load_options(baseopts,(OPTIONS_TYPE)(opt_type - 2), game_num);
2901        }
2902        else {
2903            load_options(baseopts,(OPTIONS_TYPE)(opt_type - 1), game_num);
2904        }
2905    }*/
29062906
29072907   if (game_num >= 0)
29082908   {
r11247r11248
29112911
29122912   if (opt_type == OPTIONS_GLOBAL)
29132913   {
2914      // Don't try to save a null global options file,  or it will be erased.
2914      // Don't try to save a null global options file,  or it will be erased.
29152915      //if (NULL == opts)
29162916         //return;
29172917      global = opts;
r11247r11248
29322932      switch (opt_type)
29332933      {
29342934      case OPTIONS_SOURCE:
2935         // determine the <sourcefile>
2935         // determine the <sourcefile>
29362936         basename = core_filename_extract_base(astring_alloc(), driver->source_file, TRUE);
29372937         srcname = astring_assemble_3(astring_alloc(), "source", PATH_SEPARATOR, astring_c(basename));
29382938         filename = astring_cpyc(astring_alloc(),astring_c(srcname));
r11247r11248
29652965   char* utf8_filename;
29662966
29672967   /*
2968    * Easiest to just open the ini/source folder if it exists,
2969    * then remove all the files in it that end in ini.
2970    */
2968     * Easiest to just open the ini/source folder if it exists,
2969     * then remove all the files in it that end in ini.
2970     */
29712971   pathname = astring_assemble_3(astring_alloc(), GetIniDir(), PATH_SEPARATOR, "source");
29722972   match = astring_assemble_3(astring_alloc(), astring_c(pathname), PATH_SEPARATOR, "*.ini");
29732973   if ((hFindFile = win_find_first_file_utf8(astring_c(match), &findFileData)) != INVALID_HANDLE_VALUE)
src/osd/winui/layout.c
r11247r11248
6363   {"CPU",             "cpu",               FOLDER_CPU,          IDI_CPU,                  0,             0,            CreateCPUFolders },
6464   {"Sound",           "sound",             FOLDER_SND,          IDI_SOUND,                0,             0,            CreateSoundFolders },
6565   {"Imperfect",       "imperfect",         FOLDER_DEFICIENCY,   IDI_FOLDER,               0,             0,            CreateDeficiencyFolders },
66     {"Dumping Status",  "dumping",           FOLDER_DUMPING,      IDI_FOLDER,               0,             0,            CreateDumpingFolders },
67     {"Screens",         "screens",           FOLDER_SCREENS,      IDI_FOLDER,               0,             0,            CreateScreenFolders },
66   {"Dumping Status",  "dumping",           FOLDER_DUMPING,      IDI_FOLDER,               0,             0,            CreateDumpingFolders },
67   {"Screens",         "screens",           FOLDER_SCREENS,      IDI_FOLDER,               0,             0,            CreateScreenFolders },
6868   {"Working",         "working",           FOLDER_WORKING,      IDI_WORKING,              F_WORKING,     F_NONWORKING, NULL,                       DriverIsBroken,          FALSE },
6969   {"Not Working",     "nonworking",        FOLDER_NONWORKING,   IDI_NONWORKING,           F_NONWORKING,  F_WORKING,    NULL,                       DriverIsBroken,          TRUE },
7070   {"Originals",       "originals",         FOLDER_ORIGINAL,     IDI_FOLDER,               F_ORIGINALS,   F_CLONES,     NULL,                       DriverIsClone,           FALSE },
r11247r11248
7575   {"Lightgun",        "lightgun",          FOLDER_LIGHTGUN,     IDI_FOLDER,               0,             0,            NULL,                       DriverUsesLightGun,      TRUE },
7676   {"Stereo",          "stereo",            FOLDER_STEREO,       IDI_SOUND,                0,             0,            NULL,                       DriverIsStereo,          TRUE },
7777   {"CHD",             "harddisk",          FOLDER_HARDDISK,     IDI_HARDDISK,             0,             0,            NULL,                       DriverIsHarddisk,        TRUE },
78     {"Samples",           "samples",           FOLDER_SAMPLES,      IDI_FOLDER,               0,             0,            NULL,                       DriverUsesSamples,       TRUE },
79     {"Save State",       "savestate",         FOLDER_SAVESTATE,    IDI_FOLDER,               0,             0,            NULL,                       DriverSupportsSaveState, TRUE },
80     {"BIOS",          "bios",               FOLDER_BIOS,        IDI_FOLDER,               0,             0,            NULL,                       DriverIsBios,           TRUE },
81   {"Mechanical",      "mechanical",        FOLDER_MECHANICAL,   IDI_FOLDER,            0,             0,            NULL,                       DriverIsMechanical,      TRUE },
82   {"Non Mechanical",  "nonmechanical",     FOLDER_NONMECHANICAL,IDI_FOLDER,            0,             0,            NULL,                       DriverIsMechanical,      FALSE },
78   {"Samples",        "samples",           FOLDER_SAMPLES,      IDI_FOLDER,               0,             0,            NULL,                       DriverUsesSamples,       TRUE },
79   {"Save State",     "savestate",         FOLDER_SAVESTATE,    IDI_FOLDER,               0,             0,            NULL,                       DriverSupportsSaveState, TRUE },
80   {"BIOS",          "bios",               FOLDER_BIOS,        IDI_FOLDER,               0,             0,            NULL,                       DriverIsBios,           TRUE },
81   {"Mechanical",      "mechanical",        FOLDER_MECHANICAL,   IDI_FOLDER,            0,             0,          NULL,                       DriverIsMechanical,      TRUE },
82   {"Non Mechanical",  "nonmechanical",     FOLDER_NONMECHANICAL,IDI_FOLDER,            0,             0,          NULL,                       DriverIsMechanical,      FALSE },
8383   { NULL }
8484};
8585
r11247r11248
132132extern const SPLITTERINFO g_splitterInfo[] =
133133{
134134   { 0.25,   IDC_SPLITTER,   IDC_TREE,   IDC_LIST,      AdjustSplitter1Rect },
135//   { 0.4,   IDC_SPLITTER2,   IDC_LIST,   IDC_SWTAB,      AdjustSplitter1Rect },
135//  { 0.4,  IDC_SPLITTER2,  IDC_LIST,   IDC_SWTAB,      AdjustSplitter1Rect },
136136   { 0.5,   IDC_SPLITTER2,   IDC_LIST,   IDC_SSFRAME,   AdjustSplitter2Rect },
137137   { -1 }
138138};
src/osd/winui/winui.mak
r11247r11248
4343ifndef DIRECTINPUT
4444DIRECTINPUT = 7
4545endif
46 
4746
4847
48
4949###########################################################################
5050##################   END USER-CONFIGURABLE OPTIONS   ######################
5151###########################################################################
5252
5353
5454#-------------------------------------------------
55# append "ui" to the emulator name
55# append "ui" to the emulator name
5656#-------------------------------------------------
5757
5858EMULATOR = $(PREFIX)$(NAME)ui$(SUFFIX)$(SUFFIX64)$(SUFFIXDEBUG)$(EXE)
r11247r11248
202202ifdef WIN95_MULTIMON
203203CFLAGS += -DWIN95_MULTIMON
204204endif
205 
206205
206
207207# add the windows libaries, 3 additional libs at the end for UI
208208LIBS += \
209209   -luser32 \
r11247r11248
333333endif
334334
335335# extra dependencies
336$(WINOBJ)/drawdd.o :    $(SRC)/emu/rendersw.c
336$(WINOBJ)/drawdd.o :   $(SRC)/emu/rendersw.c
337337$(WINOBJ)/drawgdi.o :   $(SRC)/emu/rendersw.c
338338
339339# add debug-specific files
r11247r11248
370370
371371
372372#-------------------------------------------------
373# rules for creating helpids.c
373# rules for creating helpids.c
374374#-------------------------------------------------
375375
376376$(UISRC)/helpids.c : $(UIOBJ)/mkhelp$(EXE) $(UISRC)/resource.h $(UISRC)/resource.hm $(UISRC)/mameui.rc
src/osd/winui/dialogs.c
r11247r11248
2323
2424#ifdef _MSC_VER
2525#ifndef NONAMELESSUNION
26#define NONAMELESSUNION
26#define NONAMELESSUNION
2727#endif
2828#endif
2929
r11247r11248
196196      Button_SetCheck(GetDlgItem(hDlg,IDC_KEY_GUI),GetKeyGUI());
197197      Button_SetCheck(GetDlgItem(hDlg,IDC_BROADCAST),GetBroadcast());
198198      Button_SetCheck(GetDlgItem(hDlg,IDC_RANDOM_BG),GetRandomBackground());
199     
199
200200      Button_SetCheck(GetDlgItem(hDlg,IDC_HIDE_MOUSE),GetHideMouseOnStartup());
201201
202202      // Get the current value of the control
r11247r11248
295295      case IDC_SCREENSHOT_BORDERCOLOR:
296296      {
297297         for (i=0;i<16;i++)
298            choice_colors[i] = GetCustomColor(i);
298            choice_colors[i] = GetCustomColor(i);
299299
300300         cc.lStructSize = sizeof(CHOOSECOLOR);
301301         cc.hwndOwner   = hDlg;
r11247r11248
304304         cc.Flags       = CC_ANYCOLOR | CC_RGBINIT | CC_SOLIDCOLOR;
305305         if (!ChooseColor(&cc))
306306            return TRUE;
307          for (i=0;i<16;i++)
308             SetCustomColor(i,choice_colors[i]);
307         for (i=0;i<16;i++)
308            SetCustomColor(i,choice_colors[i]);
309309         SetScreenshotBorderColor(cc.rgbResult);
310310         UpdateScreenShot();
311311         return TRUE;
r11247r11248
319319         SetKeyGUI(Button_GetCheck(GetDlgItem(hDlg, IDC_KEY_GUI)));
320320         SetBroadcast(Button_GetCheck(GetDlgItem(hDlg, IDC_BROADCAST)));
321321         SetRandomBackground(Button_GetCheck(GetDlgItem(hDlg, IDC_RANDOM_BG)));
322         
322
323323         SetHideMouseOnStartup(Button_GetCheck(GetDlgItem(hDlg,IDC_HIDE_MOUSE)));
324324
325325         if( Button_GetCheck(GetDlgItem(hDlg,IDC_RESET_PLAYCOUNT ) ) )
r11247r11248
356356            SetFilterInherit(checked);
357357            // LineUpIcons does just a ResetListView(), which is what we want here
358358            PostMessage(GetMainWindow(),WM_COMMAND, MAKEWPARAM(ID_VIEW_LINEUPICONS, FALSE),(LPARAM)NULL);
359          }
359         }
360360         checked = Button_GetCheck(GetDlgItem(hDlg,IDC_NOOFFSET_CLONES));
361361         if (checked != GetOffsetClones())
362362         {
363363            SetOffsetClones(checked);
364364            // LineUpIcons does just a ResetListView(), which is what we want here
365365            PostMessage(GetMainWindow(),WM_COMMAND, MAKEWPARAM(ID_VIEW_LINEUPICONS, FALSE),(LPARAM)NULL);
366          }
366         }
367367         nCurSelection = ComboBox_GetCurSel(GetDlgItem(hDlg,IDC_SNAPNAME));
368368         if (nCurSelection != CB_ERR) {
369369            const char* snapname_selection = (const char*)ComboBox_GetItemData(GetDlgItem(hDlg,IDC_SNAPNAME), nCurSelection);
r11247r11248
403403   static DWORD         dwFilters;
404404   static DWORD         dwpFilters;
405405   static LPCFOLDERDATA   lpFilterRecord;
406   char                strText[250];
406   char               strText[250];
407407   int                i;
408408
409409   switch (Msg)
r11247r11248
419419      if (folder != NULL)
420420      {
421421         char tmp[80];
422         
422
423423         win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_EDIT), g_FilterText);
424424         Edit_SetSel(GetDlgItem(hDlg, IDC_FILTER_EDIT), 0, -1);
425425         // Mask out non filter flags
r11247r11248
434434            if( lpParent )
435435            {
436436               /* Check the Parent Filters and inherit them on child,
437                * No need to promote all games to parent folder, works as is */
437                    * No need to promote all games to parent folder, works as is */
438438               dwpFilters = lpParent->m_dwFlags & F_MASK;
439439               /*Check all possible Filters if inherited solely from parent, e.g. not being set explicitly on our folder*/
440440               if( (dwpFilters & F_CLONES) && !(dwFilters & F_CLONES) )
r11247r11248
562562      {
563563      case IDOK:
564564         dwFilters = 0;
565         
565
566566         win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_EDIT), g_FilterText, FILTERTEXT_LEN);
567         
567
568568         // see which buttons are checked
569569         for (i = 0; g_lpFilterList[i].m_dwFilterType; i++)
570570         {
r11247r11248
587587      case IDCANCEL:
588588         EndDialog(hDlg, 0);
589589         return TRUE;
590         
590
591591      default:
592592         // Handle unchecking mutually exclusive filters
593593         if (wNotifyCode == BN_CLICKED)
r11247r11248
672672#else
673673               tvis.DUMMYUNIONNAME.item = tvi;
674674#endif
675               
675
676676               hti = TreeView_InsertItem(GetDlgItem(hDlg,IDC_CUSTOM_TREE),&tvis);
677677
678678               /* look for children of this custom folder */
r11247r11248
692692                       tvis.item = tvi;
693693#else
694694                       tvis.DUMMYUNIONNAME.item = tvi;
695#endif                     
695#endif
696696                     hti_child = TreeView_InsertItem(GetDlgItem(hDlg,IDC_CUSTOM_TREE),&tvis);
697697                     if (folders[jj] == default_selection)
698698                         res = TreeView_SelectItem(GetDlgItem(hDlg,IDC_CUSTOM_TREE),hti_child);
r11247r11248
707707               }
708708
709709            }
710           
710
711711         }
712712      }
713     
713
714714      win_set_window_text_utf8(GetDlgItem(hDlg,IDC_CUSTOMFILE_GAME),
715715                 ModifyThe(driver_list::driver(driver_index).description));
716716
r11247r11248
727727         if (TreeView_GetItem(GetDlgItem(hDlg,IDC_CUSTOM_TREE),&tvi) == TRUE)
728728         {
729729           /* should look for New... */
730         
730
731731           default_selection = (LPTREEFOLDER)tvi.lParam; /* start here next time */
732732
733733           AddToCustomFolder((LPTREEFOLDER)tvi.lParam,driver_index);
src/osd/winui/directdraw.c
r11247r11248
1313
1414/***************************************************************************
1515
16   directdraw.c
16    directdraw.c
1717
18   Direct Draw routines.
19 
18    Direct Draw routines.
19
2020 ***************************************************************************/
2121
2222// standard windows headers
r11247r11248
3535#include <tchar.h>
3636
3737/***************************************************************************
38   function prototypes
38    function prototypes
3939 ***************************************************************************/
4040
4141static BOOL WINAPI DDEnumInfo(GUID FAR *lpGUID,
42                       LPTSTR    lpDriverDescription,
43                       LPTSTR    lpDriverName,       
42                       LPTSTR   lpDriverDescription,
43                       LPTSTR   lpDriverName,
4444                       LPVOID   lpContext,
4545                       HMONITOR   hm);
4646
4747static BOOL WINAPI DDEnumOldInfo(GUID FAR *lpGUID,
4848                         LPTSTR      lpDriverDescription,
49                         LPTSTR      lpDriverName,     
49                         LPTSTR      lpDriverName,
5050                         LPVOID    lpContext);
5151
5252static void CalculateDisplayModes(void);
r11247r11248
5454static HRESULT CALLBACK EnumDisplayModesCallback2(DDSURFACEDESC2* pddsd, LPVOID Context);
5555
5656/***************************************************************************
57   External variables
57    External variables
5858 ***************************************************************************/
5959
6060/***************************************************************************
61   Internal structures
61    Internal structures
6262 ***************************************************************************/
6363
6464typedef struct
r11247r11248
7171                           IUnknown FAR *pUnkOuter);
7272
7373/***************************************************************************
74   Internal variables
74    Internal variables
7575 ***************************************************************************/
7676
7777#define MAX_DISPLAYS 100
r11247r11248
8686static IDirectDraw4*      g_pDirectDraw4;
8787
8888/***************************************************************************
89   External functions   
89    External functions
9090 ***************************************************************************/
9191
9292/****************************************************************************
93 *      DirectDrawInitialize
93 *      DirectDrawInitialize
9494 *
95 *      Initialize the DirectDraw variables.
95 *      Initialize the DirectDraw variables.
9696 *
97 *      This entails the following functions:
97 *      This entails the following functions:
9898 *
99 *         DirectDrawCreate
99 *          DirectDrawCreate
100100 *
101101 ****************************************************************************/
102102
103103#if !defined(LPDIRECTDRAWENUMERATE)
104104#if defined(UNICODE)
105105
106typedef HRESULT (WINAPI* LPDIRECTDRAWENUMERATEW)(LPDDENUMCALLBACKW lpCallback, LPVOID lpContext);
106typedef HRESULT (WINAPI* LPDIRECTDRAWENUMERATEW)(LPDDENUMCALLBACKW lpCallback, LPVOID lpContext);
107107
108108#define LPDIRECTDRAWENUMERATE   LPDIRECTDRAWENUMERATEW
109109
r11247r11248
112112
113113#else
114114
115typedef HRESULT (WINAPI* LPDIRECTDRAWENUMERATEA)(LPDDENUMCALLBACKA lpCallback, LPVOID lpContext);
115typedef HRESULT (WINAPI* LPDIRECTDRAWENUMERATEA)(LPDDENUMCALLBACKA lpCallback, LPVOID lpContext);
116116
117117#define LPDIRECTDRAWENUMERATE   LPDIRECTDRAWENUMERATEA
118118
r11247r11248
160160   g_pDirectDraw2 = NULL;
161161   g_pDirectDraw4 = NULL;
162162   hr = ddc(NULL, &pDirectDraw1, NULL);
163   if (FAILED(hr))
163   if (FAILED(hr))
164164   {
165165      ErrorMsg("DirectDrawCreate failed: %s", DirectXDecodeError(hr));
166166      return FALSE;
r11247r11248
179179         return FALSE;
180180      }
181181   }
182   
182
183183   memset(&ddCaps,    0, sizeof(DDCAPS));
184184   memset(&ddHelCaps, 0, sizeof(DDCAPS));
185185   ddCaps.dwSize    = sizeof(DDCAPS);
r11247r11248
195195   IDirectDraw_Release(pDirectDraw1);
196196
197197   /*
198      Note that you must know which version of the
199      function to retrieve (see the following text).
200      For this example, we use the ANSI version.
201    */
198       Note that you must know which version of the
199       function to retrieve (see the following text).
200       For this example, we use the ANSI version.
201     */
202202   pDDEnumEx = (LPDIRECTDRAWENUMERATEEX) GetProcAddress((HINSTANCE)g_hDLL, SDirectDrawEnumerateEx);
203203
204204   /*
205      If the function is there, call it to enumerate all display devices
206      attached to the desktop, and any non-display DirectDraw devices.
207    */
205       If the function is there, call it to enumerate all display devices
206       attached to the desktop, and any non-display DirectDraw devices.
207     */
208208   if (pDDEnumEx)
209209   {
210      pDDEnumEx(DDEnumInfo, NULL,
210      pDDEnumEx(DDEnumInfo, NULL,
211211              DDENUM_ATTACHEDSECONDARYDEVICES | DDENUM_DETACHEDSECONDARYDEVICES);
212212   }
213213   else
r11247r11248
216216
217217      lpDDEnum = (LPDIRECTDRAWENUMERATE) GetProcAddress((HINSTANCE)g_hDLL, SDirectDrawEnumerate);
218218      /*
219       * We must be running on an old version of ddraw. Therefore,
220       * by definiton, multimon isn't supported. Fall back on
221       * DirectDrawEnumerate to enumerate standard devices on a
222       * single monitor system.
223       */
219         * We must be running on an old version of ddraw. Therefore,
220         * by definiton, multimon isn't supported. Fall back on
221         * DirectDrawEnumerate to enumerate standard devices on a
222         * single monitor system.
223         */
224224      if (lpDDEnum)
225225      {
226226         lpDDEnum(DDEnumOldInfo, NULL);
r11247r11248
236236
237237/****************************************************************************
238238 *
239 *      DirectDraw_Close
239 *      DirectDraw_Close
240240 *
241 *      Terminate our usage of DirectDraw.
241 *      Terminate our usage of DirectDraw.
242242 *
243243 ****************************************************************************/
244244
245245void DirectDraw_Close(void)
246246{
247247   int i;
248   
248
249249   for (i = 0; i < g_nNumDisplays; i++)
250250   {
251251      free(g_Displays[i].name);
r11247r11248
255255         free(g_Displays[i].lpguid);
256256         g_Displays[i].lpguid = NULL;
257257      }
258     
258
259259   }
260260   g_nNumDisplays = 0;
261   
261
262262   /*
263      Destroy any lingering IDirectDraw object.
264   */
265   if (g_pDirectDraw2)
263        Destroy any lingering IDirectDraw object.
264    */
265   if (g_pDirectDraw2)
266266   {
267267      IDirectDraw2_Release(g_pDirectDraw2);
268268      g_pDirectDraw2 = NULL;
269269   }
270270
271   if (g_pDirectDraw4)
271   if (g_pDirectDraw4)
272272   {
273273      IDirectDraw4_Release(g_pDirectDraw4);
274274      g_pDirectDraw4 = NULL;
r11247r11248
283283
284284/****************************************************************************/
285285/*
286   Return a list of 16, 24 and 32 bit DirectDraw modes.
286    Return a list of 16, 24 and 32 bit DirectDraw modes.
287287*/
288288struct tDisplayModes* DirectDraw_GetDisplayModes(void)
289289{
r11247r11248
318318/****************************************************************************/
319319
320320static BOOL WINAPI DDEnumInfo(GUID FAR *lpGUID,
321                       LPTSTR    lpDriverDescription,
322                       LPTSTR    lpDriverName,       
321                       LPTSTR   lpDriverDescription,
322                       LPTSTR   lpDriverName,
323323                       LPVOID   lpContext,
324324                       HMONITOR   hm)
325325{
326326   g_Displays[g_nNumDisplays].name = (TCHAR*)malloc((_tcslen(lpDriverDescription) + 1) * sizeof(TCHAR));
327327   _tcscpy(g_Displays[g_nNumDisplays].name, lpDriverDescription);
328   
328
329329   if (lpGUID == NULL)
330330      g_Displays[g_nNumDisplays].lpguid = NULL;
331331   else
r11247r11248
333333      g_Displays[g_nNumDisplays].lpguid = (LPGUID)malloc(sizeof(GUID));
334334      memcpy(g_Displays[g_nNumDisplays].lpguid, lpGUID, sizeof(GUID));
335335   }
336   
336
337337   g_nNumDisplays++;
338338   if (g_nNumDisplays == MAX_DISPLAYS)
339339      return DDENUMRET_CANCEL;
r11247r11248
343343
344344static BOOL WINAPI DDEnumOldInfo(GUID FAR *lpGUID,
345345                         LPTSTR      lpDriverDescription,
346                         LPTSTR      lpDriverName,     
346                         LPTSTR      lpDriverName,
347347                         LPVOID    lpContext)
348348{
349349   return DDEnumInfo(lpGUID, lpDriverDescription, lpDriverName, lpContext, NULL);
r11247r11248
390390      if (pddsd2->dwRefreshRate != 0)
391391         g_bRefresh = TRUE;
392392   }
393   
393
394394   if (pDisplayModes->m_nNumModes == MAXMODES)
395395      return DDENUMRET_CANCEL;
396396   else
src/osd/winui/treeview.c
r11247r11248
153153 *
154154 *      Returns zero if the first n characters of s1 and s2 are equal,
155155 *      ignoring case.
156 *      stolen from datafile.c
156 *      stolen from datafile.c
157157 **************************************************************************/
158158static int ci_strncmp (const char *s1, const char *s2, int n)
159159{
r11247r11248
217217void InitTree(LPCFOLDERDATA lpFolderData, LPCFILTER_ITEM lpFilterList)
218218{
219219   LONG_PTR l;
220   
220
221221   g_lpFolderData = lpFolderData;
222222   g_lpFilterList = lpFilterList;
223223
224224   InitFolders();
225225
226226   /* this will subclass the treeview (where WM_DRAWITEM gets sent for
227      the header control) */
227       the header control) */
228228   l = GetWindowLongPtr(GetTreeView(), GWLP_WNDPROC);
229229   g_lpTreeWndProc = (WNDPROC)l;
230230   SetWindowLongPtr(GetTreeView(), GWLP_WNDPROC, (LONG_PTR)TreeWndProc);
r11247r11248
336336   //Filter out the Bioses on all Folders, except for the Bios Folder
337337   if( lpFolder->m_nFolderId != FOLDER_BIOS )
338338   {
339//      if( !( (driver_list::driver(nGame).flags & GAME_IS_BIOS_ROOT ) == 0) )
340//         return TRUE;
339//      if( !( (driver_list::driver(nGame).flags & GAME_IS_BIOS_ROOT ) == 0) )
340//          return TRUE;
341341   }
342    // Filter games--return TRUE if the game should be HIDDEN in this view
342   // Filter games--return TRUE if the game should be HIDDEN in this view
343343   if( GetFilterInherit() )
344344   {
345345      if( lpFolder )
r11247r11248
348348         if( lpParent )
349349         {
350350            /* Check the Parent Filters and inherit them on child,
351             * The inherited filters don't display on the custom Filter Dialog for the Child folder
352             * No need to promote all games to parent folder, works as is */
351                 * The inherited filters don't display on the custom Filter Dialog for the Child folder
352                 * No need to promote all games to parent folder, works as is */
353353            dwMask |= lpParent->m_dwFlags;
354354         }
355355      }
r11247r11248
358358   if (strlen(GetSearchText()) && _stricmp(GetSearchText(), SEARCH_PROMPT))
359359   {
360360      if (MyStrStrI(driver_list::driver(nGame).description,GetSearchText()) == NULL &&
361         MyStrStrI(driver_list::driver(nGame).name,GetSearchText()) == NULL)
361         MyStrStrI(driver_list::driver(nGame).name,GetSearchText()) == NULL)
362362         return TRUE;
363363   }
364364   /*Filter Text is already global*/
365365   if (MyStrStrI(driver_list::driver(nGame).description,GetFilterText()) == NULL &&
366      MyStrStrI(driver_list::driver(nGame).name,GetFilterText()) == NULL &&
367      MyStrStrI(driver_list::driver(nGame).source_file,GetFilterText()) == NULL &&
366      MyStrStrI(driver_list::driver(nGame).name,GetFilterText()) == NULL &&
367      MyStrStrI(driver_list::driver(nGame).source_file,GetFilterText()) == NULL &&
368368      MyStrStrI(driver_list::driver(nGame).manufacturer,GetFilterText()) == NULL)
369369   {
370370      return TRUE;
r11247r11248
422422}
423423
424424/***************************************************************************
425   private functions
425    private functions
426426 ***************************************************************************/
427427
428428void CreateSourceFolders(int parent_index)
r11247r11248
437437   for (jj = 0; jj < nGames; jj++)
438438   {
439439      const char *s = GetDriverFilename(jj);
440                         
440
441441      if (s == NULL || s[0] == '\0')
442442         continue;
443443
r11247r11248
455455      {
456456         // nope, it's a source file we haven't seen before, make it.
457457         LPTREEFOLDER lpTemp;
458         lpTemp = NewFolder(s, next_folder_id, parent_index, IDI_SOURCE,
458         lpTemp = NewFolder(s, next_folder_id, parent_index, IDI_SOURCE,
459459                           GetFolderFlags(numFolders));
460460         ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
461461         memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
r11247r11248
491491      int screens = DriverNumScreens(jj);
492492      char s[2];
493493      itoa(screens, s, 10);
494                         
494
495495      // look for an existant screens treefolder for this game
496496      // (likely to be the previous one, so start at the end)
497497      for (i=numFolders-1;i>=start_folder;i--)
r11247r11248
506506      {
507507         // nope, it's a screen file we haven't seen before, make it.
508508         LPTREEFOLDER lpTemp;
509         lpTemp = NewFolder(s, next_folder_id, parent_index, IDI_FOLDER,
509         lpTemp = NewFolder(s, next_folder_id, parent_index, IDI_FOLDER,
510510                           GetFolderFlags(numFolders));
511511         ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
512512         memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
r11247r11248
535535   int nGames = driver_list::total();
536536   int start_folder = numFolders;
537537   LPTREEFOLDER lpFolder = treeFolders[parent_index];
538    LPTREEFOLDER lpTemp;
538   LPTREEFOLDER lpTemp;
539539
540540   // no games in top level folder
541541   SetAllBits(lpFolder->m_lpGameBits,FALSE);
r11247r11248
550550         manufacturer += iChars;
551551         //shift to next start char
552552         if( s != NULL && *s != 0 )
553          {
553         {
554554            const char *t = TrimManufacturer(s);
555555            for (i=numFolders-1;i>=start_folder;i--)
556556            {
r11247r11248
564564            if (i == start_folder-1)
565565            {
566566               // nope, it's a manufacturer we haven't seen before, make it.
567               lpTemp = NewFolder(t, next_folder_id, parent_index, IDI_MANUFACTURER,
567               lpTemp = NewFolder(t, next_folder_id, parent_index, IDI_MANUFACTURER,
568568                              GetFolderFlags(numFolders));
569569               ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
570570               memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
r11247r11248
607607   while( *s )
608608   {
609609        /* combinations where to end string */
610     
611      if (
610
611      if (
612612            ( (*s == ' ') && ( s[1] == '(' || s[1] == '/' || s[1] == '+' ) ) ||
613613            ( *s == ']' ) ||
614614            ( *s == '/' ) ||
r11247r11248
690690      {
691691         ptmp += 14;
692692      }
693     
693
694694      while ( (*ptmp != ')' ) && (*ptmp != '/' ) && *ptmp != '\0')
695695      {
696696         if (*ptmp == ' ' && ci_strncmp(ptmp, " license", 8) == 0)
r11247r11248
703703         }
704704         *t++ = *ptmp++;
705705      }
706     
706
707707      *t = '\0';
708708   }
709709
r11247r11248
726726   //start analyzing from the back, as these are usually suffixes
727727   for(i=strlen(s)-1; i>=0;i-- )
728728   {
729     
729
730730      l = strlen(strTemp);
731731      for(k=l;k>=0; k--)
732732         strTemp[k+1] = strTemp[k];
r11247r11248
745745               if( j!=l)
746746               {
747747                  memset(strTemp2, '\0', 256 );
748                  strncpy(strTemp2, s, strlen(s)-j );   
748                  strncpy(strTemp2, s, strlen(s)-j );
749749               }
750750            }
751751            break;
r11247r11248
760760               if( j!=l)
761761               {
762762                  memset(strTemp2, '\0', 256 );
763                  strncpy(strTemp2, s, strlen(s)-j );   
763                  strncpy(strTemp2, s, strlen(s)-j );
764764               }
765765            }
766766            break;
r11247r11248
775775               if( j!=l)
776776               {
777777                  memset(strTemp2, '\0', 256 );
778                  strncpy(strTemp2, s, strlen(s)-j );   
778                  strncpy(strTemp2, s, strlen(s)-j );
779779               }
780780            }
781781            break;
r11247r11248
790790               if( j!=l)
791791               {
792792                  memset(strTemp2, '\0', 256 );
793                  strncpy(strTemp2, s, strlen(s)-j );   
793                  strncpy(strTemp2, s, strlen(s)-j );
794794               }
795795            }
796796            break;
r11247r11248
805805               if( j!=l)
806806               {
807807                  memset(strTemp2, '\0', 256 );
808                  strncpy(strTemp2, s, strlen(s)-j );   
808                  strncpy(strTemp2, s, strlen(s)-j );
809809               }
810810            }
811811            break;
r11247r11248
820820               if( j!=l)
821821               {
822822                  memset(strTemp2, '\0', 256 );
823                  strncpy(strTemp2, s, strlen(s)-j );   
823                  strncpy(strTemp2, s, strlen(s)-j );
824824               }
825825            }
826826            break;
r11247r11248
835835               if( j!=l)
836836               {
837837                  memset(strTemp2, '\0', 256 );
838                  strncpy(strTemp2, s, strlen(s)-j );   
838                  strncpy(strTemp2, s, strlen(s)-j );
839839               }
840840            }
841841            break;
r11247r11248
850850               if( j!=l)
851851               {
852852                  memset(strTemp2, '\0', 256 );
853                  strncpy(strTemp2, s, strlen(s)-j );   
853                  strncpy(strTemp2, s, strlen(s)-j );
854854               }
855855            }
856856            break;
r11247r11248
865865               if( j!=l)
866866               {
867867                  memset(strTemp2, '\0', 256 );
868                  strncpy(strTemp2, s, strlen(s)-j );   
868                  strncpy(strTemp2, s, strlen(s)-j );
869869               }
870870            }
871871            break;
r11247r11248
880880               if( j!=l)
881881               {
882882                  memset(strTemp2, '\0', 256 );
883                  strncpy(strTemp2, s, strlen(s)-j );   
883                  strncpy(strTemp2, s, strlen(s)-j );
884884               }
885885            }
886886            break;
r11247r11248
895895               if( j!=l)
896896               {
897897                  memset(strTemp2, '\0', 256 );
898                  strncpy(strTemp2, s, strlen(s)-j );   
898                  strncpy(strTemp2, s, strlen(s)-j );
899899               }
900900            }
901901            break;
r11247r11248
923923      // enumerate through all devices
924924      for (bool gotone = config.m_devicelist.first(device); gotone; gotone = device->next(device))
925925      {
926     
926
927927         // get the name
928928         const char *dev_name = device->devconfig().name();
929         
929
930930         // do we have a folder for this device?
931931         folder = NULL;
932932         for (j = 0; j < device_folder_count; j++)
r11247r11248
944944            LPTREEFOLDER lpTemp;
945945
946946            lpTemp = NewFolder(device->devconfig().name(), next_folder_id, parent_index, IDI_CPU,
947                            GetFolderFlags(numFolders));
947                           GetFolderFlags(numFolders));
948948            ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
949949            memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
950950
r11247r11248
981981      machine_config config(driver_list::driver(i),MameUIGlobal());
982982
983983      // enumerate through all devices
984     
984
985985      for (bool gotone = config.m_devicelist.first(device); gotone; gotone = device->next(device))
986986      {
987987         // get the name
r11247r11248
10041004            LPTREEFOLDER lpTemp;
10051005
10061006            lpTemp = NewFolder(device->devconfig().name(), next_folder_id, parent_index, IDI_SOUND,
1007                            GetFolderFlags(numFolders));
1007                           GetFolderFlags(numFolders));
10081008            ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
10091009            memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
10101010
r11247r11248
10361036   // create our subfolders
10371037   LPTREEFOLDER lpProt, lpWrongCol, lpImpCol, lpImpGraph, lpMissSnd, lpImpSnd, lpFlip, lpArt;
10381038   lpProt = NewFolder("Unemulated Protection", next_folder_id, parent_index, IDI_FOLDER,
1039                   GetFolderFlags(numFolders));
1039                  GetFolderFlags(numFolders));
10401040   ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
10411041   memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
10421042
r11247r11248
10481048   ExtraFolderData[next_folder_id++]->m_dwFlags = 0;
10491049   AddFolder(lpProt);
10501050   lpWrongCol = NewFolder("Wrong Colors", next_folder_id, parent_index, IDI_FOLDER,
1051                   GetFolderFlags(numFolders));
1051                  GetFolderFlags(numFolders));
10521052   ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
10531053   memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
10541054
r11247r11248
10611061   AddFolder(lpWrongCol);
10621062
10631063   lpImpCol = NewFolder("Imperfect Colors", next_folder_id, parent_index, IDI_FOLDER,
1064                   GetFolderFlags(numFolders));
1064                  GetFolderFlags(numFolders));
10651065   ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
10661066   memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
10671067
r11247r11248
10741074   AddFolder(lpImpCol);
10751075
10761076   lpImpGraph = NewFolder("Imperfect Graphics", next_folder_id, parent_index, IDI_FOLDER,
1077                   GetFolderFlags(numFolders));
1077                  GetFolderFlags(numFolders));
10781078   ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
10791079   memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
10801080
r11247r11248
10871087   AddFolder(lpImpGraph);
10881088
10891089   lpMissSnd = NewFolder("Missing Sound", next_folder_id, parent_index, IDI_FOLDER,
1090                   GetFolderFlags(numFolders));
1090                  GetFolderFlags(numFolders));
10911091   ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
10921092   memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
10931093
r11247r11248
11001100   AddFolder(lpMissSnd);
11011101
11021102   lpImpSnd = NewFolder("Imperfect Sound", next_folder_id, parent_index, IDI_FOLDER,
1103                   GetFolderFlags(numFolders));
1103                  GetFolderFlags(numFolders));
11041104   ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
11051105   memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
11061106
r11247r11248
11131113   AddFolder(lpImpSnd);
11141114
11151115   lpFlip = NewFolder("No Cocktail", next_folder_id, parent_index, IDI_FOLDER,
1116                   GetFolderFlags(numFolders));
1116                  GetFolderFlags(numFolders));
11171117   ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
11181118   memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
11191119
r11247r11248
11261126   AddFolder(lpFlip);
11271127
11281128   lpArt = NewFolder("Requires Artwork", next_folder_id, parent_index, IDI_FOLDER,
1129                   GetFolderFlags(numFolders));
1129                  GetFolderFlags(numFolders));
11301130   ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA) );
11311131   memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
11321132
r11247r11248
11731173      if (driver_list::driver(jj).flags & GAME_REQUIRES_ARTWORK)
11741174      {
11751175         AddGame(lpArt,jj);
1176      }     
1176      }
11771177   }
11781178}
11791179
r11247r11248
11861186   LPTREEFOLDER lpFolder = treeFolders[parent_index];
11871187   const rom_entry *region, *rom;
11881188   //const char *name;
1189   const game_driver *gamedrv;   
1189   const game_driver *gamedrv;
11901190
11911191   // create our two subfolders
11921192   LPTREEFOLDER lpBad, lpNo;
11931193   lpBad = NewFolder("Bad Dump", next_folder_id, parent_index, IDI_FOLDER,
1194                   GetFolderFlags(numFolders));
1194                  GetFolderFlags(numFolders));
11951195   ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
11961196   memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
11971197
r11247r11248
12031203   ExtraFolderData[next_folder_id++]->m_dwFlags = 0;
12041204   AddFolder(lpBad);
12051205   lpNo = NewFolder("No Dump", next_folder_id, parent_index, IDI_FOLDER,
1206                   GetFolderFlags(numFolders));
1206                  GetFolderFlags(numFolders));
12071207   ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
12081208   memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
12091209
r11247r11248
12231223      const rom_source *source;
12241224      gamedrv = &driver_list::driver(jj);
12251225
1226      if (!gamedrv->rom)
1226      if (!gamedrv->rom)
12271227         continue;
12281228      bBadDump = FALSE;
12291229      bNoDump = FALSE;
12301230      /* Allocate machine config */
12311231      machine_config config(*gamedrv,MameUIGlobal());
1232     
1232
12331233      for (source = rom_first_source(config); source != NULL; source = rom_next_source(*source))
12341234      {
12351235         for (region = rom_first_region(*source); region; region = rom_next_region(region))
r11247r11248
12391239               if (ROMREGION_ISROMDATA(region) || ROMREGION_ISDISKDATA(region) )
12401240               {
12411241                  //name = ROM_GETNAME(rom);
1242                  hash_collection hashes(ROM_GETHASHDATA(rom));                 
1242                  hash_collection hashes(ROM_GETHASHDATA(rom));
12431243                  if (hashes.flag(hash_collection::FLAG_BAD_DUMP))
12441244                     bBadDump = TRUE;
12451245                  if (hashes.flag(hash_collection::FLAG_NO_DUMP))
r11247r11248
12801280
12811281      if (s[4] == '?')
12821282         s[4] = '\0';
1283     
1283
12841284      // look for an extant year treefolder for this game
12851285      // (likely to be the previous one, so start at the end)
12861286      for (i=numFolders-1;i>=start_folder;i--)
r11247r11248
12961296         // nope, it's a year we haven't seen before, make it.
12971297         LPTREEFOLDER lpTemp;
12981298         lpTemp = NewFolder(s, next_folder_id, parent_index, IDI_YEAR,
1299                         GetFolderFlags(numFolders));
1299                        GetFolderFlags(numFolders));
13001300         ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
13011301         memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA));
13021302
r11247r11248
13701370
13711371   // currently "cached" parent
13721372   HTREEITEM hti_parent = NULL;
1373   int index_parent = -1;         
1373   int index_parent = -1;
13741374
13751375   res = TreeView_DeleteAllItems(hTreeView);
13761376
r11247r11248
14151415      // not a top level branch, so look for parent
14161416      if (treeFolders[i]->m_nParent != index_parent)
14171417      {
1418         
1418
14191419         hti_parent = TreeView_GetRoot(hTreeView);
14201420         while (1)
14211421         {
r11247r11248
14481448      tvi.iSelectedImage = 0;
14491449      tvi.pszText = treeFolders[i]->m_lptTitle;
14501450      tvi.lParam   = (LPARAM)treeFolders[i];
1451     
1451
14521452#if defined(__GNUC__) /* bug in commctrl.h */
14531453      tvs.item = tvi;
14541454#else
r11247r11248
14851485         SetCurrentFolder((LPTREEFOLDER)tvi.lParam);
14861486         return;
14871487      }
1488     
1488
14891489      hti_next = TreeView_GetChild(hTreeView,hti);
14901490      if (hti_next == NULL)
14911491      {
r11247r11248
15111511
15121512}
15131513
1514/*
1514/*
15151515 * Does this folder have an INI associated with it?
15161516 * Currently only TRUE for FOLDER_VECTOR and children
15171517 * of FOLDER_SOURCE.
r11247r11248
15561556/* Allocate and initialize a NEW TREEFOLDER */
15571557static LPTREEFOLDER NewFolder(const char *lpTitle,
15581558                  UINT nFolderId, int nParent, UINT nIconId, DWORD dwFlags)
1559{   
1559{
15601560   LPTREEFOLDER lpFolder = (LPTREEFOLDER)malloc(sizeof(TREEFOLDER));
15611561   memset(lpFolder, '\0', sizeof (TREEFOLDER));
15621562   lpFolder->m_lpTitle = (LPSTR)malloc(strlen(lpTitle) + 1);
r11247r11248
16291629      AddFolder(NewFolder(fData->m_lpTitle, fData->m_nFolderId, -1,
16301630                     fData->m_nIconId, dwFolderFlags));
16311631   }
1632   
1632
16331633   numExtraFolders = InitExtraFolders();
16341634
16351635   for (i = 0; i < numExtraFolders; i++)
r11247r11248
17301730
17311731   GetClipBox(hDC, &rcClip);
17321732   GetClientRect(hWnd, &rcClient);
1733   
1733
17341734   // Create a compatible memory DC
17351735   memDC = CreateCompatibleDC(hDC);
17361736
r11247r11248
17381738   bitmap = CreateCompatibleBitmap(hDC, rcClient.right - rcClient.left,
17391739                           rcClient.bottom - rcClient.top);
17401740   hOldBitmap = (HBITMAP)SelectObject(memDC, bitmap);
1741   
1741
17421742   // First let the control do its default drawing.
17431743   CallWindowProc(g_lpTreeWndProc, hWnd, uMsg, (WPARAM)memDC, 0);
17441744
17451745   // Draw bitmap in the background
17461746
17471747   {
1748      HPALETTE hPAL;       
1748      HPALETTE hPAL;
17491749      HDC maskDC;
17501750      HBITMAP maskBitmap;
17511751      HDC tempDC;
r11247r11248
17581758      RECT rcRoot;
17591759
17601760      // Now create a mask
1761      maskDC = CreateCompatibleDC(hDC);   
1762     
1761      maskDC = CreateCompatibleDC(hDC);
1762
17631763      // Create monochrome bitmap for the mask
17641764      maskBitmap = CreateBitmap(rcClient.right - rcClient.left,
1765                          rcClient.bottom - rcClient.top,
1765                          rcClient.bottom - rcClient.top,
17661766                          1, 1, NULL);
17671767
17681768      hOldMaskBitmap = (HBITMAP)SelectObject(maskDC, maskBitmap);
r11247r11248
17701770
17711771      // Create the mask from the memory DC
17721772      BitBlt(maskDC, 0, 0, rcClient.right - rcClient.left,
1773            rcClient.bottom - rcClient.top, memDC,
1773            rcClient.bottom - rcClient.top, memDC,
17741774            rcClient.left, rcClient.top, SRCCOPY);
17751775
17761776      tempDC = CreateCompatibleDC(hDC);
r11247r11248
17781778
17791779      imageDC = CreateCompatibleDC(hDC);
17801780      bmpImage = CreateCompatibleBitmap(hDC,
1781                                rcClient.right - rcClient.left,
1781                                rcClient.right - rcClient.left,
17821782                                rcClient.bottom - rcClient.top);
17831783      hOldBmpImage = (HBITMAP)SelectObject(imageDC, bmpImage);
17841784
r11247r11248
17921792         RealizePalette(hDC);
17931793         SelectPalette(imageDC, hPAL, FALSE);
17941794      }
1795     
1795
17961796      // Get x and y offset
17971797      TreeView_GetItemRect(hWnd, TreeView_GetRoot(hWnd), &rcRoot, FALSE);
17981798      rcRoot.left = -GetScrollPos(hWnd, SB_HORZ);
r11247r11248
18001800      // Draw bitmap in tiled manner to imageDC
18011801      for (i = rcRoot.left; i < rcClient.right; i += bmDesc->bmWidth)
18021802         for (j = rcRoot.top; j < rcClient.bottom; j += bmDesc->bmHeight)
1803            BitBlt(imageDC,  i, j, bmDesc->bmWidth, bmDesc->bmHeight,
1803            BitBlt(imageDC,  i, j, bmDesc->bmWidth, bmDesc->bmHeight,
18041804                  tempDC, 0, 0, SRCCOPY);
18051805
18061806      // Set the background in memDC to black. Using SRCPAINT with black and any other
r11247r11248
18141814      // Set the foreground to black. See comment above.
18151815      SetBkColor(imageDC, RGB(255,255,255));
18161816      SetTextColor(imageDC, RGB(0,0,0));
1817      BitBlt(imageDC, rcClip.left, rcClip.top, rcClip.right - rcClip.left,
1817      BitBlt(imageDC, rcClip.left, rcClip.top, rcClip.right - rcClip.left,
18181818            rcClip.bottom - rcClip.top,
18191819            maskDC, rcClip.left, rcClip.top, SRCAND);
18201820
18211821      // Combine the foreground with the background
18221822      BitBlt(imageDC, rcClip.left, rcClip.top, rcClip.right - rcClip.left,
1823            rcClip.bottom - rcClip.top,
1823            rcClip.bottom - rcClip.top,
18241824            memDC, rcClip.left, rcClip.top, SRCPAINT);
18251825
18261826      // Draw the final image to the screen
18271827      BitBlt(hDC, rcClip.left, rcClip.top, rcClip.right - rcClip.left,
1828            rcClip.bottom - rcClip.top,
1828            rcClip.bottom - rcClip.top,
18291829            imageDC, rcClip.left, rcClip.top, SRCCOPY);
1830     
1830
18311831      SelectObject(maskDC, hOldMaskBitmap);
18321832      SelectObject(tempDC, hOldHBitmap);
18331833      SelectObject(imageDC, hOldBmpImage);
r11247r11248
18581858   if (GetBackgroundBitmap() != NULL)
18591859   {
18601860      switch (uMsg)
1861      {   
1861      {
18621862      case WM_MOUSEMOVE:
18631863      {
18641864         if (MouseHasBeenMoved())
r11247r11248
19551955   memset(ExtraFolderData, 0, (MAX_EXTRA_FOLDERS * MAX_EXTRA_SUBFOLDERS)* sizeof(LPEXFOLDERDATA));
19561956
19571957   /* NPW 9-Feb-2003 - MSVC stat() doesn't like stat() called with an empty
1958    * string
1959    */
1958     * string
1959     */
19601960   if (dir[0] == '\0')
19611961      dir = ".";
19621962
r11247r11248
20342034            if (ext && *(ext + 1) && !mame_stricmp(ext + 1, "ini"))
20352035            {
20362036               ExtraFolderData[count] =(EXFOLDERDATA*) malloc(sizeof(EXFOLDERDATA));
2037               if (ExtraFolderData[count])
2037               if (ExtraFolderData[count])
20382038               {
20392039                  *ext = '\0';
20402040
r11247r11248
21132113   LPTREEFOLDER lpFolder = treeFolders[parent_index];
21142114
21152115    current_id = lpFolder->m_nFolderId;
2116   
2116
21172117    id = lpFolder->m_nFolderId - MAX_FOLDERS;
21182118
21192119    /* "folder\title.ini" */
21202120
2121    sprintf( fname, "%s\\%s.ini",
2122        GetFolderDir(),
2121    sprintf( fname, "%s\\%s.ini",
2122        GetFolderDir(),
21232123        ExtraFolderData[id]->m_szTitle);
2124   
2124
21252125    fp = fopen(fname, "r");
21262126    if (fp == NULL)
21272127        return FALSE;
2128   
2128
21292129    while ( fgets(readbuf, 256, fp) )
21302130    {
21312131        /* do we have [...] ? */
r11247r11248
21372137            {
21382138                continue;
21392139            }
2140           
2140
21412141            *p = '\0';
21422142            name = &readbuf[1];
2143     
2143
21442144            /* is it [FOLDER_SETTINGS]? */
21452145
21462146            if (strcmp(name, "FOLDER_SETTINGS") == 0)
r11247r11248
21642164
21652165                    current_id = next_folder_id++;
21662166               /* create a new folder with this name,
2167                  and the flags for this folder as read from the registry */
2167                       and the flags for this folder as read from the registry */
21682168               lpTemp = NewFolder(name,current_id,parent_index,
2169                               ExtraFolderData[id]->m_nSubIconId,
2170                               GetFolderFlags(numFolders) | F_CUSTOM);
2169                              ExtraFolderData[id]->m_nSubIconId,
2170                              GetFolderFlags(numFolders) | F_CUSTOM);
21712171               ExtraFolderData[current_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA));
21722172               memset(ExtraFolderData[current_id], 0, sizeof(EXFOLDERDATA));
21732173
r11247r11248
22572257   BOOL retval;
22582258   char filename[MAX_PATH];
22592259   char new_filename[MAX_PATH];
2260   
2260
22612261   if (lpFolder->m_nParent >= 0)
22622262   {
22632263      // a child extra folder was renamed, so do the rename and save the parent
r11247r11248
22822282      free(old_title);
22832283      return TRUE;
22842284   }
2285   
2285
22862286   // a parent extra folder was renamed, so rename the file
22872287
22882288   snprintf(new_filename,ARRAY_LENGTH(new_filename),"%s\\%s.ini",GetFolderDir(),new_name);
r11247r11248
24002400      }
24012401
24022402      /* need to loop over all our TREEFOLDERs--first the root one, then each child.
2403        start with the root */
2403          start with the root */
24042404
24052405      folder_data = root_folder;
24062406
r11247r11248
24082408
24092409      for (i=0;i<driver_list::total();i++)
24102410      {
2411         int driver_index = GetIndexFromSortedIndex(i);
2411         int driver_index = GetIndexFromSortedIndex(i);
24122412         if (TestBit(folder_data->m_lpGameBits,driver_index))
24132413         {
24142414            fprintf(fp,"%s\n",driver_list::driver(driver_index).name);
r11247r11248
24242424            treeFolders[folder_data->m_nParent] == root_folder)
24252425         {
24262426            fprintf(fp,"\n[%s]\n",folder_data->m_lpTitle);
2427           
2427
24282428            for (i=0;i<driver_list::total();i++)
24292429            {
2430               int driver_index = GetIndexFromSortedIndex(i);
2430               int driver_index = GetIndexFromSortedIndex(i);
24312431               if (TestBit(folder_data->m_lpGameBits,driver_index))
24322432               {
24332433                  fprintf(fp,"%s\n",driver_list::driver(driver_index).name);
src/osd/winui/columnedit.c
r11247r11248
1010  that you have read the license and understand and accept it fully.
1111
1212 ***************************************************************************/
13
13
1414/***************************************************************************
1515
1616  columnedit.c
r11247r11248
3838{
3939   LV_ITEM lvi;
4040   TCHAR   buf[80];
41   //int    nFrom, nTo;
42   BOOL    b_res;
41   //int   nFrom, nTo;
42   BOOL   b_res;
4343
4444   //nFrom = ListView_GetItemCount(hFrom);
4545   //nTo   = ListView_GetItemCount(hTo);
r11247r11248
7676   LV_ITEM lvi;
7777   TCHAR   buf[80];
7878   int    nMaxpos;
79   BOOL    b_res;
80   
79   BOOL   b_res;
80
8181   lvi.iItem = ListView_GetNextItem(hWnd, -1, LVIS_SELECTED | LVIS_FOCUSED);
8282   nMaxpos = ListView_GetItemCount(hWnd);
83   if (lvi.iItem == -1 ||
83   if (lvi.iItem == -1 ||
8484      (lvi.iItem <  2 && bDown == FALSE) || // Disallow moving First column
8585      (lvi.iItem == 0 && bDown == TRUE)  || // ""
8686      (lvi.iItem == nMaxpos - 1 && bDown == TRUE))
r11247r11248
137137      hShown      = GetDlgItem(hDlg, IDC_LISTSHOWCOLUMNS);
138138      hAvailable = GetDlgItem(hDlg, IDC_LISTAVAILABLECOLUMNS);
139139      /*Change Style to Always Show Selection */
140      dwShowStyle = GetWindowLong(hShown, GWL_STYLE);
141      dwAvailableStyle = GetWindowLong(hAvailable, GWL_STYLE);
140      dwShowStyle = GetWindowLong(hShown, GWL_STYLE);
141      dwAvailableStyle = GetWindowLong(hAvailable, GWL_STYLE);
142142      dwView = LVS_SHOWSELALWAYS | LVS_LIST;
143143
144144      /* Only set the window style if the view bits have changed. */
145      if ((dwShowStyle & LVS_TYPEMASK) != dwView)
146      SetWindowLong(hShown, GWL_STYLE,
147         (dwShowStyle & ~LVS_TYPEMASK) | dwView);
148      if ((dwAvailableStyle & LVS_TYPEMASK) != dwView)
149      SetWindowLong(hAvailable, GWL_STYLE,
150         (dwAvailableStyle & ~LVS_TYPEMASK) | dwView);
145      if ((dwShowStyle & LVS_TYPEMASK) != dwView)
146      SetWindowLong(hShown, GWL_STYLE,
147         (dwShowStyle & ~LVS_TYPEMASK) | dwView);
148      if ((dwAvailableStyle & LVS_TYPEMASK) != dwView)
149      SetWindowLong(hAvailable, GWL_STYLE,
150         (dwAvailableStyle & ~LVS_TYPEMASK) | dwView);
151151
152152      pfnGetColumnInfo(order, shown);
153153
154154      showMsg = TRUE;
155155      nShown   = 0;
156156      nAvail   = 0;
157                 
158      lvi.mask     = LVIF_TEXT | LVIF_PARAM;
159      lvi.stateMask = 0;               
160      lvi.iSubItem  = 0;
157
158      lvi.mask     = LVIF_TEXT | LVIF_PARAM;
159      lvi.stateMask = 0;
160      lvi.iSubItem  = 0;
161161      lvi.iImage     = -1;
162162
163163      /* Get the Column Order and save it */
164164      pfnGetRealColumnOrder(order);
165165
166166      for (i = 0 ; i < nColumnMax; i++)
167      {       
167      {
168168         lvi.pszText = (TCHAR *) names[order[i]];
169169         lvi.lParam   = order[i];
170170
r11247r11248
200200         NMHDR *nm = (NMHDR *)lParam;
201201         NM_LISTVIEW *pnmv;
202202         int       nPos;
203         
203
204204         switch (nm->code)
205205         {
206206         case NM_DBLCLK:
r11247r11248
231231               break;
232232            }
233233            return TRUE;
234           
234
235235         case LVN_ITEMCHANGED:
236236            // Don't handle this message for now
237237            pnmv = (NM_LISTVIEW *)nm;
r11247r11248
284284                  if (ListView_GetItemCount(nm->hwndFrom) != 0)
285285                  {
286286                     EnableWindow(GetDlgItem(hDlg, IDC_BUTTONADD),      FALSE);
287                     
287
288288                     if (ListView_GetNextItem(hShown, -1, LVIS_SELECTED | LVIS_FOCUSED) == 0 )
289289                     {
290290                        EnableWindow(GetDlgItem(hDlg, IDC_BUTTONREMOVE),   FALSE);
src/osd/winui/datafile.c
r11247r11248
339339 ****************************************************************************/
340340static UINT8 ParseOpen(const char *pszFilename)
341341{
342        /* Open file up in binary mode */       
342        /* Open file up in binary mode */
343343      fp =global_alloc(emu_file("", OPEN_FLAG_READ));
344344      fp->open(pszFilename);
345345
r11247r11248
597597{
598598        static struct tDatafileIndex *hist_idx = 0;
599599        static struct tDatafileIndex *mame_idx = 0;
600//   const game_driver *clone_of = NULL;
600//  const game_driver *clone_of = NULL;
601601        int history = 0, mameinfo = 0;
602602        int err = 0;
603603
r11247r11248
662662               break;
663663            err = load_datafile_text (gdrv, buffer+len, bufsize-len,
664664                                                                                  mame_idx, DATAFILE_TAG_MAME);
665           
665
666666               int g = driver_list::clone(*gdrv);
667               if (g!=-1) gdrv = &driver_list::driver(g); else gdrv = NULL;           
667               if (g!=-1) gdrv = &driver_list::driver(g); else gdrv = NULL;
668668                        } while (err && gdrv);
669669
670670                        if (err) mameinfo = 0;
src/osd/winui/picker.c
r11247r11248
695695void Picker_SetSelectedPick(HWND hWnd, int nIndex)
696696{
697697   BOOL res;
698   
698
699699   if (nIndex < 0)
700700      nIndex = 0;
701701
r11247r11248
13551355      GetClientRect(hWnd, &rcClient);
13561356      rcTmpBmp.right = rcClient.right;
13571357      /* We also need to check whether it is the last item
1358         The update region has to be extended to the bottom if it is */
1358           The update region has to be extended to the bottom if it is */
13591359      if (nItem == ListView_GetItemCount(hWnd) - 1)
13601360         rcTmpBmp.bottom = rcClient.bottom;
13611361
r11247r11248
13981398      res = ListView_GetItemRect_Modified(hWnd, nItem, &rect, LVIR_ICON);
13991399
14001400      /* indent width of icon + the space between the icon and text
1401      * so left of clone icon starts at text of parent
1401        * so left of clone icon starts at text of parent
14021402         */
14031403      indent_space = rect.right - rect.left + offset;
14041404   }
src/osd/winui/swconfig.c
r11247r11248
2929
3030   // allocate the machine config
3131   windows_options pCurrentOpts;
32   load_options(pCurrentOpts, OPTIONS_GLOBAL, driver_index);
32   load_options(pCurrentOpts, OPTIONS_GLOBAL, driver_index);
3333   config->mconfig = global_alloc(machine_config(driver_list::driver(driver_index),pCurrentOpts));
3434
3535   // other stuff
r11247r11248
4949      config->mconfig = NULL;
5050   }
5151   /*if (config->hashfile != NULL)
52   {
53      hashfile_close(config->hashfile);
54      config->hashfile = NULL;
55   }*/
52    {
53        hashfile_close(config->hashfile);
54        config->hashfile = NULL;
55    }*/
5656   free(config);
5757}
src/osd/winui/mui_audit.c
r11247r11248
1010  that you have read the license and understand and accept it fully.
1111
1212 ***************************************************************************/
13
13
1414 /***************************************************************************
1515
1616  mui_audit.c
r11247r11248
7575static volatile BOOL bCancel = FALSE;
7676
7777/***************************************************************************
78    External functions 
78    External functions
7979 ***************************************************************************/
8080
8181void AuditDialog(HWND hParent)
r11247r11248
121121      return "No";
122122
123123   //case UNKNOWN :
124//      return "?";
124//      return "?";
125125
126126   default:
127127      dprintf("unknown audit value %i\n",audit_result);
r11247r11248
149149/***************************************************************************
150150    Internal functions
151151 ***************************************************************************/
152// Verifies the ROM set while calling SetRomAuditResults   
152// Verifies the ROM set while calling SetRomAuditResults
153153int MameUIVerifyRomSet(int game)
154154{
155155   driver_enumerator enumerator(MameUIGlobal(), driver_list::driver(game));
156156   enumerator.next();
157157   media_auditor auditor(enumerator);
158158   media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST);
159   
159
160160   // output the summary of the audit
161161   astring summary_string;
162162   auditor.summarize(&summary_string);
163   DetailsPrintf("%s", summary_string.cstr());   
164   
163   DetailsPrintf("%s", summary_string.cstr());
164
165165   SetRomAuditResults(game, summary);
166166   return summary;
167167}
168168
169// Verifies the Sample set while calling SetSampleAuditResults   
169// Verifies the Sample set while calling SetSampleAuditResults
170170int MameUIVerifySampleSet(int game)
171171{
172172   driver_enumerator enumerator(MameUIGlobal(), driver_list::driver(game));
173173   enumerator.next();
174174   media_auditor auditor(enumerator);
175175   media_auditor::summary summary = auditor.audit_samples();
176   
176
177177   // output the summary of the audit
178178   astring summary_string;
179179   auditor.summarize(&summary_string);
180   DetailsPrintf("%s", summary_string.cstr());   
181   
180   DetailsPrintf("%s", summary_string.cstr());
181
182182   SetSampleAuditResults(game, summary);
183183   return summary;
184184}
r11247r11248
255255         {
256256            bCancel = TRUE;
257257            if (GetExitCodeThread(hThread, &dwExitCode) && (dwExitCode == STILL_ACTIVE))
258            {               
258            {
259259               PostMessage(hDlg, WM_COMMAND, wParam, lParam);
260260               return 1;
261261            }
r11247r11248
279279      }
280280      return 1;
281281   }
282   return 0;   
282   return 0;
283283}
284284
285285/* Callback for the Audit property sheet */
r11247r11248
357357{
358358   int  retval;
359359   TCHAR buffer[200];
360   
360
361361   retval = MameUIVerifySampleSet(sample_index);
362   
362
363363   switch (retval)
364364   {
365365   case media_auditor::CORRECT:
r11247r11248
375375
376376   case media_auditor::NOTFOUND:
377377      break;
378         
378
379379   case media_auditor::INCORRECT:
380380      samples_incorrect++;
381381      _stprintf(buffer, TEXT("%i"), samples_incorrect);
382382      SendDlgItemMessage(hAudit, IDC_SAMPLES_INCORRECT, WM_SETTEXT, 0, (LPARAM)buffer);
383383      _stprintf(buffer, TEXT("%i"), samples_correct + samples_incorrect);
384384      SendDlgItemMessage(hAudit, IDC_SAMPLES_TOTAL, WM_SETTEXT, 0, (LPARAM)buffer);
385     
385
386386      break;
387387   }
388388
389389   sample_index++;
390390   SendDlgItemMessage(hAudit, IDC_SAMPLES_PROGRESS, PBM_SETPOS, sample_index, 0);
391   
391
392392   if (sample_index == driver_list::total())
393393   {
394394      DetailsPrintf("Audit complete.\n");
r11247r11248
410410   hEdit = GetDlgItem(hAudit, IDC_AUDIT_DETAILS);
411411   if (hEdit ==  NULL)
412412      hEdit = GetDlgItem(hAudit, IDC_AUDIT_DETAILS_PROP);
413   
413
414414   if (hEdit == NULL)
415415   {
416416      dprintf("audit detailsprintf() can't find any audit control\n");
r11247r11248
418418   }
419419
420420   va_start(marker, fmt);
421   
421
422422   vsprintf(buffer, fmt, marker);
423   
423
424424   va_end(marker);
425425
426426   t_s = tstring_from_utf8(ConvertToWindowsNewlines(buffer));
r11247r11248
430430   textLength = Edit_GetTextLength(hEdit);
431431   Edit_SetSel(hEdit, textLength, textLength);
432432   SendMessage( hEdit, EM_REPLACESEL, FALSE, (WPARAM)(LPCTSTR)win_tstring_strdup(t_s) );
433   
433
434434   osd_free(t_s);
435435}
436436
r11247r11248
445445   case media_auditor::CORRECT:
446446      ptr = "Passed";
447447      break;
448     
448
449449   case media_auditor::BEST_AVAILABLE:
450450      ptr = "Best available";
451451      break;
452     
452
453453   case media_auditor::NOTFOUND:
454454      ptr = "Not found";
455455      break;
456     
456
457457   case media_auditor::INCORRECT:
458458      ptr = "Failed";
459459      break;
src/osd/winui/splitters.c
r11247r11248
1010  that you have read the license and understand and accept it fully.
1111
1212 ***************************************************************************/
13
13
1414 /***************************************************************************
1515
1616  splitters.c
1717
18  Splitter GUI code. - Tree, spliiter, list, splitter, pict
18  Splitter GUI code. - Tree, spliiter, list, splitter, pict
1919
2020  Created 12/03/98 (C) by Mike Haaland (mhaaland@hypertech.com)
2121
r11247r11248
5656
5757   splitter = (HZSPLITTER*)malloc(sizeof(HZSPLITTER) * nSplitterCount);
5858   if (!splitter)
59      goto error;     
59      goto error;
6060   memset(splitter, 0, sizeof(HZSPLITTER) * nSplitterCount);
6161
6262   nSplitterOffset = (int*)malloc(sizeof(int) * nSplitterCount);
6363   if (!nSplitterOffset)
64      goto error;     
65   memset(nSplitterOffset, 0, sizeof(int) * nSplitterCount);   
64      goto error;
65   memset(nSplitterOffset, 0, sizeof(int) * nSplitterCount);
6666
6767   return TRUE;
6868
r11247r11248
142142void RecalcSplitters(void)
143143{
144144   int    i;
145   
145
146146   for (i = 0; i < numSplitters; i++)
147147   {
148148      CalcSplitter(GetParent(splitter[i].m_hWnd), &splitter[i]);
149149      nSplitterOffset[i] = splitter[i].m_dragRect.left;
150150   }
151   
151
152152   for (i = numSplitters - 1; i >= 0; i--)
153153   {
154154      CalcSplitter(GetParent(splitter[i].m_hWnd), &splitter[i]);
r11247r11248
332332
333333      // Erase the old tracking image
334334      OnInvertTracker(hWnd, &lpCurSpltr->m_dragRect);
335     
335
336336      // calc the new one based on p.x draw it
337337      nWidth = lpCurSpltr->m_dragRect.right - lpCurSpltr->m_dragRect.left;
338338      lpCurSpltr->m_dragRect.right = pt.x + nWidth / 2;
src/osd/winui/directinput.c
r11247r11248
1212 ***************************************************************************/
1313
1414/***************************************************************************
15   
15
1616  directinput.c
1717
1818  Direct Input routines.
19
19
2020 ***************************************************************************/
2121// standard windows headers
2222#define WIN32_LEAN_AND_MEAN
r11247r11248
2828#include "directinput.h"
2929
3030/***************************************************************************
31   function prototypes
31    function prototypes
3232 ***************************************************************************/
3333
3434/***************************************************************************
35   External variables
35    External variables
3636 ***************************************************************************/
3737
3838/***************************************************************************
39   Internal structures
39    Internal structures
4040 ***************************************************************************/
4141
4242/***************************************************************************
43   Internal variables
43    Internal variables
4444 ***************************************************************************/
4545
4646static LPDIRECTINPUT di = NULL;
r11247r11248
4848static HANDLE hDLL = NULL;
4949
5050/***************************************************************************
51   External functions   
51    External functions
5252 ***************************************************************************/
5353
5454/****************************************************************************
55 *      DirectInputInitialize
55 *      DirectInputInitialize
5656 *
57 *      Initialize the DirectInput variables.
57 *      Initialize the DirectInput variables.
5858 *
59 *      This entails the following functions:
59 *      This entails the following functions:
6060 *
61 *         DirectInputCreate
61 *          DirectInputCreate
6262 *
6363 ****************************************************************************/
6464
r11247r11248
9494
9595   hr = dic(GetModuleHandle(NULL), DIRECTINPUT_VERSION, &di, NULL);
9696
97   if (FAILED(hr))
97   if (FAILED(hr))
9898   {
9999      hr = dic(GetModuleHandle(NULL), 0x0300, &di, NULL);
100100
r11247r11248
110110
111111/****************************************************************************
112112 *
113 *      DirectInputClose
113 *      DirectInputClose
114114 *
115 *      Terminate our usage of DirectInput.
115 *      Terminate our usage of DirectInput.
116116 *
117117 ****************************************************************************/
118118
119119void DirectInputClose()
120120{
121121   /*
122      Release any lingering IDirectInput object.
123   */
124   if (di)
122        Release any lingering IDirectInput object.
123    */
124   if (di)
125125   {
126126      IDirectInput_Release(di);
127127      di = NULL;
r11247r11248
162162   return di;
163163}
164164/***************************************************************************
165   Internal functions
165    Internal functions
166166 ***************************************************************************/
src/osd/winui/dirwatch.c
r11247r11248
5555{
5656   HMODULE hKernelModule;
5757   READDIRECTORYCHANGESFUNC pfnReadDirectoryChanges;
58   
58
5959   HWND hwndTarget;
6060   UINT nMessage;
6161
r11247r11248
233233         // allocate our own copy of the path list
234234         pszPathList = (LPSTR) alloca(strlen(pWatcher->pszPathList) + 1);
235235         strcpy(pszPathList, pWatcher->pszPathList);
236         
236
237237         nSubIndex = 0;
238238         do
239239         {
src/osd/winui/dxdecode.c
r11247r11248
175175   {   DIERR_INCOMPLETEEFFECT,             "DIERR_INCOMPLETEEFFECT" },
176176   {   DIERR_NOTBUFFERED,                  "DIERR_NOTBUFFERED" },
177177   {   DIERR_EFFECTPLAYING,                "DIERR_EFFECTPLAYING" },
178//   {   DIERR_UNPLUGGED,                    "DIERR_UNPLUGGED" },
178//  {   DIERR_UNPLUGGED,                    "DIERR_UNPLUGGED" },
179179
180180   {   E_NOINTERFACE,                      "E_NOINTERFACE" }
181181
r11247r11248
192192{
193193   int i;
194194   static char tmp[64];
195   
195
196196   for (i = 0; i < (sizeof(g_ErrorCode) / sizeof(g_ErrorCode[0])); i++)
197197   {
198198      if (g_ErrorCode[i].hr == errorval)
src/osd/winui/mui_util.c
r11247r11248
4141#include <shlwapi.h>
4242
4343/***************************************************************************
44   function prototypes
44    function prototypes
4545 ***************************************************************************/
4646
4747/***************************************************************************
48   External variables
48    External variables
4949 ***************************************************************************/
5050
5151/***************************************************************************
52   Internal structures
52    Internal structures
5353 ***************************************************************************/
5454static struct DriversInfo
5555{
r11247r11248
7171
7272
7373/***************************************************************************
74   External functions
74    External functions
7575 ***************************************************************************/
7676
7777/*
78   ErrorMsg
78    ErrorMsg
7979*/
8080void __cdecl ErrorMsg(const char* fmt, ...)
8181{
r11247r11248
111111
112112void __cdecl dprintf(const char* fmt, ...)
113113{
114   char    buf[5000];
114   char   buf[5000];
115115   va_list va;
116116
117117   va_start(va, fmt);
r11247r11248
129129   HDC    hDC;
130130
131131   hDC = GetDC(hWnd);
132   
132
133133   nBPP = GetDeviceCaps(hDC, BITSPIXEL) * GetDeviceCaps(hDC, PLANES);
134134
135135   ReleaseDC(hWnd, hDC);
r11247r11248
153153      {
154154         FARPROC lpfnDLLI = GetProcAddress(hModule, "DllInstall");
155155
156         if (NULL != lpfnDLLI)
156         if (NULL != lpfnDLLI)
157157         {
158158            /* comctl 4.71 or greater */
159159
160160            // see if we can find out exactly
161           
161
162162            DLLGETVERSIONPROC pDllGetVersion;
163163            pDllGetVersion = (DLLGETVERSIONPROC)GetProcAddress(hModule, "DllGetVersion");
164164
165165            /* Because some DLLs might not implement this function, you
166               must test for it explicitly. Depending on the particular
167               DLL, the lack of a DllGetVersion function can be a useful
168               indicator of the version. */
166                   must test for it explicitly. Depending on the particular
167                   DLL, the lack of a DllGetVersion function can be a useful
168                   indicator of the version. */
169169
170170            if(pDllGetVersion)
171171            {
r11247r11248
197197   HINSTANCE hErr;
198198   LPCTSTR     msg = 0;
199199   LPTSTR    tName;
200   
200
201201   tName = tstring_from_utf8(cName);
202202   if( !tName )
203203      return;
204204
205205   hErr = ShellExecute(hWnd, NULL, tName, NULL, NULL, SW_SHOWNORMAL);
206   if ((FPTR)hErr > 32)
206   if ((FPTR)hErr > 32)
207207   {
208208      osd_free(tName);
209209      return;
r11247r11248
216216      break;
217217
218218   case ERROR_FILE_NOT_FOUND:
219      msg = TEXT("The specified file was not found.");
219      msg = TEXT("The specified file was not found.");
220220      break;
221221
222222   case SE_ERR_NOASSOC :
r11247r11248
238238   default:
239239      msg = TEXT("Unknown error.");
240240   }
241
241
242242   MessageBox(NULL, msg, tName, MB_OK);
243   
243
244244   osd_free(tName);
245245}
246246
r11247r11248
249249   char* cp = (char*)pFirst;
250250   char* s1;
251251   char* s2;
252   
252
253253   while (*cp)
254254   {
255255      s1 = cp;
256256      s2 = (char*)pSrch;
257     
257
258258      while (*s1 && *s2 && !mame_strnicmp(s1, s2, 1))
259259         s1++, s2++;
260     
260
261261      if (!*s2)
262262         return cp;
263     
263
264264      cp++;
265265   }
266266   return NULL;
r11247r11248
324324   const screen_device_config *screen  = config->first_screen();
325325
326326   if (screen != NULL) {
327      // parse "vector.ini" for vector games
327      // parse "vector.ini" for vector games
328328      if (SCREEN_TYPE_VECTOR == screen->screen_type())
329329      {
330330         return TRUE;
r11247r11248
340340   for (; screen != NULL; screen = screen->next_screen()) {
341341      i++;
342342   }
343   return i;   
343   return i;
344344}
345345
346346
r11247r11248
403403            {
404404               for (rom = rom_first_file(region); rom; rom = rom_next_file(rom))
405405               {
406                  gameinfo->usesRoms = TRUE;
407                  break;
406                  gameinfo->usesRoms = TRUE;
407                  break;
408408               }
409409            }
410410         }
411411         gameinfo->usesSamples = FALSE;
412         
412
413413         {
414414            const device_config_sound_interface *sound = NULL;
415415            const char * const * samplenames = NULL;
r11247r11248
423423                  {
424424                     gameinfo->usesSamples = TRUE;
425425                     break;
426                  }         
427               }           
426                  }
427               }
428428            }
429429         }
430430
r11247r11248
434434         {
435435            const input_port_config *port;
436436            ioport_list portlist;
437           
437
438438            input_port_list_init(portlist, gamedrv->ipt, NULL, 0, FALSE, NULL);
439439            for (device_config *cfg = config.m_devicelist.first(); cfg != NULL; cfg = cfg->next())
440440            {
r11247r11248
447447            {
448448               const input_field_config *field;
449449               for (field = port->fieldlist; field != NULL; field = field->next)
450                {
450               {
451451                  UINT32 type;
452452                  type = field->type;
453453                  if (type == IPT_END)
454454                     break;
455                  if (type == IPT_DIAL || type == IPT_PADDLE ||
455                  if (type == IPT_DIAL || type == IPT_PADDLE ||
456456                     type == IPT_TRACKBALL_X || type == IPT_TRACKBALL_Y ||
457457                     type == IPT_AD_STICK_X || type == IPT_AD_STICK_Y)
458458                     gameinfo->usesTrackball = TRUE;
r11247r11248
550550}
551551
552552BOOL DriverIsVertical(int driver_index) {
553   return GetDriversInfo(driver_index)->isVertical;
553   return GetDriversInfo(driver_index)->isVertical;
554554}
555555
556556void FlushFileCaches(void)
r11247r11248
564564}
565565
566566/***************************************************************************
567   Win32 wrappers
567    Win32 wrappers
568568 ***************************************************************************/
569569
570570BOOL SafeIsAppThemed(void)
r11247r11248
572572   BOOL bResult = FALSE;
573573   HMODULE hThemes;
574574   BOOL (WINAPI *pfnIsAppThemed)(void);
575   
575
576576   hThemes = LoadLibrary(TEXT("uxtheme.dll"));
577577   if (hThemes != NULL)
578578   {
r11247r11248
606606   TCHAR* t_exefilename = tstring_from_utf8(exefilename);
607607   if( !t_exefilename )
608608      return icon;
609   
609
610610   icon = ExtractIcon(inst, t_exefilename, iconindex);
611   
611
612612   osd_free(t_exefilename);
613   
613
614614   return icon;
615615}
616616
r11247r11248
636636//  win_create_file_utf8
637637//============================================================
638638
639HANDLE win_create_file_utf8(const char* filename, DWORD desiredmode, DWORD sharemode,
640                        LPSECURITY_ATTRIBUTES securityattributes, DWORD creationdisposition,
641                        DWORD flagsandattributes, HANDLE templatehandle)
639HANDLE win_create_file_utf8(const char* filename, DWORD desiredmode, DWORD sharemode,
640                     LPSECURITY_ATTRIBUTES securityattributes, DWORD creationdisposition,
641                     DWORD flagsandattributes, HANDLE templatehandle)
642642{
643643   HANDLE result = 0;
644644   TCHAR* t_filename = tstring_from_utf8(filename);
645645   if( !t_filename )
646646      return result;
647   
647
648648   result = CreateFile(t_filename, desiredmode, sharemode, securityattributes, creationdisposition,
649649                  flagsandattributes, templatehandle);
650650
651651   osd_free(t_filename);
652                 
652
653653   return result;
654654}
655655
r11247r11248
662662   DWORD result = 0;
663663   TCHAR* t_buffer = NULL;
664664   char* utf8_buffer = NULL;
665   
665
666666   if( bufferlength > 0 ) {
667667      t_buffer = (TCHAR*)malloc((bufferlength * sizeof(TCHAR)) + 1);
668668      if( !t_buffer )
669669         return result;
670670   }
671   
671
672672   result = GetCurrentDirectory(bufferlength, t_buffer);
673   
673
674674   if( bufferlength > 0 ) {
675675      utf8_buffer = utf8_from_tstring(t_buffer);
676676      if( !utf8_buffer ) {
r11247r11248
678678         return result;
679679      }
680680   }
681     
681
682682   strncpy(buffer, utf8_buffer, bufferlength);
683   
683
684684   if( utf8_buffer )
685685      osd_free(utf8_buffer);
686   
686
687687   if( t_buffer )
688688      free(t_buffer);
689   
689
690690   return result;
691691}
692692
r11247r11248
700700   TCHAR* t_filename = tstring_from_utf8(filename);
701701   if( !t_filename )
702702      return result;
703   
703
704704   result = FindFirstFile(t_filename, findfiledata);
705   
705
706706   osd_free(t_filename);
707   
707
708708   return result;
709709}
710710
src/osd/winui/help.c
r11247r11248
1414/***************************************************************************
1515
1616  help.c
17 
18   Help wrapper code.
19   
17
18    Help wrapper code.
19
2020***************************************************************************/
2121
2222// standard windows headers
r11247r11248
9595}
9696
9797/***************************************************************************
98 Internal functions 
98 Internal functions
9999***************************************************************************/
100100
101101static void Help_Load(void)
src/osd/winui/softwarepicker.c
r11247r11248
214214
215215
216216//static void ComputeFileHash(software_picker_info *pPickerInfo,
217//   file_info *pFileInfo, const unsigned char *pBuffer, unsigned int nLength)
217//  file_info *pFileInfo, const unsigned char *pBuffer, unsigned int nLength)
218218//{
219219   //const char *functions;
220220
r11247r11248
229229
230230/*static BOOL SoftwarePicker_CalculateHash(HWND hwndPicker, int nIndex)
231231{
232   software_picker_info *pPickerInfo;
233   file_info *pFileInfo;
234   LPSTR pszZipName;
235   BOOL rc = FALSE;
236   unsigned char *pBuffer;
237   unsigned int nLength;
238   HANDLE hFile, hFileMapping;
239   LVFINDINFO lvfi;
240   BOOL res;
232    software_picker_info *pPickerInfo;
233    file_info *pFileInfo;
234    LPSTR pszZipName;
235    BOOL rc = FALSE;
236    unsigned char *pBuffer;
237    unsigned int nLength;
238    HANDLE hFile, hFileMapping;
239    LVFINDINFO lvfi;
240    BOOL res;
241241
242   pPickerInfo = GetSoftwarePickerInfo(hwndPicker);
243   assert((nIndex >= 0) && (nIndex < pPickerInfo->file_index_length));
244   pFileInfo = pPickerInfo->file_index[nIndex];
242    pPickerInfo = GetSoftwarePickerInfo(hwndPicker);
243    assert((nIndex >= 0) && (nIndex < pPickerInfo->file_index_length));
244    pFileInfo = pPickerInfo->file_index[nIndex];
245245
246   if (pFileInfo->zip_entry_name)
247   {
248      // this is in a ZIP file
249      zip_file *zip;
250      zip_error ziperr;
251      const zip_file_header *zipent;
246    if (pFileInfo->zip_entry_name)
247    {
248        // this is in a ZIP file
249        zip_file *zip;
250        zip_error ziperr;
251        const zip_file_header *zipent;
252252
253      // open the ZIP file
254      nLength = pFileInfo->zip_entry_name - pFileInfo->file_name;
255      pszZipName = (LPSTR) alloca(nLength);
256      memcpy(pszZipName, pFileInfo->file_name, nLength);
257      pszZipName[nLength - 1] = '\0';
253        // open the ZIP file
254        nLength = pFileInfo->zip_entry_name - pFileInfo->file_name;
255        pszZipName = (LPSTR) alloca(nLength);
256        memcpy(pszZipName, pFileInfo->file_name, nLength);
257        pszZipName[nLength - 1] = '\0';
258258
259      // get the entry name
260      ziperr = zip_file_open(pszZipName, &zip);
261      if (ziperr == ZIPERR_NONE)
262      {
263         zipent = zip_file_first_file(zip);
264         while(!rc && zipent)
265         {
266            if (!mame_stricmp(zipent->filename, pFileInfo->zip_entry_name))
267            {
268               pBuffer = (unsigned char *)malloc(zipent->uncompressed_length);
269               if (pBuffer)
270               {
271                  ziperr = zip_file_decompress(zip, pBuffer, zipent->uncompressed_length);
272                  if (ziperr == ZIPERR_NONE)
273                  {
274                     ComputeFileHash(pPickerInfo, pFileInfo, pBuffer, zipent->uncompressed_length);
275                     rc = TRUE;
276                  }
277                  free(pBuffer);
278               }
279            }
280            zipent = zip_file_next_file(zip);
281         }
282         zip_file_close(zip);
283      }
284   }
285   else
286   {
287      // plain open file; map it into memory and calculate the hash
288      hFile = win_create_file_utf8(pFileInfo->file_name, GENERIC_READ, FILE_SHARE_READ, NULL,
289         OPEN_EXISTING, 0, NULL);
290      if (hFile != INVALID_HANDLE_VALUE)
291      {
292         nLength = GetFileSize(hFile, NULL);
293         hFileMapping = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
294         if (hFileMapping)
295         {
296            pBuffer = (unsigned char *)MapViewOfFile(hFileMapping, FILE_MAP_READ, 0, 0, 0);
297            if (pBuffer)
298            {
299               ComputeFileHash(pPickerInfo, pFileInfo, pBuffer, nLength);
300               UnmapViewOfFile(pBuffer);
301               rc = TRUE;
302            }
303            CloseHandle(hFileMapping);
304         }
305         CloseHandle(hFile);
306      }
307   }
259        // get the entry name
260        ziperr = zip_file_open(pszZipName, &zip);
261        if (ziperr == ZIPERR_NONE)
262        {
263            zipent = zip_file_first_file(zip);
264            while(!rc && zipent)
265            {
266                if (!mame_stricmp(zipent->filename, pFileInfo->zip_entry_name))
267                {
268                    pBuffer = (unsigned char *)malloc(zipent->uncompressed_length);
269                    if (pBuffer)
270                    {
271                        ziperr = zip_file_decompress(zip, pBuffer, zipent->uncompressed_length);
272                        if (ziperr == ZIPERR_NONE)
273                        {
274                            ComputeFileHash(pPickerInfo, pFileInfo, pBuffer, zipent->uncompressed_length);
275                            rc = TRUE;
276                        }
277                        free(pBuffer);
278                    }
279                }
280                zipent = zip_file_next_file(zip);
281            }
282            zip_file_close(zip);
283        }
284    }
285    else
286    {
287        // plain open file; map it into memory and calculate the hash
288        hFile = win_create_file_utf8(pFileInfo->file_name, GENERIC_READ, FILE_SHARE_READ, NULL,
289            OPEN_EXISTING, 0, NULL);
290        if (hFile != INVALID_HANDLE_VALUE)
291        {
292            nLength = GetFileSize(hFile, NULL);
293            hFileMapping = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
294            if (hFileMapping)
295            {
296                pBuffer = (unsigned char *)MapViewOfFile(hFileMapping, FILE_MAP_READ, 0, 0, 0);
297                if (pBuffer)
298                {
299                    ComputeFileHash(pPickerInfo, pFileInfo, pBuffer, nLength);
300                    UnmapViewOfFile(pBuffer);
301                    rc = TRUE;
302                }
303                CloseHandle(hFileMapping);
304            }
305            CloseHandle(hFile);
306        }
307    }
308308
309   if (rc)
310   {
311      memset(&lvfi, 0, sizeof(lvfi));
312      lvfi.flags = LVFI_PARAM;
313      lvfi.lParam = nIndex;
314      nIndex = ListView_FindItem(hwndPicker, -1, &lvfi);
315      if (nIndex > 0)
316         res = ListView_RedrawItems(hwndPicker, nIndex, nIndex);
317   }
309    if (rc)
310    {
311        memset(&lvfi, 0, sizeof(lvfi));
312        lvfi.flags = LVFI_PARAM;
313        lvfi.lParam = nIndex;
314        nIndex = ListView_FindItem(hwndPicker, -1, &lvfi);
315        if (nIndex > 0)
316            res = ListView_RedrawItems(hwndPicker, nIndex, nIndex);
317    }
318318
319   return rc;
319    return rc;
320320}
321321
322322*/
r11247r11248
325325{
326326   software_picker_info *pPickerInfo;
327327   file_info *pFileInfo;
328//   const char *nHashFunctionsUsed = NULL;
328//  const char *nHashFunctionsUsed = NULL;
329329   //unsigned int nCalculatedHashes = 0;
330//   iodevice_t type;
330//  iodevice_t type;
331331
332332   pPickerInfo = GetSoftwarePickerInfo(hwndPicker);
333333   assert((nIndex >= 0) && (nIndex < pPickerInfo->file_index_length));
r11247r11248
336336   // Determine which hash functions we need to use for this file, and which hashes
337337   // have already been calculated
338338   /*if ((pPickerInfo->config->hashfile != NULL) && (pFileInfo->device != NULL))
339   {
340      type = pFileInfo->device->image_type();
341      if (type < IO_COUNT)
342           nHashFunctionsUsed = hashfile_functions_used(pPickerInfo->config->hashfile, type);
343      nCalculatedHashes = hash_data_used_functions(pFileInfo->hash_string);
344   }*/
339    {
340        type = pFileInfo->device->image_type();
341        if (type < IO_COUNT)
342            nHashFunctionsUsed = hashfile_functions_used(pPickerInfo->config->hashfile, type);
343        nCalculatedHashes = hash_data_used_functions(pFileInfo->hash_string);
344    }*/
345345
346346   // Did we fully compute all hashes?
347/*   if ((nHashFunctionsUsed & ~nCalculatedHashes) == 0)
348   {
349      // We have calculated all hashs for this file; mark it as realized
350      pPickerInfo->file_index[nIndex]->hash_realized = TRUE;
351      pPickerInfo->hashes_realized++;
347/*  if ((nHashFunctionsUsed & ~nCalculatedHashes) == 0)
348    {
349        // We have calculated all hashs for this file; mark it as realized
350        pPickerInfo->file_index[nIndex]->hash_realized = TRUE;
351        pPickerInfo->hashes_realized++;
352352
353      if (pPickerInfo->config->hashfile)
354      {
355         pPickerInfo->file_index[nIndex]->hashinfo = hashfile_lookup(pPickerInfo->config->hashfile,
356            pPickerInfo->file_index[nIndex]->hashes);
357      }
358   }*/
353        if (pPickerInfo->config->hashfile)
354        {
355            pPickerInfo->file_index[nIndex]->hashinfo = hashfile_lookup(pPickerInfo->config->hashfile,
356                pPickerInfo->file_index[nIndex]->hashes);
357        }
358    }*/
359359}
360360
361361
r11247r11248
690690      pFileInfo = pPickerInfo->file_index[pPickerInfo->current_position];
691691      if (!pFileInfo->hash_realized)
692692      {
693/*         if (hashfile_functions_used(pPickerInfo->config->hashfile, pFileInfo->device->image_type()))
694         {
695            // only calculate the hash if it is appropriate for this device
696            if (!SoftwarePicker_CalculateHash(hwndPicker, pPickerInfo->current_position))
697               return FALSE;
698         }*/
693/*          if (hashfile_functions_used(pPickerInfo->config->hashfile, pFileInfo->device->image_type()))
694            {
695                // only calculate the hash if it is appropriate for this device
696                if (!SoftwarePicker_CalculateHash(hwndPicker, pPickerInfo->current_position))
697                    return FALSE;
698            }*/
699699         SoftwarePicker_RealizeHash(hwndPicker, pPickerInfo->current_position);
700700
701701         // under normal circumstances this will be redundant, but in the unlikely
r11247r11248
727727   LPCTSTR s = NULL;
728728   //const char *pszUtf8 = NULL;
729729   unsigned int nHashFunction = 0;
730//   char szBuffer[256];
730//  char szBuffer[256];
731731   TCHAR* t_buf;
732732
733733   pPickerInfo = GetSoftwarePickerInfo(hwndPicker);
r11247r11248
751751      case MESS_COLUMN_MANUFACTURER:
752752      case MESS_COLUMN_YEAR:
753753      case MESS_COLUMN_PLAYABLE:
754/*         if (pFileInfo->hashinfo)
755         {
756            switch(nColumn)
757            {
758               case MESS_COLUMN_GOODNAME:
759                  pszUtf8 = pFileInfo->hashinfo->longname;
760                  break;
761               case MESS_COLUMN_MANUFACTURER:
762                  pszUtf8 = pFileInfo->hashinfo->manufacturer;
763                  break;
764               case MESS_COLUMN_YEAR:
765                  pszUtf8 = pFileInfo->hashinfo->year;
766                  break;
767               case MESS_COLUMN_PLAYABLE:
768                  pszUtf8 = pFileInfo->hashinfo->playable;
769                  break;
770            }
771            if (pszUtf8)
772            {
773               t_buf = tstring_from_utf8(pszUtf8);
774               if( !t_buf )
775                  return s;
776               _sntprintf(pszBuffer, nBufferLength, TEXT("%s"), t_buf);
777               s = pszBuffer;
778               osd_free(t_buf);
779            }
780         }*/
754/*          if (pFileInfo->hashinfo)
755            {
756                switch(nColumn)
757                {
758                    case MESS_COLUMN_GOODNAME:
759                        pszUtf8 = pFileInfo->hashinfo->longname;
760                        break;
761                    case MESS_COLUMN_MANUFACTURER:
762                        pszUtf8 = pFileInfo->hashinfo->manufacturer;
763                        break;
764                    case MESS_COLUMN_YEAR:
765                        pszUtf8 = pFileInfo->hashinfo->year;
766                        break;
767                    case MESS_COLUMN_PLAYABLE:
768                        pszUtf8 = pFileInfo->hashinfo->playable;
769                        break;
770                }
771                if (pszUtf8)
772                {
773                    t_buf = tstring_from_utf8(pszUtf8);
774                    if( !t_buf )
775                        return s;
776                    _sntprintf(pszBuffer, nBufferLength, TEXT("%s"), t_buf);
777                    s = pszBuffer;
778                    osd_free(t_buf);
779                }
780            }*/
781781         break;
782782
783783      case MESS_COLUMN_CRC:
r11247r11248
789789            case MESS_COLUMN_MD5:   nHashFunction = hash_collection::HASH_MD5;   break;
790790            case MESS_COLUMN_SHA1:   nHashFunction = hash_collection::HASH_SHA1;   break;
791791         }
792/*         if (hash_data_extract_printable_checksum(pFileInfo->hash_string, nHashFunction, szBuffer))
793         {
794            t_buf = tstring_from_utf8(szBuffer);
795            if( !t_buf )
796               return s;
797            _sntprintf(pszBuffer, nBufferLength, TEXT("%s"), t_buf);
798            s = pszBuffer;
799            osd_free(t_buf);
800         }*/
792/*          if (hash_data_extract_printable_checksum(pFileInfo->hash_string, nHashFunction, szBuffer))
793            {
794                t_buf = tstring_from_utf8(szBuffer);
795                if( !t_buf )
796                    return s;
797                _sntprintf(pszBuffer, nBufferLength, TEXT("%s"), t_buf);
798                s = pszBuffer;
799                osd_free(t_buf);
800            }*/
801801         break;
802802   }
803803   return s;
src/osd/winui/winui.c
r11247r11248
878878   windows_options mame_opts;
879879   astring error_string;
880880   // set up MAME options
881//   mame_opts = mame_options_init(mame_win_options);
882   
881//  mame_opts = mame_options_init(mame_win_options);
882
883883   // Tell mame were to get the INIs
884884   mame_opts.set_value(OPTION_INIPATH, GetIniDir(), OPTION_PRIORITY_CMDLINE,error_string);
885885
r11247r11248
905905
906906   if (g_szSelectedSoftware[0] && g_szSelectedDevice[0]) {
907907         mame_opts.set_value(g_szSelectedDevice, g_szSelectedSoftware, OPTION_PRIORITY_CMDLINE,error_string);
908         // Add params and clear so next start of driver is without parameters         
908         // Add params and clear so next start of driver is without parameters
909909         g_szSelectedSoftware[0] = 0;
910910         g_szSelectedDevice[0] = 0;
911911   }
r11247r11248
970970      for (i = 0; i < __argc; i++)
971971         osd_free(utf8_argv[i]);
972972      free(utf8_argv);
973     
973
974974      exit(rc);
975975   }
976976   if (!Win32UI_init(hInstance, lpCmdLine, nCmdShow))
r11247r11248
13001300      HWND hwndSoftwareList;
13011301
13021302      ShowWindow(GetDlgItem(hMain,IDC_SWTAB),SW_SHOW);
1303     
1303
13041304      hwndSoftwarePicker = GetDlgItem(GetMainWindow(), IDC_SWLIST);
13051305      hwndSoftwareDevView = GetDlgItem(GetMainWindow(), IDC_SWDEVVIEW);
13061306      hwndSoftwareList = GetDlgItem(GetMainWindow(), IDC_SOFTLIST);
r11247r11248
21042104static void Win32UI_exit()
21052105{
21062106   MySoftwareListClose();
2107   
2107
21082108    if (g_bDoBroadcast == TRUE)
21092109    {
21102110        ATOM a = GlobalAddAtom(TEXT(""));
r11247r11248
33683368         {
33693369            ResetListView();
33703370            MessUpdateSoftwareList();
3371            UpdateScreenShot();           
3371            UpdateScreenShot();
33723372         }
33733373      }
33743374      return TRUE;
r11247r11248
51645164      win_message_box_utf8(hwndList, "Cannot allocate small icon image list", "Allocation error - Exiting", IDOK);
51655165      PostQuitMessage(0);
51665166   }
5167   
5167
51685168   hLarge = ImageList_Create(dwLargeIconSize, dwLargeIconSize,
51695169                       ILC_COLORDDB | ILC_MASK, icon_count, icon_count + grow);
51705170
r11247r11248
52805280      {
52815281         machine_config config1(driver_list::driver(index1),MameUIGlobal());
52825282         machine_config config2(driver_list::driver(index2),MameUIGlobal());
5283         
5283
52845284         value = isDriverVector(&config1) - isDriverVector(&config2);
52855285      }
52865286      break;
r11247r11248
56975697      // call the MAME core function to check the save state file
56985698      //rc = state_manager::check_file(NULL, pSaveState, selected_filename, MameMessageBox);
56995699      //if (rc)
5700//         return;
5700//          return;
57015701
57025702      memset(&playopts, 0, sizeof(playopts));
57035703#ifdef MESS
r11247r11248
59055905   /* Redraw list view */
59065906   if (hBackground != NULL && showSoftware)
59075907      InvalidateRect(hwndList, NULL, FALSE);
5908#endif     
5908#endif
59095909}
59105910
59115911static void AdjustMetrics(void)
src/osd/winui/properties.c
r11247r11248
1010  that you have read the license and understand and accept it fully.
1111
1212 ***************************************************************************/
13
13
1414/***************************************************************************
1515
1616  Properties.c
1717
1818    Properties Popup and Misc UI support routines.
19   
19
2020    Created 8/29/98 by Mike Haaland (mhaaland@hypertech.com)
2121
2222***************************************************************************/
r11247r11248
2525
2626MSH - 20070809
2727--
28Notes on properties and ini files, reset and reset to default.
28Notes on properties and ini files, reset and reset to default.
2929----------------------------------------------------------------------------
3030Each ini contains a complete option set.
3131
r11247r11248
247247{
248248   const TCHAR*   m_pText;
249249   const char*      m_pData;
250} g_ComboBoxVideo[] =
250} g_ComboBoxVideo[] =
251251{
252252   { TEXT("None"),                 "none"    },
253253   { TEXT("GDI"),                  "gdi"    },
r11247r11248
260260{
261261   const TCHAR*   m_pText;
262262   const int      m_pData;
263} g_ComboBoxD3DVersion[] =
263} g_ComboBoxD3DVersion[] =
264264{
265265   { TEXT("Version 9"),           9   },
266266   { TEXT("Version 8"),           8   },
r11247r11248
272272{
273273   const TCHAR*   m_pText;
274274   const int      m_pData;
275} g_ComboBoxSelectScreen[] =
275} g_ComboBoxSelectScreen[] =
276276{
277277   { TEXT("Screen 0"),             0    },
278278   { TEXT("Screen 1"),             1    },
r11247r11248
285285{
286286   const TCHAR*   m_pText;
287287   const char*      m_pData;
288} g_ComboBoxView[] =
288} g_ComboBoxView[] =
289289{
290290   { TEXT("Auto"),              "auto"        },
291   { TEXT("Standard"),         "standard"    },
292   { TEXT("Pixel Aspect"),     "pixel"       },
291   { TEXT("Standard"),         "standard"    },
292   { TEXT("Pixel Aspect"),     "pixel"       },
293293   { TEXT("Cocktail"),         "cocktail"    },
294294};
295295#define NUMVIEW (sizeof(g_ComboBoxView) / sizeof(g_ComboBoxView[0]))
r11247r11248
300300{
301301   const TCHAR*   m_pText;
302302   const char*    m_pData;
303} g_ComboBoxDevice[] =
303} g_ComboBoxDevice[] =
304304{
305305   { TEXT("None"),                  "none"      },
306306   { TEXT("Keyboard"),              "keyboard"  },
r11247r11248
315315{
316316   const TCHAR*   m_pText;
317317   const char*      m_pData;
318} g_ComboBoxSnapView[] =
318} g_ComboBoxSnapView[] =
319319{
320320   { TEXT("Internal"),           "internal"    },
321321   { TEXT("Auto"),              "auto"        },
322   { TEXT("Standard"),         "standard"    },
323   { TEXT("Pixel Aspect"),     "pixel"       },
322   { TEXT("Standard"),         "standard"    },
323   { TEXT("Pixel Aspect"),     "pixel"       },
324324   { TEXT("Cocktail"),         "cocktail"    },
325325};
326326#define NUMSNAPVIEW (sizeof(g_ComboBoxSnapView) / sizeof(g_ComboBoxSnapView[0]))
r11247r11248
483483   PROPSHEETPAGE   *pspage;
484484   TCHAR*          t_description = 0;
485485   OPTIONS_TYPE    default_type = opt_type;
486   
486
487487   if (highlight_brush == NULL)
488488      highlight_brush = CreateSolidBrush(HIGHLIGHT_COLOR);
489489
r11247r11248
529529
530530   ZeroMemory(&pshead, sizeof(PROPSHEETHEADER));
531531
532   // Set the game to audio to this game
532   // Set the game to audio to this game
533533   InitGameAudit(game_num);
534534
535535   // Create the propery sheets
r11247r11248
626626
627627      gotone = cpu->next(cpu);
628628    }
629   
629
630630   return buf;
631631}
632632
633633/* Build Sound system info string */
634634static char *GameInfoSound(UINT nIndex)
635635{
636   static char buf[1024];   
636   static char buf[1024];
637637
638638   buf[0] = 0;
639   
639
640640   machine_config config(driver_list::driver(nIndex),pCurrentOpts);
641   
641
642642   /* iterate over sound chips */
643643   const device_config_sound_interface *sound = NULL;
644644   bool gotone = config.m_devicelist.first(sound);
r11247r11248
701701
702702   if (isDriverVector(&config))
703703   {
704      strcpy(buf, "Vector Game");
704      strcpy(buf, "Vector Game");
705705   }
706706   else
707707   {
708708      const screen_device_config *screen = config.first_screen();
709709      if (screen == NULL) {
710         strcpy(buf, "Screenless Game");
710         strcpy(buf, "Screenless Game");
711711      }
712712      else {
713713         for (; screen != NULL; screen = screen->next_screen()) {
r11247r11248
752752   int audit_result = GetRomAuditResults(driver_index);
753753   memset(buffer,0,sizeof(char)*1024);
754754   if ( bRomStatus )
755    {
755   {
756756      if (IsAuditResultKnown(audit_result) == FALSE)
757       {
757      {
758758         strcpy(buffer, "Unknown");
759759      }
760760      else if (IsAuditResultYes(audit_result))
761761      {
762762         if (DriverIsBroken(driver_index))
763          {
763         {
764764            strcpy(buffer, "Not working");
765           
765
766766            if (driver_list::driver(driver_index).flags & GAME_UNEMULATED_PROTECTION)
767767            {
768768               if (*buffer != '\0')
r11247r11248
805805                  strcat(buffer, "\r\n");
806806               strcat(buffer, "Screen flipping is not supported");
807807            }
808             if (driver_list::driver(driver_index).flags & GAME_REQUIRES_ARTWORK)
808            if (driver_list::driver(driver_index).flags & GAME_REQUIRES_ARTWORK)
809809            {
810810               if (*buffer != '\0')
811811                  strcat(buffer, "\r\n");
812812               strcat(buffer, "Game requires artwork");
813            }           
814          }
813            }
814         }
815815         else
816816         {
817817            strcpy(buffer, "Working");
818           
818
819819            if (driver_list::driver(driver_index).flags & GAME_UNEMULATED_PROTECTION)
820820            {
821821               if (*buffer != '\0')
r11247r11248
863863               if (*buffer != '\0')
864864                  strcat(buffer, "\r\n");
865865               strcat(buffer, "Game requires artwork");
866            }           
866            }
867867         }
868868      }
869869      else
r11247r11248
886886      else
887887      {
888888         strcpy(buffer, "Working");
889      }   
889      }
890890      if (driver_list::driver(driver_index).flags & GAME_UNEMULATED_PROTECTION)
891891      {
892892         if (*buffer != '\0')
r11247r11248
934934         if (*buffer != '\0')
935935            strcat(buffer, "\r\n");
936936         strcat(buffer, "Game requires artwork");
937      }     
937      }
938938   }
939939   return buffer;
940940}
r11247r11248
944944{
945945   static char buffer[1024];
946946
947   snprintf(buffer,sizeof(buffer),"%s %s",driver_list::driver(nIndex).year,driver_list::driver(nIndex).manufacturer);
947   snprintf(buffer,sizeof(buffer),"%s %s",driver_list::driver(nIndex).year,driver_list::driver(nIndex).manufacturer);
948948   return buffer;
949949}
950950
r11247r11248
959959      OPTIONS_VERTICAL == opt_type || OPTIONS_HORIZONTAL == opt_type)
960960      strcpy(buf, "Global folder options\nDefault options used by all games in the folder");
961961   else
962      sprintf(buf, "%s\n\"%s\"", ModifyThe(driver_list::driver(nIndex).description), driver_list::driver(nIndex).name);
962      sprintf(buf, "%s\n\"%s\"", ModifyThe(driver_list::driver(nIndex).description), driver_list::driver(nIndex).name);
963963   return buf;
964964}
965965
r11247r11248
976976      nParentIndex = GetParentIndex(&driver_list::driver(nIndex));
977977      sprintf(buf, "%s - \"%s\"",
978978         ConvertAmpersandString(ModifyThe(driver_list::driver(nParentIndex).description)),
979         driver_list::driver(nParentIndex).name);
979         driver_list::driver(nParentIndex).name);
980980   }
981981
982982   return buf;
r11247r11248
10131013      win_set_window_text_utf8(GetDlgItem(hDlg, IDC_PROP_COLORS),        GameInfoColors(g_nGame));
10141014      win_set_window_text_utf8(GetDlgItem(hDlg, IDC_PROP_CLONEOF),       GameInfoCloneOf(g_nGame));
10151015      win_set_window_text_utf8(GetDlgItem(hDlg, IDC_PROP_SOURCE),        GameInfoSource(g_nGame));
1016     
1016
10171017      if (DriverIsClone(g_nGame))
10181018      {
10191019         ShowWindow(GetDlgItem(hDlg, IDC_PROP_CLONEOF_TEXT), SW_SHOW);
r11247r11248
10341034/* Handle all options property pages */
10351035INT_PTR CALLBACK GameOptionsProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
10361036{
1037//   RECT rc;
1038//   int nParentIndex = -1;
1037//  RECT rc;
1038//  int nParentIndex = -1;
10391039   switch (Msg)
10401040   {
10411041   case WM_INITDIALOG:
r11247r11248
10551055         EnableWindow(GetDlgItem(hDlg, IDC_USE_DEFAULT), (g_bUseDefaults) ? FALSE : TRUE);
10561056      EnableWindow(GetDlgItem(hDlg, IDC_PROP_RESET), g_bReset);
10571057      ShowWindow(hDlg, SW_SHOW);
1058   
1058
10591059      return 1;
10601060
10611061   case WM_HSCROLL:
r11247r11248
10771077   case WM_COMMAND:
10781078      {
10791079         /* Below, 'changed' is used to signify the 'Apply'
1080          * button should be enabled.
1081          */
1080             * button should be enabled.
1081             */
10821082         WORD wID         = GET_WM_COMMAND_ID(wParam, lParam);
10831083         HWND hWndCtrl    = GET_WM_COMMAND_HWND(wParam, lParam);
10841084         WORD wNotifyCode = GET_WM_COMMAND_CMD(wParam, lParam);
r11247r11248
11561156            //options_copy(pCurrentOpts, pDefaultOpts);
11571157            // repopulate the controls with the new data
11581158            UpdateProperties(hDlg, properties_datamap, pCurrentOpts);
1159           
1159
11601160            g_bUseDefaults = pCurrentOpts == pDefaultOpts;
11611161            // This evaluates properly
11621162            g_bReset = (pCurrentOpts == pOrigOpts) ? FALSE : TRUE;
r11247r11248
11891189               UpdateProperties(hDlg, properties_datamap, pCurrentOpts);
11901190               changed = TRUE;
11911191               /*
1192               datamap_populate_control(properties_datamap, hDlg, pCurrentOpts, IDC_SCREENSELECT);
1193               datamap_populate_control(properties_datamap, hDlg, pCurrentOpts, IDC_SCREEN);
1194               datamap_populate_control(properties_datamap, hDlg, pCurrentOpts, IDC_REFRESH);
1195               datamap_populate_control(properties_datamap, hDlg, pCurrentOpts, IDC_SIZES);
1196               datamap_populate_control(properties_datamap, hDlg, pCurrentOpts, IDC_VIEW);
1197               datamap_populate_control(properties_datamap, hDlg, pCurrentOpts, IDC_SWITCHRES);
1192                    datamap_populate_control(properties_datamap, hDlg, pCurrentOpts, IDC_SCREENSELECT);
1193                    datamap_populate_control(properties_datamap, hDlg, pCurrentOpts, IDC_SCREEN);
1194                    datamap_populate_control(properties_datamap, hDlg, pCurrentOpts, IDC_REFRESH);
1195                    datamap_populate_control(properties_datamap, hDlg, pCurrentOpts, IDC_SIZES);
1196                    datamap_populate_control(properties_datamap, hDlg, pCurrentOpts, IDC_VIEW);
1197                    datamap_populate_control(properties_datamap, hDlg, pCurrentOpts, IDC_SWITCHRES);
11981198
1199               if (strcmp(options_get_string(pCurrentOpts, "screen0"), options_get_string(pOrigOpts, "screen0")) ||
1200                  strcmp(options_get_string(pCurrentOpts, "screen1"), options_get_string(pOrigOpts, "screen1")) ||
1201                  strcmp(options_get_string(pCurrentOpts, "screen2"), options_get_string(pOrigOpts, "screen2")) ||
1202                  strcmp(options_get_string(pCurrentOpts, "screen3"), options_get_string(pOrigOpts, "screen3")))
1203               {
1204                  changed = TRUE;
1205               }
1206               */
1199                    if (strcmp(options_get_string(pCurrentOpts, "screen0"), options_get_string(pOrigOpts, "screen0")) ||
1200                        strcmp(options_get_string(pCurrentOpts, "screen1"), options_get_string(pOrigOpts, "screen1")) ||
1201                        strcmp(options_get_string(pCurrentOpts, "screen2"), options_get_string(pOrigOpts, "screen2")) ||
1202                        strcmp(options_get_string(pCurrentOpts, "screen3"), options_get_string(pOrigOpts, "screen3")))
1203                    {
1204                        changed = TRUE;
1205                    }
1206                    */
12071207            }
12081208            break;
12091209         default:
r11247r11248
12181218               // combo box
12191219               if ((wNotifyCode == CBN_SELCHANGE) || (wNotifyCode == CBN_SELENDOK))
12201220               {
1221                   changed = datamap_read_control(properties_datamap, hDlg, pCurrentOpts, wID);
1221                  changed = datamap_read_control(properties_datamap, hDlg, pCurrentOpts, wID);
12221222               }
12231223            }
12241224            else if (!_tcscmp(szClass, WC_BUTTON) && (GetWindowLong(hWndCtrl, GWL_STYLE) & BS_CHECKBOX))
r11247r11248
12411241         }
12421242
12431243         // If we are closing, pCurrentOpts may be null
1244/*         if (NULL != pCurrentOpts)
1245         {
1246            // make sure everything's copied over, to determine what's changed
1247            UpdateOptions(hDlg, properties_datamap, pCurrentOpts);
1248            SetPropEnabledControls(hDlg);
1249            // redraw it, it might be a new color now
1250            if (GetDlgItem(hDlg,wID))
1251               InvalidateRect(GetDlgItem(hDlg,wID),NULL,FALSE);
1252         }*/
1244/*          if (NULL != pCurrentOpts)
1245            {
1246                // make sure everything's copied over, to determine what's changed
1247                UpdateOptions(hDlg, properties_datamap, pCurrentOpts);
1248                SetPropEnabledControls(hDlg);
1249                // redraw it, it might be a new color now
1250                if (GetDlgItem(hDlg,wID))
1251                    InvalidateRect(GetDlgItem(hDlg,wID),NULL,FALSE);
1252            }*/
12531253      }
12541254      break;
12551255
12561256   case WM_NOTIFY:
12571257      {
12581258         // Set to true if we are exiting the properites dialog
1259         BOOL bClosing = ((LPPSHNOTIFY) lParam)->lParam;
1259         BOOL bClosing = ((LPPSHNOTIFY) lParam)->lParam;
12601260
12611261         switch (((NMHDR *) lParam)->code)
12621262         {
1263            //We'll need to use a CheckState Table
1263            //We'll need to use a CheckState Table
12641264            //Because this one gets called for all kinds of other things too, and not only if a check is set
12651265         case PSN_SETACTIVE:
12661266            /* Initialize the controls. */
r11247r11248
12791279            if (bClosing)
12801280            {
12811281               //if (NULL == pCurrentOpts)
1282//                  return TRUE;
1282//                      return TRUE;
12831283            }
12841284
12851285            // Read the datamap
r11247r11248
12871287
12881288            // Copy current options to orignal options.
12891289            //options_copy(pOrigOpts, pCurrentOpts);
1290           
1290
12911291            // Repopulate the controls?  WTF?  We just read them, they should be fine.
12921292            UpdateProperties(hDlg, properties_datamap, pCurrentOpts);
12931293
r11247r11248
13271327
13281328            ResetDataMap(hDlg);
13291329            SetWindowLongPtr(hDlg, DWLP_MSGRESULT, FALSE);
1330            return 1; 
1330            return 1;
13311331
13321332         case PSN_RESET:
13331333            // Reset to the original values. Disregard changes
r11247r11248
13471347      HelpFunction((HWND)((LPHELPINFO)lParam)->hItemHandle, MAMEUICONTEXTHELP, HH_TP_HELP_WM_HELP, GetHelpIDs());
13481348      break;
13491349
1350   case WM_CONTEXTMENU:
1350   case WM_CONTEXTMENU:
13511351      HelpFunction((HWND)wParam, MAMEUICONTEXTHELP, HH_TP_HELP_CONTEXTMENU, GetHelpIDs());
1352      break;
1352      break;
13531353
13541354   }
13551355   EnableWindow(GetDlgItem(hDlg, IDC_PROP_RESET), g_bReset);
r11247r11248
13681368   // It appears these are here to clear the global struct we are removing!
13691369   // FIXME
13701370   //if (g_nGame > -1)
1371   //   SetGameUsesDefaults(g_nGame,g_bUseDefaults);
1371   //  SetGameUsesDefaults(g_nGame,g_bUseDefaults);
13721372
13731373   /* aspect ratio */
13741374   hCtrl  = GetDlgItem(hWnd, IDC_ASPECTRATION);
r11247r11248
16241624   int in_window = 0;
16251625
16261626   nIndex = g_nGame;
1627   
1627
16281628   d3d = !mame_stricmp(pCurrentOpts.value(WINOPTION_VIDEO), "d3d");
16291629   ddraw = !mame_stricmp(pCurrentOpts.value(WINOPTION_VIDEO), "ddraw");
16301630   gdi = !d3d && !ddraw;
r11247r11248
16621662
16631663   EnableWindow(GetDlgItem(hWnd,IDC_D3D_FILTER),d3d);
16641664   EnableWindow(GetDlgItem(hWnd,IDC_D3D_VERSION),d3d);
1665   
1665
16661666   //Switchres and D3D or ddraw enable the per screen parameters
16671667
16681668   EnableWindow(GetDlgItem(hWnd, IDC_NUMSCREENS),                 (ddraw || d3d));
r11247r11248
17211721      else
17221722      {
17231723         BOOL use_lightgun;
1724         // Older than XP
1724         // Older than XP
17251725         Button_Enable(GetDlgItem(hWnd,IDC_LIGHTGUN),TRUE);
17261726         use_lightgun = Button_GetCheck(GetDlgItem(hWnd,IDC_LIGHTGUN));
17271727         Button_Enable(GetDlgItem(hWnd,IDC_DUAL_LIGHTGUN),use_lightgun);
r11247r11248
17521752      EnableWindow(GetDlgItem(hWnd,IDC_AUDIO_LATENCY_TEXT),sound);
17531753      SetSamplesEnabled(hWnd, nIndex, sound);
17541754   }
1755   
1755
17561756   if (Button_GetCheck(GetDlgItem(hWnd, IDC_AUTOFRAMESKIP)))
17571757      EnableWindow(GetDlgItem(hWnd, IDC_FRAMESKIP), FALSE);
17581758   else
r11247r11248
19431943
19441944static BOOL DefaultInputReadControl(datamap *map, HWND dialog, HWND control, windows_options *opts, const char *option_name)
19451945{
1946   TCHAR *input_option_value;   
1946   TCHAR *input_option_value;
19471947   int input_option_index;
19481948   char *op_val;
19491949   astring error_string;
19501950
19511951   input_option_index = ComboBox_GetCurSel(control);
1952   input_option_value = (TCHAR*) ComboBox_GetItemData(control, input_option_index);   
1952   input_option_value = (TCHAR*) ComboBox_GetItemData(control, input_option_index);
19531953   op_val = utf8_from_tstring(input_option_value);
19541954   opts->set_value(OPTION_CTRLR, op_val, OPTION_PRIORITY_CMDLINE,error_string);
19551955   assert(!error_string);
r11247r11248
19901990   (void)ComboBox_InsertString(control, index, TEXT("Standard"));
19911991   (void)ComboBox_SetItemData(control, index, "");
19921992   index++;
1993   
1993
19941994   t_ctrldir = tstring_from_utf8(GetCtrlrDir());
19951995   if( !t_ctrldir )
19961996   {
r11247r11248
20002000   }
20012001
20022002   _stprintf (path, TEXT("%s\\*.*"), t_ctrldir);
2003   
2003
20042004   osd_free(t_ctrldir);
20052005
20062006   hFind = FindFirstFile(path, &FindFileData);
20072007
20082008   if (hFind != INVALID_HANDLE_VALUE)
20092009   {
2010      do
2010      do
20112011      {
20122012         // copy the filename
20132013         _tcscpy (root,FindFileData.cFileName);
r11247r11248
20342034         }
20352035      }
20362036      while (FindNextFile (hFind, &FindFileData) != 0);
2037     
2037
20382038      FindClose (hFind);
20392039   }
20402040
20412041   (void)ComboBox_SetCurSel(control, selected);
2042   
2042
20432043   if( t_buf )
20442044      osd_free(t_buf);
20452045
r11247r11248
20752075      else
20762076      {
20772077         snprintf(option_value, ARRAY_LENGTH(option_value), "auto");
2078      }     
2078      }
20792079      opts->set_value(option_name, option_value, OPTION_PRIORITY_CMDLINE,error_string);
20802080      assert(!error_string);
20812081   }
r11247r11248
21492149
21502150            }
21512151         }
2152         if (devmode.dmDisplayFrequency >= 10 )
2152         if (devmode.dmDisplayFrequency >= 10 )
21532153         {
21542154            // I have some devmode "vga" which specifes 1 Hz, which is probably bogus, so we filter it out
21552155
r11247r11248
21902190
21912191   snprintf(screen_option, ARRAY_LENGTH(screen_option), "screen%d", GetSelectedScreen(hWnd));
21922192
2193   if (pCurrentOpts.value(screen_option) == NULL
2193   if (pCurrentOpts.value(screen_option) == NULL
21942194      || (mame_stricmp(pCurrentOpts.value(screen_option), "") == 0 )
21952195      || (mame_stricmp(pCurrentOpts.value(screen_option), "auto") == 0 ) )
21962196   {
r11247r11248
22592259   datamap_add(properties_datamap, IDC_VOLUME,               DM_INT,      OPTION_VOLUME);
22602260   datamap_add(properties_datamap, IDC_VOLUMEDISP,            DM_INT,      OPTION_VOLUME);
22612261
2262   // core input options
2262   // core input options
22632263   datamap_add(properties_datamap, IDC_COINLOCKOUT,         DM_BOOL,   OPTION_COIN_LOCKOUT);
22642264   datamap_add(properties_datamap, IDC_DEFAULT_INPUT,         DM_STRING,   OPTION_CTRLR);
22652265   datamap_add(properties_datamap, IDC_USE_MOUSE,            DM_BOOL,   OPTION_MOUSE);
r11247r11248
23152315   datamap_add(properties_datamap, IDC_KEEPASPECT,            DM_BOOL,   WINOPTION_KEEPASPECT);
23162316   datamap_add(properties_datamap, IDC_PRESCALE,            DM_INT,      WINOPTION_PRESCALE);
23172317   datamap_add(properties_datamap, IDC_PRESCALEDISP,         DM_INT,      WINOPTION_PRESCALE);
2318   // datamap_add(properties_datamap, IDC_EFFECT,               DM_STRING,   OPTION_EFFECT);
2318   // datamap_add(properties_datamap, IDC_EFFECT,                  DM_STRING,  OPTION_EFFECT);
23192319   datamap_add(properties_datamap, IDC_WAITVSYNC,            DM_BOOL,   WINOPTION_WAITVSYNC);
23202320   datamap_add(properties_datamap, IDC_SYNCREFRESH,         DM_BOOL,   WINOPTION_SYNCREFRESH);
23212321
r11247r11248
23512351
23522352   // input device options
23532353   datamap_add(properties_datamap, IDC_DUAL_LIGHTGUN,         DM_BOOL,   WINOPTION_DUAL_LIGHTGUN);
2354   
2354
23552355   // show menu
23562356   datamap_add(properties_datamap, IDC_SHOW_MENU,            DM_BOOL,   WINOPTION_MENU);
23572357
r11247r11248
23662366   datamap_set_callback(properties_datamap, IDC_REFRESH,      DCT_POPULATE_CONTROL,   ResolutionPopulateControl);
23672367   datamap_set_callback(properties_datamap, IDC_SIZES,         DCT_READ_CONTROL,      ResolutionReadControl);
23682368   datamap_set_callback(properties_datamap, IDC_SIZES,         DCT_POPULATE_CONTROL,   ResolutionPopulateControl);
2369   datamap_set_callback(properties_datamap, IDC_DEFAULT_INPUT,   DCT_READ_CONTROL,      DefaultInputReadControl);   
2369   datamap_set_callback(properties_datamap, IDC_DEFAULT_INPUT,   DCT_READ_CONTROL,      DefaultInputReadControl);
23702370   datamap_set_callback(properties_datamap, IDC_DEFAULT_INPUT,   DCT_POPULATE_CONTROL,   DefaultInputPopulateControl);
23712371   datamap_set_callback(properties_datamap, IDC_SNAPVIEW,      DCT_POPULATE_CONTROL,   SnapViewPopulateControl);
23722372
r11247r11248
24112411
24122412   hCtrl = GetDlgItem(hWnd, IDC_SAMPLES);
24132413
2414   
2414
24152415   if (hCtrl)
2416   {     
2416   {
24172417      const device_config_sound_interface *sound;
24182418      if ( nIndex > -1 ) {
24192419         machine_config config(driver_list::driver(nIndex),pCurrentOpts);
2420     
2420
24212421         for (bool gotone = config.m_devicelist.first(sound); gotone; gotone = sound->next(sound))
24222422         {
24232423            if (sound->devconfig().type() == SAMPLES ||
r11247r11248
29192919
29202920        // Create a compatible DC
29212921        hDCMem = CreateCompatibleDC(hDC);
2922        hBmp = CreateCompatibleBitmap(hDC,
2922        hBmp = CreateCompatibleBitmap(hDC,
29232923               rc.right - rc.left, rc.bottom - rc.top);
29242924        hBmpOld = (HBITMAP)(SelectObject(hDCMem, hBmp));
29252925
29262926        // Tell the tab control to paint in our DC
2927        SendMessage(hwndTab, WM_PRINTCLIENT, (WPARAM)(hDCMem),
2927        SendMessage(hwndTab, WM_PRINTCLIENT, (WPARAM)(hDCMem),
29282928           (LPARAM)(PRF_ERASEBKGND | PRF_CLIENT | PRF_NONCLIENT));
29292929
29302930        // Create a pattern brush from the bitmap selected in our DC
src/mess/tiny.lst
r11247r11248
11/******************************************************************************
22
33    tiny.lst
4   
4
55    List of all enabled drivers in the system. This file is parsed by
66    makelist.exe, sorted, and output as C code describing the drivers.
77
r11247r11248
3838
3939******************************************************************************/
4040
41coleco       // ColecoVision (Original BIOS)
41coleco      // ColecoVision (Original BIOS)
4242colecoa    // ColecoVision (Thick Characters)
4343colecob    // Spectravideo SVI-603 Coleco Game Adapter
4444
src/mess/hashfile.c
r11247r11248
250250            /* do we use this hash? */
251251            if (!state->selector_proc || state->selector_proc(state->hashfile, state->param, name, &hashes))
252252            {
253               hi = (hash_info*)pool_malloc_lib(state->hashfile->pool, sizeof(hash_info));               
253               hi = (hash_info*)pool_malloc_lib(state->hashfile->pool, sizeof(hash_info));
254254               if (!hi)
255255                  return;
256256               memset(hi, 0, sizeof(*hi));
r11247r11248
277277         else if (!strcmp(tagname, "pcb")){
278278         }
279279         else if (!strcmp(tagname, "extrainfo")) {
280            text_dest = (char **) &state->hi->extrainfo;     
280            text_dest = (char **) &state->hi->extrainfo;
281281         }
282282         else
283283            unknown_tag(state, tagname);
284         
284
285285         if (text_dest && state->hi)
286286            state->text_dest = text_dest;
287287         break;
r11247r11248
526526
527527   param.hashes = hashes;
528528   param.hi = NULL;
529   
529
530530   for (i = 0; i < hashfile->preloaded_hash_count; i++)
531531   {
532532      if (singular_selector_proc(hashfile, &param, NULL, hashfile->preloaded_hashes[i]->hashes))
r11247r11248
544544{
545545   hash_file *hashfile = NULL;
546546   const hash_info *info = NULL;
547   
547
548548   /* open the hash file */
549549   hashfile = hashfile_open(image.device().machine().options(), sysname, FALSE, NULL);
550550   if (!hashfile)
551551      return NULL;
552   
552
553553   /* look up this entry in the hash file */
554554   info = hashfile_lookup(hashfile, &image.hash());
555   
555
556556   if (!info || !info->extrainfo)
557557   {
558558      hashfile_close(hashfile);
559559      return NULL;
560560   }
561   
561
562562   extra_info = auto_strdup(image.device().machine(),info->extrainfo);
563563   if (!extra_info)
564564   {
565565      hashfile_close(hashfile);
566566      return NULL;
567567   }
568     
568
569569   /* copy the relevant entries */
570570   hashfile_close(hashfile);
571   
571
572572   return extra_info;
573573}
574574
575575const char *hashfile_extrainfo(device_image_interface &image)
576576{
577   const char *rc;   
577   const char *rc;
578578
579579   /* now read the hash file */
580580   image.crc();
src/mess/machine/psxcard.c
r11247r11248
11/*
22    psxcard.c - Sony PlayStation memory card device
3
3
44    by pSXAuthor
55    MESS conversion by R. Belmont
66*/
r11247r11248
6868   memset(cache, 0, 128*1024);
6969
7070   // save state registrations
71/*   save_item(NAME(pkt));
72   save_item(NAME(pkt_ptr));
73   save_item(NAME(pkt_sz));
74   save_item(NAME(pkt));
75   save_item(NAME(cache));
76   save_item(NAME(addr));
77   save_item(NAME(state));*/
71/*  save_item(NAME(pkt));
72    save_item(NAME(pkt_ptr));
73    save_item(NAME(pkt_sz));
74    save_item(NAME(pkt));
75    save_item(NAME(cache));
76    save_item(NAME(addr));
77    save_item(NAME(state));*/
7878}
7979
8080void psxcard_device::device_reset()
r11247r11248
9696      case state_illegal:
9797         if (to == 0x81)
9898         {
99//            printf("CARD: begin\n");
99//              printf("CARD: begin\n");
100100            state = state_command;
101101            *from = 0x00;
102102         }
r11247r11248
126126
127127      case state_addr_hi:
128128         addr=(to<<8);
129//         printf("addr_hi: %02x, addr = %x\n", to, addr);
129//          printf("addr_hi: %02x, addr = %x\n", to, addr);
130130         *from=0;
131131         state=state_addr_lo;
132132         break;
133133
134134      case state_addr_lo:
135135         addr|=(to&0xff);
136//         printf("addr_lo: %02x, addr = %x, cmd = %x\n", to, addr, cmd);
136//          printf("addr_lo: %02x, addr = %x, cmd = %x\n", to, addr, cmd);
137137         *from=(addr>>8);
138138
139139         switch (cmd)
r11247r11248
169169
170170      case state_read:
171171         //assert(to==0);
172//         printf("state_read: pkt_ptr = %d, pkt_sz = %d\n", pkt_ptr, pkt_sz);
172//          printf("state_read: pkt_ptr = %d, pkt_sz = %d\n", pkt_ptr, pkt_sz);
173173         *from=pkt[pkt_ptr++];
174174         if (pkt_ptr==pkt_sz)
175175         {
r11247r11248
228228   }
229229
230230   #ifdef debug_card
231//      printf("card: transfer to=%02x from=%02x ret=%c\n",to,*from,ret ? 'T' : 'F');
231//      printf("card: transfer to=%02x from=%02x ret=%c\n",to,*from,ret ? 'T' : 'F');
232232   #endif
233233
234234   return ret;
src/mess/machine/ataricrt.c
r11247r11248
611611   {
612612      /* load an optional (dual) cartidge */
613613      size = image.fread(&mem[0x4000], 0x8000);
614   }
614   }
615615   else
616616   {
617617      size = image.get_software_region_length("rom");
src/mess/machine/comxpl80.c
r11247r11248
11/*
22
3   TODO:
3    TODO:
44
5   - CPU type?
5    - CPU type?
66
77*/
88
r11247r11248
173173{
174174   return INPUT_PORTS_NAME( comxpl80 );
175175}
176     
177176
178177
178
179179//**************************************************************************
180180//  LIVE DEVICE
181181//**************************************************************************
r11247r11248
219219
220220
221221//-------------------------------------------------
222//  pa_w -
222//  pa_w -
223223//-------------------------------------------------
224224
225225WRITE8_MEMBER( comxpl80_device::pa_w )
r11247r11248
271271
272272
273273//-------------------------------------------------
274//  pb_w -
274//  pb_w -
275275//-------------------------------------------------
276276
277277WRITE8_MEMBER( comxpl80_device::pb_w )
r11247r11248
298298
299299
300300//-------------------------------------------------
301//  pc_w -
301//  pc_w -
302302//-------------------------------------------------
303303
304304WRITE8_MEMBER( comxpl80_device::pc_w )
r11247r11248
328328
329329
330330//-------------------------------------------------
331//  pd_r -
331//  pd_r -
332332//-------------------------------------------------
333333
334334READ8_MEMBER( comxpl80_device::pd_r )
src/mess/machine/hp48.c
r11247r11248
11841184   /* I/O RAM */
11851185   state->m_modules[0].off_mask = 0x0003f;  /* 32 B */
11861186   state->m_modules[0].read     = hp48_io_r;
1187   state->m_modules[0].read_name     = "hp48_io_r";   
1187   state->m_modules[0].read_name     = "hp48_io_r";
11881188   state->m_modules[0].write    = hp48_io_w;
11891189   state->m_modules[0].write_name    = "hp48_io_w";
11901190
src/mess/machine/isa_fdc.c
r11247r11248
5555//**************************************************************************
5656//  GLOBAL VARIABLES
5757//**************************************************************************
58
58
5959const device_type ISA8_FDC = isa8_fdc_device_config::static_alloc_device_config;
60
60
6161//**************************************************************************
6262//  DEVICE CONFIGURATION
6363//**************************************************************************
64
64
6565//-------------------------------------------------
6666//  isa8_fdc_device_config - constructor
6767//-------------------------------------------------
68
68
6969isa8_fdc_device_config::isa8_fdc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
7070        : device_config(mconfig, static_alloc_device_config, "ISA8_FDC", tag, owner, clock),
7171         device_config_isa8_card_interface(mconfig, *this)
7272{
7373}
74
74
7575//-------------------------------------------------
7676//  static_alloc_device_config - allocate a new
7777//  configuration object
7878//-------------------------------------------------
79
79
8080device_config *isa8_fdc_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
8181{
8282        return global_alloc(isa8_fdc_device_config(mconfig, tag, owner, clock));
8383}
84
84
8585//-------------------------------------------------
8686//  alloc_device - allocate a new device object
8787//-------------------------------------------------
88
88
8989device_t *isa8_fdc_device_config::alloc_device(running_machine &machine) const
9090{
9191        return auto_alloc(machine, isa8_fdc_device(machine, *this));
9292}
93
93
9494//-------------------------------------------------
9595//  machine_config_additions - device-specific
9696//  machine configurations
r11247r11248
104104//**************************************************************************
105105//  LIVE DEVICE
106106//**************************************************************************
107
107
108108//-------------------------------------------------
109109//  isa8_fdc_device - constructor
110110//-------------------------------------------------
111
111
112112isa8_fdc_device::isa8_fdc_device(running_machine &_machine, const isa8_fdc_device_config &config) :
113113        device_t(_machine, config),
114114      device_isa8_card_interface( _machine, config, *this ),
r11247r11248
117117      m_isa(*owner(),config.m_isa_tag)
118118{
119119}
120
120
121121//-------------------------------------------------
122122//  device_start - device-specific startup
123123//-------------------------------------------------
124
124
125125void isa8_fdc_device::device_start()
126{       
126{
127127   m_isa->add_isa_card(this, m_config.m_isa_num);
128   m_isa->install_device(this, 0x03f0, 0x03f7, 0, 0, FUNC(pc_fdc_r), FUNC(pc_fdc_w) );   
128   m_isa->install_device(this, 0x03f0, 0x03f7, 0, 0, FUNC(pc_fdc_r), FUNC(pc_fdc_w) );
129129}
130130
131131//-------------------------------------------------
132132//  device_reset - device-specific reset
133133//-------------------------------------------------
134
134
135135void isa8_fdc_device::device_reset()
136136{
137137   status_register_a = 0;
r11247r11248
144144   tc_state = 0;
145145   dma_state = 0;
146146   int_state = 0;
147   
147
148148   upd765_reset(m_upd765,0);
149149
150150   /* set FDC at reset */
r11247r11248
167167static WRITE_LINE_DEVICE_HANDLER(  pc_fdc_hw_interrupt )
168168{
169169   isa8_fdc_device   *fdc  = downcast<isa8_fdc_device *>(device->owner());
170   
170
171171   fdc->int_state = state;
172172
173173   /* if dma is not enabled, irq's are masked */
r11247r11248
313313   UINT8 data = 0xff;
314314
315315   isa8_fdc_device   *fdc  = downcast<isa8_fdc_device *>(device);
316   
316
317317   switch(offset)
318318   {
319319      case 0: /* status register a */
r11247r11248
347347static WRITE8_DEVICE_HANDLER ( pc_fdc_w )
348348{
349349   isa8_fdc_device   *fdc  = downcast<isa8_fdc_device *>(device);
350   
350
351351   if (LOG_FDC)
352352      logerror("pc_fdc_w(): pc=0x%08x offset=%d data=0x%02X\n", (unsigned) cpu_get_reg(device->machine().firstcpu,STATE_GENPC), offset, data);
353353
r11247r11248
406406   {
407407      /* dma acknowledge - and send byte to fdc */
408408      upd765_dack_w(m_upd765, 0,data);
409   }   
409   }
410410}
411411void isa8_fdc_device::eop_w(int state)
412412{
src/mess/machine/upd765.c
r11247r11248
12421242         if (floppy_get_heads_per_disk(flopimg_get_image(current_image(device)))==1) {
12431243            return 1;
12441244         } else {
1245            if (fdc->side==1)
1245            if (fdc->side==1)
12461246               return 1;
12471247         }
12481248      }
src/mess/machine/isa_fdc.h
r11247r11248
44
55**********************************************************************/
66#pragma once
7
7
88#ifndef ISA_FDC_H
99#define ISA_FDC_H
1010
r11247r11248
1414//**************************************************************************
1515//  TYPE DEFINITIONS
1616//**************************************************************************
17
17
1818// ======================> isa8_fdc_device_config
19 
20class isa8_fdc_device_config :
19
20class isa8_fdc_device_config :
2121      public device_config,
2222      public device_config_isa8_card_interface
2323{
2424        friend class isa8_device;
2525      friend class isa8_fdc_device;
26
26
2727        // construction/destruction
2828        isa8_fdc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
29
29
3030public:
3131        // allocators
3232        static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
3333        virtual device_t *alloc_device(running_machine &machine) const;
34     
34
3535      // optional information overrides
3636      virtual machine_config_constructor device_mconfig_additions() const;
3737};
38 
39 
38
39
4040// ======================> isa8_fdc_device
41 
42class isa8_fdc_device :
41
42class isa8_fdc_device :
4343      public device_t,
4444      public device_isa8_card_interface
4545{
4646        friend class isa8_fdc_device_config;
47
47
4848        // construction/destruction
4949        isa8_fdc_device(running_machine &_machine, const isa8_fdc_device_config &config);
5050
r11247r11248
6161      virtual void dack_w(int line,UINT8 data);
6262      virtual void eop_w(int state);
6363      virtual bool have_dack(int line);
64     
64
6565      int status_register_a;
6666      int status_register_b;
6767      int digital_output_register;
r11247r11248
7676      int dma_state;
7777      /* stored int state */
7878      int int_state;
79     
79
8080      required_device<device_t> m_upd765;
81public:     
81public:
8282      required_device<isa8_device> m_isa;
8383};
84 
85 
84
85
8686// device type definition
8787extern const device_type ISA8_FDC;
8888
src/mess/machine/c1581.c
r11247r11248
99
1010/*
1111
12   TODO:
12    TODO:
1313
14   - C1563 device
14    - C1563 device
1515
1616*/
1717
r11247r11248
145145
146146        bit     description
147147
148        PA0     
148        PA0
149149        PA1     /RDY
150        PA2     
150        PA2
151151        PA3     DEV# SEL (SW1)
152152        PA4     DEV# SEL (SW1)
153        PA5     
154        PA6     
153        PA5
154        PA6
155155        PA7     /DISK CHNG
156156
157157    */
r11247r11248
178178        bit     description
179179
180180        PA0     SIDE0
181        PA1     
181        PA1
182182        PA2     /MOTOR
183        PA3     
184        PA4     
183        PA3
184        PA4
185185        PA5     POWER LED
186186        PA6     ACT LED
187        PA7     
187        PA7
188188
189189    */
190190
r11247r11248
211211        bit     description
212212
213213        PB0     DATA IN
214        PB1     
214        PB1
215215        PB2     CLK IN
216        PB3     
217        PB4     
218        PB5     
216        PB3
217        PB4
218        PB5
219219        PB6     /WPRT
220220        PB7     ATN IN
221221
r11247r11248
245245
246246        bit     description
247247
248        PB0     
248        PB0
249249        PB1     DATA OUT
250        PB2     
250        PB2
251251        PB3     CLK OUT
252252        PB4     ATN ACK
253253        PB5     FAST SER DIR
254        PB6     
255        PB7     
254        PB6
255        PB7
256256
257257    */
258258
r11247r11248
436436
437437
438438//-------------------------------------------------
439//  iec_atn_w -
439//  iec_atn_w -
440440//-------------------------------------------------
441441
442442WRITE_LINE_MEMBER( c1581_device::iec_atn_w )
r11247r11248
448448
449449
450450//-------------------------------------------------
451//  iec_srq_w -
451//  iec_srq_w -
452452//-------------------------------------------------
453453
454454WRITE_LINE_MEMBER( c1581_device::iec_srq_w )
r11247r11248
461461
462462
463463//-------------------------------------------------
464//  iec_data_w -
464//  iec_data_w -
465465//-------------------------------------------------
466466
467467WRITE_LINE_MEMBER( c1581_device::iec_data_w )
r11247r11248
474474
475475
476476//-------------------------------------------------
477//  iec_reset_w -
477//  iec_reset_w -
478478//-------------------------------------------------
479479WRITE_LINE_MEMBER( c1581_device::iec_reset_w )
480480{
src/mess/machine/c1581.h
r11247r11248
7272protected:
7373    // device_config overrides
7474    virtual void device_config_complete();
75   
75
7676private:
7777   const char *m_bus_tag;
7878   int m_address;
src/mess/machine/mbee.c
r11247r11248
505505   mbee_state *state = machine.driver_data<mbee_state>();
506506   /* These values need to be fine tuned or the fdc repaired */
507507   wd17xx_set_pause_time(state->m_fdc, 45);       /* default is 40 usec if not set */
508//   wd17xx_set_complete_command_delay(state->m_fdc, 50);   /* default is 12 usec if not set */
508//  wd17xx_set_complete_command_delay(state->m_fdc, 50);   /* default is 12 usec if not set */
509509}
510510
511511MACHINE_RESET( mbee )
src/mess/machine/msx_slot.c
r11247r11248
11931193   UINT8 *p;
11941194
11951195   p = state->m_cart.sram.mem;
1196   
1196
11971197   emu_file f(machine.options().memcard_directory(), OPEN_FLAG_READ);
11981198   file_error filerr = f.open(state->m_sramfile);
11991199   if (filerr == FILERR_NONE)
src/mess/machine/ti99/hsgpl.c
r11247r11248
660660         at29c040a_is_dirty(card->gromb))
661661      {
662662         card->flashrom[0] = NVVERSION;
663         
663
664664         emu_file nvfile(device->machine().options().nvram_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
665665         filerr = nvfile.open(astring_c(hsname));
666666         if (filerr != FILERR_NONE)
src/mess/machine/coco.c
r11247r11248
29862986MACHINE_RESET( dgnalpha )
29872987{
29882988   coco_state *state = machine.driver_data<coco_state>();
2989//   device_t *fdc = machine.device("wd2797");
2990//   wd17xx_set_complete_command_delay(fdc,20);
2989//  device_t *fdc = machine.device("wd2797");
2990//  wd17xx_set_complete_command_delay(fdc,20);
29912991
29922992   /* state->m_dgnalpha_just_reset, is here to flag that we should ignore the first irq generated */
29932993   /* by the WD2797, it is reset to 0 after the first inurrupt */
src/mess/machine/8530scc.c
r11247r11248
203203      rate = scc->clock / brconst;
204204   }
205205   else
206   {   
206   {
207207      rate = 0;
208208   }
209209
r11247r11248
701701AppleTalk check:
702702
703703SCC: port B reg 9 write 0x40      Channel Reset B
704SCC: port B reg 4 write 0x20     SDLC mode
705SCC: port B reg 10 write 0xe0     CRC preset + FM0
706SCC: port B reg 6 write 0x00     SDLC address
707SCC: port B reg 7 write 0x7e     SDLC flag
708SCC: port B reg 12 write 0x06     baud rate low
709SCC: port B reg 13 write 0x00     baud rate high
710SCC: port B reg 14 write 0xc0     Set FM mode
711SCC: port B reg 3 write 0xdd     Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
712SCC: port B reg 2 write 0x00     interrupt vector 0
713SCC: port B reg 15 write 0x08     DCD interrupt enable
714SCC: port B reg 1 write 0x09     Rx IRQ on first char or special, ext int enable
715SCC: port B reg 9 write 0x0a     Master IRQ enable, no-vector mode
716SCC: port B reg 11 write 0x70     Rx clock = DPLL output, Tx clock = BR generator
717SCC: port B reg 14 write 0x21     Enter search mode, BR generator enable
718SCC: port B reg 5 write 0x60     Tx 8 bits/char
719SCC: port B reg 6 write 0x2a     SDLC address
704SCC: port B reg 4 write 0x20      SDLC mode
705SCC: port B reg 10 write 0xe0     CRC preset + FM0
706SCC: port B reg 6 write 0x00      SDLC address
707SCC: port B reg 7 write 0x7e      SDLC flag
708SCC: port B reg 12 write 0x06     baud rate low
709SCC: port B reg 13 write 0x00     baud rate high
710SCC: port B reg 14 write 0xc0     Set FM mode
711SCC: port B reg 3 write 0xdd      Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
712SCC: port B reg 2 write 0x00      interrupt vector 0
713SCC: port B reg 15 write 0x08     DCD interrupt enable
714SCC: port B reg 1 write 0x09      Rx IRQ on first char or special, ext int enable
715SCC: port B reg 9 write 0x0a      Master IRQ enable, no-vector mode
716SCC: port B reg 11 write 0x70     Rx clock = DPLL output, Tx clock = BR generator
717SCC: port B reg 14 write 0x21     Enter search mode, BR generator enable
718SCC: port B reg 5 write 0x60      Tx 8 bits/char
719SCC: port B reg 6 write 0x2a      SDLC address
720720SCC: port B reg 0 read 0x00
721SCC: port B reg 15 write 0x88     DCD interrupt enable, break/abort interrupt enable
721SCC: port B reg 15 write 0x88     DCD interrupt enable, break/abort interrupt enable
722722
723723(repeats)
724724SCC: port B reg 1 read 0x09
725725SCC: port B reg 3 write 0xd0
726SCC: port B reg 3 write 0xdd     Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
727SCC: port B reg 15 write 0x08     DCD interrupt enable
726SCC: port B reg 3 write 0xdd      Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
727SCC: port B reg 15 write 0x08     DCD interrupt enable
728728SCC: port B reg 0 read 0x00
729729SCC: port B reg 15 write 0x88
730730
731731System 7:
732732
733SCC: port B reg 9 write 0x40     Channel Reset B                                                       
734SCC: port B reg 4 write 0x20     SDLC mode
735SCC: port B reg 10 write 0xe0     CRC preset + FM0
736SCC: port B reg 6 write 0x00     SDLC address
737SCC: port B reg 7 write 0x7e     SDLC flag
738SCC: port B reg 12 write 0x06     baud rate low
739SCC: port B reg 13 write 0x00     baud rate high
740SCC: port B reg 14 write 0xc0     Set FM mode
741SCC: port B reg 3 write 0xdd     Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
742SCC: port B reg 2 write 0x00     interrupt vector 0
743SCC: port B reg 15 write 0x08     DCD interrupt enable
744SCC: port B reg 1 write 0x09     Rx IRQ on first char or special, ext int enable
745SCC: port B reg 9 write 0x0a     Master IRQ enable, no-vector mode
746SCC: port B reg 11 write 0x70     Rx clock = DPLL output, Tx clock = BR generator
747SCC: port B reg 14 write 0x21     Enter search mode, BR generator enable
748SCC: port B reg 5 write 0x60     Tx 8 bits/char
749SCC: port B reg 6 write 0x01     SDLC address
750SCC: port B reg 3 write 0xdd     Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
733SCC: port B reg 9 write 0x40      Channel Reset B
734SCC: port B reg 4 write 0x20      SDLC mode
735SCC: port B reg 10 write 0xe0     CRC preset + FM0
736SCC: port B reg 6 write 0x00      SDLC address
737SCC: port B reg 7 write 0x7e      SDLC flag
738SCC: port B reg 12 write 0x06     baud rate low
739SCC: port B reg 13 write 0x00     baud rate high
740SCC: port B reg 14 write 0xc0     Set FM mode
741SCC: port B reg 3 write 0xdd      Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
742SCC: port B reg 2 write 0x00      interrupt vector 0
743SCC: port B reg 15 write 0x08     DCD interrupt enable
744SCC: port B reg 1 write 0x09      Rx IRQ on first char or special, ext int enable
745SCC: port B reg 9 write 0x0a      Master IRQ enable, no-vector mode
746SCC: port B reg 11 write 0x70     Rx clock = DPLL output, Tx clock = BR generator
747SCC: port B reg 14 write 0x21     Enter search mode, BR generator enable
748SCC: port B reg 5 write 0x60      Tx 8 bits/char
749SCC: port B reg 6 write 0x01      SDLC address
750SCC: port B reg 3 write 0xdd      Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
751751
752752(repeats)
753753
754754SCC: port B reg 0 read 0x00
755SCC: port B reg 15 write 0x88     DCD interrupt enable, break/abort interrupt enable
756SCC: port B reg 15 write 0x08     DCD interrupt enable
757SCC: port B reg 1 read 0x09     Rx IRQ on first char or special, ext int enable                       
758SCC: port B reg 3 write 0xdd     Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
755SCC: port B reg 15 write 0x88     DCD interrupt enable, break/abort interrupt enable
756SCC: port B reg 15 write 0x08     DCD interrupt enable
757SCC: port B reg 1 read 0x09   Rx IRQ on first char or special, ext int enable
758SCC: port B reg 3 write 0xdd      Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
759759
760760*/
src/mess/machine/c128.c
r11247r11248
10791079WRITE8_DEVICE_HANDLER(c128_m6510_port_write)
10801080{
10811081   c128_state *state = device->machine().driver_data<c128_state>();
1082   
1082
10831083   UINT8 direction = offset; // HACK ALERT!
10841084
10851085   /* if line is marked as input then keep current value */
src/mess/machine/psxcd.c
r11247r11248
210210
211211      if (m_cd)
212212      {
213//         printf("psxcd: found disc!\n");
213//          printf("psxcd: found disc!\n");
214214         driver = open_mess_drv();
215215         driver->set_machine(machine());
216216         driver->set_cdrom_file(m_cd);
r11247r11248
218218      else
219219      {
220220         driver = NULL;
221//         printf("psxcd: Found device, but no disc\n");
221//          printf("psxcd: Found device, but no disc\n");
222222      }
223223   }
224224   else
225225   {
226226      driver = NULL;
227//      printf("psxcd: Device [%s] not found!\n", m_devname);
227//      printf("psxcd: Device [%s] not found!\n", m_devname);
228228   }
229229
230230}
r11247r11248
317317               }
318318            }
319319            /*else
320            {
321               if (rdp>=cur_res->sz)
322               {
323                  sr&=~(1<<5);
324               } else
325               {
326                  sr|=~(1<<5);
327                   res=cur_res->data[rdp++];
328               }
329            }
330            */
320                {
321                    if (rdp>=cur_res->sz)
322                    {
323                        sr&=~(1<<5);
324                    } else
325                    {
326                        sr|=~(1<<5);
327                        res=cur_res->data[rdp++];
328                    }
329                }
330                */
331331         }
332332         break;
333333
r11247r11248
473473                l[0],l[1],l[2]);
474474   }
475475
476    send_result(intr_complete);
476   send_result(intr_complete);
477477}
478478
479479void psxcd_device::cdcmd_play()
r11247r11248
490490         (curpos[1]==0) &&
491491         (curpos[2]==0))
492492   {
493       send_result(intr_acknowledge);
493      send_result(intr_acknowledge);
494494   } else
495495   {
496496      stop_read();
r11247r11248
676676   dst[1]=s;
677677   dst[2]=f;
678678}
679#endif                     
679#endif
680680static void sub_loc(unsigned char *dst, const unsigned char *src1, const unsigned char *src2)
681681{
682682   int f=src1[2]-src2[2],
r11247r11248
729729      decimal_to_bcd(tloc[2]),   // frame
730730      decimal_to_bcd(loc[0]),   // amin
731731      decimal_to_bcd(loc[1]),   // asec
732      decimal_to_bcd(loc[2])    // aframe
732      decimal_to_bcd(loc[2])   // aframe
733733   };
734734
735735   //unsigned char data[8]={ 2,1,0,0xff,0xff,0xff,0xff,0xff };
r11247r11248
972972//
973973
974974event *psxcd_device::send_result(const unsigned int res,
975                                            const unsigned char *data,
976                                            const unsigned int sz,
975                                          const unsigned char *data,
976                                          const unsigned int sz,
977977                                             const unsigned int delay)
978978{
979979   // Update shell open status
r11247r11248
981981   if (! open)
982982   {
983983      status=status_error|status_shellopen;
984   }
984   }
985985   else
986986   {
987987      if (status&status_shellopen)
r11247r11248
10411041      printf("cdrom: dma past end of sector (secleft=%d sz=%d)\n",secleft,size);
10421042   }
10431043
1044//   printf("cdrom: start dma %d bytes, %d remaining, secptr %p\n", size, secleft, secptr);
1044//  printf("cdrom: start dma %d bytes, %d remaining, secptr %p\n", size, secleft, secptr);
10451045   #ifdef debug_cdrom
10461046   if (size==12)
10471047   {
r11247r11248
10871087   assert(driver);
10881088   assert(secin<sector_buffer_size);
10891089
1090//   printf("read_next_sector: sec %d, sechead %d, raw_sector_size %d\n", pos, sechead, raw_sector_size);
1090//  printf("read_next_sector: sec %d, sechead %d, raw_sector_size %d\n", pos, sechead, raw_sector_size);
10911091   if (driver->read_sector(pos, buf, block))
10921092   {
1093//      printf("buf contents = %02x %02x | %02x %02x\n", buf[0], buf[1], buf[0x20], buf[0x21]);
1093//      printf("buf contents = %02x %02x | %02x %02x\n", buf[0], buf[1], buf[0x20], buf[0x21]);
10941094
10951095      sechead=(sechead+1)&(sector_buffer_size-1);
10961096      secin++;
r11247r11248
11251125            rawsec=&secbuf[raw_sector_size*sectail];
11261126            secptr=rawsec+24;
11271127            secleft=2048;
1128         }
1128         }
11291129         else
11301130         {
11311131            rawsec=&secbuf[raw_sector_size*sectail];
r11247r11248
12501250
12511251         if ((streaming) && (isxa))
12521252         {
1253             global_free(res);
1254             res=NULL;
1253            global_free(res);
1254            res=NULL;
12551255         }
12561256
12571257         if (res)
r11247r11248
13451345         }
13461346
13471347         unsigned char *cddaptr;
1348//         bool full=false;
1348//          bool full=false;
13491349         unsigned int cddasecsz;
13501350
13511351         while (1)
r11247r11248
15441544
15451545   status|=status_playing;
15461546
1547    secin=sechead=sectail=0;
1547   secin=sechead=sectail=0;
15481548   cdda_prefetch_sector=-1;
15491549
15501550   if (mode&mode_autopause)
15511551   {
15521552      unsigned int pos=msf_to_sector(curpos);
15531553      driver->find_track(pos+150,NULL,&autopause_sector);
1554//      printf("pos=%d auto=%d\n",pos,autopause_sector);
1554//      printf("pos=%d auto=%d\n",pos,autopause_sector);
15551555   }
15561556
15571557   unsigned int cyc=read_sector_cycles;
r11247r11248
16321632         }
16331633
16341634         first_open=false;
1635      }
1635      }
16361636   } else
16371637   {
16381638      driver=NULL;
r11247r11248
16541654{
16551655   event *ev = m_eventfortimer[tid];
16561656
1657//   printf("timer %d fired, performing event type %d\n", tid, ev->type);
1657//  printf("timer %d fired, performing event type %d\n", tid, ev->type);
16581658
16591659   switch (ev->type)
16601660   {
r11247r11248
16841684   }
16851685
16861686   // free the timer
1687//   printf("Freeing timer %d\n", tid);
1687//  printf("Freeing timer %d\n", tid);
16881688   m_timers[tid]->adjust(attotime::never, 0, attotime::never);
16891689   m_timerinuse[tid] = false;
16901690   m_eventfortimer[tid] = NULL;
r11247r11248
17171717
17181718   // ev->t is in maincpu clock cycles
17191719   UINT32 hz = m_sysclock / ev->t;
1720//   printf("add_system_event: event type %d for %d hz (using timer %d)\n", ev->type, hz, tnum);
1720//  printf("add_system_event: event type %d for %d hz (using timer %d)\n", ev->type, hz, tnum);
17211721   timer->adjust(attotime::from_hz(hz), tnum, attotime::never);
17221722
17231723   // back-reference the timer from the event
src/mess/machine/ay3600.c
r11247r11248
329329   state->m_keystilldown = 0;
330330   state->m_keymodreg = A2_KEYMOD_CAPSLOCK;   // caps lock on
331331
332   state->m_last_key = 0xff;    /* necessary for special repeat key behaviour */
332   state->m_last_key = 0xff;   /* necessary for special repeat key behaviour */
333333   state->m_last_key_unmodified = 0xff;   /* necessary for special repeat key behaviour */
334334   state->m_time_until_repeat = MAGIC_KEY_REPEAT_NUMBER;
335335
src/mess/machine/psxcd.h
r11247r11248
2727#define MCFG_PSXCD_ADD(_devname) \
2828    MCFG_DEVICE_ADD(PSXCD_TAG, PSXCD, 0) \
2929   MCFG_PSXCD_DEVNAME(_devname)
30   
30
3131#define MCFG_PSXCD_DEVNAME(_name) \
3232   psxcd_device_config::static_set_devname(device, _name); \
3333
r11247r11248
7171      command_result *next;
7272   };
7373
74   static const unsigned int sector_buffer_size=16, default_irq_delay=16000;   //480;   //8000;   //2000<<2;
74   static const unsigned int sector_buffer_size=16, default_irq_delay=16000;   //480;  //8000; //2000<<2;
7575
7676   unsigned char sr,res,ir,cmdmode,
7777                        cmdbuf[64],*cbp,
src/mess/machine/vic1112.c
r11247r11248
336336
337337
338338//-------------------------------------------------
339//  srq_w -
339//  srq_w -
340340//-------------------------------------------------
341341
342342WRITE_LINE_MEMBER( vic1112_device::srq_w )
src/mess/machine/c2040.c
r11247r11248
16851685
16861686      /* --- the following bits of info are returned as NULL-terminated strings --- */
16871687      case DEVINFO_STR_NAME:                     strcpy(info->s, "Commodore 8050");                     break;
1688      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "c8050");                           break;     
1688      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "c8050");                           break;
16891689
16901690      default:                              DEVICE_GET_INFO_CALL(c2040);                        break;
16911691   }
r11247r11248
17061706      /* --- the following bits of info are returned as NULL-terminated strings --- */
17071707      case DEVINFO_STR_NAME:                     strcpy(info->s, "Commodore 8250");                     break;
17081708      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "c8250");                           break;
1709   
1709
17101710      default:                              DEVICE_GET_INFO_CALL(c2040);                        break;
17111711   }
17121712}
src/mess/machine/vic1112.h
r11247r11248
4444#define VIC1112_INTERFACE(name) \
4545   const vic1112_interface (name) =
4646
47   
47
4848#define VIC1112_IEEE488 \
4949   VIC1112_TAG, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, \
5050   DEVCB_DEVICE_LINE_MEMBER(VIC1112_TAG, vic1112_device, srq_w), DEVCB_NULL, DEVCB_NULL
r11247r11248
8484protected:
8585    // device_config overrides
8686    virtual void device_config_complete();
87   
87
8888private:
8989   const char *m_bus_tag;
9090};
src/mess/machine/genpc.c
r11247r11248
6969
7070
7171READ8_MEMBER( ibm5160_mb_device::pc_dma_read_byte )
72{   
72{
7373   address_space *spaceio = m_maincpu->space(AS_PROGRAM);
7474   offs_t page_offset = (((offs_t) m_dma_offset[m_dma_channel]) << 16) & 0x0F0000;
7575   return spaceio->read_byte( page_offset + offset);
r11247r11248
142142   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_out_eop),
143143   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma_read_byte),
144144   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma_write_byte),
145   
146   { DEVCB_NULL,                     
147     DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_1_dack_r),
148     DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_2_dack_r),
145
146   { DEVCB_NULL,
147     DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_1_dack_r),
148     DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_2_dack_r),
149149     DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_3_dack_r) },
150   
151   
152   { DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_0_dack_w),
153     DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_1_dack_w),
154     DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_2_dack_w),
150
151
152   { DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_0_dack_w),
153     DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_1_dack_w),
154     DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_2_dack_w),
155155     DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_3_dack_w) },
156   
156
157157   // DACK's
158   { DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dack0_w),
159     DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dack1_w),
160     DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dack2_w),
158   { DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dack0_w),
159     DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dack1_w),
160     DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dack2_w),
161161     DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dack3_w) }
162162};
163163
r11247r11248
208208WRITE_LINE_MEMBER( ibm5160_mb_device::pc_pit8253_out2_changed )
209209{
210210   m_pc_input = state ? 1 : 0;
211   speaker_level_w( m_speaker, m_pc_spkrdata & m_pc_input );   
211   speaker_level_w( m_speaker, m_pc_spkrdata & m_pc_input );
212212}
213213
214214
r11247r11248
446446//**************************************************************************
447447//  GLOBAL VARIABLES
448448//**************************************************************************
449
449
450450const device_type IBM5160_MOTHERBOARD = ibm5160_mb_device_config::static_alloc_device_config;
451
451
452452//**************************************************************************
453453//  DEVICE CONFIGURATION
454454//**************************************************************************
r11247r11248
461461   MCFG_PIC8259_ADD( "pic8259", pc_pic8259_config )
462462
463463   MCFG_I8255A_ADD( "ppi8255", pc_ppi8255_interface )
464     
464
465465   MCFG_ISA8_BUS_ADD("isa", "maincpu", isabus_intf)
466466   /* sound hardware */
467467   MCFG_SPEAKER_STANDARD_MONO("mono")
r11247r11248
469469   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mb:mono", 1.00)
470470MACHINE_CONFIG_END
471471
472
472
473473//-------------------------------------------------
474474//  ibm5160_mb_device_config - constructor
475475//-------------------------------------------------
476
476
477477ibm5160_mb_device_config::ibm5160_mb_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
478478        : device_config(mconfig, static_alloc_device_config, "IBM5160_MOTHERBOARD", tag, owner, clock)
479479{
480480}
481
481
482482//-------------------------------------------------
483483//  static_alloc_device_config - allocate a new
484484//  configuration object
485485//-------------------------------------------------
486
486
487487device_config *ibm5160_mb_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
488488{
489489   return global_alloc(ibm5160_mb_device_config(mconfig, tag, owner, clock));
490490}
491
491
492492//-------------------------------------------------
493493//  alloc_device - allocate a new device object
494494//-------------------------------------------------
495
495
496496device_t *ibm5160_mb_device_config::alloc_device(running_machine &machine) const
497497{
498498   return auto_alloc(machine, ibm5160_mb_device(machine, *this));
r11247r11248
541541{
542542   return INPUT_PORTS_NAME( ibm5160_mb );
543543}
544   
545544
545
546546void ibm5160_mb_device_config::static_set_cputag(device_config *device, const char *tag)
547547{
548548   ibm5160_mb_device_config *board = downcast<ibm5160_mb_device_config *>(device);
r11247r11248
552552//**************************************************************************
553553//  LIVE DEVICE
554554//**************************************************************************
555
555
556556//-------------------------------------------------
557557//  ibm5160_mb_device - constructor
558558//-------------------------------------------------
559
559
560560ibm5160_mb_device::ibm5160_mb_device(running_machine &_machine, const ibm5160_mb_device_config &config) :
561561        device_t(_machine, config),
562562        m_config(config),
r11247r11248
569569      m_isabus(*this, "isa")
570570{
571571}
572
572
573573void ibm5160_mb_device::install_device(device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_device_func rhandler, const char* rhandler_name, write8_device_func whandler, const char *whandler_name)
574{   
574{
575575   int buswidth = machine().firstcpu->memory().space_config(AS_IO)->m_databus_width;
576576   switch(buswidth)
577577   {
r11247r11248
588588}
589589
590590void ibm5160_mb_device::install_device_write(device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, write8_device_func whandler, const char *whandler_name)
591{   
591{
592592   int buswidth = machine().firstcpu->memory().space_config(AS_IO)->m_databus_width;
593593   switch(buswidth)
594594   {
r11247r11248
631631//-------------------------------------------------
632632//  device_start - device-specific startup
633633//-------------------------------------------------
634
634
635635void ibm5160_mb_device::device_start()
636636{
637637   // resolve callbacks
638638   devcb_resolve_write_line(&m_kb_set_clock_signal_func, &m_config.m_kb_set_clock_signal_func, this);
639639   devcb_resolve_write_line(&m_kb_set_data_signal_func,  &m_config.m_kb_set_data_signal_func,  this);
640640
641   install_device(m_dma8237, 0x0000, 0x000f, 0, 0, FUNC(i8237_r), FUNC(i8237_w) );   
642   install_device(m_pic8259, 0x0020, 0x0021, 0, 0, FUNC(pic8259_r), FUNC(pic8259_w) );   
643   install_device(m_pit8253, 0x0040, 0x0043, 0, 0, FUNC(pit8253_r), FUNC(pit8253_w) );   
644   install_device(m_ppi8255, 0x0060, 0x0063, 0, 0, FUNC(i8255a_r), FUNC(i8255a_w) );   
645   install_device(this,    0x0080, 0x0087, 0, 0, FUNC(pc_page_r), FUNC(pc_page_w) );   
646   install_device_write(this,    0x00a0, 0x00a1, 0, 0, FUNC(nmi_enable_w));   
641   install_device(m_dma8237, 0x0000, 0x000f, 0, 0, FUNC(i8237_r), FUNC(i8237_w) );
642   install_device(m_pic8259, 0x0020, 0x0021, 0, 0, FUNC(pic8259_r), FUNC(pic8259_w) );
643   install_device(m_pit8253, 0x0040, 0x0043, 0, 0, FUNC(pit8253_r), FUNC(pit8253_w) );
644   install_device(m_ppi8255, 0x0060, 0x0063, 0, 0, FUNC(i8255a_r), FUNC(i8255a_w) );
645   install_device(this,    0x0080, 0x0087, 0, 0, FUNC(pc_page_r), FUNC(pc_page_w) );
646   install_device_write(this,    0x00a0, 0x00a1, 0, 0, FUNC(nmi_enable_w));
647647   /* MESS managed RAM */
648648   if ( ram_get_ptr(machine().device(RAM_TAG)) )
649      memory_set_bankptr( machine(), "bank10", ram_get_ptr(machine().device(RAM_TAG)) );   
649      memory_set_bankptr( machine(), "bank10", ram_get_ptr(machine().device(RAM_TAG)) );
650650}
651
651
652652IRQ_CALLBACK(ibm5160_mb_device::pc_irq_callback)
653653{
654654   device_t *pic = device->machine().device("mb:pic8259");
655   return pic8259_acknowledge( pic );   
655   return pic8259_acknowledge( pic );
656656}
657657
658658
659659//-------------------------------------------------
660660//  device_reset - device-specific reset
661661//-------------------------------------------------
662 
662
663663void ibm5160_mb_device::device_reset()
664664{
665665   device_set_irq_callback(m_maincpu, pc_irq_callback);
r11247r11248
687687//**************************************************************************
688688//  GLOBAL VARIABLES
689689//**************************************************************************
690
690
691691const device_type IBM5150_MOTHERBOARD = ibm5150_mb_device_config::static_alloc_device_config;
692
692
693693//**************************************************************************
694694//  DEVICE CONFIGURATION
695695//**************************************************************************
r11247r11248
703703
704704static MACHINE_CONFIG_FRAGMENT( ibm5150_mb_config )
705705   MCFG_FRAGMENT_ADD(ibm5160_mb_config)
706   
706
707707   MCFG_CASSETTE_ADD( "cassette", ibm5150_cassette_config )
708708MACHINE_CONFIG_END
709709
710
710
711711//-------------------------------------------------
712712//  ibm5150_mb_device_config - constructor
713713//-------------------------------------------------
714
714
715715ibm5150_mb_device_config::ibm5150_mb_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
716716        : ibm5160_mb_device_config(mconfig, tag, owner, clock)
717717{
718718}
719
719
720720//-------------------------------------------------
721721//  static_alloc_device_config - allocate a new
722722//  configuration object
723723//-------------------------------------------------
724
724
725725device_config *ibm5150_mb_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
726726{
727727   return global_alloc(ibm5150_mb_device_config(mconfig, tag, owner, clock));
728728}
729
729
730730//-------------------------------------------------
731731//  alloc_device - allocate a new device object
732732//-------------------------------------------------
733
733
734734device_t *ibm5150_mb_device_config::alloc_device(running_machine &machine) const
735735{
736736   return auto_alloc(machine, ibm5150_mb_device(machine, *this));
r11247r11248
749749//**************************************************************************
750750//  LIVE DEVICE
751751//**************************************************************************
752
752
753753//-------------------------------------------------
754754//  ibm5150_mb_device - constructor
755755//-------------------------------------------------
756
756
757757ibm5150_mb_device::ibm5150_mb_device(running_machine &_machine, const ibm5150_mb_device_config &config) :
758758        ibm5160_mb_device(_machine, config),
759759      m_cassette(*this, "cassette")
760760{
761761}
762
762
763763void ibm5150_mb_device::device_start()
764764{
765765   ibm5160_mb_device::device_start();
src/mess/machine/amigafdc.c
r11247r11248
658658      *(dest + 62) = (UINT8) ((even & 0xff00)>>8);
659659      *(dest + 63) = (UINT8) (even & 0xff);
660660   }
661   
661
662662   // update MFM data with proper CLK signal
663663   int lastbit= 0;
664664   for(int i=0;i<MAX_TRACK_BYTES ;i++)
665665   {
666      UINT8 c=fdc->fdc_status[drive].mfm[i];     
666      UINT8 c=fdc->fdc_status[drive].mfm[i];
667667      UINT8 dat = 0;
668668      for(int j=0;j<8;j=j+2)
669669      {
r11247r11248
677677         {
678678            if(lastbit==0 && (c1&0x2))
679679            {
680               dat |= (0x02<<(6-j));               
680               dat |= (0x02<<(6-j));
681681            }
682682            else
683683            {
src/mess/machine/c1541.c
r11247r11248
12881288
12891289      /* --- the following bits of info are returned as NULL-terminated strings --- */
12901290      case DEVINFO_STR_NAME:                     strcpy(info->s, "Commodore VIC-1540");                  break;
1291      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "vic1540");                           break;     
1291      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "vic1540");                           break;
12921292      case DEVINFO_STR_FAMILY:                  strcpy(info->s, "Commodore VIC-1540");                  break;
12931293      case DEVINFO_STR_VERSION:                  strcpy(info->s, "1.0");                              break;
12941294      case DEVINFO_STR_SOURCE_FILE:               strcpy(info->s, __FILE__);                           break;
r11247r11248
13101310
13111311      /* --- the following bits of info are returned as NULL-terminated strings --- */
13121312      case DEVINFO_STR_NAME:                     strcpy(info->s, "Commodore VIC-1541");                  break;
1313      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "vic1541");                           break;     
1314     
1313      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "vic1541");                           break;
1314
13151315      default:                              DEVICE_GET_INFO_CALL(c1540);                        break;
13161316   }
13171317}
r11247r11248
13301330
13311331      /* --- the following bits of info are returned as NULL-terminated strings --- */
13321332      case DEVINFO_STR_NAME:                     strcpy(info->s, "Commodore 1541C");                     break;
1333      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "vic1541c");                        break;     
1333      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "vic1541c");                        break;
13341334
13351335      default:                              DEVICE_GET_INFO_CALL(c1540);                        break;
13361336   }
r11247r11248
13501350
13511351      /* --- the following bits of info are returned as NULL-terminated strings --- */
13521352      case DEVINFO_STR_NAME:                     strcpy(info->s, "Commodore 1541-II");                  break;
1353      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "vic1541ii");                        break;     
1353      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "vic1541ii");                        break;
13541354
13551355      default:                              DEVICE_GET_INFO_CALL(c1540);                        break;
13561356   }
r11247r11248
13701370
13711371      /* --- the following bits of info are returned as NULL-terminated strings --- */
13721372      case DEVINFO_STR_NAME:                     strcpy(info->s, "Commodore SX1541");                  break;
1373      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "sx1541");                           break;     
1373      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "sx1541");                           break;
13741374
13751375      default:                              DEVICE_GET_INFO_CALL(c1540);                        break;
13761376   }
r11247r11248
13901390
13911391      /* --- the following bits of info are returned as NULL-terminated strings --- */
13921392      case DEVINFO_STR_NAME:                     strcpy(info->s, "Commodore 2031");                     break;
1393      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "c2031");                           break;     
1393      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "c2031");                           break;
13941394
13951395      default:                              DEVICE_GET_INFO_CALL(c1540);                        break;
13961396   }
r11247r11248
14101410
14111411      /* --- the following bits of info are returned as NULL-terminated strings --- */
14121412      case DEVINFO_STR_NAME:                     strcpy(info->s, "Oceanic OC-118");                     break;
1413      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "oc118");                           break;     
1413      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "oc118");                           break;
14141414
14151415      default:                              DEVICE_GET_INFO_CALL(c1540);                        break;
14161416   }
src/mess/machine/abcbus.c
r11247r11248
101101   {
102102      fatalerror("Daisy chain not provided!");
103103   }
104   
104
105105   m_daisy = intf;
106106}
107107
r11247r11248
129129void abcbus_device::device_start()
130130{
131131   const abcbus_config *daisy = m_config.m_daisy;
132   
132
133133   // create a linked list of devices
134134   daisy_entry **tailptr = &m_daisy_list;
135135   for ( ; daisy->devname != NULL; daisy++)
r11247r11248
165165
166166
167167//-------------------------------------------------
168//  cs_w -
168//  cs_w -
169169//-------------------------------------------------
170170
171171WRITE8_MEMBER( abcbus_device::cs_w )
r11247r11248
178178
179179
180180//-------------------------------------------------
181//  rst_r -
181//  rst_r -
182182//-------------------------------------------------
183183
184184READ8_MEMBER( abcbus_device::rst_r )
r11247r11248
188188      daisy->m_interface->abcbus_rst(0);
189189      daisy->m_interface->abcbus_rst(1);
190190   }
191   
191
192192   return 0xff;
193193}
194194
195195
196196//-------------------------------------------------
197//  inp_r -
197//  inp_r -
198198//-------------------------------------------------
199199
200200READ8_MEMBER( abcbus_device::inp_r )
r11247r11248
205205   {
206206      data &= daisy->m_interface->abcbus_inp();
207207   }
208   
208
209209   return data;
210210}
211211
212212
213213//-------------------------------------------------
214//  utp_w -
214//  utp_w -
215215//-------------------------------------------------
216216
217217WRITE8_MEMBER( abcbus_device::utp_w )
r11247r11248
224224
225225
226226//-------------------------------------------------
227//  stat_r -
227//  stat_r -
228228//-------------------------------------------------
229229
230230READ8_MEMBER( abcbus_device::stat_r )
r11247r11248
235235   {
236236      data &= daisy->m_interface->abcbus_stat();
237237   }
238   
238
239239   return data;
240240}
241241
242242
243243//-------------------------------------------------
244//  c1_w -
244//  c1_w -
245245//-------------------------------------------------
246246
247247WRITE8_MEMBER( abcbus_device::c1_w )
r11247r11248
254254
255255
256256//-------------------------------------------------
257//  c2_w -
257//  c2_w -
258258//-------------------------------------------------
259259
260260WRITE8_MEMBER( abcbus_device::c2_w )
r11247r11248
267267
268268
269269//-------------------------------------------------
270//  c3_w -
270//  c3_w -
271271//-------------------------------------------------
272272
273273WRITE8_MEMBER( abcbus_device::c3_w )
r11247r11248
280280
281281
282282//-------------------------------------------------
283//  c4_w -
283//  c4_w -
284284//-------------------------------------------------
285285
286286WRITE8_MEMBER( abcbus_device::c4_w )
r11247r11248
293293
294294
295295//-------------------------------------------------
296//  resin_w -
296//  resin_w -
297297//-------------------------------------------------
298298
299299WRITE_LINE_MEMBER( abcbus_device::resin_w )
r11247r11248
302302
303303
304304//-------------------------------------------------
305//  int_w -
305//  int_w -
306306//-------------------------------------------------
307307
308308WRITE_LINE_MEMBER( abcbus_device::int_w )
r11247r11248
311311
312312
313313//-------------------------------------------------
314//  nmi_w -
314//  nmi_w -
315315//-------------------------------------------------
316316
317317WRITE_LINE_MEMBER( abcbus_device::nmi_w )
r11247r11248
320320
321321
322322//-------------------------------------------------
323//  rdy_w -
323//  rdy_w -
324324//-------------------------------------------------
325325
326326WRITE_LINE_MEMBER( abcbus_device::rdy_w )
src/mess/machine/a7800.c
r11247r11248
166166{
167167   if (length <= 128)
168168      return;
169   dest.compute(&data[128], length - 128, functions);   
169   dest.compute(&data[128], length - 128, functions);
170170}
171171
172172
src/mess/machine/abcbus.h
r11247r11248
77
88**********************************************************************
99
10                       a     b
11            -12 V   <--   *  1  *   --> -12V
12            0 V     ---   *  2  *   --- 0 V
13            RESIN_  -->   *  3  *   --> XMEMWR_
14            0 V     ---   *  4  *   --> XMEMFL_
15            INT_    -->   *  5  *   --> phi
16            D7      <->   *  6  *   --- 0 V
17            D6      <->   *  7  *   --- 0 V
18            D5      <->   *  8  *   --- 0 V
19            D4      <->   *  9  *   --- 0 V
20            D3      <->   * 10  *   --- 0 V
21            D2      <->   * 11  *   --- 0 V
22            D1      <->   * 12  *   --- 0 V
23            D0      <->   * 13  *   --- 0 V
24                       * 14  *   --> A15
25            RST_    <--   * 15  *   --> A14
26            IN1     <--   * 16  *   --> A13
27            IN0     <--   * 17  *   --> A12
28            OUT5    <--   * 18  *   --> A11
29            OUT4    <--   * 19  *   --> A10
30            OUT3    <--   * 20  *   --> A9
31            OUT2    <--   * 21  *   --> A8
32            OUT0    <--   * 22  *   --> A7
33            OUT1    <--   * 23  *   --> A6
34            NMI_    -->   * 24  *   --> A5
35            INP2_   <--   * 25  *   --> A4
36            XINPSTB_ <--   * 26  *   --> A3
37           XOUTPSTB_ <--   * 27  *   --> A2
38            XM_     -->   * 28  *   --> A1
39            RFSH_   <--   * 29  *   --> A0
40            RDY     -->   * 30  *   --> MEMRQ_
41            +5 V    <--   * 31  *   --> +5 V
42            +12 V   <--   * 32  *   --> +12 V
10                              a     b
11                -12 V   <--   *  1  *   --> -12V
12                0 V     ---   *  2  *   --- 0 V
13                RESIN_  -->   *  3  *   --> XMEMWR_
14                0 V     ---   *  4  *   --> XMEMFL_
15                INT_    -->   *  5  *   --> phi
16                D7      <->   *  6  *   --- 0 V
17                D6      <->   *  7  *   --- 0 V
18                D5      <->   *  8  *   --- 0 V
19                D4      <->   *  9  *   --- 0 V
20                D3      <->   * 10  *   --- 0 V
21                D2      <->   * 11  *   --- 0 V
22                D1      <->   * 12  *   --- 0 V
23                D0      <->   * 13  *   --- 0 V
24                              * 14  *   --> A15
25                RST_    <--   * 15  *   --> A14
26                IN1     <--   * 16  *   --> A13
27                IN0     <--   * 17  *   --> A12
28                OUT5    <--   * 18  *   --> A11
29                OUT4    <--   * 19  *   --> A10
30                OUT3    <--   * 20  *   --> A9
31                OUT2    <--   * 21  *   --> A8
32                OUT0    <--   * 22  *   --> A7
33                OUT1    <--   * 23  *   --> A6
34                NMI_    -->   * 24  *   --> A5
35                INP2_   <--   * 25  *   --> A4
36               XINPSTB_ <--   * 26  *   --> A3
37              XOUTPSTB_ <--   * 27  *   --> A2
38                XM_     -->   * 28  *   --> A1
39                RFSH_   <--   * 29  *   --> A0
40                RDY     -->   * 30  *   --> MEMRQ_
41                +5 V    <--   * 31  *   --> +5 V
42                +12 V   <--   * 32  *   --> +12 V
4343
4444**********************************************************************/
4545
r11247r11248
5555    IN 0    _INP    data input
5656    IN 1    _STAT   status in
5757    IN 7    RST     reset
58   
58
5959*/
6060
6161#pragma once
r11247r11248
175175   DECLARE_WRITE8_MEMBER( c2_w );
176176   DECLARE_WRITE8_MEMBER( c3_w );
177177   DECLARE_WRITE8_MEMBER( c4_w );
178   
178
179179   DECLARE_WRITE_LINE_MEMBER( resin_w );
180180   DECLARE_WRITE_LINE_MEMBER( int_w );
181181   DECLARE_WRITE_LINE_MEMBER( nmi_w );
src/mess/machine/cs4031.c
r11247r11248
11/***************************************************************************
22
3   Chips & Technologies CS4031 chipset
3    Chips & Technologies CS4031 chipset
44
5   Chipset for 486 based PC/AT compatible systems. Consists of two
6   individual chips:
5    Chipset for 486 based PC/AT compatible systems. Consists of two
6    individual chips:
77
8   * F84031
9      - DRAM controller
10      - ISA-bus controller
11      - VESA VL-BUS controller
8    * F84031
9        - DRAM controller
10        - ISA-bus controller
11        - VESA VL-BUS controller
1212
13   * F84035
14      - 2x 8257 DMA controller
15      - 2x 8259 interrupt controller
16      - 8254 timer
17      - MC14818 RTC
13    * F84035
14        - 2x 8257 DMA controller
15        - 2x 8259 interrupt controller
16        - 8254 timer
17        - MC14818 RTC
1818
1919***************************************************************************/
2020
src/mess/machine/cs4031.h
r11247r11248
11/***************************************************************************
22
3   Chips & Technologies CS4031 chipset
3    Chips & Technologies CS4031 chipset
44
5   Chipset for 486 based PC/AT compatible systems. Consists of two
6   individual chips:
5    Chipset for 486 based PC/AT compatible systems. Consists of two
6    individual chips:
77
8   * F84031
9      - DRAM controller
10      - ISA-bus controller
11      - VESA VL-BUS controller
8    * F84031
9        - DRAM controller
10        - ISA-bus controller
11        - VESA VL-BUS controller
1212
13   * F84035
14      - 2x 8257 DMA controller
15      - 2x 8259 interrupt controller
16      - 8254 timer
17      - MC14818 RTC
13    * F84035
14        - 2x 8257 DMA controller
15        - 2x 8259 interrupt controller
16        - 8254 timer
17        - MC14818 RTC
1818
1919***************************************************************************/
2020
src/mess/machine/psxcddrv.c
r11247r11248
2727   m_cd = NULL;
2828   m_machine = NULL;
2929
30//   printf("cdrom_driver base class init, pf_buffer size is %d\n", num_pf_sectors*num_pf_buffers*raw_sector_size);
30//  printf("cdrom_driver base class init, pf_buffer size is %d\n", num_pf_sectors*num_pf_buffers*raw_sector_size);
3131
3232   pf_buffer=new unsigned char [num_pf_sectors*num_pf_buffers*raw_sector_size];
3333
r11247r11248
7272   int numpfsec=num_pf*num_pf_sectors,
7373         pfsec=sec-pf_head_sector;
7474
75//   printf("prefetch_sector: %d\n", sec);
75//  printf("prefetch_sector: %d\n", sec);
7676
7777   if ((pfsec<0) || (pfsec>numpfsec))
7878   {
r11247r11248
131131
132132   if (! comp)
133133   {
134      INT64 curtime=m_machine->device<cpu_device>("maincpu")->total_cycles();
134      INT64 curtime=m_machine->device<cpu_device>("maincpu")->total_cycles();
135135
136136      if (last_pf_status!=pf_status)
137137      {
r11247r11248
210210         pfsec=sec-pf_head_sector;
211211   if ((pfsec>=0) && (pfsec<numpfsec))
212212   {
213       int   blk=(pf_head+(pfsec/num_pf_sectors))%num_pf_buffers,
214             off=((blk*num_pf_sectors)+(pfsec%num_pf_sectors))*native_sector_size;
213      int   blk=(pf_head+(pfsec/num_pf_sectors))%num_pf_buffers,
214            off=((blk*num_pf_sectors)+(pfsec%num_pf_sectors))*native_sector_size;
215215      *sz=native_sector_size;
216216      return pf_buffer+off;
217217   } else
r11247r11248
228228{
229229   bool loaded=is_prefetch_sector_loaded(sec);
230230
231//   printf("read_sector: %d (loaded=%c)\n", sec, loaded ? 'Y' : 'N');
231//  printf("read_sector: %d (loaded=%c)\n", sec, loaded ? 'Y' : 'N');
232232
233233   if ((! loaded) && (block))
234234   {
r11247r11248
242242      unsigned char *ptr=get_prefetch_sector(sec,&secsz);
243243      assert(ptr);
244244
245//      printf("got sector %d @ %p, size %d = %02x %02x | %02x %02x\n", sec, ptr, secsz, ptr[0], ptr[1], ptr[0x20], ptr[0x21]);
245//      printf("got sector %d @ %p, size %d = %02x %02x | %02x %02x\n", sec, ptr, secsz, ptr[0], ptr[1], ptr[0x20], ptr[0x21]);
246246
247247      if (secsz<2352)
248248      {
r11247r11248
291291
292292   timestamp_frequency = m_machine->device<cpu_device>("maincpu")->clock();
293293
294//   printf("cdrom_driver::set_machine: timestamp frequency = %d\n", timestamp_frequency);
294//  printf("cdrom_driver::set_machine: timestamp frequency = %d\n", timestamp_frequency);
295295}
296296
297297/*
298   MAME/MESS driver implementation
298    MAME/MESS driver implementation
299299*/
300300
301301class mess_cdrom_driver : public cdrom_driver
r11247r11248
345345{
346346   for (int i=0; i<100; i++)
347347      toc[i].type=track_illegal;
348   num_tracks=0;
348   num_tracks=0;
349349   num_sectors=0;
350350}
351351
r11247r11248
382382      set_native_sector_size(bin_sector_size);
383383      num_sectors = cdrom_get_track_start(m_cd, num_tracks) + toc->tracks[num_tracks].frames;
384384
385//      printf("mess_cdrom_driver: %d sectors, native size %d\n",num_sectors, bin_sector_size);
385//      printf("mess_cdrom_driver: %d sectors, native size %d\n",num_sectors, bin_sector_size);
386386
387387      return true;
388388   }
r11247r11248
406406
407407   if ((startsec>=0)) // && ((int)startsec<num_sectors))
408408   {
409//      fin->seek((INT64)startsec*(INT64)bin_sector_size);
409//      fin->seek((INT64)startsec*(INT64)bin_sector_size);
410410
411//      io_status *ios=fin->async_read(buf,numsec*bin_sector_size);
412//      if (! ios)
411//      io_status *ios=fin->async_read(buf,numsec*bin_sector_size);
412//      if (! ios)
413413      for (int i = 0; i < numsec; i++)
414414      {
415//         printf("[%d/%d] Reading to pf_buffer %p at offset %d, size %d\n", i, numsec, &buf[secsize*i], secsize*i, secsize);
415//          printf("[%d/%d] Reading to pf_buffer %p at offset %d, size %d\n", i, numsec, &buf[secsize*i], secsize*i, secsize);
416416         cdrom_read_data(m_cd, startsec+i, &buf[secsize*i], CD_TRACK_RAW_DONTCARE);
417417      }
418418
419419      return NULL;
420420
421//      return ios;
421//      return ios;
422422   }
423423   else
424424   {
r11247r11248
442442
443443unsigned int mess_cdrom_driver::get_num_tracks() const
444444{
445//   printf("get_num_tracks = %d\n", num_tracks);
445//  printf("get_num_tracks = %d\n", num_tracks);
446446   return num_tracks;
447447}
448448
r11247r11248
458458      address[1] = address[1];
459459      address[2] = address[2];
460460
461//      printf("get_track_address %d = %02x:%02x:%02x\n", track, address[0], address[1], address[2]);
461//      printf("get_track_address %d = %02x:%02x:%02x\n", track, address[0], address[1], address[2]);
462462
463463      return true;
464   }
464   }
465465   else
466466   {
467467      address[0]=address[1]=address[2]=0;
r11247r11248
475475   UINT32 track = cdrom_get_track(m_cd, sector);
476476   int start;
477477
478   start = cdrom_get_track_start(m_cd, track);
478   start = cdrom_get_track_start(m_cd, track);
479479
480480   if (start_sector != NULL)
481481   {
r11247r11248
498498
499499cdromtype mess_cdrom_driver::get_type() const
500500{
501//   printf("get_type\n");
501//  printf("get_type\n");
502502   return cdromtype_cd;
503503}
504504
r11247r11248
510510{
511511   const cdrom_toc *toc = cdrom_get_toc(m_cd);
512512
513//   printf("get_track_type %d = %d\n", track, toc->tracks[track].trktype);
513//  printf("get_track_type %d = %d\n", track, toc->tracks[track].trktype);
514514
515515   switch (toc->tracks[track].trktype)
516516   {
src/mess/machine/wd17xx.c
r11247r11248
129129    - Copied multi-sector write code from r7263, for some reason this had been
130130      silently removed, but is required for the rmnimbus driver.
131131
132   2011-Mar-08 Phill Harvey-Smith
133   - Triggering intrq now clears the DRQ bit in the status as well as the busy bit.
134     Execution of the READ_DAM command now correctly sets w->command.
132    2011-Mar-08 Phill Harvey-Smith
133    - Triggering intrq now clears the DRQ bit in the status as well as the busy bit.
134      Execution of the READ_DAM command now correctly sets w->command.
135135
136   2011-Apr-01 Curt Coder
137   - Set complete command delay to 16 usec (DD) / 32 usec (SD) and removed
138     the external delay setting hack.
136    2011-Apr-01 Curt Coder
137    - Set complete command delay to 16 usec (DD) / 32 usec (SD) and removed
138      the external delay setting hack.
139139
140140    TODO:
141141        - What happens if a track is read that doesn't have any id's on it?
r11247r11248
399399INLINE wd1770_state *get_safe_token(device_t *device)
400400{
401401   assert(device != NULL);
402   assert(device->type() == WD1770 || device->type() == WD1771 || device->type() == WD1772 || device->type() == WD1773 ||
403      device->type() == WD1793 ||   device->type() == WD1795 || device->type() == WD1797 ||
404      device->type() == WD2793 || device->type() == WD2795 || device->type() == WD2797 ||
402   assert(device->type() == WD1770 || device->type() == WD1771 || device->type() == WD1772 || device->type() == WD1773 ||
403      device->type() == WD1793 ||   device->type() == WD1795 || device->type() == WD1797 ||
404      device->type() == WD2793 || device->type() == WD2795 || device->type() == WD2797 ||
405405      device->type() == WD177X || device->type() == WD179X || device->type() == MB8877);
406406
407407   return (wd1770_state *)downcast<legacy_device_base *>(device)->token();
r11247r11248
414414
415415static int wd17xx_has_side_select(device_t *device)
416416{
417   return (device->type() == WD1795 || device->type() == WD1797 ||
417   return (device->type() == WD1795 || device->type() == WD1797 ||
418418         device->type() == WD2795 || device->type() == WD2797);
419419}
420420
src/mess/machine/psxcddrv.h
r11247r11248
77{
88protected:
99   virtual ~io_status() {}
10   
10
1111public:
1212   io_status() { }
13   
13
1414   virtual void cancel()=0;
1515   virtual void release()=0;
1616   virtual bool complete() const=0;
r11247r11248
9696   if (sec>=150)
9797   {
9898      return sec-150;
99   }
99   }
100100   else
101101   {
102102      return 0;
src/mess/machine/s1410.c
r11247r11248
4444    CN3     - 2x10 PCB header, ST-506 drive 0 data
4545    CN4     - 2x10 PCB header, ST-506 drive 1 data
4646    CN5     - 2x25 PCB header, SASI host interface
47   
48   
47
48
4949ASSY 104766 REV C02 SN 231985P
5050
5151|-------------------------------------------|
5252|                                           |
53| CN1                     SY2158      |
53| CN1                           SY2158      |
5454|                               CN7     CN6 |
55|                        ROM         |
55|                               ROM         |
5656| CN2                                       |
57|         XEBEC1         Z80               |
57|           XEBEC1          Z80             |
5858|                                       CN5 |
59| CN3       XEBEC2   20MHz      XEBEC3      |
59| CN3       XEBEC2   20MHz      XEBEC3      |
6060|                                           |
61| CN4       XEBEC4            XEBEC5      |
61| CN4       XEBEC4              XEBEC5      |
6262|                                           |
6363|-------------------------------------------|
6464
r11247r11248
6767
6868    Z80     - Zilog Z8400APS Z80A CPU
6969    ROM     - 2732 pinout ROM "104788D"
70   SY2158   - Synertek SY2158A-3 1Kx8 RAM
70    SY2158  - Synertek SY2158A-3 1Kx8 RAM
7171    XEBEC1  - Xebec 3198-0046N8445
7272    XEBEC2  - Xebec 3198-0009
7373    XEBEC3  - Xebec 3198-0057
r11247r11248
7878    CN3     - 2x10 PCB header, ST-506 drive 0 data
7979    CN4     - 2x10 PCB header, ST-506 drive 1 data
8080    CN5     - 2x25 PCB header, SASI host interface
81   CN6      - 2x8 PCB header
82   CN7      - 2x10 PCB header (test only)
81    CN6     - 2x8 PCB header
82    CN7     - 2x10 PCB header (test only)
8383
8484*/
8585
src/mess/machine/comx35.c
r11247r11248
127127UINT8 comx35_state::read_expansion()
128128{
129129   UINT8 result;
130   
130
131131   switch (machine().phase())
132132   {
133133      case MACHINE_PHASE_RESET:
src/mess/machine/64h156.c
r11247r11248
99
1010/*
1111
12   TODO:
12    TODO:
1313
14   - serial IEC protocol handling
15   - write to disk image
14    - serial IEC protocol handling
15    - write to disk image
1616
1717*/
1818
r11247r11248
7979//**************************************************************************
8080
8181//-------------------------------------------------
82//  set_atn_line -
82//  set_atn_line -
8383//-------------------------------------------------
8484
8585inline void c64h156_device::set_atn_line()
r11247r11248
9191
9292
9393//-------------------------------------------------
94//  set_sync_line -
94//  set_sync_line -
9595//-------------------------------------------------
9696
9797inline void c64h156_device::set_sync_line(int state)
r11247r11248
103103
104104
105105//-------------------------------------------------
106//  set_byte_line -
106//  set_byte_line -
107107//-------------------------------------------------
108108
109109inline void c64h156_device::set_byte_line(int state)
r11247r11248
115115
116116
117117//-------------------------------------------------
118//  read_current_track -
118//  read_current_track -
119119//-------------------------------------------------
120120
121121inline void c64h156_device::read_current_track()
r11247r11248
136136
137137
138138//-------------------------------------------------
139//  receive_bit -
139//  receive_bit -
140140//-------------------------------------------------
141141
142142inline void c64h156_device::receive_bit()
r11247r11248
262262
263263
264264//-------------------------------------------------
265//  yb_r -
265//  yb_r -
266266//-------------------------------------------------
267267
268268READ8_MEMBER( c64h156_device::yb_r )
r11247r11248
274274
275275
276276//-------------------------------------------------
277//  yb_w -
277//  yb_w -
278278//-------------------------------------------------
279279
280280WRITE8_MEMBER( c64h156_device::yb_w )
r11247r11248
284284
285285
286286//-------------------------------------------------
287//  test_w -
287//  test_w -
288288//-------------------------------------------------
289289
290290WRITE_LINE_MEMBER( c64h156_device::test_w )
r11247r11248
293293
294294
295295//-------------------------------------------------
296//  accl_w -
296//  accl_w -
297297//-------------------------------------------------
298298
299299WRITE_LINE_MEMBER( c64h156_device::accl_w )
r11247r11248
303303
304304
305305//-------------------------------------------------
306//  sync_r -
306//  sync_r -
307307//-------------------------------------------------
308308
309309READ_LINE_MEMBER( c64h156_device::sync_r )
r11247r11248
313313
314314
315315//-------------------------------------------------
316//  byte_r -
316//  byte_r -
317317//-------------------------------------------------
318318
319319READ_LINE_MEMBER( c64h156_device::byte_r )
r11247r11248
323323
324324
325325//-------------------------------------------------
326//  stp_w -
326//  stp_w -
327327//-------------------------------------------------
328328
329329WRITE_LINE_MEMBER( c64h156_device::mtr_w )
r11247r11248
345345
346346
347347//-------------------------------------------------
348//  oe_w -
348//  oe_w -
349349//-------------------------------------------------
350350
351351WRITE_LINE_MEMBER( c64h156_device::oe_w )
r11247r11248
355355
356356
357357//-------------------------------------------------
358//  soe_w -
358//  soe_w -
359359//-------------------------------------------------
360360
361361WRITE_LINE_MEMBER( c64h156_device::soe_w )
r11247r11248
365365
366366
367367//-------------------------------------------------
368//  atn_r -
368//  atn_r -
369369//-------------------------------------------------
370370
371371READ_LINE_MEMBER( c64h156_device::atn_r )
r11247r11248
375375
376376
377377//-------------------------------------------------
378//  atni_w -
378//  atni_w -
379379//-------------------------------------------------
380380
381381WRITE_LINE_MEMBER( c64h156_device::atni_w )
r11247r11248
387387
388388
389389//-------------------------------------------------
390//  atna_w -
390//  atna_w -
391391//-------------------------------------------------
392392
393393WRITE_LINE_MEMBER( c64h156_device::atna_w )
r11247r11248
399399
400400
401401//-------------------------------------------------
402//  stp_w -
402//  stp_w -
403403//-------------------------------------------------
404404
405405void c64h156_device::stp_w(int data)
r11247r11248
445445
446446
447447//-------------------------------------------------
448//  on_disk_changed -
448//  on_disk_changed -
449449//-------------------------------------------------
450450
451451void c64h156_device::on_disk_changed()
src/mess/machine/c1551.c
r11247r11248
110110
111111        bit     description
112112
113        P0     
114        P1     
115        P2     
116        P3     
113        P0
114        P1
115        P2
116        P3
117117        P4      WPS
118        P5     
119        P6     
118        P5
119        P6
120120        P7      BYTE LTCHED
121121
122   */   
122    */
123123
124124   UINT8 data = 0;
125125
r11247r11248
143143        P1      STP0B
144144        P2      MTR0
145145        P3      ACT0
146        P4     
146        P4
147147        P5      DS0
148148        P6      DS1
149        P7     
149        P7
150150
151   */
151    */
152152
153153   // spindle motor
154154   m_ga->mtr_w(BIT(data, 2));
r11247r11248
192192        PA6     TCBM PA6
193193        PA7     TCBM PA7
194194
195   */
195    */
196196
197197   return m_tcbm_data;
198198}
r11247r11248
213213        PA6     TCBM PA6
214214        PA7     TCBM PA7
215215
216   */
216    */
217217
218218   m_tcbm_data = data;
219219}
r11247r11248
225225
226226        bit     description
227227
228        PC0     
229        PC1     
230        PC2     
231        PC3     
232        PC4     
228        PC0
229        PC1
230        PC2
231        PC3
232        PC4
233233        PC5     JP1
234234        PC6     _SYNC
235235        PC7     TCBM DAV
236236
237   */
237    */
238238
239239   UINT8 data = 0;
240240
r11247r11248
262262        PC2     TCBM DEV
263263        PC3     TCBM ACK
264264        PC4     MODE
265        PC5     
266        PC6     
267        PC7     
265        PC5
266        PC6
267        PC7
268268
269   */
269    */
270270
271271   // TCBM status
272272   m_status = data & 0x03;
r11247r11248
314314        PB6
315315        PB7
316316
317   */
317    */
318318
319319   return m_status & 0x03;
320320}
r11247r11248
332332        PC3
333333        PC4
334334        PC5
335        PC6     
335        PC6
336336        PC7     TCBM ACK
337337
338   */
338    */
339339
340340   UINT8 data = 0;
341341
r11247r11248
359359        PC4
360360        PC5
361361        PC6     TCBM DAV
362        PC7     
362        PC7
363363
364   */
364    */
365365
366366   // TCBM data valid
367367   m_dav = BIT(data, 6);
r11247r11248
539539
540540
541541//-------------------------------------------------
542//  on_disk_change -
542//  on_disk_change -
543543//-------------------------------------------------
544544
545545void c1551_device::on_disk_change(device_image_interface &image)
src/mess/machine/c1551.h
r11247r11248
6262protected:
6363    // device_config overrides
6464    virtual void device_config_complete();
65   
65
6666private:
6767   const char *m_cpu_tag;
6868   int m_address;
src/mess/machine/abc99.c
r11247r11248
3535
3636/*
3737
38   TODO:
38    TODO:
3939
40   - verify cursor keys
41   - language DIP
42   - mouse
43   - investigate unknown ROMs
40    - verify cursor keys
41    - language DIP
42    - mouse
43    - investigate unknown ROMs
4444    - MCS-48 PC:01DC - Unimplemented opcode = 75
45      - 75 = ENT0 CLK : enable CLK (unscaled_clock/3) output on T0
46      - halt Z2 when Z5 is reset, resume Z2 when Z5 executes ENT0 CLK instruction
45        - 75 = ENT0 CLK : enable CLK (unscaled_clock/3) output on T0
46        - halt Z2 when Z5 is reset, resume Z2 when Z5 executes ENT0 CLK instruction
4747
4848*/
4949
r11247r11248
457457{
458458   return INPUT_PORTS_NAME( abc99 );
459459}
460     
461460
462461
462
463463//**************************************************************************
464464//  INLINE HELPERS
465465//**************************************************************************
r11247r11248
482482inline void abc99_device::serial_output()
483483{
484484   int so = m_so_z2 & m_so_z5;
485   
485
486486   if (m_so != so)
487487   {
488488      m_so = so;
r11247r11248
605605   case TIMER_SERIAL:
606606      serial_clock();
607607      break;
608     
608
609609   case TIMER_MOUSE:
610610      scan_mouse();
611611      break;
r11247r11248
620620WRITE8_MEMBER( abc99_device::z2_led_w )
621621{
622622   if (m_led_en) return;
623   
623
624624   output_set_led_value(LED_1, BIT(data, 0));
625625   output_set_led_value(LED_2, BIT(data, 1));
626626   output_set_led_value(LED_3, BIT(data, 2));
r11247r11248
639639WRITE8_MEMBER( abc99_device::z2_p1_w )
640640{
641641   /*
642   
643      bit      description
644     
645      P10      serial output
646      P11      KEY DOWN
647      P12      transmit -> Z5 T1
648      P13      INS led
649      P14      ALT led
650      P15      CAPS LOCK led
651      P16      speaker output
652      P17      Z8 enable
653     
654   */
655642
643        bit     description
644
645        P10     serial output
646        P11     KEY DOWN
647        P12     transmit -> Z5 T1
648        P13     INS led
649        P14     ALT led
650        P15     CAPS LOCK led
651        P16     speaker output
652        P17     Z8 enable
653
654    */
655
656656   // serial output
657657   int so_z2 = BIT(data, 0);
658   
658
659659   if (m_so_z2 != so_z2)
660660   {
661661      m_so_z2 = so_z2;
r11247r11248
675675
676676   // speaker output
677677   speaker_level_w(m_speaker, !BIT(data, 6));
678   
678
679679   // Z8 enable
680680   m_led_en = BIT(data, 7);
681681}
r11247r11248
688688READ8_MEMBER( abc99_device::z2_p2_r )
689689{
690690   /*
691   
692      bit      description
693     
694      P20     
695      P21     
696      P22     
697      P23     
698      P24     
699      P25      DIP0
700      P26      DIP1
701      P27      DIP2
702     
703   */
704   
691
692        bit     description
693
694        P20
695        P21
696        P22
697        P23
698        P24
699        P25     DIP0
700        P26     DIP1
701        P27     DIP2
702
703    */
704
705705   UINT8 data = input_port_read(this, "Z14") << 5;
706706
707707   return data;
r11247r11248
735735READ8_MEMBER( abc99_device::z5_p1_r )
736736{
737737   /*
738   
739      bit      description
740     
741      P10      XA
742      P11      XB
743      P12      YA
744      P13      YB
745      P14      LB
746      P15      MB
747      P16      RB
748      P17      input from host
749     
750   */
751   
738
739        bit     description
740
741        P10     XA
742        P11     XB
743        P12     YA
744        P13     YB
745        P14     LB
746        P15     MB
747        P16     RB
748        P17     input from host
749
750    */
751
752752   UINT8 data = 0;
753753
754754   // mouse buttons
r11247r11248
768768WRITE8_MEMBER( abc99_device::z5_p2_w )
769769{
770770   /*
771   
772      bit      description
773     
774      P20     
775      P21     
776      P22     
777      P23     
778      P24      Z2 serial input enable
779      P25      Z2 RESET
780      P26      serial output
781      P27      Z2 T1
782     
783   */
784771
772        bit     description
773
774        P20
775        P21
776        P22
777        P23
778        P24     Z2 serial input enable
779        P25     Z2 RESET
780        P26     serial output
781        P27     Z2 T1
782
783    */
784
785785   // serial input enable
786786   int si_en = BIT(data, 4);
787   
787
788788   if (m_si_en != si_en)
789789   {
790790      m_si_en = si_en;
r11247r11248
793793
794794   // Z2 reset
795795   int reset = BIT(data, 5);
796   
796
797797   if (m_reset != reset)
798798   {
799799      m_reset = reset;
r11247r11248
802802
803803   // serial output
804804   int so_z5 = BIT(data, 6);
805   
805
806806   if (m_so_z5 != so_z5)
807807   {
808808      m_so_z5 = so_z5;
src/mess/machine/abc99.h
r11247r11248
8080
8181public:
8282   static INPUT_CHANGED( keyboard_reset );
83   
83
8484   DECLARE_WRITE8_MEMBER( z2_led_w );
8585   DECLARE_WRITE8_MEMBER( z2_p1_w );
8686   DECLARE_READ8_MEMBER( z2_p2_r );
src/mess/machine/apple2gs.c
r11247r11248
4646        bit 2 - key data interurpt enabled
4747        bit 1 - clear if horizontal mouse data, set if vertical
4848        bit 0 - command register full
49
49
5050    C029 - NEWVIDEO
51       bit 7 - 1 for Super Hi-Res mode, 0 for old Apple II video modes
52       bit 6 - 1 to enable memory linearization (2000-9D00 in banks 01/E1), 0 for physical layout
53       bit 5 - 1 to display double hi-res mode in monochrome, 0 for color
54       bit 4 - ???
55       bit 3 - ???
56       bit 2 - ???
57       bit 1 - ???
58       bit 0 - ???
59 
51        bit 7 - 1 for Super Hi-Res mode, 0 for old Apple II video modes
52        bit 6 - 1 to enable memory linearization (2000-9D00 in banks 01/E1), 0 for physical layout
53        bit 5 - 1 to display double hi-res mode in monochrome, 0 for color
54        bit 4 - ???
55        bit 3 - ???
56        bit 2 - ???
57        bit 1 - ???
58        bit 0 - ???
59
6060    C02D - SLTROMSEL
6161
6262    C031 - DISKREG
r11247r11248
772772
773773      if (scb & 0x40)
774774      {
775         // scanline int flag is set even when the actual interrupt is disabled
775         // scanline int flag is set even when the actual interrupt is disabled
776776         state->m_vgcint |= 0x20;
777777
778778         // see if the interrupt is also enabled and trigger it if so
src/mess/machine/isa_hdc.c
r11247r11248
126126//**************************************************************************
127127//  GLOBAL VARIABLES
128128//**************************************************************************
129
129
130130const device_type ISA8_HDC = isa8_hdc_device_config::static_alloc_device_config;
131
131
132132//**************************************************************************
133133//  DEVICE CONFIGURATION
134134//**************************************************************************
135
135
136136//-------------------------------------------------
137137//  isa8_hdc_device_config - constructor
138138//-------------------------------------------------
139
139
140140isa8_hdc_device_config::isa8_hdc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
141141        : device_config(mconfig, static_alloc_device_config, "ISA8_HDC", tag, owner, clock),
142142         device_config_isa8_card_interface(mconfig, *this)
143143{
144144   m_shortname = "hdc";
145145}
146
146
147147//-------------------------------------------------
148148//  static_alloc_device_config - allocate a new
149149//  configuration object
150150//-------------------------------------------------
151
151
152152device_config *isa8_hdc_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
153153{
154154        return global_alloc(isa8_hdc_device_config(mconfig, tag, owner, clock));
155155}
156
156
157157//-------------------------------------------------
158158//  alloc_device - allocate a new device object
159159//-------------------------------------------------
160
160
161161device_t *isa8_hdc_device_config::alloc_device(running_machine &machine) const
162162{
163163        return auto_alloc(machine, isa8_hdc_device(machine, *this));
164164}
165
165
166166//-------------------------------------------------
167167//  machine_config_additions - device-specific
168168//  machine configurations
r11247r11248
185185//**************************************************************************
186186//  LIVE DEVICE
187187//**************************************************************************
188
188
189189//-------------------------------------------------
190190//  isa8_hdc_device - constructor
191191//-------------------------------------------------
192
192
193193isa8_hdc_device::isa8_hdc_device(running_machine &_machine, const isa8_hdc_device_config &config) :
194194        device_t(_machine, config),
195195      device_isa8_card_interface( _machine, config, *this ),
r11247r11248
197197      m_isa(*owner(),config.m_isa_tag)
198198{
199199}
200
200
201201//-------------------------------------------------
202202//  device_start - device-specific startup
203203//-------------------------------------------------
204
204
205205void isa8_hdc_device::device_start()
206{           
206{
207207   m_isa->add_isa_card(this, m_config.m_isa_num);
208208   m_isa->install_rom(this, 0xc8000, 0xc9fff, 0, 0, "hdc", "hdc");
209   m_isa->install_device(this, 0x0320, 0x0323, 0, 0, FUNC(pc_HDC_r), FUNC(pc_HDC_w) );   
209   m_isa->install_device(this, 0x0320, 0x0323, 0, 0, FUNC(pc_HDC_r), FUNC(pc_HDC_w) );
210210   buffer = auto_alloc_array(machine(), UINT8, 17*4*512);
211211   timer = machine().scheduler().timer_alloc(FUNC(pc_hdc_command), this);
212212}
r11247r11248
214214//-------------------------------------------------
215215//  device_reset - device-specific reset
216216//-------------------------------------------------
217
217
218218void isa8_hdc_device::device_reset()
219219{
220220   drv = 0;
221221   data_cnt = 0;
222222   buffer_ptr = NULL;
223   hdc_control = 0;   
223   hdc_control = 0;
224224   for (int i = 0; i < 2; i++)
225225   {
226226      cylinders[i] = 612;
r11247r11248
255255      break;
256256   case 1:
257257      img = dynamic_cast<device_image_interface *>(machine().device(subtag(tempstring,"slave")));
258      break;   
258      break;
259259   }
260   if ( img == NULL )
260   if ( img == NULL )
261261      return NULL;
262262
263263   if (!img->exists())
r11247r11248
518518   return 1;
519519}
520520
521void isa8_hdc_device::hdc_command()
521void isa8_hdc_device::hdc_command()
522522{
523523   int set_error_info = 1;
524524   int old_error = error;         /* Previous error data is needed for CMD_SENSE */
r11247r11248
817817{
818818   UINT8 data = 0xff;
819819   isa8_hdc_device   *hdc  = downcast<isa8_hdc_device *>(device);
820   
820
821821   switch( offset )
822822   {
823      case 0: data = hdc->pc_hdc_data_r();     break;
823      case 0: data = hdc->pc_hdc_data_r();    break;
824824      case 1: data = hdc->pc_hdc_status_r();    break;
825825      case 2: data = hdc->pc_hdc_dipswitch_r(); break;
826826      case 3: break;
r11247r11248
854854}
855855
856856void isa8_hdc_device::dack_w(int line,UINT8 data)
857{   
858   pc_hdc_dack_w(data);   
857{
858   pc_hdc_dack_w(data);
859859}
860860bool isa8_hdc_device::have_dack(int line)
861861{
src/mess/machine/isa_hdc.h
r11247r11248
44
55**********************************************************************/
66#pragma once
7
7
88#ifndef ISA_HDC_H
99#define ISA_HDC_H
1010
r11247r11248
1515//**************************************************************************
1616//  TYPE DEFINITIONS
1717//**************************************************************************
18
18
1919// ======================> isa8_hdc_device_config
20 
21class isa8_hdc_device_config :
20
21class isa8_hdc_device_config :
2222      public device_config,
2323      public device_config_isa8_card_interface
2424{
2525        friend class isa8_device;
2626      friend class isa8_hdc_device;
27
27
2828        // construction/destruction
2929        isa8_hdc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
30
30
3131public:
3232        // allocators
3333        static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
3434        virtual device_t *alloc_device(running_machine &machine) const;
35     
35
3636      // optional information overrides
3737      virtual machine_config_constructor device_mconfig_additions() const;
38      virtual const rom_entry *device_rom_region() const;   
38      virtual const rom_entry *device_rom_region() const;
3939};
40 
41 
40
41
4242// ======================> isa8_hdc_device
43 
44class isa8_hdc_device :
43
44class isa8_hdc_device :
4545      public device_t,
4646      public device_isa8_card_interface
4747{
4848        friend class isa8_hdc_device_config;
49
49
5050        // construction/destruction
5151        isa8_hdc_device(running_machine &_machine, const isa8_hdc_device_config &config);
5252
r11247r11248
5555        virtual void device_start();
5656        virtual void device_reset();
5757private:
58      int drv;                      /* 0 master, 1 slave drive */
58      int drv;                     /* 0 master, 1 slave drive */
5959      int cylinders[2];      /* number of cylinders */
6060      int rwc[2];         /* reduced write current from cyl */
6161      int wp[2];         /* write precompensation from cyl */
r11247r11248
7979      UINT8 *buffer;               /* data buffer */
8080      UINT8 *buffer_ptr;         /* data pointer */
8181      UINT8 hdc_control;
82     
82
8383      UINT8 hdcdma_data[512];
8484      UINT8 *hdcdma_src;
8585      UINT8 *hdcdma_dst;
8686      int hdcdma_read;
8787      int hdcdma_write;
8888      int hdcdma_size;
89     
89
9090        // internal state
9191        const isa8_hdc_device_config &m_config;
92public:     
92public:
9393      required_device<isa8_device> m_isa;
9494public:
9595      virtual UINT8 dack_r(int line);
9696      virtual void dack_w(int line,UINT8 data);
9797      virtual bool have_dack(int line);
9898protected:
99      hard_disk_file *pc_hdc_file(int id);     
99      hard_disk_file *pc_hdc_file(int id);
100100      void pc_hdc_result(int set_error_info);
101101      int no_dma(void);
102102      int get_lbasector();
r11247r11248
107107      void get_drive();
108108      void get_chsn();
109109      int test_ready();
110      static TIMER_CALLBACK(pc_hdc_command);     
111public:   
110      static TIMER_CALLBACK(pc_hdc_command);
111public:
112112      void hdc_command();
113113      void pc_hdc_data_w(int data);
114114      void pc_hdc_reset_w(int data);
r11247r11248
118118      UINT8 pc_hdc_status_r();
119119      UINT8 pc_hdc_dipswitch_r();
120120};
121 
122 
121
122
123123// device type definition
124124extern const device_type ISA8_HDC;
125125
src/mess/machine/mpc105.c
r11247r11248
8787mpc105_device::mpc105_device(running_machine &_machine, const mpc105_device_config &config)
8888    : device_t(_machine, config),
8989      m_config(config),
90     m_maincpu(*owner(), config.m_cputag)     
90     m_maincpu(*owner(), config.m_cputag)
9191{
9292}
9393
r11247r11248
112112
113113
114114//-------------------------------------------------
115//  update_memory - MMU update
115//  update_memory - MMU update
116116//-------------------------------------------------
117117
118118void mpc105_device::update_memory()
src/mess/machine/mpc105.h
r11247r11248
1515    MCFG_DEVICE_ADD(_tag, MPC105, 0) \
1616    mpc105_device_config::static_set_cputag(device, _cputag); \
1717    mpc105_device_config::static_set_bank_base(device, _bankbase); \
18   
18
1919// ======================> mpc105_device_config
2020
2121class mpc105_device_config :  public device_config
r11247r11248
3333   // inline configuration helpers
3434   static void static_set_bank_base(device_config *device, int bank_base);
3535   static void static_set_cputag(device_config *device, const char *tag);
36   
36
3737protected:
3838    // internal state goes here
3939    int m_bank_base;
r11247r11248
5959    // device-level overrides
6060    virtual void device_start();
6161    virtual void device_reset();
62   
62
6363   void update_memory();
6464
6565    // internal state
r11247r11248
6868private:
6969   int m_bank_base;
7070   UINT8 m_bank_enable;
71   UINT32 m_bank_registers[8];   
72   
71   UINT32 m_bank_registers[8];
72
7373   required_device<device_t>   m_maincpu;
7474};
7575
src/mess/machine/at_keybc.c
r11247r11248
11/***************************************************************************
22
3   IBM PC AT compatibles 8042 keyboard controller
3    IBM PC AT compatibles 8042 keyboard controller
44
55***************************************************************************/
66
r11247r11248
184184}
185185
186186/*
187   Port 1 (Input port)
188   0 - P10 - Undefined
189   1 - P11 - Undefined
190   2 - P12 - Undefined
191   3 - P13 - Undefined
192   4 - P14 - External RAM (1 = Enable external RAM, 0 = Disable external RAM)
193   5 - P15 - Manufacturing setting (1 = Setting enabled, 0 = Setting disabled)
194   6 - P16 - Display type switch (1 = Monochrome display, 0 = Color display)
195   7 - P17 - Keyboard inhibit switch (1 = Keyboard enabled, 0 = Keyboard inhibited)
187    Port 1 (Input port)
188    0 - P10 - Undefined
189    1 - P11 - Undefined
190    2 - P12 - Undefined
191    3 - P13 - Undefined
192    4 - P14 - External RAM (1 = Enable external RAM, 0 = Disable external RAM)
193    5 - P15 - Manufacturing setting (1 = Setting enabled, 0 = Setting disabled)
194    6 - P16 - Display type switch (1 = Monochrome display, 0 = Color display)
195    7 - P17 - Keyboard inhibit switch (1 = Keyboard enabled, 0 = Keyboard inhibited)
196196*/
197197READ8_MEMBER( at_keyboard_controller_device::p1_r )
198198{
r11247r11248
205205}
206206
207207/*
208   Port 2 (Output port)
209   0 - P20 - System Reset (1 = Normal, 0 = Reset computer)
210   1 - P21 - Gate A20
211   2 - P22 - Undefined
212   3 - P23 - Undefined
213   4 - P24 - Input Buffer Full
214   5 - P25 - Output Buffer Empty
215   6 - P26 - Keyboard Clock (1 = Pull Clock low, 0 = High-Z)
216   7 - P27 - Keyboard Data (1 = Pull Data low, 0 = High-Z)
208    Port 2 (Output port)
209    0 - P20 - System Reset (1 = Normal, 0 = Reset computer)
210    1 - P21 - Gate A20
211    2 - P22 - Undefined
212    3 - P23 - Undefined
213    4 - P24 - Input Buffer Full
214    5 - P25 - Output Buffer Empty
215    6 - P26 - Keyboard Clock (1 = Pull Clock low, 0 = High-Z)
216    7 - P27 - Keyboard Data (1 = Pull Data low, 0 = High-Z)
217217*/
218218WRITE8_MEMBER( at_keyboard_controller_device::p2_w )
219219{
src/mess/machine/nes.c
r11247r11248
15201520{
15211521   if (length <= 16)
15221522      return;
1523   dest.compute(&data[16], length - 16, functions);   
1523   dest.compute(&data[16], length - 16, functions);
15241524}
15251525
15261526/**************************
src/mess/machine/at_keybc.h
r11247r11248
11/***************************************************************************
22
3   IBM PC AT compatibles 8042 keyboard controller
3    IBM PC AT compatibles 8042 keyboard controller
44
55***************************************************************************/
66
src/mess/machine/mboard.c
r11247r11248
209209
210210WRITE32_HANDLER( mboard_write_board_32 )
211211{
212//   data |= data << 24;
212//  data |= data << 24;
213213//printf("write board %08x %08x\n",offset,data);
214214   logerror("write board 32 o: %08x d: %08x\n",offset,data);
215215   if (offset) write_board(space->machine(),data);
r11247r11248
230230
231231WRITE32_HANDLER( mboard_write_LED_32 )
232232{
233//   data = data | data << 24;
233//  data = data | data << 24;
234234//printf("write LED %08x %08x\n",offset,data);
235235   if (offset) write_LED(data);
236236   else write_LED(data >> 24);
237237   logerror("write LED   32 o: %08x d: %08x\n",offset,data);
238//   device_spin_until_time(&space->device(), ATTOTIME_IN_USEC(20));
238//  device_spin_until_time(&space->device(), ATTOTIME_IN_USEC(20));
239239}
240240
241241
src/mess/machine/lux21046.c
r11247r11248
142142   {
143143      fatalerror("Interface not provided!");
144144   }
145   
145
146146   m_sw1 = intf->m_sw1;
147147   m_sw2 = intf->m_sw2;
148148   m_sw3 = intf->m_sw3;
r11247r11248
458458   save_item(NAME(m_force_busy));
459459
460460   // patch out sector skew table
461/*   UINT8 *rom = subregion("conkort")->base();
461/*  UINT8 *rom = subregion("conkort")->base();
462462
463   for (int i = 0; i < 16; i++)
464      rom[0x2dd3 + i] = i + 1;*/
463    for (int i = 0; i < 16; i++)
464        rom[0x2dd3 + i] = i + 1;*/
465465}
466466
467467
r11247r11248
486486//**************************************************************************
487487
488488//-------------------------------------------------
489//  abcbus_cs -
489//  abcbus_cs -
490490//-------------------------------------------------
491491
492492void luxor_55_21046_device::abcbus_cs(UINT8 data)
r11247r11248
496496
497497
498498//-------------------------------------------------
499//  abcbus_rst -
499//  abcbus_rst -
500500//-------------------------------------------------
501501
502502void luxor_55_21046_device::abcbus_rst(int state)
r11247r11248
509509
510510
511511//-------------------------------------------------
512//  abcbus_stat -
512//  abcbus_stat -
513513//-------------------------------------------------
514514
515515UINT8 luxor_55_21046_device::abcbus_stat()
r11247r11248
527527
528528
529529//-------------------------------------------------
530//  abcbus_inp -
530//  abcbus_inp -
531531//-------------------------------------------------
532532
533533UINT8 luxor_55_21046_device::abcbus_inp()
r11247r11248
545545
546546
547547//-------------------------------------------------
548//  abcbus_utp -
548//  abcbus_utp -
549549//-------------------------------------------------
550550
551551void luxor_55_21046_device::abcbus_utp(UINT8 data)
r11247r11248
559559
560560
561561//-------------------------------------------------
562//  abcbus_c1 -
562//  abcbus_c1 -
563563//-------------------------------------------------
564564
565565void luxor_55_21046_device::abcbus_c1(UINT8 data)
r11247r11248
573573
574574
575575//-------------------------------------------------
576//  abcbus_c3 -
576//  abcbus_c3 -
577577//-------------------------------------------------
578578
579579void luxor_55_21046_device::abcbus_c3(UINT8 data)
r11247r11248
592592//**************************************************************************
593593
594594//-------------------------------------------------
595//  3d_r -
595//  3d_r -
596596//-------------------------------------------------
597597
598598READ8_MEMBER( luxor_55_21046_device::_3d_r )
r11247r11248
607607
608608
609609//-------------------------------------------------
610//  4d_w -
610//  4d_w -
611611//-------------------------------------------------
612612
613613WRITE8_MEMBER( luxor_55_21046_device::_4d_w )
r11247r11248
622622
623623
624624//-------------------------------------------------
625//  4b_w -
625//  4b_w -
626626//-------------------------------------------------
627627
628628WRITE8_MEMBER( luxor_55_21046_device::_4b_w )
r11247r11248
653653
654654
655655//-------------------------------------------------
656//  9b_w -
656//  9b_w -
657657//-------------------------------------------------
658658
659659WRITE8_MEMBER( luxor_55_21046_device::_9b_w )
r11247r11248
691691
692692
693693//-------------------------------------------------
694//  8a_w -
694//  8a_w -
695695//-------------------------------------------------
696696
697697WRITE8_MEMBER( luxor_55_21046_device::_8a_w )
r11247r11248
722722
723723
724724//-------------------------------------------------
725//  9a_r -
725//  9a_r -
726726//-------------------------------------------------
727727
728728READ8_MEMBER( luxor_55_21046_device::_9a_r )
src/mess/machine/isa_com.c
r11247r11248
7878//**************************************************************************
7979//  GLOBAL VARIABLES
8080//**************************************************************************
81
81
8282const device_type ISA8_COM = isa8_com_device_config::static_alloc_device_config;
83
83
8484//**************************************************************************
8585//  DEVICE CONFIGURATION
8686//**************************************************************************
87
87
8888//-------------------------------------------------
8989//  isa8_com_device_config - constructor
9090//-------------------------------------------------
91
91
9292isa8_com_device_config::isa8_com_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
9393        : device_config(mconfig, static_alloc_device_config, "ISA8_COM", tag, owner, clock),
9494         device_config_isa8_card_interface(mconfig, *this)
9595{
9696}
97
97
9898//-------------------------------------------------
9999//  static_alloc_device_config - allocate a new
100100//  configuration object
101101//-------------------------------------------------
102
102
103103device_config *isa8_com_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
104104{
105105        return global_alloc(isa8_com_device_config(mconfig, tag, owner, clock));
106106}
107
107
108108//-------------------------------------------------
109109//  alloc_device - allocate a new device object
110110//-------------------------------------------------
111
111
112112device_t *isa8_com_device_config::alloc_device(running_machine &machine) const
113113{
114114        return auto_alloc(machine, isa8_com_device(machine, *this));
115115}
116
116
117117//-------------------------------------------------
118118//  machine_config_additions - device-specific
119119//  machine configurations
r11247r11248
127127//**************************************************************************
128128//  LIVE DEVICE
129129//**************************************************************************
130
130
131131//-------------------------------------------------
132132//  isa8_com_device - constructor
133133//-------------------------------------------------
134
134
135135isa8_com_device::isa8_com_device(running_machine &_machine, const isa8_com_device_config &config) :
136136        device_t(_machine, config),
137137      device_isa8_card_interface( _machine, config, *this ),
r11247r11248
139139      m_isa(*owner(),config.m_isa_tag)
140140{
141141}
142
142
143143//-------------------------------------------------
144144//  device_start - device-specific startup
145145//-------------------------------------------------
146
146
147147void isa8_com_device::device_start()
148{       
148{
149149   m_isa->add_isa_card(this, m_config.m_isa_num);
150150   m_isa->install_device(subdevice("ins8250_0"), 0x03f8, 0x03ff, 0, 0, FUNC(ins8250_r), FUNC(ins8250_w) );
151151   m_isa->install_device(subdevice("ins8250_1"), 0x02f8, 0x02ff, 0, 0, FUNC(ins8250_r), FUNC(ins8250_w) );
r11247r11248
156156//-------------------------------------------------
157157//  device_reset - device-specific reset
158158//-------------------------------------------------
159
159
160160void isa8_com_device::device_reset()
161161{
162162}
src/mess/machine/lux21046.h
r11247r11248
9494protected:
9595    // device_config overrides
9696    virtual void device_config_complete();
97   
97
9898private:
9999   UINT8 m_sw1;            // DS/DD
100100   UINT8 m_sw2;            // drive type
r11247r11248
105105// ======================> luxor_55_21046_device
106106
107107class luxor_55_21046_device :  public device_t,
108                        public device_abcbus_interface
108                        public device_abcbus_interface
109109{
110110    friend class luxor_55_21046_device_config;
111111
src/mess/machine/isa_com.h
r11247r11248
11#pragma once
2
2
33#ifndef __ISA_COM_H__
44#define __ISA_COM_H__
5
5
66#include "emu.h"
77#include "machine/isa.h"
88
99//**************************************************************************
1010//  TYPE DEFINITIONS
1111//**************************************************************************
12
12
1313// ======================> isa8_com_device_config
14 
15class isa8_com_device_config :
14
15class isa8_com_device_config :
1616      public device_config,
1717      public device_config_isa8_card_interface
1818{
1919        friend class isa8_device;
2020      friend class isa8_com_device;
21
21
2222        // construction/destruction
2323        isa8_com_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
24
24
2525public:
2626        // allocators
2727        static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
2828        virtual device_t *alloc_device(running_machine &machine) const;
29     
29
3030      // optional information overrides
3131      virtual machine_config_constructor device_mconfig_additions() const;
3232};
33 
34 
33
34
3535// ======================> isa8_com_device
36 
37class isa8_com_device :
36
37class isa8_com_device :
3838      public device_t,
3939      public device_isa8_card_interface
4040{
4141        friend class isa8_com_device_config;
42
42
4343        // construction/destruction
4444        isa8_com_device(running_machine &_machine, const isa8_com_device_config &config);
4545
r11247r11248
5151private:
5252        // internal state
5353        const isa8_com_device_config &m_config;
54public:     
55      required_device<isa8_device> m_isa;     
54public:
55      required_device<isa8_device> m_isa;
5656};
57 
58 
57
58
5959// device type definition
6060extern const device_type ISA8_COM;
6161
src/mess/machine/lynx.c
r11247r11248
18791879
18801880   info = hashfile_extrainfo(image);
18811881
1882   state->m_rotate0 = 0;   
1882   state->m_rotate0 = 0;
18831883   if (info)
18841884   {
18851885      if(strcmp(info, "ROTATE90DEGREE") == 0)
src/mess/machine/isa_sblaster.c
r11247r11248
2222  pro audio spectrum 16: 1 OPL3
2323
2424  2 x saa1099 chips
25   also on sound blaster 1.0
26   option on sound blaster 1.5
25    also on sound blaster 1.0
26    option on sound blaster 1.5
2727
2828  jumperable? normally 0x220
29*/
29*/
3030#define ym3812_StdClock 3579545
3131
3232static const ym3812_interface pc_ym3812_interface =
r11247r11248
4242   MCFG_SOUND_ADD("saa1099.1", SAA1099, 4772720)
4343   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sblaster:mono", 0.50)
4444   MCFG_SOUND_ADD("saa1099.2", SAA1099, 4772720)
45   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sblaster:mono", 0.50)     
45   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sblaster:mono", 0.50)
4646MACHINE_CONFIG_END
4747
4848static READ8_DEVICE_HANDLER( ym3812_16_r )
4949{
5050   UINT8 retVal = 0xff;
51   switch(offset)
51   switch(offset)
5252   {
5353      case 0 : retVal = ym3812_status_port_r( device, offset ); break;
5454   }
r11247r11248
5757
5858static WRITE8_DEVICE_HANDLER( ym3812_16_w )
5959{
60   switch(offset)
60   switch(offset)
6161   {
6262      case 0 : ym3812_control_port_w( device, offset, data ); break;
6363      case 1 : ym3812_write_port_w( device, offset, data ); break;
r11247r11248
7171
7272static WRITE8_DEVICE_HANDLER( saa1099_16_w )
7373{
74   switch(offset)
74   switch(offset)
7575   {
7676      case 0 : saa1099_control_w( device, offset, data ); break;
7777      case 1 : saa1099_data_w( device, offset, data ); break;
r11247r11248
8181//**************************************************************************
8282//  GLOBAL VARIABLES
8383//**************************************************************************
84
84
8585const device_type ISA8_SOUND_BLASTER_1_0 = isa8_sblaster_device_config::static_alloc_device_config;
86
86
8787//**************************************************************************
8888//  DEVICE CONFIGURATION
8989//**************************************************************************
90
90
9191//-------------------------------------------------
9292//  isa8_sblaster_device_config - constructor
9393//-------------------------------------------------
94
94
9595isa8_sblaster_device_config::isa8_sblaster_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
9696        : device_config(mconfig, static_alloc_device_config, "ISA8_SOUND_BLASTER_1_0", tag, owner, clock),
9797         device_config_isa8_card_interface(mconfig, *this)
9898{
9999}
100
100
101101//-------------------------------------------------
102102//  static_alloc_device_config - allocate a new
103103//  configuration object
104104//-------------------------------------------------
105
105
106106device_config *isa8_sblaster_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
107107{
108108        return global_alloc(isa8_sblaster_device_config(mconfig, tag, owner, clock));
109109}
110
110
111111//-------------------------------------------------
112112//  alloc_device - allocate a new device object
113113//-------------------------------------------------
114
114
115115device_t *isa8_sblaster_device_config::alloc_device(running_machine &machine) const
116116{
117117        return auto_alloc(machine, isa8_sblaster_device(machine, *this));
118118}
119
119
120120//-------------------------------------------------
121121//  machine_config_additions - device-specific
122122//  machine configurations
r11247r11248
130130//**************************************************************************
131131//  LIVE DEVICE
132132//**************************************************************************
133
133
134134//-------------------------------------------------
135135//  isa8_sblaster_device - constructor
136136//-------------------------------------------------
137
137
138138isa8_sblaster_device::isa8_sblaster_device(running_machine &_machine, const isa8_sblaster_device_config &config) :
139139        device_t(_machine, config),
140140      device_isa8_card_interface( _machine, config, *this ),
r11247r11248
142142      m_isa(*owner(),config.m_isa_tag)
143143{
144144}
145
145
146146//-------------------------------------------------
147147//  device_start - device-specific startup
148148//-------------------------------------------------
149
149
150150void isa8_sblaster_device::device_start()
151{       
151{
152152   m_isa->add_isa_card(this, m_config.m_isa_num);
153153   m_isa->install_device(subdevice("ym3812"), 0x0388, 0x0389, 0, 0, FUNC(ym3812_16_r), FUNC(ym3812_16_w) );
154154   m_isa->install_device(subdevice("saa1099.1"), 0x0220, 0x0221, 0, 0, FUNC(saa1099_16_r), FUNC(saa1099_16_w) );
155   m_isa->install_device(subdevice("saa1099.2"), 0x0222, 0x0223, 0, 0, FUNC(saa1099_16_r), FUNC(saa1099_16_w) );   
155   m_isa->install_device(subdevice("saa1099.2"), 0x0222, 0x0223, 0, 0, FUNC(saa1099_16_r), FUNC(saa1099_16_w) );
156156}
157157
158158//-------------------------------------------------
159159//  device_reset - device-specific reset
160160//-------------------------------------------------
161
161
162162void isa8_sblaster_device::device_reset()
163163{
164164}
src/mess/machine/isa.c
r11247r11248
11/***************************************************************************
2
2
33        ISA bus device
4
4
55***************************************************************************/
6
6
77#include "emu.h"
88#include "machine/isa.h"
9 
10 
9
10
1111//**************************************************************************
1212//  GLOBAL VARIABLES
1313//**************************************************************************
14
14
1515const device_type ISA8 = isa8_device_config::static_alloc_device_config;
16
16
1717//**************************************************************************
1818//  DEVICE CONFIGURATION
1919//**************************************************************************
20
20
2121//-------------------------------------------------
2222//  isa8_device_config - constructor
2323//-------------------------------------------------
24
24
2525isa8_device_config::isa8_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
2626        : device_config(mconfig, static_alloc_device_config, "ISA8", tag, owner, clock)
2727{
2828}
29
29
3030//-------------------------------------------------
3131//  static_alloc_device_config - allocate a new
3232//  configuration object
3333//-------------------------------------------------
34
34
3535device_config *isa8_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
3636{
3737   return global_alloc(isa8_device_config(mconfig, tag, owner, clock));
3838}
39
39
4040//-------------------------------------------------
4141//  alloc_device - allocate a new device object
4242//-------------------------------------------------
43
43
4444device_t *isa8_device_config::alloc_device(running_machine &machine) const
4545{
4646   return auto_alloc(machine, isa8_device(machine, *this));
4747}
48
48
4949void isa8_device_config::static_set_cputag(device_config *device, const char *tag)
5050{
5151   isa8_device_config *isa = downcast<isa8_device_config *>(device);
r11247r11248
8282   }
8383}
8484
85
85
8686//**************************************************************************
8787//  LIVE DEVICE
8888//**************************************************************************
89
89
9090//-------------------------------------------------
9191//  isa8_device - constructor
9292//-------------------------------------------------
93
93
9494isa8_device::isa8_device(running_machine &_machine, const isa8_device_config &config) :
9595        device_t(_machine, config),
9696        m_config(config),
r11247r11248
9999   for(int i = 0; i < 8; i++)
100100      m_isa_device[i] = NULL;
101101}
102
102
103103//-------------------------------------------------
104104//  device_start - device-specific startup
105105//-------------------------------------------------
106
106
107107void isa8_device::device_start()
108108{
109109   // resolve callbacks
r11247r11248
117117   devcb_resolve_write_line(&m_out_drq2_func, &m_config.m_out_drq2_func, this);
118118   devcb_resolve_write_line(&m_out_drq3_func, &m_config.m_out_drq3_func, this);
119119}
120
120
121121//-------------------------------------------------
122122//  device_reset - device-specific reset
123123//-------------------------------------------------
124 
124
125125void isa8_device::device_reset()
126126{
127127}
r11247r11248
132132}
133133
134134void isa8_device::install_device(device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_device_func rhandler, const char* rhandler_name, write8_device_func whandler, const char *whandler_name)
135{   
135{
136136   int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width;
137137   switch(buswidth)
138138   {
r11247r11248
158158void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, const char *region)
159159{
160160   astring tempstring;
161   address_space *space = m_maincpu->memory().space(AS_PROGRAM);   
161   address_space *space = m_maincpu->memory().space(AS_PROGRAM);
162162   space->install_read_bank(start, end, mask, mirror, tag);
163   space->unmap_write(start, end, mask, mirror);     
163   space->unmap_write(start, end, mask, mirror);
164164   memory_set_bankptr(machine(), tag, machine().region(dev->subtag(tempstring, region))->base());
165165}
166166
r11247r11248
177177WRITE_LINE_MEMBER( isa8_device::drq2_w ) { devcb_call_write_line(&m_out_drq2_func, state); }
178178WRITE_LINE_MEMBER( isa8_device::drq3_w ) { devcb_call_write_line(&m_out_drq3_func, state); }
179179
180UINT8 isa8_device::dack_r(int line)
180UINT8 isa8_device::dack_r(int line)
181181{
182182   UINT8 retVal = 0xff;
183183   for(int i=0;i<8;i++) {
184184      if (m_isa_device[i] != NULL && m_isa_device[i]->have_dack(line)) {
185185         retVal = m_isa_device[i]->dack_r(line);
186      }     
186      }
187187   }
188188   return retVal;
189189}
r11247r11248
193193   for(int i=0;i<8;i++) {
194194      if (m_isa_device[i] != NULL && m_isa_device[i]->have_dack(line)) {
195195         m_isa_device[i]->dack_w(line,data);
196      }     
196      }
197197   }
198198}
199199
r11247r11248
214214//-------------------------------------------------
215215
216216device_config_isa8_card_interface::device_config_isa8_card_interface(const machine_config &mconfig, device_config &devconfig)
217   : device_config_interface(mconfig, devconfig)   
217   : device_config_interface(mconfig, devconfig)
218218{
219219}
220220
r11247r11248
227227{
228228}
229229
230void device_config_isa8_card_interface::static_set_isa8_tag(device_config *device, const char *tag)
230void device_config_isa8_card_interface::static_set_isa8_tag(device_config *device, const char *tag)
231231{
232232   device_config_isa8_card_interface *isa_card = dynamic_cast<device_config_isa8_card_interface *>(device);
233233   isa_card->m_isa_tag = tag;
src/mess/machine/isa_sblaster.h
r11247r11248
11#pragma once
2
2
33#ifndef __ISA_SOUND_BLASTER_H__
44#define __ISA_SOUND_BLASTER_H__
5
5
66#include "emu.h"
77#include "machine/isa.h"
88
99//**************************************************************************
1010//  TYPE DEFINITIONS
1111//**************************************************************************
12
12
1313// ======================> isa8_sblaster_device_config
14 
15class isa8_sblaster_device_config :
14
15class isa8_sblaster_device_config :
1616      public device_config,
1717      public device_config_isa8_card_interface
1818{
1919        friend class isa8_device;
2020      friend class isa8_sblaster_device;
21
21
2222        // construction/destruction
2323        isa8_sblaster_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
24
24
2525public:
2626        // allocators
2727        static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
2828        virtual device_t *alloc_device(running_machine &machine) const;
29     
29
3030      // optional information overrides
3131      virtual machine_config_constructor device_mconfig_additions() const;
3232};
33 
34 
33
34
3535// ======================> isa8_sblaster_device
36 
37class isa8_sblaster_device :
36
37class isa8_sblaster_device :
3838      public device_t,
3939      public device_isa8_card_interface
4040{
4141        friend class isa8_sblaster_device_config;
42
42
4343        // construction/destruction
4444        isa8_sblaster_device(running_machine &_machine, const isa8_sblaster_device_config &config);
4545
r11247r11248
5151private:
5252        // internal state
5353        const isa8_sblaster_device_config &m_config;
54public:     
55      required_device<isa8_device> m_isa;     
54public:
55      required_device<isa8_device> m_isa;
5656};
57 
58 
57
58
5959// device type definition
6060extern const device_type ISA8_SOUND_BLASTER_1_0;
6161
src/mess/machine/abc830.c
r11247r11248
11/*
22
3   Luxor ABC 830
3    Luxor ABC 830
44
55    Type                    Size        Tracks  Sides   Sectors/track   Sectors     Speed           Drives
66
src/mess/machine/isa.h
r11247r11248
11/***************************************************************************
2
2
33        ISA bus device
4 
54
6   8 bit ISA bus connector:
75
8   A1    O  I/O CH CHK    B1       GND
9   A2   IO  D7            B2   I   RESET
10   A3   IO  D6            B3       +5V
11   A4   IO  D5            B4    O  IRQ2
12   A5   IO  D4            B5       -5V
13   A6   IO  D3            B6    O  DRQ2
14   A7   IO  D2            B7       -12V
15   A8   IO  D1            B8    O  /NOWS
16   A9   IO  D0            B9       +12V
17   A10   O  I/O CH RDY    B10      GND
18   A11  I   AEN           B11  I   /SMEMW
19   A12  IO  A19           B12  I   /SMEMR
20   A13  IO  A18           B13  I   /IOW
21   A14  IO  A17           B14  I   /IOR
22   A15  IO  A16           B15  I   /DACK3
23   A16  IO  A15           B16   O  DRQ3
24   A17  IO  A14           B17  I   /DACK1
25   A18  IO  A13           B18   O  DRQ1
26   A19  IO  A12           B19  IO  /REFRESH
27   A20  IO  A11           B20  I   CLOCK
28   A21  IO  A10           B21   O  IRQ7
29   A22  IO  A9            B22   O  IRQ6
30   A23  IO  A8            B23   O  IRQ5
31   A24  IO  A7            B24   O  IRQ4
32   A25  IO  A6            B25   O  IRQ3
33   A26  IO  A5            B26  I   /DACK2
34   A27  IO  A4            B27  I   T/C
35   A28  IO  A3            B28  I   ALE
36   A29  IO  A2            B29      +5V
37   A30  IO  A1            B30  I   OSC
38   A31  IO  A0            B31      GND
6    8 bit ISA bus connector:
397
8    A1    O  I/O CH CHK    B1       GND
9    A2   IO  D7            B2   I   RESET
10    A3   IO  D6            B3       +5V
11    A4   IO  D5            B4    O  IRQ2
12    A5   IO  D4            B5       -5V
13    A6   IO  D3            B6    O  DRQ2
14    A7   IO  D2            B7       -12V
15    A8   IO  D1            B8    O  /NOWS
16    A9   IO  D0            B9       +12V
17    A10   O  I/O CH RDY    B10      GND
18    A11  I   AEN           B11  I   /SMEMW
19    A12  IO  A19           B12  I   /SMEMR
20    A13  IO  A18           B13  I   /IOW
21    A14  IO  A17           B14  I   /IOR
22    A15  IO  A16           B15  I   /DACK3
23    A16  IO  A15           B16   O  DRQ3
24    A17  IO  A14           B17  I   /DACK1
25    A18  IO  A13           B18   O  DRQ1
26    A19  IO  A12           B19  IO  /REFRESH
27    A20  IO  A11           B20  I   CLOCK
28    A21  IO  A10           B21   O  IRQ7
29    A22  IO  A9            B22   O  IRQ6
30    A23  IO  A8            B23   O  IRQ5
31    A24  IO  A7            B24   O  IRQ4
32    A25  IO  A6            B25   O  IRQ3
33    A26  IO  A5            B26  I   /DACK2
34    A27  IO  A4            B27  I   T/C
35    A28  IO  A3            B28  I   ALE
36    A29  IO  A2            B29      +5V
37    A30  IO  A1            B30  I   OSC
38    A31  IO  A0            B31      GND
39
4040***************************************************************************/
41
41
4242#pragma once
43
43
4444#ifndef __ISA_H__
4545#define __ISA_H__
46
46
4747#include "emu.h"
48 
49 
48
49
5050//**************************************************************************
5151//  INTERFACE CONFIGURATION MACROS
5252//**************************************************************************
53
53
5454#define MCFG_ISA8_BUS_ADD(_tag, _cputag, _config) \
5555    MCFG_DEVICE_ADD(_tag, ISA8, 0) \
5656    MCFG_DEVICE_CONFIG(_config) \
5757    isa8_device_config::static_set_cputag(device, _cputag); \
58
58
5959#define MCFG_ISA8_BUS_DEVICE(_isatag, _num, _tag, _dev_type) \
6060    MCFG_DEVICE_ADD(_tag, _dev_type, 0) \
6161   device_config_isa8_card_interface::static_set_isa8_tag(device, _isatag); \
6262   device_config_isa8_card_interface::static_set_isa8_num(device, _num); \
6363
64   
64
6565//**************************************************************************
6666//  TYPE DEFINITIONS
6767//**************************************************************************
r11247r11248
8484
8585
8686// ======================> isa8_device_config
87
87
8888class isa8_device_config : public device_config,
8989                           public isabus_interface
9090{
9191   friend class isa8_device;
92
92
9393   // construction/destruction
9494   isa8_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
95
95
9696public:
9797   // allocators
9898   static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
9999   virtual device_t *alloc_device(running_machine &machine) const;
100
100
101101   // inline configuration
102102   static void static_set_cputag(device_config *device, const char *tag);
103
103
104104   const char *m_cputag;
105105
106106protected:
r11247r11248
108108   virtual void device_config_complete();
109109
110110};
111 
112 
111
112
113113// ======================> isa8_device
114114class device_isa8_card_interface;
115115class isa8_device : public device_t
116116{
117117        friend class isa8_device_config;
118
118
119119        // construction/destruction
120120        isa8_device(running_machine &_machine, const isa8_device_config &config);
121121public:
r11247r11248
143143        // device-level overrides
144144        virtual void device_start();
145145        virtual void device_reset();
146
146
147147private:
148148        // internal state
149149        const isa8_device_config &m_config;
r11247r11248
160160       devcb_resolved_write_line   m_out_drq1_func;
161161       devcb_resolved_write_line   m_out_drq2_func;
162162       devcb_resolved_write_line   m_out_drq3_func;
163     
163
164164      device_isa8_card_interface *m_isa_device[8];
165165};
166 
167 
166
167
168168// device type definition
169169extern const device_type ISA8;
170 
171170
171
172172// ======================> device_config_isa8_card_interface
173173
174174// class representing interface-specific configuration isa8 card
r11247r11248
182182   virtual ~device_config_isa8_card_interface();
183183    // inline configuration
184184    static void static_set_isa8_tag(device_config *device, const char *tag);
185    static void static_set_isa8_num(device_config *device, int num);   
185    static void static_set_isa8_num(device_config *device, int num);
186186
187187protected:
188188   const char *m_isa_tag;
r11247r11248
205205
206206   // configuration access
207207   const device_config_isa8_card_interface &isa8_card_config() const { return m_isa8_card_config; }
208     
208
209209   virtual UINT8 dack_r(int line);
210210   virtual void dack_w(int line,UINT8 data);
211211   virtual void eop_w(int state);
212212   virtual bool have_dack(int line);
213213protected:
214214   // configuration
215   const device_config_isa8_card_interface &m_isa8_card_config;   // reference to our device_config_execute_interface   
215   const device_config_isa8_card_interface &m_isa8_card_config;   // reference to our device_config_execute_interface
216216
217217};
218
218
219219#endif  /* __ISA_H__ */
src/mess/machine/lux10828.c
r11247r11248
192192   m_sw1 = intf->m_sw1;
193193   m_drive_type = intf->m_drive_type;
194194   m_s1 = intf->m_s1;
195   
195
196196   m_shortname = "lux10828";
197197}
198198
r11247r11248
526526//**************************************************************************
527527
528528//-------------------------------------------------
529//   abcbus_cs -
529//  abcbus_cs -
530530//-------------------------------------------------
531531
532532void luxor_55_10828_device::abcbus_cs(UINT8 data)
r11247r11248
538538
539539
540540//-------------------------------------------------
541//  abcbus_rst -
541//  abcbus_rst -
542542//-------------------------------------------------
543543
544544void luxor_55_10828_device::abcbus_rst(int state)
r11247r11248
551551
552552
553553//-------------------------------------------------
554//  abcbus_stat -
554//  abcbus_stat -
555555//-------------------------------------------------
556556
557557UINT8 luxor_55_10828_device::abcbus_stat()
r11247r11248
568568
569569
570570//-------------------------------------------------
571//  abcbus_inp -
571//  abcbus_inp -
572572//-------------------------------------------------
573573
574574UINT8 luxor_55_10828_device::abcbus_inp()
r11247r11248
591591
592592
593593//-------------------------------------------------
594//  abcbus_utp -
594//  abcbus_utp -
595595//-------------------------------------------------
596596
597597void luxor_55_10828_device::abcbus_utp(UINT8 data)
r11247r11248
609609
610610
611611//-------------------------------------------------
612//  abcbus_c1 -
612//  abcbus_c1 -
613613//-------------------------------------------------
614614
615615void luxor_55_10828_device::abcbus_c1(UINT8 data)
r11247r11248
623623
624624
625625//-------------------------------------------------
626//  abcbus_c3 -
626//  abcbus_c3 -
627627//-------------------------------------------------
628628
629629void luxor_55_10828_device::abcbus_c3(UINT8 data)
r11247r11248
642642//**************************************************************************
643643
644644//-------------------------------------------------
645//  ctrl_w -
645//  ctrl_w -
646646//-------------------------------------------------
647647
648648WRITE8_MEMBER( luxor_55_10828_device::ctrl_w )
r11247r11248
688688
689689
690690//-------------------------------------------------
691//  status_w -
691//  status_w -
692692//-------------------------------------------------
693693
694694WRITE8_MEMBER( luxor_55_10828_device::status_w )
r11247r11248
716716
717717
718718//-------------------------------------------------
719//  fdc_r -
719//  fdc_r -
720720//-------------------------------------------------
721721
722722READ8_MEMBER( luxor_55_10828_device::fdc_r )
r11247r11248
743743
744744
745745//-------------------------------------------------
746//  fdc_w -
746//  fdc_w -
747747//-------------------------------------------------
748748
749749WRITE8_MEMBER( luxor_55_10828_device::fdc_w )
src/mess/machine/6525tpi.c
r11247r11248
117117   devcb_resolved_read8      in_pc_func;
118118   devcb_resolved_write8      out_pc_func;
119119   devcb_resolved_write_line   out_ca_func;
120   devcb_resolved_write_line   out_cb_func;   
121   
120   devcb_resolved_write_line   out_cb_func;
121
122122   UINT8 port_a, ddr_a, in_a;
123123   UINT8 port_b, ddr_b, in_b;
124124   UINT8 port_c, ddr_c, in_c;
src/mess/machine/lux10828.h
r11247r11248
9595protected:
9696    // device_config overrides
9797    virtual void device_config_complete();
98   
98
9999private:
100100   UINT8 m_sw1;            // single/double sided/density
101101   UINT8 m_drive_type;         // drive type
r11247r11248
106106// ======================> luxor_55_10828_device
107107
108108class luxor_55_10828_device :  public device_t,
109                        public device_abcbus_interface
109                        public device_abcbus_interface
110110{
111111    friend class luxor_55_10828_device_config;
112112
r11247r11248
131131    // device-level overrides
132132    virtual void device_start();
133133   virtual void device_reset();
134   
134
135135   // device_abcbus_interface overrides
136136   virtual void abcbus_cs(UINT8 data);
137137   virtual void abcbus_rst(int state);
src/mess/machine/c1571.c
r11247r11248
10531053      /* --- the following bits of info are returned as NULL-terminated strings --- */
10541054      case DEVINFO_STR_NAME:                     strcpy(info->s, "Commodore 1571");                     break;
10551055      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "c1571");                           break;
1056     
1056
10571057      default:                              DEVICE_GET_INFO_CALL(c1570);                        break;
10581058   }
10591059}
r11247r11248
10731073      /* --- the following bits of info are returned as NULL-terminated strings --- */
10741074      case DEVINFO_STR_NAME:                     strcpy(info->s, "Commodore 1571CR");                  break;
10751075      case DEVINFO_STR_SHORTNAME:                  strcpy(info->s, "c1571cr");                           break;
1076     
1076
10771077      default:                              DEVICE_GET_INFO_CALL(c1570);                        break;
10781078   }
10791079}
src/mess/machine/abc77.c
r11247r11248
307307{
308308   return INPUT_PORTS_NAME( abc77 );
309309}
310     
311310
312311
312
313313//**************************************************************************
314314//  INLINE HELPERS
315315//**************************************************************************
r11247r11248
420420   case TIMER_SERIAL:
421421      serial_clock();
422422      break;
423     
423
424424   case TIMER_RESET:
425425      device_set_input_line(m_maincpu, INPUT_LINE_RESET, CLEAR_LINE);
426426      break;
r11247r11248
435435READ8_MEMBER( abc77_device::p1_r )
436436{
437437   /*
438   
439      bit      description
440     
441      P10      Z17 Y0
442      P11      Z17 Y1
443      P12      Z17 Y2
444      P13      Z17 Y3
445      P14      Z17 Y4
446      P15      Z17 Y5
447      P16      Z17 Y6
448      P17      Z17 Y7
449     
450   */
451438
439        bit     description
440
441        P10     Z17 Y0
442        P11     Z17 Y1
443        P12     Z17 Y2
444        P13     Z17 Y3
445        P14     Z17 Y4
446        P15     Z17 Y5
447        P16     Z17 Y6
448        P17     Z17 Y7
449
450    */
451
452452   static const char *const keynames[] = { "X0", "X1", "X2", "X3", "X4", "X5", "X6", "X7", "X8", "X9", "X10", "X11" };
453453
454454   return input_port_read(this, keynames[m_keylatch]);
r11247r11248
462462WRITE8_MEMBER( abc77_device::p2_w )
463463{
464464   /*
465   
466      bit      description
467     
468      P20      Z2 A0
469      P21      Z2 A1
470      P22      Z2 A2
471      P23      Z2 A3
472      P24      NE556 2,6
473      P25      TxD
474      P26      _KEYDOWN
475      P27      Z17 HYS
476     
477   */
478465
466        bit     description
467
468        P20     Z2 A0
469        P21     Z2 A1
470        P22     Z2 A2
471        P23     Z2 A3
472        P24     NE556 2,6
473        P25     TxD
474        P26     _KEYDOWN
475        P27     Z17 HYS
476
477    */
478
479479   m_keylatch = data & 0x0f;
480480
481481   if (m_keylatch == 1)
src/mess/machine/isa_adlib.c
r11247r11248
2626static READ8_DEVICE_HANDLER( ym3812_16_r )
2727{
2828   UINT8 retVal = 0xff;
29   switch(offset)
29   switch(offset)
3030   {
3131      case 0 : retVal = ym3812_status_port_r( device, offset ); break;
3232   }
r11247r11248
3535
3636static WRITE8_DEVICE_HANDLER( ym3812_16_w )
3737{
38   switch(offset)
38   switch(offset)
3939   {
4040      case 0 : ym3812_control_port_w( device, offset, data ); break;
4141      case 1 : ym3812_write_port_w( device, offset, data ); break;
r11247r11248
4545//**************************************************************************
4646//  GLOBAL VARIABLES
4747//**************************************************************************
48
48
4949const device_type ISA8_ADLIB = isa8_adlib_device_config::static_alloc_device_config;
50
50
5151//**************************************************************************
5252//  DEVICE CONFIGURATION
5353//**************************************************************************
54
54
5555//-------------------------------------------------
5656//  isa8_adlib_device_config - constructor
5757//-------------------------------------------------
58
58
5959isa8_adlib_device_config::isa8_adlib_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
6060        : device_config(mconfig, static_alloc_device_config, "ISA8_ADLIB", tag, owner, clock),
6161         device_config_isa8_card_interface(mconfig, *this)
6262{
6363}
64
64
6565//-------------------------------------------------
6666//  static_alloc_device_config - allocate a new
6767//  configuration object
6868//-------------------------------------------------
69
69
7070device_config *isa8_adlib_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
7171{
7272        return global_alloc(isa8_adlib_device_config(mconfig, tag, owner, clock));
7373}
74
74
7575//-------------------------------------------------
7676//  alloc_device - allocate a new device object
7777//-------------------------------------------------
78
78
7979device_t *isa8_adlib_device_config::alloc_device(running_machine &machine) const
8080{
8181        return auto_alloc(machine, isa8_adlib_device(machine, *this));
8282}
83
83
8484//-------------------------------------------------
8585//  machine_config_additions - device-specific
8686//  machine configurations
r11247r11248
9494//**************************************************************************
9595//  LIVE DEVICE
9696//**************************************************************************
97
97
9898//-------------------------------------------------
9999//  isa8_adlib_device - constructor
100100//-------------------------------------------------
101
101
102102isa8_adlib_device::isa8_adlib_device(running_machine &_machine, const isa8_adlib_device_config &config) :
103103        device_t(_machine, config),
104104      device_isa8_card_interface( _machine, config, *this ),
r11247r11248
106106      m_isa(*owner(),config.m_isa_tag)
107107{
108108}
109
109
110110//-------------------------------------------------
111111//  device_start - device-specific startup
112112//-------------------------------------------------
113
113
114114void isa8_adlib_device::device_start()
115{       
115{
116116   m_isa->add_isa_card(this, m_config.m_isa_num);
117   m_isa->install_device(subdevice("ym3812"), 0x0388, 0x0389, 0, 0, FUNC(ym3812_16_r), FUNC(ym3812_16_w) );   
117   m_isa->install_device(subdevice("ym3812"), 0x0388, 0x0389, 0, 0, FUNC(ym3812_16_r), FUNC(ym3812_16_w) );
118118}
119119
120120//-------------------------------------------------
121121//  device_reset - device-specific reset
122122//-------------------------------------------------
123
123
124124void isa8_adlib_device::device_reset()
125125{
126126}
src/mess/machine/tf20.c
r11247r11248
33    Epson TF-20
44
55    Dual floppy drive with HX-20 factory option
6   
76
7
88    Status: Boots from system disk, missing ??PD7201 emulation
99
1010***************************************************************************/
src/mess/machine/isa_adlib.h
r11247r11248
11#pragma once
2
2
33#ifndef __ISA_ADLIB_H__
44#define __ISA_ADLIB_H__
5
5
66#include "emu.h"
77#include "machine/isa.h"
88
99//**************************************************************************
1010//  TYPE DEFINITIONS
1111//**************************************************************************
12
12
1313// ======================> isa8_adlib_device_config
14 
15class isa8_adlib_device_config :
14
15class isa8_adlib_device_config :
1616      public device_config,
1717      public device_config_isa8_card_interface
1818{
1919        friend class isa8_device;
2020      friend class isa8_adlib_device;
21
21
2222        // construction/destruction
2323        isa8_adlib_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
24
24
2525public:
2626        // allocators
2727        static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
2828        virtual device_t *alloc_device(running_machine &machine) const;
29     
29
3030      // optional information overrides
3131      virtual machine_config_constructor device_mconfig_additions() const;
3232};
33 
34 
33
34
3535// ======================> isa8_adlib_device
36 
37class isa8_adlib_device :
36
37class isa8_adlib_device :
3838      public device_t,
3939      public device_isa8_card_interface
4040{
4141        friend class isa8_adlib_device_config;
42
42
4343        // construction/destruction
4444        isa8_adlib_device(running_machine &_machine, const isa8_adlib_device_config &config);
4545
r11247r11248
5151private:
5252        // internal state
5353        const isa8_adlib_device_config &m_config;
54public:     
55      required_device<isa8_device> m_isa;     
54public:
55      required_device<isa8_device> m_isa;
5656};
57 
58 
57
58
5959// device type definition
6060extern const device_type ISA8_ADLIB;
6161
src/mess/machine/cybiko.c
r11247r11248
140140static emu_file *nvram_system_fopen( running_machine &machine, UINT32 openflags, const char *name)
141141{
142142   file_error filerr;
143   astring *fname = astring_assemble_4( astring_alloc(), machine.system().name, PATH_SEPARATOR, name, ".nv");   
143   astring *fname = astring_assemble_4( astring_alloc(), machine.system().name, PATH_SEPARATOR, name, ".nv");
144144   emu_file *file = global_alloc(emu_file(machine.options().nvram_directory(), openflags));
145   filerr = file->open(astring_c( fname));   
145   filerr = file->open(astring_c( fname));
146146   astring_free( fname);
147147   return (filerr == FILERR_NONE) ? file : NULL;
148148}
src/mess/machine/c64.c
r11247r11248
549549WRITE8_DEVICE_HANDLER(c64_m6510_port_write)
550550{
551551   c64_state *state = device->machine().driver_data<c64_state>();
552   
552
553553   UINT8 direction = offset; // HACK ALERT!
554554
555555   /* if line is marked as input then keep current value */
src/mess/machine/isa_gblaster.c
r11247r11248
2222   MCFG_SOUND_ADD("saa1099.1", SAA1099, 4772720)
2323   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "gblaster:mono", 0.50)
2424   MCFG_SOUND_ADD("saa1099.2", SAA1099, 4772720)
25   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "gblaster:mono", 0.50)   
25   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "gblaster:mono", 0.50)
2626MACHINE_CONFIG_END
2727
2828static READ8_DEVICE_HANDLER( saa1099_16_r )
r11247r11248
3232
3333static WRITE8_DEVICE_HANDLER( saa1099_16_w )
3434{
35   switch(offset)
35   switch(offset)
3636   {
3737      case 0 : saa1099_control_w( device, offset, data ); break;
3838      case 1 : saa1099_data_w( device, offset, data ); break;
r11247r11248
4242//**************************************************************************
4343//  GLOBAL VARIABLES
4444//**************************************************************************
45
45
4646const device_type ISA8_GAME_BLASTER = isa8_gblaster_device_config::static_alloc_device_config;
47
47
4848//**************************************************************************
4949//  DEVICE CONFIGURATION
5050//**************************************************************************
51
51
5252//-------------------------------------------------
5353//  isa8_gblaster_device_config - constructor
5454//-------------------------------------------------
55
55
5656isa8_gblaster_device_config::isa8_gblaster_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
5757        : device_config(mconfig, static_alloc_device_config, "ISA8_GAME_BLASTER", tag, owner, clock),
5858         device_config_isa8_card_interface(mconfig, *this)
5959{
6060}
61
61
6262//-------------------------------------------------
6363//  static_alloc_device_config - allocate a new
6464//  configuration object
6565//-------------------------------------------------
66
66
6767device_config *isa8_gblaster_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
6868{
6969        return global_alloc(isa8_gblaster_device_config(mconfig, tag, owner, clock));
7070}
71
71
7272//-------------------------------------------------
7373//  alloc_device - allocate a new device object
7474//-------------------------------------------------
75
75
7676device_t *isa8_gblaster_device_config::alloc_device(running_machine &machine) const
7777{
7878        return auto_alloc(machine, isa8_gblaster_device(machine, *this));
7979}
80
80
8181//-------------------------------------------------
8282//  machine_config_additions - device-specific
8383//  machine configurations
r11247r11248
9191//**************************************************************************
9292//  LIVE DEVICE
9393//**************************************************************************
94
94
9595//-------------------------------------------------
9696//  isa8_gblaster_device - constructor
9797//-------------------------------------------------
98
98
9999isa8_gblaster_device::isa8_gblaster_device(running_machine &_machine, const isa8_gblaster_device_config &config) :
100100        device_t(_machine, config),
101101      device_isa8_card_interface( _machine, config, *this ),
r11247r11248
103103      m_isa(*owner(),config.m_isa_tag)
104104{
105105}
106
106
107107//-------------------------------------------------
108108//  device_start - device-specific startup
109109//-------------------------------------------------
110
110
111111void isa8_gblaster_device::device_start()
112{       
113   m_isa->add_isa_card(this, m_config.m_isa_num);   
112{
113   m_isa->add_isa_card(this, m_config.m_isa_num);
114114   m_isa->install_device(subdevice("saa1099.1"), 0x0220, 0x0221, 0, 0, FUNC(saa1099_16_r), FUNC(saa1099_16_w) );
115115   m_isa->install_device(subdevice("saa1099.2"), 0x0222, 0x0223, 0, 0, FUNC(saa1099_16_r), FUNC(saa1099_16_w) );
116116}
r11247r11248
118118//-------------------------------------------------
119119//  device_reset - device-specific reset
120120//-------------------------------------------------
121
121
122122void isa8_gblaster_device::device_reset()
123123{
124124}
src/mess/machine/isa_gblaster.h
r11247r11248
11#pragma once
2
2
33#ifndef __ISA_GAME_BLASTER_H__
44#define __ISA_GAME_BLASTER_H__
5
5
66#include "emu.h"
77#include "machine/isa.h"
88
99//**************************************************************************
1010//  TYPE DEFINITIONS
1111//**************************************************************************
12
12
1313// ======================> isa8_gblaster_device_config
14 
15class isa8_gblaster_device_config :
14
15class isa8_gblaster_device_config :
1616      public device_config,
1717      public device_config_isa8_card_interface
1818{
1919        friend class isa8_device;
2020      friend class isa8_gblaster_device;
21
21
2222        // construction/destruction
2323        isa8_gblaster_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
24
24
2525public:
2626        // allocators
2727        static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
2828        virtual device_t *alloc_device(running_machine &machine) const;
29     
29
3030      // optional information overrides
3131      virtual machine_config_constructor device_mconfig_additions() const;
3232};
33 
34 
33
34
3535// ======================> isa8_gblaster_device
36 
37class isa8_gblaster_device :
36
37class isa8_gblaster_device :
3838      public device_t,
3939      public device_isa8_card_interface
4040{
4141        friend class isa8_gblaster_device_config;
42
42
4343        // construction/destruction
4444        isa8_gblaster_device(running_machine &_machine, const isa8_gblaster_device_config &config);
4545
r11247r11248
5151private:
5252        // internal state
5353        const isa8_gblaster_device_config &m_config;
54public:     
55      required_device<isa8_device> m_isa;     
54public:
55      required_device<isa8_device> m_isa;
5656};
57 
58 
57
58
5959// device type definition
6060extern const device_type ISA8_GAME_BLASTER;
6161
src/mess/machine/kb3600.c
r11247r11248
1111
1212    TODO:
1313
14   - scan timer clock frequency
14    - scan timer clock frequency
1515    - more accurate emulation of real chip
1616
1717*/
r11247r11248
170170
171171
172172//-------------------------------------------------
173//  b_r -
173//  b_r -
174174//-------------------------------------------------
175175
176176UINT16 ay3600_device::b_r()
src/mess/video/pc8401a.c
r11247r11248
1616bool pc8401a_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
1717{
1818   m_lcdc->update_screen(&bitmap, &cliprect);
19   
19
2020   return 0;
2121}
2222
r11247r11248
3131   m_lcdc->update_screen(&bitmap, &cliprect);
3232
3333   /*
34   if (strcmp(screen.tag(), SCREEN_TAG) == 0)
35   {
36      sed1330_update(m_lcdc, &bitmap, &cliprect);
37   }
38   else
39   {
40      mc6845_update(m_crtc, &bitmap, &cliprect);
41   }
42   */
34    if (strcmp(screen.tag(), SCREEN_TAG) == 0)
35    {
36        sed1330_update(m_lcdc, &bitmap, &cliprect);
37    }
38    else
39    {
40        mc6845_update(m_crtc, &bitmap, &cliprect);
41    }
42    */
4343
4444   return 0;
4545}
r11247r11248
6262{
6363}
6464
65static const mc6845_interface pc8441a_mc6845_interface =
65static const mc6845_interface pc8441a_mc6845_interface =
6666{
6767   CRT_SCREEN_TAG,
6868   6,
r11247r11248
106106   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
107107   MCFG_SCREEN_SIZE(480, 208)
108108   MCFG_SCREEN_VISIBLE_AREA(0, 480-1, 0, 200-1)
109   
109
110110   MCFG_SED1330_ADD(SED1330_TAG, 0, SCREEN_TAG, pc8500_lcdc)
111111
112112   /* PC-8441A CRT */
r11247r11248
116116   MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*8-1)
117117   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
118118   MCFG_SCREEN_REFRESH_RATE(50)
119   
119
120120   MCFG_MC6845_ADD(MC6845_TAG, MC6845, 400000, pc8441a_mc6845_interface)
121121MACHINE_CONFIG_END
src/mess/video/pc_vga_mess.c
r11247r11248
14961496   MCFG_SCREEN_UPDATE(pc_video)
14971497   MCFG_SCREEN_REFRESH_RATE(60)
14981498   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
1499   
1499
15001500   MCFG_PALETTE_LENGTH(0x100)
15011501   MCFG_PALETTE_INIT(vga)
15021502
src/mess/video/isa_mda.c
r11247r11248
113113   MCFG_MC6845_ADD( MDA_MC6845_NAME, MC6845, MDA_CLOCK/9, mc6845_mda_intf)
114114
115115   MCFG_GFXDECODE(pcmda)
116   
117   MCFG_PC_LPT_ADD("lpt", pc_lpt_config)   
116
117   MCFG_PC_LPT_ADD("lpt", pc_lpt_config)
118118MACHINE_CONFIG_END
119119
120120ROM_START( mda )
r11247r11248
126126//**************************************************************************
127127//  GLOBAL VARIABLES
128128//**************************************************************************
129
129
130130const device_type ISA8_MDA = isa8_mda_device_config::static_alloc_device_config;
131
131
132132//**************************************************************************
133133//  DEVICE CONFIGURATION
134134//**************************************************************************
135
135
136136//-------------------------------------------------
137137//  isa8_mda_device_config - constructor
138138//-------------------------------------------------
139
139
140140isa8_mda_device_config::isa8_mda_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
141141        : device_config(mconfig, static_alloc_device_config, "ISA8_MDA", tag, owner, clock),
142142         device_config_isa8_card_interface(mconfig, *this)
143143{
144144   m_shortname = "mda";
145145}
146
146
147147//-------------------------------------------------
148148//  static_alloc_device_config - allocate a new
149149//  configuration object
150150//-------------------------------------------------
151
151
152152device_config *isa8_mda_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
153153{
154154        return global_alloc(isa8_mda_device_config(mconfig, tag, owner, clock));
155155}
156
156
157157//-------------------------------------------------
158158//  alloc_device - allocate a new device object
159159//-------------------------------------------------
160
160
161161device_t *isa8_mda_device_config::alloc_device(running_machine &machine) const
162162{
163163        return auto_alloc(machine, isa8_mda_device(machine, *this));
164164}
165
165
166166//-------------------------------------------------
167167//  machine_config_additions - device-specific
168168//  machine configurations
r11247r11248
185185//**************************************************************************
186186//  LIVE DEVICE
187187//**************************************************************************
188
188
189189//-------------------------------------------------
190190//  isa8_mda_device - constructor
191191//-------------------------------------------------
192
192
193193isa8_mda_device::isa8_mda_device(running_machine &_machine, const isa8_mda_device_config &config) :
194194        device_t(_machine, config),
195195      device_isa8_card_interface( _machine, config, *this ),
r11247r11248
197197      m_isa(*owner(),config.m_isa_tag)
198198{
199199}
200
200
201201//-------------------------------------------------
202202//  device_start - device-specific startup
203203//-------------------------------------------------
204
204
205205void isa8_mda_device::device_start()
206{       
206{
207207   m_isa->add_isa_card(this, m_config.m_isa_num);
208208   videoram = auto_alloc_array(machine(), UINT8, 0x1000);
209209   m_isa->install_device(this, 0x3b0, 0x3bf, 0, 0, FUNC(pc_MDA_r), FUNC(pc_MDA_w) );
210   m_isa->install_bank(0xb0000, 0xb0fff, 0, 0x07000, "bank_mda", videoram);   
211   
210   m_isa->install_bank(0xb0000, 0xb0fff, 0, 0x07000, "bank_mda", videoram);
211
212212   /* Initialise the mda palette */
213213   for(int i = 0; i < (sizeof(mda_palette) / 3); i++)
214      palette_set_color_rgb(machine(), i, mda_palette[i][0], mda_palette[i][1], mda_palette[i][2]);   
214      palette_set_color_rgb(machine(), i, mda_palette[i][0], mda_palette[i][1], mda_palette[i][2]);
215215}
216
216
217217//-------------------------------------------------
218218//  device_reset - device-specific reset
219219//-------------------------------------------------
220
220
221221void isa8_mda_device::device_reset()
222222{
223223   update_row = NULL;
r11247r11248
225225   mode_control = 0;
226226   vsync = 0;
227227   hsync = 0;
228   
228
229229   astring tempstring;
230   chr_gen = machine().region(subtag(tempstring, "gfx1"))->base();   
230   chr_gen = machine().region(subtag(tempstring, "gfx1"))->base();
231231}
232232
233233/***************************************************************************
r11247r11248
492492         break;
493493      case 12: case 13:  case 14:
494494         pc_lpt_w(lpt, offset - 12, data);
495         break;         
495         break;
496496   }
497497}
498498
r11247r11248
567567
568568   MCFG_GFXDECODE(pcherc)
569569
570   MCFG_PC_LPT_ADD("lpt", pc_lpt_config)   
570   MCFG_PC_LPT_ADD("lpt", pc_lpt_config)
571571MACHINE_CONFIG_END
572572
573573ROM_START( hercules )
r11247r11248
578578//**************************************************************************
579579//  GLOBAL VARIABLES
580580//**************************************************************************
581
581
582582const device_type ISA8_HERCULES = isa8_hercules_device_config::static_alloc_device_config;
583
583
584584//**************************************************************************
585585//  DEVICE CONFIGURATION
586586//**************************************************************************
587
587
588588//-------------------------------------------------
589589//  isa8_mda_device_config - constructor
590590//-------------------------------------------------
591
591
592592isa8_hercules_device_config::isa8_hercules_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
593593        : isa8_mda_device_config(mconfig, tag, owner, clock)
594594{
595595   m_shortname = "hercules";
596596}
597
597
598598//-------------------------------------------------
599599//  static_alloc_device_config - allocate a new
600600//  configuration object
601601//-------------------------------------------------
602
602
603603device_config *isa8_hercules_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
604604{
605605        return global_alloc(isa8_hercules_device_config(mconfig, tag, owner, clock));
606606}
607
607
608608//-------------------------------------------------
609609//  alloc_device - allocate a new device object
610610//-------------------------------------------------
611
611
612612device_t *isa8_hercules_device_config::alloc_device(running_machine &machine) const
613613{
614614        return auto_alloc(machine, isa8_hercules_device(machine, *this));
615615}
616
616
617617//-------------------------------------------------
618618//  machine_config_additions - device-specific
619619//  machine configurations
r11247r11248
636636//**************************************************************************
637637//  LIVE DEVICE
638638//**************************************************************************
639
639
640640//-------------------------------------------------
641641//  isa8_hercules_device - constructor
642642//-------------------------------------------------
643
643
644644isa8_hercules_device::isa8_hercules_device(running_machine &_machine, const isa8_hercules_device_config &config) :
645645        isa8_mda_device(_machine, config),
646646      m_config(config)
647647{
648648}
649
649
650650//-------------------------------------------------
651651//  device_start - device-specific startup
652652//-------------------------------------------------
653
653
654654void isa8_hercules_device::device_start()
655{       
655{
656656   videoram = auto_alloc_array(machine(), UINT8, 0x10000);
657657
658658   m_isa->install_device(this, 0x3b0, 0x3bf, 0, 0, FUNC(hercules_r), FUNC(hercules_w) );
r11247r11248
660660
661661   /* Initialise the mda palette */
662662   for(int i = 0; i < (sizeof(mda_palette) / 3); i++)
663      palette_set_color_rgb(machine(), i, mda_palette[i][0], mda_palette[i][1], mda_palette[i][2]);   
663      palette_set_color_rgb(machine(), i, mda_palette[i][0], mda_palette[i][1], mda_palette[i][2]);
664664}
665
665
666666//-------------------------------------------------
667667//  device_reset - device-specific reset
668668//-------------------------------------------------
669
669
670670void isa8_hercules_device::device_reset()
671671{
672672   isa8_mda_device::device_reset();
673673   configuration_switch = 0;
674674
675675   astring tempstring;
676   chr_gen = machine().region(subtag(tempstring, "gfx1"))->base();   
676   chr_gen = machine().region(subtag(tempstring, "gfx1"))->base();
677677}
678678
679679/***************************************************************************
r11247r11248
766766static WRITE8_DEVICE_HANDLER ( hercules_w )
767767{
768768   device_t *devconf = device->subdevice(HERCULES_MC6845_NAME);
769   device_t *lpt = device->subdevice("lpt");   
769   device_t *lpt = device->subdevice("lpt");
770770   switch( offset )
771771   {
772772   case 0: case 2: case 4: case 6:
r11247r11248
780780      break;
781781   case 12: case 13:  case 14:
782782      pc_lpt_w(lpt, offset - 12, data);
783      break;               
783      break;
784784   case 15:
785785      hercules_config_w(device, offset, data);
786786      break;
r11247r11248
825825   /* 12, 13, 14  are the LPT ports */
826826   case 12: case 13:  case 14:
827827      data = pc_lpt_r(lpt, offset - 12);
828      break;     
828      break;
829829   }
830830   return data;
831831}
src/mess/video/isa_mda.h
r11247r11248
11#pragma once
2
2
33#ifndef __ISA_MDA_H__
44#define __ISA_MDA_H__
5
5
66#include "emu.h"
77#include "machine/isa.h"
88#include "video/mc6845.h"
r11247r11248
1010//**************************************************************************
1111//  TYPE DEFINITIONS
1212//**************************************************************************
13
13
1414// ======================> isa8_mda_device_config
15 
16class isa8_mda_device_config :
15
16class isa8_mda_device_config :
1717      public device_config,
1818      public device_config_isa8_card_interface
1919{
2020        friend class isa8_device;
2121      friend class isa8_mda_device;
2222      friend class isa8_hercules_device_config;
23
23
2424        // construction/destruction
2525        isa8_mda_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
26
26
2727public:
2828        // allocators
2929        static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
3030        virtual device_t *alloc_device(running_machine &machine) const;
31     
31
3232      // optional information overrides
3333      virtual machine_config_constructor device_mconfig_additions() const;
34      virtual const rom_entry *device_rom_region() const;     
34      virtual const rom_entry *device_rom_region() const;
3535};
36 
37 
36
37
3838// ======================> isa8_mda_device
39 
40class isa8_mda_device :
39
40class isa8_mda_device :
4141      public device_t,
4242      public device_isa8_card_interface
4343{
4444        friend class isa8_mda_device_config;
45      friend class isa8_hercules_device_config;     
45      friend class isa8_hercules_device_config;
4646      friend class isa8_hercules_device;
47
47
4848        // construction/destruction
4949        isa8_mda_device(running_machine &_machine, const isa8_mda_device_config &config);
5050
r11247r11248
5656private:
5757        // internal state
5858        const isa8_mda_device_config &m_config;
59public:     
59public:
6060      required_device<isa8_device> m_isa;
6161      int  framecnt;
6262
6363      UINT8 mode_control;
64     
64
6565      mc6845_update_row_func  update_row;
6666      UINT8   *chr_gen;
6767      UINT8   vsync;
6868      UINT8   hsync;
6969      UINT8  *videoram;
7070};
71 
72 
71
72
7373// device type definition
7474extern const device_type ISA8_MDA;
7575
7676// ======================> isa8_hercules_device_config
77 
78class isa8_hercules_device_config :
77
78class isa8_hercules_device_config :
7979      public isa8_mda_device_config
8080{
8181        friend class isa8_hercules_device;
8282      friend class isa8_mda_device;
83
83
8484        // construction/destruction
8585        isa8_hercules_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
86
86
8787public:
8888        // allocators
8989        static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
9090        virtual device_t *alloc_device(running_machine &machine) const;
91     
91
9292      // optional information overrides
9393      virtual machine_config_constructor device_mconfig_additions() const;
94      virtual const rom_entry *device_rom_region() const;     
94      virtual const rom_entry *device_rom_region() const;
9595};
96 
97 
96
97
9898// ======================> isa8_hercules_device
99 
100class isa8_hercules_device :
99
100class isa8_hercules_device :
101101      public isa8_mda_device
102102{
103103        friend class isa8_hercules_device_config;
104104      friend class isa8_mda_device_config;
105
105
106106        // construction/destruction
107107        isa8_hercules_device(running_machine &_machine, const isa8_hercules_device_config &config);
108108
r11247r11248
110110        // device-level overrides
111111        virtual void device_start();
112112        virtual void device_reset();
113
113
114114private:
115115        // internal state
116116        const isa8_hercules_device_config &m_config;
r11247r11248
118118public:
119119      UINT8 configuration_switch; //hercules
120120};
121 
122 
121
122
123123// device type definition
124124extern const device_type ISA8_HERCULES;
125125
src/mess/video/cirrus.c
r11247r11248
263263
264264   if (LOG_PCIACCESS)
265265      logerror("cirrus5430_pci_read(): function=%d offset=0x%02X result=0x%04X\n", function, offset, result);
266   return result;   
266   return result;
267267}
268268
269269
src/mess/video/cirrus.h
r11247r11248
1313
1414#define MCFG_CIRRUS_ADD(_tag) \
1515    MCFG_DEVICE_ADD(_tag, CIRRUS, 0) \
16   
16
1717// ======================> cirrus_device_config
1818
1919class cirrus_device_config :  public device_config
r11247r11248
2727    // allocators
2828    static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
2929    virtual device_t *alloc_device(running_machine &machine) const;
30   
30
3131protected:
3232    // internal state goes here
3333};
r11247r11248
5555   // internal state
5656    const cirrus_device_config &m_config;
5757
58private:   
58private:
5959};
6060
6161
src/mess/video/pcw.c
r11247r11248
188188SCREEN_UPDATE( pcw_printer )
189189{
190190   pcw_state *state = screen->machine().driver_data<pcw_state>();
191   
191
192192   // printer output
193193   rectangle rect;
194194   INT32 feed;
src/mess/video/upd7220.c
r11247r11248
1818    - incomplete / unimplemented FIGD / GCHRD draw modes
1919        - Arc
2020        - FIGD character
21      - slanted character
22       - GCHRD character (needs rewrite)
21        - slanted character
22        - GCHRD character (needs rewrite)
2323    - read-modify-write cycle
2424        - read data
2525        - modify data
2626        - write data
27   - QX-10 diagnostic test has positioning bugs with the bitmap display test;
28   - QX-10 diagnostic test misses the zooming factor (external pin);
29   - compis2 SAD address for bitmap is 0x20000 for whatever reason (presumably missing banking);
30   - A5105 has a FIFO bug with the RDAT, should be a lot larger when it scrolls up;
27    - QX-10 diagnostic test has positioning bugs with the bitmap display test;
28    - QX-10 diagnostic test misses the zooming factor (external pin);
29    - compis2 SAD address for bitmap is 0x20000 for whatever reason (presumably missing banking);
30    - A5105 has a FIFO bug with the RDAT, should be a lot larger when it scrolls up;
3131
3232    - honor visible area
3333    - wide mode (32-bit access)
r11247r11248
152152// internal 128x14 control ROM
153153ROM_START( upd7220 )
154154   ROM_REGION( 0x100, "upd7220", 0 )
155   ROM_LOAD( "upd7220.bin", 0x000, 0x100, NO_DUMP )
155   ROM_LOAD( "upd7220.bin", 0x000, 0x100, NO_DUMP )
156156ROM_END
157157
158158
r11247r11248
246246//**************************************************************************
247247
248248//-------------------------------------------------
249//  fifo_clear -
249//  fifo_clear -
250250//-------------------------------------------------
251251
252252inline void upd7220_device::fifo_clear()
r11247r11248
266266
267267
268268//-------------------------------------------------
269//  fifo_param_count -
269//  fifo_param_count -
270270//-------------------------------------------------
271271
272272inline int upd7220_device::fifo_param_count()
r11247r11248
283283
284284
285285//-------------------------------------------------
286//  fifo_set_direction -
286//  fifo_set_direction -
287287//-------------------------------------------------
288288
289289inline void upd7220_device::fifo_set_direction(int dir)
r11247r11248
298298
299299
300300//-------------------------------------------------
301//  queue -
301//  queue -
302302//-------------------------------------------------
303303
304304inline void upd7220_device::queue(UINT8 data, int flag)
r11247r11248
326326
327327
328328//-------------------------------------------------
329//  dequeue -
329//  dequeue -
330330//-------------------------------------------------
331331
332332inline void upd7220_device::dequeue(UINT8 *data, int *flag)
r11247r11248
357357
358358
359359//-------------------------------------------------
360//  update_vsync_timer -
360//  update_vsync_timer -
361361//-------------------------------------------------
362362
363363inline void upd7220_device::update_vsync_timer(int state)
r11247r11248
371371
372372
373373//-------------------------------------------------
374//  update_hsync_timer -
374//  update_hsync_timer -
375375//-------------------------------------------------
376376
377377inline void upd7220_device::update_hsync_timer(int state)
r11247r11248
388388
389389
390390//-------------------------------------------------
391//  update_blank_timer -
391//  update_blank_timer -
392392//-------------------------------------------------
393393
394394inline void upd7220_device::update_blank_timer(int state)
r11247r11248
405405
406406
407407//-------------------------------------------------
408//  recompute_parameters -
408//  recompute_parameters -
409409//-------------------------------------------------
410410
411411inline void upd7220_device::recompute_parameters()
r11247r11248
453453
454454
455455//-------------------------------------------------
456//  reset_figs_param -
456//  reset_figs_param -
457457//-------------------------------------------------
458458
459459inline void upd7220_device::reset_figs_param()
r11247r11248
467467
468468
469469//-------------------------------------------------
470//  advance_ead -
470//  advance_ead -
471471//-------------------------------------------------
472472
473473inline void upd7220_device::advance_ead()
r11247r11248
530530
531531
532532//-------------------------------------------------
533//  read_vram -
533//  read_vram -
534534//-------------------------------------------------
535535
536536inline void upd7220_device::read_vram(UINT8 type, UINT8 mod)
r11247r11248
566566
567567
568568//-------------------------------------------------
569//  write_vram -
569//  write_vram -
570570//-------------------------------------------------
571571
572572inline void upd7220_device::write_vram(UINT8 type, UINT8 mod)
r11247r11248
641641
642642
643643//-------------------------------------------------
644//  check_pattern -
644//  check_pattern -
645645//-------------------------------------------------
646646
647647inline UINT16 upd7220_device::check_pattern(UINT16 pattern)
r11247r11248
661661
662662
663663//-------------------------------------------------
664//  get_text_partition -
664//  get_text_partition -
665665//-------------------------------------------------
666666
667667inline void upd7220_device::get_text_partition(int index, UINT32 *sad, UINT16 *len, int *im, int *wd)
r11247r11248
674674
675675
676676//-------------------------------------------------
677//  get_graphics_partition -
677//  get_graphics_partition -
678678//-------------------------------------------------
679679
680680inline void upd7220_device::get_graphics_partition(int index, UINT32 *sad, UINT16 *len, int *im, int *wd)
r11247r11248
873873
874874
875875//-------------------------------------------------
876//  draw_pixel -
876//  draw_pixel -
877877//-------------------------------------------------
878878
879879void upd7220_device::draw_pixel(int x, int y, UINT16 tile_data)
r11247r11248
895895
896896
897897//-------------------------------------------------
898//  draw_line -
898//  draw_line -
899899//-------------------------------------------------
900900
901901void upd7220_device::draw_line(int x, int y)
r11247r11248
933933
934934
935935//-------------------------------------------------
936//  draw_rectangle -
936//  draw_rectangle -
937937//-------------------------------------------------
938938
939939void upd7220_device::draw_rectangle(int x, int y)
r11247r11248
996996
997997
998998//-------------------------------------------------
999//  draw_char -
999//  draw_char -
10001000//-------------------------------------------------
10011001
10021002void upd7220_device::draw_char(int x, int y)
r11247r11248
10491049
10501050
10511051//-------------------------------------------------
1052//  translate_command -
1052//  translate_command -
10531053//-------------------------------------------------
10541054
10551055int upd7220_device::translate_command(UINT8 data)
r11247r11248
10981098
10991099
11001100//-------------------------------------------------
1101//  process_fifo -
1101//  process_fifo -
11021102//-------------------------------------------------
11031103
11041104void upd7220_device::process_fifo()
r11247r11248
13531353         m_figs.m_figure_type = (m_pr[1] & 0xf8) >> 3;
13541354
13551355         //if(m_figs.m_dir != 2)
1356         //   printf("DIR %02x\n",m_pr[1]);
1356         //  printf("DIR %02x\n",m_pr[1]);
13571357      }
13581358
13591359      if (m_param_ptr == 4)
r11247r11248
14461446
14471447
14481448//-------------------------------------------------
1449//  read -
1449//  read -
14501450//-------------------------------------------------
14511451
14521452READ8_MEMBER( upd7220_device::read )
r11247r11248
14751475
14761476
14771477//-------------------------------------------------
1478//  write -
1478//  write -
14791479//-------------------------------------------------
14801480
14811481WRITE8_MEMBER( upd7220_device::write )
r11247r11248
14981498
14991499
15001500//-------------------------------------------------
1501//  dack_r -
1501//  dack_r -
15021502//-------------------------------------------------
15031503
15041504READ8_MEMBER( upd7220_device::dack_r )
r11247r11248
15081508
15091509
15101510//-------------------------------------------------
1511//  dack_w -
1511//  dack_w -
15121512//-------------------------------------------------
15131513
15141514WRITE8_MEMBER( upd7220_device::dack_w )
r11247r11248
15171517
15181518
15191519//-------------------------------------------------
1520//  ext_sync_w -
1520//  ext_sync_w -
15211521//-------------------------------------------------
15221522
15231523WRITE_LINE_MEMBER( upd7220_device::ext_sync_w )
r11247r11248
15361536
15371537
15381538//-------------------------------------------------
1539//  ext_sync_w -
1539//  ext_sync_w -
15401540//-------------------------------------------------
15411541
15421542WRITE_LINE_MEMBER( upd7220_device::lpen_w )
r11247r11248
15561556
15571557
15581558//-------------------------------------------------
1559//  update_text -
1559//  update_text -
15601560//-------------------------------------------------
15611561
15621562void upd7220_device::update_text(bitmap_t *bitmap, const rectangle *cliprect)
r11247r11248
15741574      {
15751575         addr = sad + (y * m_pitch);
15761576
1577         if (m_config.m_draw_text_func)
1577         if (m_config.m_draw_text_func)
15781578            m_config.m_draw_text_func(this, bitmap, m_vram, addr, y, wd, m_pitch, 0, 0, m_aw * 8 - 1, m_al - 1, m_lr, m_dc, m_ead);
15791579      }
15801580
r11247r11248
15841584
15851585
15861586//-------------------------------------------------
1587//  draw_graphics_line -
1587//  draw_graphics_line -
15881588//-------------------------------------------------
15891589
15901590void upd7220_device::draw_graphics_line(bitmap_t *bitmap, UINT32 addr, int y, int wd)
r11247r11248
16051605
16061606
16071607//-------------------------------------------------
1608//  update_graphics -
1608//  update_graphics -
16091609//-------------------------------------------------
16101610
16111611void upd7220_device::update_graphics(bitmap_t *bitmap, const rectangle *cliprect, int force_bitmap)
r11247r11248
16461646
16471647
16481648//-------------------------------------------------
1649//  update_screen -
1649//  update_screen -
16501650//-------------------------------------------------
16511651
16521652void upd7220_device::update_screen(bitmap_t *bitmap, const rectangle *cliprect)
src/mess/video/pc_t1t.c
r11247r11248
940940   pcjr.update_row = NULL;
941941   pcjr.bank = 0;
942942   pcjr.chr_size = 16;
943   
943
944944   buswidth = machine.firstcpu->memory().space_config(AS_PROGRAM)->m_databus_width;
945945   switch(buswidth)
946946   {
r11247r11248
957957      default:
958958         fatalerror("T1T: Bus width %d not supported", buswidth);
959959         break;
960   }   
960   }
961961}
962962
963963
r11247r11248
971971   pcjr.bank = 0;
972972   pcjr.mode_control = 0x08;
973973   pcjr.chr_size = 8;
974   
974
975975   buswidth = machine.firstcpu->memory().space_config(AS_PROGRAM)->m_databus_width;
976976   switch(buswidth)
977977   {
r11247r11248
982982      default:
983983         fatalerror("PCJR: Bus width %d not supported", buswidth);
984984         break;
985   }   
985   }
986986}
src/mess/video/pc_aga.c
r11247r11248
6161   UINT8   cga_palette_lut_2bpp[4];
6262   UINT8   vsync;
6363   UINT8   hsync;
64   
64
6565   UINT8  *videoram;
6666} aga;
6767
src/mess/video/pc_cga.c
r11247r11248
249249   UINT8   vsync;
250250   UINT8   hsync;
251251   UINT8   p3df;
252   
252
253253   size_t  videoram_size;
254254   UINT8  *videoram;
255255} cga;
r11247r11248
17701770   internal_pc_cga_video_start(machine);
17711771   cga.videoram_size = 0x10000;
17721772   cga.videoram = auto_alloc_array(machine, UINT8, 0x10000 );
1773   
1773
17741774   address_space *space = machine.firstcpu->memory().space( AS_PROGRAM );
17751775   address_space *io_space = machine.firstcpu->memory().space( AS_IO );
17761776
r11247r11248
17801780
17811781   io_space->install_legacy_read_handler( 0x3d0, 0x3df, FUNC(pc1512_16le_r) );
17821782   io_space->install_legacy_write_handler( 0x3d0, 0x3df, FUNC(pc1512_16le_w) );
1783   
1783
17841784}
17851785
17861786
src/mess/video/poly88.c
r11247r11248
9090               for(b = 0; b < 7; b++ )
9191                  *BITMAP_ADDR16(bitmap, y*15+j, xpos+b ) =  (l >> (6-b)) & 1;
9292
93                 *BITMAP_ADDR16(bitmap, y*15+j, xpos+7 ) =  0;
94                 *BITMAP_ADDR16(bitmap, y*15+j, xpos+8 ) =  0;
95                 *BITMAP_ADDR16(bitmap, y*15+j, xpos+9 ) =  0;
93               *BITMAP_ADDR16(bitmap, y*15+j, xpos+7 ) =  0;
94               *BITMAP_ADDR16(bitmap, y*15+j, xpos+8 ) =  0;
95               *BITMAP_ADDR16(bitmap, y*15+j, xpos+9 ) =  0;
9696            }
9797         }
9898         xpos += 10;
src/mess/video/abc1600.c
r11247r11248
22
33    TODO:
44
5   - FRAME POL
6   - landscape/portrait mode
7   - position image based on vsync/hsync
5    - FRAME POL
6    - landscape/portrait mode
7    - position image based on vsync/hsync
88
99*/
1010
r11247r11248
103103{
104104   UINT32 addr = (offset & 0x7fffe) >> 1;
105105   UINT8 data = 0;
106   
106
107107   if (offset & 0x01)
108108   {
109109      data = m_video_ram[addr] & 0xff;
r11247r11248
140140         if (LOG) logerror("GMDI LB %02x -> %04x\n", data, m_gmdi);
141141      }
142142
143//      m_wrm = 0xffff;
143//      m_wrm = 0xffff;
144144      write_videoram(addr, m_gmdi, m_wrm & 0x00ff);
145145
146146      if (LOG) logerror("Video RAM write LB to %05x : %04x\n", addr, m_video_ram[addr]);
r11247r11248
160160         if (LOG) logerror("GMDI HB %02x -> %04x\n", data, m_gmdi);
161161      }
162162
163//      m_wrm = 0xffff;
163//      m_wrm = 0xffff;
164164      write_videoram(addr, m_gmdi, m_wrm & 0xff00);
165165
166166      if (LOG) logerror("Video RAM write HB to %05x : %04x\n", addr, m_video_ram[addr]);
r11247r11248
176176{
177177   /*
178178
179      bit      description
179        bit     description
180180
181      0      0
182      1      SCREENPOS
183      2     
184      3     
185      4     
186      5     
187      6      VSYNC
188      7      BUSY
181        0       0
182        1       SCREENPOS
183        2
184        3
185        4
186        5
187        6       VSYNC
188        7       BUSY
189189
190   */
190    */
191191
192192   UINT8 data = 0;
193193
194194   // monitor orientation (portrait/landscape)
195//   data |= 0x02;
196   
195//  data |= 0x02;
196
197197   // vertical sync
198198   data |= m_vs << 6;
199199
r11247r11248
212212   case LDSX_HB:
213213      /*
214214
215         bit      description
215            bit     description
216216
217         0      XSIZE8
218         1      XSIZE9
219         2      U/D* Y
220         3      U/D* X
221         4     
222         5     
223         6     
224         7     
217            0       XSIZE8
218            1       XSIZE9
219            2       U/D* Y
220            3       U/D* X
221            4
222            5
223            6
224            7
225225
226      */
227     
226        */
227
228228      m_xsize = ((data & 0x03) << 8) | (m_xsize & 0xff);
229229      m_udy = BIT(data, 2);
230230      m_udx = BIT(data, 3);
231231      break;
232     
232
233233   case LDSX_LB:
234234      /*
235235
236         bit      description
236            bit     description
237237
238         0      XSIZE0
239         1      XSIZE1
240         2      XSIZE2
241         3      XSIZE3
242         4      XSIZE4
243         5      XSIZE5
244         6      XSIZE6
245         7      XSIZE7
238            0       XSIZE0
239            1       XSIZE1
240            2       XSIZE2
241            3       XSIZE3
242            4       XSIZE4
243            5       XSIZE5
244            6       XSIZE6
245            7       XSIZE7
246246
247      */
248     
247        */
248
249249      m_xsize = (m_xsize & 0x300) | data;
250250      break;
251     
251
252252   case LDSY_HB:
253253      /*
254254
255         bit      description
255            bit     description
256256
257         0      Y size 8
258         1      Y size 9
259         2      Y size 10
260         3      Y size 11
261         4     
262         5     
263         6     
264         7     
257            0       Y size 8
258            1       Y size 9
259            2       Y size 10
260            3       Y size 11
261            4
262            5
263            6
264            7
265265
266      */
267     
266        */
267
268268      m_ysize = ((data & 0x0f) << 8) | (m_ysize & 0xff);
269269      break;
270     
270
271271   case LDSY_LB:
272272      /*
273273
274         bit      description
274            bit     description
275275
276         0      Y size 0
277         1      Y size 1
278         2      Y size 2
279         3      Y size 3
280         4      Y size 4
281         5      Y size 5
282         6      Y size 6
283         7      Y size 7
276            0       Y size 0
277            1       Y size 1
278            2       Y size 2
279            3       Y size 3
280            4       Y size 4
281            5       Y size 5
282            6       Y size 6
283            7       Y size 7
284284
285      */
286     
285        */
286
287287      m_ysize = (m_ysize & 0xf00) | data;
288288      break;
289     
289
290290   case LDTX_HB:
291291      /*
292292
293         bit      description
293            bit     description
294294
295         0      XTO8, MTA4
296         1      XTO9, MTA5
297         2     
298         3     
299         4     
300         5     
301         6     
302         7     
295            0       XTO8, MTA4
296            1       XTO9, MTA5
297            2
298            3
299            4
300            5
301            6
302            7
303303
304      */
305     
304        */
305
306306      m_xto = ((data & 0x03) << 8) | (m_xto & 0xff);
307307      m_mta = (m_mta & 0x3ffcf) | ((data & 0x03) << 4);
308308      break;
309     
309
310310   case LDTX_LB:
311311      /*
312312
313         bit      description
313            bit     description
314314
315         0      XTO0
316         1      XTO1
317         2      XTO2
318         3      XTO3
319         4      XTO4, MTA0
320         5      XTO5, MTA1
321         6      XTO6, MTA2
322         7      XTO7, MTA3
315            0       XTO0
316            1       XTO1
317            2       XTO2
318            3       XTO3
319            4       XTO4, MTA0
320            5       XTO5, MTA1
321            6       XTO6, MTA2
322            7       XTO7, MTA3
323323
324      */
325     
324        */
325
326326      m_xto = (m_xto & 0x300) | data;
327327      m_mta = (m_mta & 0x3fff0) | (data >> 4);
328328      break;
r11247r11248
330330   case LDTY_HB:
331331      /*
332332
333         bit      description
333            bit     description
334334
335         0      YTO8, MTA14
336         1      YTO9, MTA15
337         2      YTO10, MTA16
338         3      YTO11, MTA17
339         4     
340         5     
341         6     
342         7     
335            0       YTO8, MTA14
336            1       YTO9, MTA15
337            2       YTO10, MTA16
338            3       YTO11, MTA17
339            4
340            5
341            6
342            7
343343
344      */
345     
344        */
345
346346      m_yto = (data << 8) | (m_yto & 0xff);
347347      m_mta = ((data & 0x0f) << 14) | (m_mta & 0x3fff);
348348      break;
r11247r11248
350350   case LDTY_LB:
351351      /*
352352
353         bit      description
353            bit     description
354354
355         0      YTO0, MTA6
356         1      YTO1, MTA7
357         2      YTO2, MTA8
358         3      YTO3, MTA9
359         4      YTO4, MTA10
360         5      YTO5, MTA11
361         6      YTO6, MTA12
362         7      YTO7, MTA13
355            0       YTO0, MTA6
356            1       YTO1, MTA7
357            2       YTO2, MTA8
358            3       YTO3, MTA9
359            4       YTO4, MTA10
360            5       YTO5, MTA11
361            6       YTO6, MTA12
362            7       YTO7, MTA13
363363
364      */
365     
364        */
365
366366      m_yto = (m_yto & 0xf00) | data;
367367      m_mta = (m_mta & 0x3c03f) | (data << 6);
368368      break;
r11247r11248
381381   case LDFX_HB:
382382      /*
383383
384         bit      description
384            bit     description
385385
386         0      XFROM8, MFA4
387         1      XFROM9, MFA5
388         2     
389         3     
390         4     
391         5     
392         6     
393         7     
386            0       XFROM8, MFA4
387            1       XFROM9, MFA5
388            2
389            3
390            4
391            5
392            6
393            7
394394
395      */
395        */
396396
397397      m_xfrom = ((data & 0x03) << 8) | (m_xfrom & 0xff);
398398      m_mfa = (m_mfa & 0x3ffcf) | ((data & 0x03) << 4);
399399      break;
400     
400
401401   case LDFX_LB:
402402      /*
403403
404         bit      description
404            bit     description
405405
406         0      XFROM0
407         1      XFROM1
408         2      XFROM2
409         3      XFROM3
410         4      XFROM4, MFA0
411         5      XFROM5, MFA1
412         6      XFROM6, MFA2
413         7      XFROM7, MFA3
406            0       XFROM0
407            1       XFROM1
408            2       XFROM2
409            3       XFROM3
410            4       XFROM4, MFA0
411            5       XFROM5, MFA1
412            6       XFROM6, MFA2
413            7       XFROM7, MFA3
414414
415      */
415        */
416416
417417      m_xfrom = (m_xfrom & 0x300) | data;
418418      m_mfa = (m_mfa & 0x3fff0) | (data >> 4);
419419      break;
420     
420
421421   case LDFY_HB:
422422      /*
423423
424         bit      description
424            bit     description
425425
426         0      MFA14
427         1      MFA15
428         2      MFA16
429         3      MFA17
430         4     
431         5     
432         6     
433         7     
426            0       MFA14
427            1       MFA15
428            2       MFA16
429            3       MFA17
430            4
431            5
432            6
433            7
434434
435      */
435        */
436436
437437      m_mfa = ((data & 0x0f) << 14) | (m_mfa & 0x3fff);
438438      break;
439     
439
440440   case LDFY_LB:
441441      /*
442442
443         bit      description
443            bit     description
444444
445         0      MFA6
446         1      MFA7
447         2      MFA8
448         3      MFA9
449         4      MFA10
450         5      MFA11
451         6      MFA12
452         7      MFA13
445            0       MFA6
446            1       MFA7
447            2       MFA8
448            3       MFA9
449            4       MFA10
450            5       MFA11
451            6       MFA12
452            7       MFA13
453453
454      */
454        */
455455
456456      m_mfa = (m_mfa & 0x3c03f) | (data << 6);
457     
457
458458      mover();
459459      break;
460     
460
461461   case WRML:
462462      /*
463463
464         bit      description
464            bit     description
465465
466         0      MOVE CYK CLK
467         1      DISP CYC SEL / DISP CYK PRE FETCH (+1 PIXCLK)
468         2      DATA CLK
469         3      _DISP MEM WE
470         4      _CAS HB
471         5      DTACK CLK / BLANK TEST (+2 PIXCLK)
472         6      DISPREC CLK
473         7      _RAS HB
466            0       MOVE CYK CLK
467            1       DISP CYC SEL / DISP CYK PRE FETCH (+1 PIXCLK)
468            2       DATA CLK
469            3       _DISP MEM WE
470            4       _CAS HB
471            5       DTACK CLK / BLANK TEST (+2 PIXCLK)
472            6       DISPREC CLK
473            7       _RAS HB
474474
475      */
475        */
476476
477477      if (LOG) logerror("MS %u : %02x\n", (offset >> 4) & 0x0f, data);
478478
r11247r11248
481481         m_ms[(offset >> 4) & 0x0f] = data;
482482      }
483483      break;
484     
484
485485   case WRDL:
486486      /*
487487
488         bit      description
488            bit     description
489489
490         0      MOVE CYK CLK
491         1      DISP CYC SEL / DISP CYK PRE FETCH (+1 PIXCLK)
492         2      DATA CLK
493         3      _DISP MEM WE
494         4      _CAS HB
495         5      DTACK CLK / BLANK TEST (+2 PIXCLK)
496         6      DISPREC CLK
497         7      _RAS HB
490            0       MOVE CYK CLK
491            1       DISP CYC SEL / DISP CYK PRE FETCH (+1 PIXCLK)
492            2       DATA CLK
493            3       _DISP MEM WE
494            4       _CAS HB
495            5       DTACK CLK / BLANK TEST (+2 PIXCLK)
496            6       DISPREC CLK
497            7       _RAS HB
498498
499      */
499        */
500500
501501      if (LOG) logerror("WS %u : %02x\n", (offset >> 4) & 0x0f, data);
502502
r11247r11248
531531         if (LOG) logerror("WRM HB %04x\n", m_gmdi);
532532      }
533533      break;
534     
534
535535   case WRMASK_STROBE_LB:
536536      if (REPLACE)
537537      {
r11247r11248
551551      if (LOG) logerror("ENABLE CLOCKS\n");
552552      m_clocks_disabled = 0;
553553      break;
554     
554
555555   case FLAG_STROBE:
556556      /*
557     
558         bit      description
559         
560         0      L/_P FLAG
561         1      BLANK FLAG
562         2      PIX POL
563         3      FRAME POL
564         4      HOLD FY
565         5      HOLD FX
566         6      COMP MOVE FLAG
567         7      REPLACE/SET & RESET
568     
569      */
570557
558            bit     description
559
560            0       L/_P FLAG
561            1       BLANK FLAG
562            2       PIX POL
563            3       FRAME POL
564            4       HOLD FY
565            5       HOLD FX
566            6       COMP MOVE FLAG
567            7       REPLACE/SET & RESET
568
569        */
570
571571      m_flag = data;
572572      if (LOG) logerror("FLAG %02x\n", m_flag);
573573      break;
574     
574
575575   case ENDISP:
576576      if (LOG) logerror("ENDISP\n");
577577      m_endisp = 1;
r11247r11248
586586//**************************************************************************
587587
588588//-------------------------------------------------
589//  clock_mfa_x -
589//  clock_mfa_x -
590590//-------------------------------------------------
591591
592592inline void abc1600_state::clock_mfa_x()
593593{
594594   UINT16 mfa_y = m_mfa >> 6;
595595   UINT8 mfa_x = m_mfa & 0x3f;
596   
596
597597   if (!HOLD_FX)
598598   {
599599      mfa_x += m_udx ? 1 : -1;
r11247r11248
605605
606606
607607//-------------------------------------------------
608//  clock_mfa_y -
608//  clock_mfa_y -
609609//-------------------------------------------------
610610
611611inline void abc1600_state::clock_mfa_y()
r11247r11248
624624
625625
626626//-------------------------------------------------
627//  clock_mta_x -
627//  clock_mta_x -
628628//-------------------------------------------------
629629
630630inline void abc1600_state::clock_mta_x()
r11247r11248
640640
641641
642642//-------------------------------------------------
643//  clock_mta_y -
643//  clock_mta_y -
644644//-------------------------------------------------
645645
646646inline void abc1600_state::clock_mta_y()
r11247r11248
656656
657657
658658//-------------------------------------------------
659//  load_mfa_x -
659//  load_mfa_x -
660660//-------------------------------------------------
661661
662662inline void abc1600_state::load_mfa_x()
r11247r11248
669669
670670
671671//-------------------------------------------------
672//  load_mta_x -
672//  load_mta_x -
673673//-------------------------------------------------
674674
675675inline void abc1600_state::load_mta_x()
r11247r11248
682682
683683
684684//-------------------------------------------------
685//  compare_mta_x -
685//  compare_mta_x -
686686//-------------------------------------------------
687687
688688inline void abc1600_state::compare_mta_x()
689689{
690690   UINT8 mta_x_end = ((m_xto + m_xsize) >> 4) & 0x3f;
691691   UINT8 mta_x = m_mta & 0x3f;
692   
692
693693   if (mta_x == mta_x_end)
694694   {
695695      m_cmc = 0;
r11247r11248
700700
701701
702702//-------------------------------------------------
703//  compare_mta_y -
703//  compare_mta_y -
704704//-------------------------------------------------
705705
706706inline void abc1600_state::compare_mta_y()
707707{
708708   int mta_y_end = (m_yto + m_ysize) & 0xfff;
709709   UINT16 mta_y = m_mta >> 6;
710   
710
711711   if (mta_y == mta_y_end)
712712   {
713713      m_rmc = 0;
r11247r11248
716716
717717
718718//-------------------------------------------------
719//  get_shinf -
719//  get_shinf -
720720//-------------------------------------------------
721721
722722inline void abc1600_state::get_shinf()
723723{
724724   /*
725     
726      bit      description
727     
728      A0      XFROM0
729      A1      XFROM1
730      A2      XFROM2
731      A3      XFROM3
732      A4      XTO0
733      A5      XTO1
734      A6      XTO2
735      A7      XTO3
736      A8      U/D* X
737     
738   */
739   
725
726        bit     description
727
728        A0      XFROM0
729        A1      XFROM1
730        A2      XFROM2
731        A3      XFROM3
732        A4      XTO0
733        A5      XTO1
734        A6      XTO2
735        A7      XTO3
736        A8      U/D* X
737
738    */
739
740740   UINT16 shinf_addr = (m_udx << 8) | ((m_xto & 0x0f) << 4) | (m_xfrom & 0x0f);
741741   UINT8 shinf = m_shinf_rom[shinf_addr];
742742
r11247r11248
746746
747747
748748//-------------------------------------------------
749//  get_drmsk -
749//  get_drmsk -
750750//-------------------------------------------------
751751
752752inline UINT16 abc1600_state::get_drmsk()
753753{
754754   /*
755     
756      bit      description
757     
758      A0      SH0
759      A1      SH1
760      A2      SH2
761      A3      SH3
762      A4      U/D* X
763     
764   */
765   
755
756        bit     description
757
758        A0      SH0
759        A1      SH1
760        A2      SH2
761        A3      SH3
762        A4      U/D* X
763
764    */
765
766766   UINT16 drmsk_addr = (m_udx << 4) | (m_sh & 0x0f);
767767   UINT8 drmskl = m_drmsk_rom[drmsk_addr];
768768   UINT8 drmskh = m_drmsk_rom[drmsk_addr + 0x20];
769769   UINT16 drmsk = (drmskh << 8) | drmskl;
770   
770
771771   return drmsk;
772772}
773773
r11247r11248
779779inline UINT16 abc1600_state::get_wrmsk()
780780{
781781   /*
782     
783      bit      description
784     
785      A0      XTO0
786      A1      XTO1
787      A2      XTO2
788      A3      XTO3
789      A4      XSIZE0
790      A5      XSIZE1
791      A6      XSIZE2
792      A7      XSIZE3
793      A8      U/D* X
794      A9      ANDED MASKS
795      A10      WRMS0
796      A11      WRMS1
797     
798   */
799   
782
783        bit     description
784
785        A0      XTO0
786        A1      XTO1
787        A2      XTO2
788        A3      XTO3
789        A4      XSIZE0
790        A5      XSIZE1
791        A6      XSIZE2
792        A7      XSIZE3
793        A8      U/D* X
794        A9      ANDED MASKS
795        A10     WRMS0
796        A11     WRMS1
797
798    */
799
800800   UINT16 wrmsk_addr = (m_wrms1 << 11) | (m_wrms0 << 10) | ((!m_wrms1 & !m_wrms0) << 9) | (m_udx << 8) | ((m_xsize & 0x0f) << 4) | (m_xto & 0x0f);
801801   UINT8 wrmskl = m_wrmsk_rom[wrmsk_addr];
802802   UINT8 wrmskh = m_wrmsk_rom[wrmsk_addr + 0x1000];
803803   UINT16 wrmsk = (wrmskh << 8) | wrmskl;
804   
804
805805   return wrmsk ^ 0xffff;
806806}
807807
808808
809809//-------------------------------------------------
810//  barrel_shift -
810//  barrel_shift -
811811//-------------------------------------------------
812812
813813inline UINT16 abc1600_state::barrel_shift(UINT16 gmdr)
r11247r11248
826826
827827
828828//-------------------------------------------------
829//  word_mixer -
829//  word_mixer -
830830//-------------------------------------------------
831831
832832inline UINT16 abc1600_state::word_mixer(UINT16 rot)
r11247r11248
838838   {
839839      gmdi ^= 0xffff;
840840   }
841   
841
842842   m_mdor = rot;
843843
844844   return gmdi;
r11247r11248
846846
847847
848848//-------------------------------------------------
849//  mover -
849//  mover -
850850//-------------------------------------------------
851851
852852void abc1600_state::mover()
r11247r11248
857857
858858   m_rmc = 1;
859859   get_shinf();
860   
860
861861   do
862862   {
863863      compare_mta_y();
r11247r11248
873873         UINT16 gmdr = read_videoram(m_mfa);
874874         UINT16 rot = barrel_shift(gmdr);
875875         word_mixer(rot);
876         
876
877877         clock_mfa_x();
878878      }
879     
879
880880      do
881881      {
882882         compare_mta_x();
883         
883
884884         UINT16 gmdr = read_videoram(m_mfa);
885885         UINT16 rot = barrel_shift(gmdr);
886886         UINT16 gmdi = word_mixer(rot);
887887         UINT16 mask = get_wrmsk();
888         
888
889889         write_videoram(m_mta, gmdi, mask);
890     
890
891891         clock_mfa_x();
892892         clock_mta_x();
893         
893
894894         m_wrms0 = 1;
895895      }
896896      while (m_cmc);
897     
897
898898      clock_mfa_y();
899899      clock_mta_y();
900   }
900   }
901901   while (m_rmc);
902902
903903   m_amm = 0;
r11247r11248
916916inline UINT16 abc1600_state::get_crtca(UINT16 ma, UINT8 ra, UINT8 column)
917917{
918918   /*
919     
920      bit         description
921919
922      CRTCA0      0
923      CRTCA1      0
924      CRTCA2      CC1/MA1
925      CRTCA3      CC2/MA2
926      CRTCA4      CC3/MA3
927      CRTCA5      CC4/MA4
928      CRTCA6      RA0
929      CRTCA7      RA1
930      CRTCA8      RA2
931      CRTCA9      RA3
932      CRTCA10      CR0/MA8
933      CRTCA11      CR1/MA9
934      CRTCA12      CR2/MA10
935      CRTCA13      CR3/MA11
936      CRTCA14      CR4/MA12
937      CRTCA15      CR5/MA13
920        bit         description
938921
939   */
922        CRTCA0      0
923        CRTCA1      0
924        CRTCA2      CC1/MA1
925        CRTCA3      CC2/MA2
926        CRTCA4      CC3/MA3
927        CRTCA5      CC4/MA4
928        CRTCA6      RA0
929        CRTCA7      RA1
930        CRTCA8      RA2
931        CRTCA9      RA3
932        CRTCA10     CR0/MA8
933        CRTCA11     CR1/MA9
934        CRTCA12     CR2/MA10
935        CRTCA13     CR3/MA11
936        CRTCA14     CR4/MA12
937        CRTCA15     CR5/MA13
940938
939    */
940
941941   UINT8 cc = (ma & 0xff) + column;
942942   UINT8 cr = ma >> 8;
943943
r11247r11248
951951   for (int column = 0; column < x_count; column += 2)
952952   {
953953      UINT16 dma = get_crtca(ma, ra, column);
954     
954
955955      // data is read out of video RAM in nibble mode by strobing CAS 4 times
956956      for (int cas = 0; cas < 4; cas++)
957957      {
958958         UINT16 data = m_video_ram[dma + cas];
959     
959
960960         for (int bit = 0; bit < 16; bit++)
961961         {
962962            int color = (BIT(data, 15) ^ PIX_POL) & !BLANK;
963963
964964            *BITMAP_ADDR16(bitmap, y, x++) = color;
965         
965
966966            data <<= 1;
967967         }
968968      }
r11247r11248
10121012{
10131013   // allocate video RAM
10141014   m_video_ram = auto_alloc_array(machine(), UINT16, VIDEORAM_SIZE);
1015   
1015
10161016   // find memory regions
10171017   m_wrmsk_rom = machine().region("wrmsk")->base();
10181018   m_shinf_rom = machine().region("shinf")->base();
src/mess/video/ibm_vga.c
r11247r11248
3333
3434void ibm_vga_device::vga_crtc_w(int offset, UINT8 data)
3535{
36   switch(offset)
36   switch(offset)
3737   {
3838      case 4:
3939         mc6845_address_w( m_crtc, offset, data );
r11247r11248
4343         break;
4444   }
4545}
46   
46
4747READ8_MEMBER(ibm_vga_device::vga_port_03b0_r)
4848{
4949   UINT8 retVal = 0xff;
5050   if (CRTC_PORT_ADDR == 0x3b0)
51      retVal = vga_crtc_r(offset);   
51      retVal = vga_crtc_r(offset);
5252   //if (LOG_ACCESSES)
5353      //logerror("vga_port_03b0_r(): port=0x%04x data=0x%02x\n", offset + 0x3b0, retVal);
5454   return retVal;
r11247r11248
7676               {
7777                  retVal = m_attr_data[m_attr_idx & 0x1f];
7878               }
79               break;   
79               break;
8080      case 0x04 : // Sequencer Index Register
8181               retVal = m_seq_idx;
8282               break;
r11247r11248
106106                  }
107107               }
108108               break;
109      case 0x0a : //
109      case 0x0a : //
110110               retVal = m_feature_ctrl;
111111      case 0x0c : // Miscellaneous Output Register
112112               retVal = m_misc_out_reg;
113               break;               
113               break;
114114      case 0x0e : // Graphics Index Register
115115               retVal = m_gc_idx;
116116               break;
r11247r11248
120120   }
121121
122122   if (LOG_ACCESSES)
123      logerror("vga_port_03c0_r(): port=0x%04x data=0x%02x\n", offset + 0x3c0, retVal);   
123      logerror("vga_port_03c0_r(): port=0x%04x data=0x%02x\n", offset + 0x3c0, retVal);
124124   return retVal;
125125}
126126
r11247r11248
128128{
129129   if (LOG_ACCESSES)
130130      logerror("vga_port_03c0_w(): port=0x%04x data=0x%02x\n", offset + 0x3c0, data);
131     
131
132132   switch(offset) {
133133      case 0x00:  // Attribute Controller
134134               if (m_attr_state==0)
r11247r11248
140140                  m_attr_data[m_attr_idx & 0x1f] = data;
141141               }
142142               m_attr_state=!m_attr_state;
143               break;   
143               break;
144144      case 0x02 : // Miscellaneous Output Register
145145               m_misc_out_reg = data;
146146               break;
r11247r11248
152152               break;
153153      case 0x06 : // Video DAC Pel Mask Register
154154               m_dac_mask = data;
155               break;               
155               break;
156156      case 0x07 : // Video DAC Index (CLUT Reads)
157157               m_dac_read_idx = data;
158158               m_dac_state = 0;
r11247r11248
161161      case 0x08 : // Video DAC Index (CLUT Writes)
162162               m_dac_write_idx = data;
163163               m_dac_state = 0;
164               m_dac_read = 0;     
164               m_dac_read = 0;
165165               break;
166166      case 0x09 : // Video DAC Data Register
167167               if (!m_dac_read)
168168               {
169169                  m_dac_color[m_dac_state++][m_dac_write_idx] = data;
170170                  if (m_dac_state==3) {
171                     m_dac_state=0;
171                     m_dac_state=0;
172172                     m_dac_write_idx++;
173173                  }
174               }     
174               }
175175               break;
176176      case 0x0e : // Graphics Index Register
177177               m_gc_idx = data;
178178               break;
179179      case 0x0f : // Graphics Data Register
180180               m_gc_data[m_gc_idx & 0x1f] = data;
181               break;               
181               break;
182182   }
183183}
184184
r11247r11248
186186{
187187   UINT8 retVal = 0xff;
188188   if (CRTC_PORT_ADDR == 0x3d0)
189      retVal = vga_crtc_r(offset);     
189      retVal = vga_crtc_r(offset);
190190   //if (LOG_ACCESSES)
191//      logerror("vga_port_03d0_r(): port=0x%04x data=0x%02x\n", offset + 0x3d0, retVal);
191//      logerror("vga_port_03d0_r(): port=0x%04x data=0x%02x\n", offset + 0x3d0, retVal);
192192   return retVal;
193193}
194194
195195WRITE8_MEMBER( ibm_vga_device::vga_port_03d0_w )
196196{
197//   if (LOG_ACCESSES)
197//  if (LOG_ACCESSES)
198198      //logerror("vga_port_03d0_w(): port=0x%04x data=0x%02x\n", offset + 0x3d0, data);
199199   if (CRTC_PORT_ADDR == 0x3d0)
200200      vga_crtc_w(offset, data);
r11247r11248
346346
347347      case 64:
348348         break;
349         
349
350350      default:
351351         fatalerror("VGA: Bus width %d not supported", buswidth);
352352         break;
r11247r11248
362362
363363void ibm_vga_device::device_reset()
364364{
365   m_misc_out_reg = 0;   
365   m_misc_out_reg = 0;
366366   m_feature_ctrl = 0;
367   
367
368368   m_seq_idx = 0;
369369   memset(m_seq_data,0xff,0x1f);
370   
370
371371   m_attr_idx = 0;
372372   memset(m_attr_data,0xff,0x1f);
373373   m_attr_state = 0;
374   
374
375375   m_gc_idx = 0;
376376   memset(m_gc_data,0xff,0x1f);
377   
377
378378   m_dac_mask = 0;
379379   m_dac_write_idx = 0;
380380   m_dac_read_idx = 0;
r11247r11248
382382   m_dac_state = 0;
383383   memset(m_dac_color,0,sizeof(m_dac_color));
384384
385   for (int i = 0; i < 0x100; i++)   
386      palette_set_color_rgb(machine(), i, 0, 0, 0);   
385   for (int i = 0; i < 0x100; i++)
386      palette_set_color_rgb(machine(), i, 0, 0, 0);
387387}
src/mess/video/ibm_vga.h
r11247r11248
7070private:
7171   // internal state
7272   const ibm_vga_device_config &m_config;
73   
73
7474   UINT8 m_misc_out_reg;
75   
75
7676   UINT8 m_feature_ctrl;
77   
78   UINT8 m_seq_idx;   
77
78   UINT8 m_seq_idx;
7979   UINT8 m_seq_data[0x1f];
80   
80
8181   UINT8 m_attr_idx;
8282   UINT8 m_attr_data[0x1f];
8383   UINT8 m_attr_state;
84   
84
8585   UINT8 m_gc_idx;
8686   UINT8 m_gc_data[0x1f];
87   
87
8888   UINT8 m_dac_mask;
8989   UINT8 m_dac_write_idx;
9090   UINT8 m_dac_read_idx;
src/mess/video/gba.c
r11247r11248
117117
118118   if ((depth == 4) && (state->m_DISPCNT & DISPCNT_FRAMESEL))
119119      src16 += 0xa000/2;
120   
120
121121   // sign extend roz parameters
122122   if (X & 0x08000000) X |= 0xf0000000;
123123   if (Y & 0x08000000) Y |= 0xf0000000;
src/mess/includes/compis.h
r11247r11248
126126   compis_state(running_machine &machine, const driver_device_config_base &config)
127127      : driver_device(machine, config),
128128        m_hgdc(*this, "upd7220")
129         { }
129        { }
130130
131131   required_device<upd7220_device> m_hgdc;
132132
src/mess/includes/trs80m2.h
r11247r11248
5555   required_device<device_t> m_centronics;
5656   required_device<device_t> m_floppy;
5757   required_device<device_t> m_ram;
58   
58
5959   virtual void machine_start();
6060   virtual void machine_reset();
6161
r11247r11248
7878   DECLARE_WRITE8_MEMBER( pio_pa_w );
7979   DECLARE_WRITE_LINE_MEMBER( strobe_w );
8080   DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w );
81   
81
8282   void scan_keyboard();
8383   void bankswitch();
84   
84
8585   /* memory state */
8686   int m_boot_rom;
8787   int m_bank;
src/mess/includes/pc8401a.h
r11247r11248
6666   DECLARE_WRITE8_MEMBER( port71_w );
6767   DECLARE_READ8_MEMBER( ppi_pc_r );
6868   DECLARE_WRITE8_MEMBER( ppi_pc_w );
69   
69
7070   void scan_keyboard();
7171   void bankswitch(UINT8 data);
7272
src/mess/includes/mc1000.h
r11247r11248
5757   DECLARE_READ8_MEMBER( videoram_r );
5858   DECLARE_WRITE8_MEMBER( keylatch_w );
5959   DECLARE_READ8_MEMBER( keydata_r );
60   
60
6161   void bankswitch();
62   
62
6363   /* cpu state */
6464   int m_ne555_int;
6565
src/mess/includes/pes.h
r11247r11248
2020        m_terminal(*this, TERMINAL_TAG),
2121        m_speech(*this, "tms5220")
2222      { }
23     
23
2424   required_device<cpu_device> m_maincpu;
2525   required_device<device_t> m_terminal;
2626   required_device<device_t> m_speech;
src/mess/includes/mz700.h
r11247r11248
4444   int m_mz800_ram_monitor;   /* 1 if monitor rom banked in */
4545
4646   int m_hires_mode;         /* 1 if in 640x200 mode */
47   int m_screen;          /* screen designation */
47   int m_screen;         /* screen designation */
4848   UINT8 *m_colorram;
4949   UINT8 *m_videoram;
5050   UINT8 m_speaker_level;
src/mess/includes/mpf1.h
r11247r11248
4040   required_device<device_t> m_ctc;
4141   required_device<device_t> m_speaker;
4242   required_device<device_t> m_cassette;
43   
43
4444   virtual void machine_start();
4545   virtual void machine_reset();
4646
src/mess/includes/pc8001.h
r11247r11248
6363   DECLARE_WRITE8_MEMBER( dma_mem_w );
6464   DECLARE_READ8_MEMBER( dma_io_r );
6565   DECLARE_WRITE8_MEMBER( dma_io_w );
66   
66
6767   /* video state */
6868   UINT8 *m_char_rom;
6969   int m_width80;
src/mess/includes/beta.h
r11247r11248
2929
3030   required_device<cpu_device> m_maincpu;
3131   required_device<device_t> m_speaker;
32   
32
3333   virtual void machine_start();
3434
3535   DECLARE_READ8_MEMBER( riot_pa_r );
src/mess/includes/eti660.h
r11247r11248
5656   DECLARE_WRITE8_MEMBER( dma_w );
5757   DECLARE_READ8_MEMBER( pia_pa_r );
5858   DECLARE_WRITE8_MEMBER( pia_pa_w );
59   
59
6060   /* keyboard state */
6161   UINT8 m_keylatch;
6262
src/mess/includes/px8.h
r11247r11248
4444   virtual void machine_reset();
4545
4646   virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
47   
47
4848   READ8_MEMBER( gah40m_r );
4949   WRITE8_MEMBER( gah40m_w );
5050   READ8_MEMBER( gah40s_r );
r11247r11248
5353   READ8_MEMBER( krtn_0_3_r );
5454   READ8_MEMBER( krtn_4_7_r );
5555   WRITE8_MEMBER( ksc_w );
56   
56
5757   void bankswitch();
5858   UINT8 krtn_read();
59   
59
6060   /* GAH40M state */
6161   UINT16 m_icr;            /* input capture register */
6262   UINT16 m_frc;            /* free running counter */
src/mess/includes/poly880.h
r11247r11248
4040   DECLARE_WRITE8_MEMBER( pio1_pa_w );
4141   DECLARE_READ8_MEMBER( pio1_pb_r );
4242   DECLARE_WRITE8_MEMBER( pio1_pb_w );
43   
43
4444   void update_display();
45   
45
4646   /* display state */
4747   UINT8 m_digit;
4848   UINT8 m_segment;
src/mess/includes/genpc.h
r11247r11248
2424    devcb_write_line   m_kb_set_clock_signal_func;
2525    devcb_write_line   m_kb_set_data_signal_func;
2626};
27   
27
2828// ======================> ibm5160_mb_device_config
29
29
3030class ibm5160_mb_device_config : public device_config,
3131                         public motherboard_interface
3232{
3333   friend class ibm5160_mb_device;
3434
35protected:   
35protected:
3636   // construction/destruction
3737   ibm5160_mb_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
38
38
3939public:
4040   // allocators
4141   static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
4242   virtual device_t *alloc_device(running_machine &machine) const;
43
43
4444   // inline configuration
4545   static void static_set_cputag(device_config *device, const char *tag);
46
46
4747   // optional information overrides
4848   virtual machine_config_constructor device_mconfig_additions() const;
4949   virtual const input_port_token *device_input_ports() const;
50   
50
5151   const char *m_cputag;
5252
5353protected:
5454   // device_config overrides
55   virtual void device_config_complete();           
55   virtual void device_config_complete();
5656};
57 
58 
57
58
5959// ======================> ibm5160_mb_device
6060class ibm5160_mb_device : public device_t
6161{
6262        friend class ibm5160_mb_device_config;
63
63
6464protected:
6565        // construction/destruction
6666        ibm5160_mb_device(running_machine &_machine, const ibm5160_mb_device_config &config);
r11247r11248
8181      required_device<device_t>  m_ppi8255;
8282      required_device<device_t>  m_speaker;
8383      required_device<isa8_device>  m_isabus;
84     
84
8585       devcb_resolved_write_line   m_kb_set_clock_signal_func;
8686       devcb_resolved_write_line   m_kb_set_data_signal_func;
87     
87
8888      /* U73 is an LS74 - dual flip flop */
8989      /* Q2 is set by OUT1 from the 8253 and goes to DRQ1 on the 8237 */
9090      UINT8   m_u73_q2;
r11247r11248
9393      UINT8 m_dma_offset[4];
9494      UINT8 m_pc_spkrdata;
9595      UINT8 m_pc_input;
96     
96
9797      UINT8 m_nmi_enabled;
9898
9999      int                  m_ppi_portc_switch_high;
r11247r11248
105105      UINT8               m_ppi_data_signal;
106106      UINT8               m_ppi_shift_register;
107107      UINT8               m_ppi_shift_enable;
108     
108
109109      static IRQ_CALLBACK(pc_irq_callback);
110     
110
111111      // interface to the keyboard
112112      DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w );
113113      DECLARE_WRITE_LINE_MEMBER( keyboard_data_w );
r11247r11248
118118
119119      DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out1_changed );
120120      DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out2_changed );
121     
121
122122      DECLARE_WRITE_LINE_MEMBER( pc_dma_hrq_changed );
123123      DECLARE_WRITE_LINE_MEMBER( pc_dma8237_out_eop );
124124      DECLARE_READ8_MEMBER( pc_dma_read_byte );
r11247r11248
137137
138138      DECLARE_WRITE_LINE_MEMBER( pc_cpu_line );
139139      DECLARE_WRITE_LINE_MEMBER( pc_speaker_set_spkrdata );
140     
140
141141};
142 
143 
142
143
144144// device type definition
145145extern const device_type IBM5160_MOTHERBOARD;
146146
r11247r11248
151151    ibm5150_mb_device_config::static_set_cputag(device, _cputag); \
152152
153153// ======================> ibm5150_mb_device_config
154
154
155155class ibm5150_mb_device_config : public ibm5160_mb_device_config
156156{
157157   friend class ibm5150_mb_device;
158158   friend class ibm5160_mb_device_config;
159
159
160160   // construction/destruction
161161   ibm5150_mb_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
162
162
163163public:
164164   // allocators
165165   static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
166166   virtual device_t *alloc_device(running_machine &machine) const;
167 
167
168168   // optional information overrides
169169   virtual machine_config_constructor device_mconfig_additions() const;
170170};
171 
172 
171
172
173173// ======================> ibm5150_mb_device
174174class ibm5150_mb_device : public ibm5160_mb_device
175175{
176176        friend class ibm5160_mb_device;
177177      friend class ibm5150_mb_device_config;
178
178
179179        // construction/destruction
180180        ibm5150_mb_device(running_machine &_machine, const ibm5150_mb_device_config &config);
181181
r11247r11248
183183        // device-level overrides
184184        virtual void device_start();
185185        virtual void device_reset();
186     
186
187187      required_device<device_t>   m_cassette;
188188public:
189189      virtual DECLARE_READ8_MEMBER ( pc_ppi_porta_r );
190190      virtual DECLARE_READ8_MEMBER ( pc_ppi_portc_r );
191      virtual DECLARE_WRITE8_MEMBER( pc_ppi_portb_w );     
191      virtual DECLARE_WRITE8_MEMBER( pc_ppi_portb_w );
192192};
193 
194 
193
194
195195// device type definition
196196extern const device_type IBM5150_MOTHERBOARD;
197197
src/mess/includes/lc80.h
r11247r11248
3131        m_speaker(*this, SPEAKER_TAG),
3232        m_ram(*this, RAM_TAG)
3333   { }
34   
34
3535   required_device<cpu_device> m_maincpu;
3636   required_device<z80pio_device> m_pio2;
3737   required_device<device_t> m_cassette;
3838   required_device<device_t> m_speaker;
3939   required_device<device_t> m_ram;
40   
40
4141   virtual void machine_start();
4242
4343   DECLARE_WRITE_LINE_MEMBER( ctc_z0_w );
r11247r11248
4949   DECLARE_READ8_MEMBER( pio2_pb_r );
5050
5151   void update_display();
52   
52
5353   // display state
5454   UINT8 m_digit;
5555   UINT8 m_segment;
src/mess/includes/ql.h
r11247r11248
9494
9595   virtual void machine_start();
9696   virtual void machine_reset();
97   
97
9898   virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
9999
100100   DECLARE_WRITE8_MEMBER( ipc_w );
r11247r11248
114114   DECLARE_READ_LINE_MEMBER( zx8302_raw1_r );
115115   DECLARE_WRITE_LINE_MEMBER( zx8302_raw2_w );
116116   DECLARE_READ_LINE_MEMBER( zx8302_raw2_r );
117   
117
118118   /* IPC state */
119119   UINT8 m_keylatch;
120120   int m_ipl;
r11247r11248
126126   DECLARE_WRITE8_MEMBER( disk_io_w );
127127   DECLARE_READ8_MEMBER( trump_card_rom_r );
128128   DECLARE_READ8_MEMBER( cart_rom_r );
129   
129
130130   void trump_card_set_control(UINT8 data);
131131   void sandy_set_control(UINT8 data);
132   
132
133133   int      m_disk_type;
134134   int      m_disk_io_base;
135135   UINT8   m_disk_io_byte;
src/mess/includes/cgc7900.h
r11247r11248
5050   DECLARE_WRITE16_MEMBER( z_mode_w );
5151   DECLARE_WRITE16_MEMBER( color_status_w );
5252   DECLARE_READ16_MEMBER( sync_r );
53   
53
5454   void update_clut();
5555   void draw_bitmap(screen_device *screen, bitmap_t *bitmap);
5656   void draw_overlay(screen_device *screen, bitmap_t *bitmap);
57     
57
5858   /* interrupt state */
5959   UINT16 m_int_mask;
6060
src/mess/includes/c80.h
r11247r11248
3636   DECLARE_WRITE8_MEMBER( pio1_pa_w );
3737   DECLARE_WRITE8_MEMBER( pio1_pb_w );
3838   DECLARE_WRITE_LINE_MEMBER( pio1_brdy_w );
39   
39
4040   /* keyboard state */
4141   int m_keylatch;
4242
src/mess/includes/tmc2000e.h
r11247r11248
4040   virtual void machine_reset();
4141
4242   virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
43   
43
4444   DECLARE_READ8_MEMBER( vismac_r );
4545   DECLARE_WRITE8_MEMBER( vismac_w );
4646   DECLARE_READ8_MEMBER( floppy_r );
src/mess/includes/tmc1800.h
r11247r11248
3636   required_device<cpu_device> m_maincpu;
3737   required_device<cdp1861_device> m_vdc;
3838   required_device<device_t> m_cassette;
39   
39
4040   virtual void machine_start();
4141   virtual void machine_reset();
4242
r11247r11248
101101   virtual void machine_reset();
102102
103103   virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
104   
104
105105   DECLARE_WRITE8_MEMBER( keylatch_w );
106106   DECLARE_WRITE8_MEMBER( bankswitch_w );
107107   DECLARE_READ_LINE_MEMBER( clear_r );
r11247r11248
112112   DECLARE_READ_LINE_MEMBER( rdata_r );
113113   DECLARE_READ_LINE_MEMBER( bdata_r );
114114   DECLARE_READ_LINE_MEMBER( gdata_r );
115   
115
116116   void bankswitch();
117   
117
118118   // memory
119119   int m_rac;
120120   int m_roc;
121   
121
122122   /* video state */
123123   UINT8 *m_colorram;      /* color memory */
124124   UINT8 m_color;
src/mess/includes/newbrain.h
r11247r11248
7878
7979   virtual void video_start();
8080   virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
81   
81
8282   DECLARE_WRITE8_MEMBER( enrg1_w );
8383   DECLARE_WRITE8_MEMBER( a_enrg1_w );
8484   DECLARE_READ8_MEMBER( ust_r );
r11247r11248
103103   DECLARE_WRITE8_MEMBER( tvctl_w );
104104   DECLARE_READ8_MEMBER( cop_r );
105105   DECLARE_WRITE8_MEMBER( cop_w );
106     
106
107107   void check_interrupt();
108108   void bankswitch();
109109   void tvram_w(UINT8 data, int a6);
110110   inline int get_reset_t();
111111   inline int get_pwrup_t();
112112   void screen_update(bitmap_t *bitmap, const rectangle *cliprect);
113   
113
114114   // processor state
115115   int m_pwrup;         // power up
116116   int m_userint;         // user interrupt
r11247r11248
204204   DECLARE_WRITE_LINE_MEMBER( ctc_z1_w );
205205   DECLARE_WRITE_LINE_MEMBER( ctc_z2_w );
206206   DECLARE_WRITE_LINE_MEMBER( adc_eoc_w );
207     
207
208208   void bankswitch();
209209
210210   // paging state
src/mess/includes/tsispch.h
r11247r11248
2222        m_uart(*this, "i8251a_u15"),
2323        m_pic(*this, "pic8259")
2424      { }
25     
25
2626   required_device<cpu_device> m_maincpu;
2727   required_device<cpu_device> m_dsp;
2828   required_device<device_t> m_terminal;
src/mess/includes/jtc.h
r11247r11248
3131        m_speaker(*this, SPEAKER_TAG),
3232        m_centronics(*this, CENTRONICS_TAG)
3333   { }
34   
34
3535   required_device<cpu_device> m_maincpu;
3636   required_device<device_t> m_cassette;
3737   required_device<device_t> m_speaker;
r11247r11248
4141
4242   virtual void video_start();
4343   virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
44   
44
4545   DECLARE_WRITE8_MEMBER( p2_w );
4646   DECLARE_READ8_MEMBER( p3_r );
4747   DECLARE_WRITE8_MEMBER( p3_w );
48   
48
4949   UINT8 *m_video_ram;
5050};
5151
r11247r11248
8181   DECLARE_READ8_MEMBER( videoram_r );
8282   DECLARE_WRITE8_MEMBER( videoram_w );
8383   DECLARE_WRITE8_MEMBER( banksel_w );
84   
84
8585   UINT8 m_video_bank;
8686   UINT8 *m_color_ram_r;
8787   UINT8 *m_color_ram_g;
src/mess/includes/e01.h
r11247r11248
4040
4141   virtual void machine_start();
4242   virtual void machine_reset();
43   
43
4444   void update_interrupts();
4545   void network_irq_enable(int enabled);
4646   void hdc_irq_enable(int enabled);
r11247r11248
5959   DECLARE_WRITE_LINE_MEMBER( adlc_irq_w );
6060   DECLARE_WRITE_LINE_MEMBER( via_irq_w );
6161   DECLARE_WRITE_LINE_MEMBER( fdc_drq_w );
62   
62
6363   /* interrupt state */
6464   int m_adlc_ie;
6565   int m_hdc_ie;
src/mess/includes/abc1600.h
r11247r11248
8787
8888   virtual void video_start();
8989   virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
90   
90
9191   DECLARE_READ8_MEMBER( mac_r );
9292   DECLARE_WRITE8_MEMBER( mac_w );
9393   DECLARE_READ8_MEMBER( cause_r );
r11247r11248
168168   inline void write_videoram(UINT32 offset, UINT16 data, UINT16 mask);
169169   inline UINT16 get_crtca(UINT16 ma, UINT8 ra, UINT8 column);
170170   void crtc_update_row(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param);
171   
171
172172   // memory access controller
173173   UINT8 m_task;
174174   UINT8 m_segment_ram[0x400];
175175   UINT16 m_page_ram[0x400];
176   
176
177177   // DMA
178178   UINT8 m_dmamap[8];
179179   int m_dmadis;
r11247r11248
209209   UINT16 m_yto;            // Y to
210210   UINT32 m_mfa;            // mover from address
211211   UINT32 m_mta;            // mover to address
212   UINT8 m_sh;               //
213   UINT16 m_mdor;            //
214   int m_hold_1w_cyk;         //
215   int m_wrms0;            //
216   int m_wrms1;            //
212   UINT8 m_sh;               //
213   UINT16 m_mdor;            //
214   int m_hold_1w_cyk;         //
215   int m_wrms0;            //
216   int m_wrms1;            //
217217   int m_rmc;               // row match count
218218   int m_cmc;               // column match count
219219   int m_amm;               // active mover mask
src/mess/includes/cosmicos.h
r11247r11248
8484   DECLARE_READ_LINE_MEMBER( ef4_r );
8585   DECLARE_WRITE_LINE_MEMBER( q_w );
8686   DECLARE_READ8_MEMBER( dma_r );
87   
87
8888   void set_cdp1802_mode(int mode);
8989   void clear_input_data();
9090   void set_ram_mode();
91   
92   
91
92
9393   /* CPU state */
9494   int m_wait;
9595   int m_clear;
src/mess/mess.lst
r11247r11248
11/******************************************************************************
22
33    mess.lst
4   
4
55    List of all enabled drivers in the system. This file is parsed by
66    makelist.exe, sorted, and output as C code describing the drivers.
77
r11247r11248
3939******************************************************************************/
4040
4141// 3DO
423do      // 3DO consoles 
423do      // 3DO consoles
43433do_pal
4444
4545// Atari
46a2600    // Atari 2600   
47a2600p   // Atari 2600 PAL     
48a5200    // Atari 5200   
49a7800    // Atari 7800 NTSC 
50a7800p   // Atari 7800 PAL     
51lynx     // Atari Lynx Handheld     
52//  lynx2  // Atari Lynx II Handheld redesigned, no additions
53jaguar   // Atari Jaguar
54jaguarcd  // Atari Jaguar CD   
46a2600    // Atari 2600
47a2600p   // Atari 2600 PAL
48a5200    // Atari 5200
49a7800    // Atari 7800 NTSC
50a7800p   // Atari 7800 PAL
51lynx     // Atari Lynx Handheld
52//  lynx2  // Atari Lynx II Handheld redesigned, no additions
53jaguar   // Atari Jaguar
54jaguarcd  // Atari Jaguar CD
5555
5656// Nintendo
5757nes       // Nintendo Entertainment System
r11247r11248
7777snesst10  // Nintendo Super Nintendo NTSC w/ST-010 CPU
7878snesst11  // Nintendo Super Nintendo NTSC w/ST-011 CPU
7979snesst    // Nintendo Super Nintendo NTSC w/Sufami Turbo base cart
80snesbsx   // Nintendo Super Nintendo NTSC w/BS-X compatible cart
81n64       // Nintendo N64 
80snesbsx   // Nintendo Super Nintendo NTSC w/BS-X compatible cart
81n64       // Nintendo N64
8282pokemini  // Nintendo Pokemon Mini
8383
84megaduck  // Megaduck
84megaduck  // Megaduck
8585
8686// SEGA
87sg1000   // Sega SG-1000 (Japan)
88sg1000m2  // Sega SG-1000 Mark II (Japan)
89sc3000   // Sega SC-3000 (Japan)
90sc3000h   // Sega SC-3000H (Japan)   
91sf7000   // Sega SC-3000 w/ SF-7000 (Japan)   
92omv1000   // Tsukuda Original Othello Multivision FG-1000
93omv2000   // Tsukuda Original Othello Multivision FG-2000
87sg1000   // Sega SG-1000 (Japan)
88sg1000m2  // Sega SG-1000 Mark II (Japan)
89sc3000   // Sega SC-3000 (Japan)
90sc3000h   // Sega SC-3000H (Japan)
91sf7000   // Sega SC-3000 w/ SF-7000 (Japan)
92omv1000   // Tsukuda Original Othello Multivision FG-1000
93omv2000   // Tsukuda Original Othello Multivision FG-2000
9494
95gamegear  // Sega GameGear   
96gamegeaj  // Sega GameGear (Japan)   
97sms      // Sega Master System II (NTSC) 
98sms1     // Sega Master System I (NTSC)     
99sms1pal   // Sega Master System I (PAL)     
100smspal   // Sega Master System II (PAL)   
101smsj     // Sega Master System (Japan) with FM Chip     
102sg1000m3  // Sega SG-1000 Mark III (Japan)   
103sms2kr   // Samsung Gam*Boy II (Korea)     
104smssdisp  // Sega Master System Store Display Unit   
95gamegear  // Sega GameGear
96gamegeaj  // Sega GameGear (Japan)
97sms      // Sega Master System II (NTSC)
98sms1     // Sega Master System I (NTSC)
99sms1pal   // Sega Master System I (PAL)
100smspal   // Sega Master System II (PAL)
101smsj     // Sega Master System (Japan) with FM Chip
102sg1000m3  // Sega SG-1000 Mark III (Japan)
103sms2kr   // Samsung Gam*Boy II (Korea)
104smssdisp  // Sega Master System Store Display Unit
105105
106megadrij  // 1988 Sega Mega Drive (Japan)
107genesis   // 1989 Sega Genesis (USA)   
108gensvp   // 1993 Sega Genesis (USA w/SVP chip)     
109megadriv  // 1990 Sega Mega Drive (Europe)   
110pico     // 1994 Sega Pico (Europe)     
111picou    // 1994 Sega Pico (USA)   
112picoj    // 1993 Sega Pico (Japan)   
113segacd   // 1992 Sega Sega CD (USA)   
114megacd   // 1993 Sega Mega-CD (Europe)     
115megacda   // 1993 Sega Mega-CD (Asia)     
116megacdj   // 1991 Sega Mega-CD (Japan)   
117segacd2   // 1993 Sega Sega CD 2 (USA)   
118megacd2   // 1993 Sega Mega-CD 2 (Europe)
119megacd2j  // 1993 Sega Mega-CD 2 (Japan)   
120laseract  // 1993 Pioneer LaserActive (USA)     
121laseractj // 1993 Pioneer LaserActive (Japan)
122xeye     // 1993 JVC X'eye (USA)   
123wmega    // 1992 Sega Wondermega (Japan)   
124wmegam2   // 1993 Victor Wondermega M2 (Japan)   
125cdx      // 1994 Sega CDX (USA)   
126multmega  // 1994 Sega Multi-Mega (Europe)   
12732x      // 1994 Sega 32X (USA)   
12832x_scd   // 1994 Sega Sega CD (USA w/32X addon)   
106megadrij  // 1988 Sega Mega Drive (Japan)
107genesis   // 1989 Sega Genesis (USA)
108gensvp   // 1993 Sega Genesis (USA w/SVP chip)
109megadriv  // 1990 Sega Mega Drive (Europe)
110pico     // 1994 Sega Pico (Europe)
111picou    // 1994 Sega Pico (USA)
112picoj    // 1993 Sega Pico (Japan)
113segacd   // 1992 Sega Sega CD (USA)
114megacd   // 1993 Sega Mega-CD (Europe)
115megacda   // 1993 Sega Mega-CD (Asia)
116megacdj   // 1991 Sega Mega-CD (Japan)
117segacd2   // 1993 Sega Sega CD 2 (USA)
118megacd2   // 1993 Sega Mega-CD 2 (Europe)
119megacd2j  // 1993 Sega Mega-CD 2 (Japan)
120laseract  // 1993 Pioneer LaserActive (USA)
121laseractj // 1993 Pioneer LaserActive (Japan)
122xeye     // 1993 JVC X'eye (USA)
123wmega    // 1992 Sega Wondermega (Japan)
124wmegam2   // 1993 Victor Wondermega M2 (Japan)
125cdx      // 1994 Sega CDX (USA)
126multmega  // 1994 Sega Multi-Mega (Europe)
12732x      // 1994 Sega 32X (USA)
12832x_scd   // 1994 Sega Sega CD (USA w/32X addon)
129129
130saturnjp  // 1994 Sega Saturn (Japan)
131saturn   // 1995 Sega Saturn (USA)     
132saturneu  // 1995 Sega Saturn (Europe)   
133vsaturn   // JVC V-Saturn
134hisaturn  // Hitachi HiSaturn
130saturnjp  // 1994 Sega Saturn (Japan)
131saturn   // 1995 Sega Saturn (USA)
132saturneu  // 1995 Sega Saturn (Europe)
133vsaturn   // JVC V-Saturn
134hisaturn  // Hitachi HiSaturn
135135
136136dcjp     // 1998 Sega Dreamcast (Japan)
137137dc   // 1999 Sega Dreamcast (USA)
r11247r11248
140140
141141// Sony
142142psj      // 1994 Sony PlayStation (Japan)
143psu      // 1995 Sony PlayStation (USA)   
144pse      // 1995 Sony PlayStation (Europe)     
145psa      // 1995 Sony PlayStation (Asia-Pacific) 
146pockstat  // 1999 Sony PocketStation   
143psu      // 1995 Sony PlayStation (USA)
144pse      // 1995 Sony PlayStation (Europe)
145psa      // 1995 Sony PlayStation (Asia-Pacific)
146pockstat  // 1999 Sony PocketStation
147147
148148// Bally
149astrocde   // Bally Professional Arcade / Astrocade   
150astrocdl   // Bally Home Library Computer   
151astrocdw   // Bally Computer System (white case)
149astrocde   // Bally Professional Arcade / Astrocade
150astrocdl   // Bally Home Library Computer
151astrocdw   // Bally Computer System (white case)
152152
153153// RCA
154vip      // 1977 Cosmac VIP VP-711     
155vp111    // 1977 Cosmac VIP VP-111   
156studio2   // 1977 Studio II     
154vip      // 1977 Cosmac VIP VP-711
155vp111    // 1977 Cosmac VIP VP-111
156studio2   // 1977 Studio II
157157visicom
158158mpt02
159159eti660
160160mpt02h
161mtc9016   // 1978 Mustang 9016 Telespiel Computer
161mtc9016   // 1978 Mustang 9016 Telespiel Computer
162162shmc1200
163163cm1200
164164apollo80
r11247r11248
169169esq1   // 1986 ESQ-1 Digital Wave Synthesizer
170170
171171// Fairchild
172channelf  // Fairchild Channel F VES - 1976     
173sabavdpl  // SABA Videoplay - 1977 (PAL)   
174luxorves  // Luxor Video Entertainment System (PAL)     
175channlf2  // Fairchild Channel F II - 1978   
176sabavpl2  // SABA Videoplay 2 (PAL)     
177luxorvec  // Luxor Video Entertainment Computer (PAL)
178itttelma  // ITT Tele-Match Processor (PAL)     
179ingtelma  // Ingelen Tele-Match Processor (PAL)     
172channelf  // Fairchild Channel F VES - 1976
173sabavdpl  // SABA Videoplay - 1977 (PAL)
174luxorves  // Luxor Video Entertainment System (PAL)
175channlf2  // Fairchild Channel F II - 1978
176sabavpl2  // SABA Videoplay 2 (PAL)
177luxorvec  // Luxor Video Entertainment Computer (PAL)
178itttelma  // ITT Tele-Match Processor (PAL)
179ingtelma  // Ingelen Tele-Match Processor (PAL)
180180
181181// Casio
182182pv1000   // Casio PV-1000
r11247r11248
187187cfx9850   // Casio CFX-9850
188188
189189// Coleco
190coleco   // ColecoVision (Original BIOS)
191colecoa   // ColecoVision (Thick Characters)   
192colecob   // Spectravideo SVI-603 Coleco Game Adapter
193czz50    // Bit Corporation Chuang Zao Zhe 50 
194dina     // Telegames Dina   
195prsarcde  // Telegames Personal Arcade   
196adam     // Coleco Adam     
190coleco   // ColecoVision (Original BIOS)
191colecoa   // ColecoVision (Thick Characters)
192colecob   // Spectravideo SVI-603 Coleco Game Adapter
193czz50    // Bit Corporation Chuang Zao Zhe 50
194dina     // Telegames Dina
195prsarcde  // Telegames Personal Arcade
196adam     // Coleco Adam
197197
198198// NEC
199pce      // PC/Engine NEC 1987-1993   
200tg16     // Turbo Grafix-16  NEC 1989-1993   
201sgx      // SuperGrafX NEC 1989   
202pcfx     // PC-FX NEC 1994   
199pce      // PC/Engine NEC 1987-1993
200tg16     // Turbo Grafix-16  NEC 1989-1993
201sgx      // SuperGrafX NEC 1989
202pcfx     // PC-FX NEC 1994
203203pcfxga   // PC-FX NEC 199? (PC-FX on a PC ISA Card)
204204
205205// Arcadia 2001 family
206advsnha      // Advision Home Arcade
207bndarc      // Bandai Arcadia   
208arcadia      // Emerson Arcadia 2001
209tccosmos      // Tele-Computer Cosmos
210dynavisn      // Dynavision   
211ekusera      // Ekusera 
212hanihac      // Hanimex Home Arcade Centre   
213hmg2650      // Hanimex HMG-2650
214intmpt03      // Intelligent Game MPT-03 
215ixl2000      // Intercord XL 2000 System
216intervsn      // Intervision 2001
217itmcmtp3      // ITMC MPT-03 
218lvision      // Leisure-Vision   
219leonardo      // Leonardo
220mratlus      // Mr. Altus Tele Brain
221ormatu      // Ormatu 2001
222plldium      // Palladium Video-Computer-Game   
223polyvcg      // Polybrain Video Computer Game   
206advsnha      // Advision Home Arcade
207bndarc      // Bandai Arcadia
208arcadia      // Emerson Arcadia 2001
209tccosmos      // Tele-Computer Cosmos
210dynavisn      // Dynavision
211ekusera      // Ekusera
212hanihac      // Hanimex Home Arcade Centre
213hmg2650      // Hanimex HMG-2650
214intmpt03      // Intelligent Game MPT-03
215ixl2000      // Intercord XL 2000 System
216intervsn      // Intervision 2001
217itmcmtp3      // ITMC MPT-03
218lvision      // Leisure-Vision
219leonardo      // Leonardo
220mratlus      // Mr. Altus Tele Brain
221ormatu      // Ormatu 2001
222plldium      // Palladium Video-Computer-Game
223polyvcg      // Polybrain Video Computer Game
224224poppympt      // Poppy MPT-03 Tele Computer Spiel
225prestmpt      // Prestige Video Computer Game MPT-03
225prestmpt      // Prestige Video Computer Game MPT-03
226226rowtrn2k      // Rowtron 2000
227tvg2000      // Schmid TVG 2000 
228sheenhvc      // Sheen Home Video Centre 2001
229soundic      // Soundic MPT-03   
230telefevr      // Tchibo Tele-Fever   
231tempestm      // Tempest MPT-03   
232tbbympt3      // Tobby MPT-03
233trakcvg      // Trakton Computer Video Game 
234tunixha      // Tunix Home Arcade   
235tryomvgc      // Tryom Video Game Center 
236orbituvi      // UVI Compu-Game   
237vdmaster      // Video Master
227tvg2000      // Schmid TVG 2000
228sheenhvc      // Sheen Home Video Centre 2001
229soundic      // Soundic MPT-03
230telefevr      // Tchibo Tele-Fever
231tempestm      // Tempest MPT-03
232tbbympt3      // Tobby MPT-03
233trakcvg      // Trakton Computer Video Game
234tunixha      // Tunix Home Arcade
235tryomvgc      // Tryom Video Game Center
236orbituvi      // UVI Compu-Game
237vdmaster      // Video Master
238238
239239// Radofin 1292 Advanced Programmable Video System family
240240vc4000   // Interton vc4000
r11247r11248
267267gp2x   // GP2X 2005
268268
269269// GCE
270vectrex   // General Consumer Electric Vectrex - 1982-1984   
271// (aka Milton-Bradley Vectrex)
272raaspec   // RA+A Spectrum - Modified Vectrex
270vectrex   // General Consumer Electric Vectrex - 1982-1984
271// (aka Milton-Bradley Vectrex)
272raaspec   // RA+A Spectrum - Modified Vectrex
273273
274274// Mattel
275intv     // Mattel Intellivision - 1979 AKA INTV   
276intvsrs   // Intellivision (Sears License) - 19??
275intv     // Mattel Intellivision - 1979 AKA INTV
276intvsrs   // Intellivision (Sears License) - 19??
277277
278278// Entex
279advision  // Adventurevision   
279advision  // Adventurevision
280280
281281// Capcom
282sfach    // CPS Changer (Street Fighter Alpha)   
283sfzbch   // CPS Changer (Street Fighter ZERO Brazil)
284sfzch    // CPS Changer (Street Fighter ZERO) 
285wofch    // CPS Changer (Tenchi Wo Kurau II)   
282sfach    // CPS Changer (Street Fighter Alpha)
283sfzbch   // CPS Changer (Street Fighter ZERO Brazil)
284sfzch    // CPS Changer (Street Fighter ZERO)
285wofch    // CPS Changer (Tenchi Wo Kurau II)
286286
287287// Magnavox
288odyssey2  // Magnavox Odyssey 2 - 1978-1983     
288odyssey2  // Magnavox Odyssey 2 - 1978-1983
289289
290290// Hartung, Watara, ...
291gmaster   // Hartung Gamemaster     
291gmaster   // Hartung Gamemaster
292292
293293// Watara
294svision   // Supervision Handheld
294svision   // Supervision Handheld
295295svisions
296296svisionp
297297svisionn
298298tvlinkp
299299
300300// BANDAI
301wswan    // Bandai WonderSwan Handheld   
302wscolor   // Bandai WonderSwan Color Handheld
301wswan    // Bandai WonderSwan Handheld
302wscolor   // Bandai WonderSwan Color Handheld
303303
304304// EPOCH
305gamepock  // Epoch Game Pocket Computer     
305gamepock  // Epoch Game Pocket Computer
306306
307307// KOEI
308pasogo   // KOEI PasoGo   
308pasogo   // KOEI PasoGo
309309
310310// SNK
311311ngp      // NeoGeo Pocket
312ngpc     // NeoGeo Pocket Color     
313aes      // NeoGeo AES     
314neocd    // NeoGeo CD 
315neocdz   // NeoGeo CDZ     
312ngpc     // NeoGeo Pocket Color
313aes      // NeoGeo AES
314neocd    // NeoGeo CD
315neocdz   // NeoGeo CDZ
316316
317317// Philips
318cdimono1  // Philips CD-i (Mono-I board)   
318cdimono1  // Philips CD-i (Mono-I board)
319319
320320//***************COMPUTERS**************************************************
321321
322322// Acorn
323acrnsys1  // 1979 Acorn System 1 (Microcomputer Kit)   
324atom     // 1979 Acorn Atom     
325atomeb   // 1979 Acorn Atom   
326bbca     // 1981 BBC Micro Model A   
327bbcb     // 1981 BBC Micro Model B   
328bbcbp    // 198? BBC Micro Model B+ 64K 
329bbcbp128  // 198? BBC Micro Model B+ 128K
330bbcm      // 198? BBC Master   
331bbcbc    // 1985 BBC Bridge Companion 
332electron  // 1983 Acorn Electron   
333a310     // 1988 Acorn Archimedes 310
334a7000     // 1995 Acorn Archimedes 7000
335a7000p     // 1997 Acorn Archimedes 7000+
323acrnsys1  // 1979 Acorn System 1 (Microcomputer Kit)
324atom     // 1979 Acorn Atom
325atomeb   // 1979 Acorn Atom
326bbca     // 1981 BBC Micro Model A
327bbcb     // 1981 BBC Micro Model B
328bbcbp    // 198? BBC Micro Model B+ 64K
329bbcbp128  // 198? BBC Micro Model B+ 128K
330bbcm      // 198? BBC Master
331bbcbc    // 1985 BBC Bridge Companion
332electron  // 1983 Acorn Electron
333a310     // 1988 Acorn Archimedes 310
334a7000     // 1995 Acorn Archimedes 7000
335a7000p     // 1997 Acorn Archimedes 7000+
336336a6809
337337
338338// ACT
r11247r11248
343343aprifp
344344
345345// Cambridge Computers
346z88      //   
346z88      //
347347
348348// Amstrad / Schneider
349cpc464   // Amstrad (Schneider in Germany) 1984   
350cpc664   // Amstrad (Schneider in Germany) 1985   
351cpc6128   // Amstrad (Schneider in Germany) 1985   
352cpc6128s  // Amstrad (Schneider in Germany) 1985   
353cpc6128f  // Amstrad (Schneider in Germany) 1985 (AZERTY)
354cpc464p   // Amstrad CPC464  Plus - 1990   
355cpc6128p  // Amstrad CPC6128 Plus - 1990   
356gx4000   // Amstrad GX4000 - 1990   
357kccomp   // VEB KC compact     
358al520ex   // Patisonic Aleste 520EX (1993)   
359pcw8256   // 198? PCW8256
360pcw8512   // 198? PCW8512
361pcw9256   // 198? PCW9256
362pcw9512   // 198? PCW9512 (+)
363pcw10    // 198? PCW10   
364pcw16    // 1995 PCW16   
365nc100    // 1992 NC100   
366nc150    // 1992 NC150   
367nc200    // 1993 NC200   
349cpc464   // Amstrad (Schneider in Germany) 1984
350cpc664   // Amstrad (Schneider in Germany) 1985
351cpc6128   // Amstrad (Schneider in Germany) 1985
352cpc6128s  // Amstrad (Schneider in Germany) 1985
353cpc6128f  // Amstrad (Schneider in Germany) 1985 (AZERTY)
354cpc464p   // Amstrad CPC464  Plus - 1990
355cpc6128p  // Amstrad CPC6128 Plus - 1990
356gx4000   // Amstrad GX4000 - 1990
357kccomp   // VEB KC compact
358al520ex   // Patisonic Aleste 520EX (1993)
359pcw8256   // 198? PCW8256
360pcw8512   // 198? PCW8512
361pcw9256   // 198? PCW9256
362pcw9512   // 198? PCW9512 (+)
363pcw10    // 198? PCW10
364pcw16    // 1995 PCW16
365nc100    // 1992 NC100
366nc150    // 1992 NC150
367nc200    // 1993 NC200
368368
369369// Apple
370apple1   // Jul 1976 Apple 1
371apple2   // Apr 1977 Apple ][   
372apple2p   // Jun 1979 Apple ][+     
373prav82   // Pravetz 82     
374prav8m   // Pravetz 8M     
375apple2jp  // ??? ???? Apple ][j+   
376apple2e   // Jan 1983 Apple //e     
377mprof3   // Microprofessor III     
378apple2ee  // Mar 1985 Apple //e Enhanced   
379apple2ep  // Jan 1987 Apple //e Platinum   
380apple2c   // Apr 1984 Apple //c     
381prav8c   // Pravetz 8C     
382apple2c0  // ??? 1985 Apple //c (3.5 ROM)
383apple2c3  // Sep 1986 Apple //c (Original Mem. Exp.)   
384apple2c4  // ??? 198? Apple //c (rev 4)     
385apple2cp  // Sep 1988 Apple //c+   
386apple2gsr0   // Sep 1986 Apple IIgs ROM00   
387apple2gsr1   // Sep 1987 Apple IIgs ROM01   
388apple2gs  // Aug 1989 Apple IIgs ROM03   
389apple2gsr3p   // ??? 198? Apple IIgs ROM03 prototype   
390apple2gsr3lp  // ??? 1989 Apple IIgs ROM03 late? prototype   
391apple3   // May 1980 Apple ///     
392// Dec 1983 Apple ///+   
393ace100   // ??? 1982 Franklin Ace 100   
394laser128  // ??? 1987 Laser 128     
395las128ex  // ??? 1987 Laser 128 EX   
396las3000   // ??? 1983 Laser 3000   
397ivelultr  // Ivasim Ivel Ultra   
398agat7    // Agat-7   
399agat9    // Agat-9   
370apple1   // Jul 1976 Apple 1
371apple2   // Apr 1977 Apple ][
372apple2p   // Jun 1979 Apple ][+
373prav82   // Pravetz 82
374prav8m   // Pravetz 8M
375apple2jp  // ??? ???? Apple ][j+
376apple2e   // Jan 1983 Apple //e
377mprof3   // Microprofessor III
378apple2ee  // Mar 1985 Apple //e Enhanced
379apple2ep  // Jan 1987 Apple //e Platinum
380apple2c   // Apr 1984 Apple //c
381prav8c   // Pravetz 8C
382apple2c0  // ??? 1985 Apple //c (3.5 ROM)
383apple2c3  // Sep 1986 Apple //c (Original Mem. Exp.)
384apple2c4  // ??? 198? Apple //c (rev 4)
385apple2cp  // Sep 1988 Apple //c+
386apple2gsr0   // Sep 1986 Apple IIgs ROM00
387apple2gsr1   // Sep 1987 Apple IIgs ROM01
388apple2gs  // Aug 1989 Apple IIgs ROM03
389apple2gsr3p   // ??? 198? Apple IIgs ROM03 prototype
390apple2gsr3lp  // ??? 1989 Apple IIgs ROM03 late? prototype
391apple3   // May 1980 Apple ///
392// Dec 1983 Apple ///+
393ace100   // ??? 1982 Franklin Ace 100
394laser128  // ??? 1987 Laser 128
395las128ex  // ??? 1987 Laser 128 EX
396las3000   // ??? 1983 Laser 3000
397ivelultr  // Ivasim Ivel Ultra
398agat7    // Agat-7
399agat9    // Agat-9
400400
401401//  Lisa   January    1983
402402//  Lisa 2   January  1984
403403//Macintosh XL   January    1985
404404
405lisa     // 1983 Apple Lisa     
406lisa2    // 1984 Apple Lisa 2 
407lisa210   // 1984 Apple Lisa 2/10
408macxl    // 1985 Apple Macintosh XL 
405lisa     // 1983 Apple Lisa
406lisa2    // 1984 Apple Lisa 2
407lisa210   // 1984 Apple Lisa 2/10
408macxl    // 1985 Apple Macintosh XL
409409
410410// Macintosh    January  1984
411411// Macintosh 512k      July?       1984
r11247r11248
414414// Macintosh SE  March     1987
415415// Macintosh II  March     1987
416416
417mac128k   // 1984 Apple Macintosh
418mac512k   // 1985 Apple Macintosh 512k   
419mac512ke  // 1986 Apple Macintosh 512ke     
420macplus   // 1986 Apple Macintosh Plus   
421macse    // 1987 Apple Macintosh SE 
417mac128k   // 1984 Apple Macintosh
418mac512k   // 1985 Apple Macintosh 512k
419mac512ke  // 1986 Apple Macintosh 512ke
420macplus   // 1986 Apple Macintosh Plus
421macse    // 1987 Apple Macintosh SE
422422macii    // 1987 Apple Macintosh II
423423macsefd   // 1988 Apple Macintosh SE (FDHD)
424424mac2fdhd  // 1988 Apple Macintosh II (FDHD)
r11247r11248
427427macse30   // 1989 Apple Macintosh SE/30
428428maciicx   // 1989 Apple Macintosh IIcx
429429maciici   // 1989 Apple Macintosh IIci
430macclasc  // 1990 Apple Macintosh Classic
430macclasc  // 1990 Apple Macintosh Classic
431431maclc // 1990 Apple Macintosh LC
432432maciisi   // 1990 Apple Macintosh IIsi
433433macpb100  // 1991 Apple Macintosh PowerBook 100
r11247r11248
437437pmac6100  // 1994 Apple Power Macintosh 6100
438438
439439// Atari
440a400     // 1979 Atari 400   
441a400pal   // 1979 Atari 400 PAL     
442a800     // 1979 Atari 800   
443a800pal   // 1979 Atari 800 PAL     
444a1200xl   // 1982 Atari 1200 XL     
445a600xl   // 1983 Atari 600 XL   
446a800xl   // 1983 Atari 800 XL   
447a800xlp   // 1983 Atari 800 XL (PAL)   
448a65xe    // 1986 Atari 65 XE (XL Extended)   
449a65xea   // 1986? Atari 65 XE Arabic
450a130xe   // 1986 Atari 130 XE   
451a800xe   // 1986 Atari 800 XE   
452xegs     // 1987 Atari XE Game System
453st   // Atari ST
440a400     // 1979 Atari 400
441a400pal   // 1979 Atari 400 PAL
442a800     // 1979 Atari 800
443a800pal   // 1979 Atari 800 PAL
444a1200xl   // 1982 Atari 1200 XL
445a600xl   // 1983 Atari 600 XL
446a800xl   // 1983 Atari 800 XL
447a800xlp   // 1983 Atari 800 XL (PAL)
448a65xe    // 1986 Atari 65 XE (XL Extended)
449a65xea   // 1986? Atari 65 XE Arabic
450a130xe   // 1986 Atari 130 XE
451a800xe   // 1986 Atari 800 XE
452xegs     // 1987 Atari XE Game System
453st   // Atari ST
454454st_uk
455455st_de
456456st_es
r11247r11248
458458st_fr
459459st_se
460460st_sg
461megast   // Atari Mega ST   
461megast   // Atari Mega ST
462462megast_uk
463463megast_de
464464megast_fr
465465megast_se
466466megast_sg
467//  stacy  // Atari STacy 
468ste  // Atari STe   
467//  stacy  // Atari STacy
468ste  // Atari STe
469469ste_uk
470470ste_de
471471ste_es
r11247r11248
473473ste_it
474474ste_se
475475ste_sg
476stbook   // Atari STBook
477megaste   // Atari Mega STe     
476stbook   // Atari STBook
477megaste   // Atari Mega STe
478478megaste_uk
479479megaste_de
480480megaste_es
481481megaste_fr
482482megaste_it
483483megaste_se
484//  stpad  // Atari STPad (prototype) 
485tt030  // Atari TT030 
484//  stpad  // Atari STPad (prototype)
485tt030  // Atari TT030
486486tt030_uk
487487tt030_de
488488tt030_fr
489489tt030_pl
490//  fx1      // Atari FX-1 (prototype)     
491falcon30    // Atari Falcon030   
492falcon40  // Atari Falcon040 (prototype)   
490//  fx1      // Atari FX-1 (prototype)
491falcon30    // Atari Falcon030
492falcon40  // Atari Falcon040 (prototype)
493493
494494// AT&T
4954953b1      // 3B1 "Unix PC"
496496
497497// Commodore
498kim1     // Commodore (MOS) KIM-1 1975   
499sym1     // Synertek SYM-1   
500aim65    // Rockwell AIM65   
501aim65_40  // Rockwell AIM65/40   
498kim1     // Commodore (MOS) KIM-1 1975
499sym1     // Synertek SYM-1
500aim65    // Rockwell AIM65
501aim65_40  // Rockwell AIM65/40
502502
503pet2001   // PET 2001
504pet2001n  // PET 2001-N     
505pet2001b  // PET 2001-B     
506cbm30    // CBM 30xx   
507cbm30b   // CBM 30xx (Business keyboard)
508cbm30nor  // CBM 30xx (Norway, Business keyboard)
509pet40on   // PET 40xx (Basic 4, no CRTC, Normal keyboard)
510pet40ob   // PET 40xx (Basic 4, no CRTC, Business keyboard) 
511pet40n   // PET 40xx (Basic 4, CRTC 60Hz, 40 columns)   
512pet40b   // PET 40xx (Basic 4, CRTC 60Hz, 80 columns)   
513cbm40o   // CBM 40xx (Basic 4, no CRTC, Normal keyboard)
514cbm40ob   // CBM 40xx (Basic 4, no CRTC, Business keyboard) 
515cbm40n   // CBM 40xx (Basic 4, CRTC 50Hz, 40 columns)   
516cbm40b   // CBM 40xx (Basic 4, CRTC 50Hz, 80 columns)   
517pet80    // PET 80xx (Basic 4, CRTC 60Hz, 80 columns) 
518cbm80    // CBM 80xx (Basic 4, CRTC 50Hz, 80 columns) 
519cbm80ger  // CBM 80xx (Germany, Basic 4, CRTC 50Hz, 80 cols)
520cbm80hun  // CBM 80xx (Hungary, Basic 4, CRTC 50Hz, 80 cols)
521cbm80swe  // CBM 80xx (Sweden, Basic 4, CRTC 50Hz, 80 cols) 
522cbm8296   // CBM 8296 (Basic 4, CRTC 50Hz, 80 columns)   
523cbm8296d  // CBM 8296D   
524superpet  // SuperPET
525sp9000   // CBM SP9000 / MiniMainFrame 9000   
526mmf9000s  // MiniMainFrame 9000 (Sweden)   
503pet2001   // PET 2001
504pet2001n  // PET 2001-N
505pet2001b  // PET 2001-B
506cbm30    // CBM 30xx
507cbm30b   // CBM 30xx (Business keyboard)
508cbm30nor  // CBM 30xx (Norway, Business keyboard)
509pet40on   // PET 40xx (Basic 4, no CRTC, Normal keyboard)
510pet40ob   // PET 40xx (Basic 4, no CRTC, Business keyboard)
511pet40n   // PET 40xx (Basic 4, CRTC 60Hz, 40 columns)
512pet40b   // PET 40xx (Basic 4, CRTC 60Hz, 80 columns)
513cbm40o   // CBM 40xx (Basic 4, no CRTC, Normal keyboard)
514cbm40ob   // CBM 40xx (Basic 4, no CRTC, Business keyboard)
515cbm40n   // CBM 40xx (Basic 4, CRTC 50Hz, 40 columns)
516cbm40b   // CBM 40xx (Basic 4, CRTC 50Hz, 80 columns)
517pet80    // PET 80xx (Basic 4, CRTC 60Hz, 80 columns)
518cbm80    // CBM 80xx (Basic 4, CRTC 50Hz, 80 columns)
519cbm80ger  // CBM 80xx (Germany, Basic 4, CRTC 50Hz, 80 cols)
520cbm80hun  // CBM 80xx (Hungary, Basic 4, CRTC 50Hz, 80 cols)
521cbm80swe  // CBM 80xx (Sweden, Basic 4, CRTC 50Hz, 80 cols)
522cbm8296   // CBM 8296 (Basic 4, CRTC 50Hz, 80 columns)
523cbm8296d  // CBM 8296D
524superpet  // SuperPET
525sp9000   // CBM SP9000 / MiniMainFrame 9000
526mmf9000s  // MiniMainFrame 9000 (Sweden)
527527
528vic1001   // Commodore VIC-1001 (Japan)     
529vic20    // Commodore VIC 20 (NTSC) 
530vic20p   // Commodore VIC 20 (PAL)     
531vic20s   // Commodore VIC 20 (Swedish Expanson Kit)   
528vic1001   // Commodore VIC-1001 (Japan)
529vic20    // Commodore VIC 20 (NTSC)
530vic20p   // Commodore VIC 20 (PAL)
531vic20s   // Commodore VIC 20 (Swedish Expanson Kit)
532532
533533max      // Commodore Max Machine (Japan)
534c64      // Commodore 64 (NTSC)   
535c64pal   // Commodore 64 (PAL)     
536c64jpn   // Commodore 64 (Japan)
537c64swe   // Commodore 64 (Sweden)   
538vic64s   // Commodore VIC 64S (Sweden)     
539pet64    // Commodore PET 64   
540cbm4064   // Commodore CBM 4064     
541edu64    // Commodore Educator 64 
534c64      // Commodore 64 (NTSC)
535c64pal   // Commodore 64 (PAL)
536c64jpn   // Commodore 64 (Japan)
537c64swe   // Commodore 64 (Sweden)
538vic64s   // Commodore VIC 64S (Sweden)
539pet64    // Commodore PET 64
540cbm4064   // Commodore CBM 4064
541edu64    // Commodore Educator 64
542542//  clipper  // C64 in a briefcase with 3" floppy, electroluminescent flat screen, thermal printer
543543//  tesa6240  //  modified SX64 with label printer
544sx64     // Commodore SX-64 Executive Machine (PAL)     
545vip64    // Commodore VIP64 (SX64, PAL, Swedish)   
546//  dx64    // Commodore DX-64 - Prototype     
547c64c     // Commodore 64C (NTSC)   
548c64cpal   // Commodore 64C (PAL)   
544sx64     // Commodore SX-64 Executive Machine (PAL)
545vip64    // Commodore VIP64 (SX64, PAL, Swedish)
546//  dx64    // Commodore DX-64 - Prototype
547c64c     // Commodore 64C (NTSC)
548c64cpal   // Commodore 64C (PAL)
549549c64csfi
550c64g     // Commodore 64G (PAL)     
551c64gs    // Commodore 64 Games System 
552c64dtv    // Commodore 64 Direct-to-TV 
553clcd     // Commodore LCD
550c64g     // Commodore 64G (PAL)
551c64gs    // Commodore 64 Games System
552c64dtv    // Commodore 64 Direct-to-TV
553clcd     // Commodore LCD
554554
555b500     // Commodore B500   
556b128     // Commodore B128   
557b256     // Commodore B256   
558cbm610   // Commodore CBM 610   
559cbm620   // Commodore CBM 620   
560cbm620hu  // Commodore CBM 620 (Hungary)   
561b128hp   // Commodore B128HP
562b256hp   // Commodore B256HP
563bx256hp   // Commodore BX256HP   
564cbm710   // Commodore CBM 710   
565cbm720   // Commodore CBM 720   
566cbm720se  // Commodore CBM 720 (Sweden / Finland)
567p500     // Commodore P500 (proto, a.k.a. C128-40, PET-II) 
555b500     // Commodore B500
556b128     // Commodore B128
557b256     // Commodore B256
558cbm610   // Commodore CBM 610
559cbm620   // Commodore CBM 620
560cbm620hu  // Commodore CBM 620 (Hungary)
561b128hp   // Commodore B128HP
562b256hp   // Commodore B256HP
563bx256hp   // Commodore BX256HP
564cbm710   // Commodore CBM 710
565cbm720   // Commodore CBM 720
566cbm720se  // Commodore CBM 720 (Sweden / Finland)
567p500     // Commodore P500 (proto, a.k.a. C128-40, PET-II)
568568
569c16      // Commodore 16 
570c16c     // Commodore 16  c1551     
571c16v     // Commodore 16  vc1541   
569c16      // Commodore 16
570c16c     // Commodore 16  c1551
571c16v     // Commodore 16  vc1541
572572c16hun   // Commodore 16 Novotrade (Hungarian Character Set)
573c116     // Commodore 116
574c116c    // Commodore 116  c1551   
575c116v    // Commodore 116  vc1541 
576plus4    // Commodore +4   
577plus4c   // Commodore +4  c1551   
578plus4v   // Commodore +4  vc1541
579c232     // Commodore 232 - Prototype
580c264     // Commodore 264 - Prototype
581c364     // Commodore V364 - Prototype   
582c16sid      // Commodore 16  sid card
583plus4sid    // Commodore +4  sid card
573c116     // Commodore 116
574c116c    // Commodore 116  c1551
575c116v    // Commodore 116  vc1541
576plus4    // Commodore +4
577plus4c   // Commodore +4  c1551
578plus4v   // Commodore +4  vc1541
579c232     // Commodore 232 - Prototype
580c264     // Commodore 264 - Prototype
581c364     // Commodore V364 - Prototype
582c16sid      // Commodore 16  sid card
583plus4sid    // Commodore +4  sid card
584584
585c128     // Commodore 128 - NTSC   
586c128cr   // Commodore 128CR - NTSC (proto?)   
587c128sfi   // Commodore 128 - PAL (Swedish / Finnish)   
588c128fra   // Commodore 128 - PAL (French)
589c128ger   // Commodore 128 - PAL (German)
590c128nor   // Commodore 128 - PAL (Norwegian)   
591c128d    // Commodore 128D - PAL   
592c128dpr   // Commodore 128D - NTSC (proto)   
593c128dcr   // Commodore 128DCR - NTSC   
594c128drde  // Commodore 128DCR - PAL (German)   
595c128drit  // Commodore 128DCR - PAL (Italian)
596c128drsw  // Commodore 128DCR - PAL (Swedish)
597c128d81   // Commodore 128D/81   
585c128     // Commodore 128 - NTSC
586c128cr   // Commodore 128CR - NTSC (proto?)
587c128sfi   // Commodore 128 - PAL (Swedish / Finnish)
588c128fra   // Commodore 128 - PAL (French)
589c128ger   // Commodore 128 - PAL (German)
590c128nor   // Commodore 128 - PAL (Norwegian)
591c128d    // Commodore 128D - PAL
592c128dpr   // Commodore 128D - NTSC (proto)
593c128dcr   // Commodore 128DCR - NTSC
594c128drde  // Commodore 128DCR - PAL (German)
595c128drit  // Commodore 128DCR - PAL (Italian)
596c128drsw  // Commodore 128DCR - PAL (Swedish)
597c128d81   // Commodore 128D/81
598598
599a500n    // Commodore Amiga 500 - NTSC   
600a500p    // Commodore Amiga 500 - PAL 
601a1000n   // Commodore Amiga 1000 - NTSC   
602a1000p   // Commodore Amiga 1000 - PAL     
603cdtv     // Commodore CDTV   
604a3000    // Commodore Amiga 3000   
605a1200n   // Commodore Amiga 1200 - NTSC   
606a1200p   // Commodore Amiga 1200 - PAL     
607cd32     // Commodore Amiga CD32   
599a500n    // Commodore Amiga 500 - NTSC
600a500p    // Commodore Amiga 500 - PAL
601a1000n   // Commodore Amiga 1000 - NTSC
602a1000p   // Commodore Amiga 1000 - PAL
603cdtv     // Commodore CDTV
604a3000    // Commodore Amiga 3000
605a1200n   // Commodore Amiga 1200 - NTSC
606a1200p   // Commodore Amiga 1200 - PAL
607cd32     // Commodore Amiga CD32
608608
609c65      // 1991 C65 / C64DX (Prototype, NTSC)     
610c64dx    // 1991 C65 / C64DX (Prototype, German PAL)   
609c65      // 1991 C65 / C64DX (Prototype, NTSC)
610c64dx    // 1991 C65 / C64DX (Prototype, German PAL)
611611
612612// Epson
613px4      // 1985 Epson PX-4   
614px4p     // 1985 Epson PX-4+   
613px4      // 1985 Epson PX-4
614px4p     // 1985 Epson PX-4+
615615px8
616616qx10
617617qc10
618618ehx20
619619
620620// IBM PC & Clones
621ibm5150   // 1981 IBM 5150   
622ibm5155   // 1982 IBM 5155   
623ibm5140   // 1985 IBM 5140   
621ibm5150   // 1981 IBM 5150
622ibm5155   // 1982 IBM 5155
623ibm5140   // 1985 IBM 5140
624624dgone    // 1984 Data General/One
625pcmda    // 1987 PC with MDA   
626pcherc   // 1987 PC with Hercules (for testing hercules)
627pc   // 1987 PC with CGA
628bw230   // 1985 Bondwell (CGA)   
629europc   // 1988 Schneider Euro PC (CGA or Hercules)
625pcmda    // 1987 PC with MDA
626pcherc   // 1987 PC with Hercules (for testing hercules)
627pc   // 1987 PC with CGA
628bw230   // 1985 Bondwell (CGA)
629europc   // 1988 Schneider Euro PC (CGA or Hercules)
630630
631631// PC Junior
632ibmpcjr   // 1984 IBM PC Jr     
633ibmpcjx   // 1985 IBM PC JX     
634t1000hx   // 1987 Tandy 1000 HX (similiar to PCJr)
635t1000sx   // 1987 Tandy 1000 SX (similiar to PCJr)
632ibmpcjr   // 1984 IBM PC Jr
633ibmpcjx   // 1985 IBM PC JX
634t1000hx   // 1987 Tandy 1000 HX (similiar to PCJr)
635t1000sx   // 1987 Tandy 1000 SX (similiar to PCJr)
636636t1000tx   // 1987 Tandy 1000 TX
637637t1000rl   // 1989 Tandy 1000 RL
638638
639639// XT
640ibm5160   // 1982 IBM XT 5160
641ibm5162   // 1986 IBM XT 5162 (XT w/80286)   
642pc200    // 1988 Sinclair PC200 
643pc20     // 1988 Amstrad PC20
644ppc512   // 1987 Amstrad PPC512   
645ppc640   // 1987 Amstrad PPC640   
646pc1512   // 1986 Amstrad PC1512 v1 (CGA compatible)   
647pc1512v2  // 1986 Amstrad PC1512 v2 (CGA compatible)   
648pc1640   // 1987 Amstrad PC1640 (EGA compatible)
640ibm5160   // 1982 IBM XT 5160
641ibm5162   // 1986 IBM XT 5162 (XT w/80286)
642pc200    // 1988 Sinclair PC200
643pc20     // 1988 Amstrad PC20
644ppc512   // 1987 Amstrad PPC512
645ppc640   // 1987 Amstrad PPC640
646pc1512   // 1986 Amstrad PC1512 v1 (CGA compatible)
647pc1512v2  // 1986 Amstrad PC1512 v2 (CGA compatible)
648pc1640   // 1987 Amstrad PC1640 (EGA compatible)
649649
650xtvga    // 198? PC-XT (VGA, MF2 Keyboard)   
650xtvga    // 198? PC-XT (VGA, MF2 Keyboard)
651651iskr1031
652652iskr1030m
653653ec1840
r11247r11248
663663m240
664664
665665// AT
666ibm5170   // 1984 IBM PC/AT 5170, original 6 MHz model   
667ibm5170a  // 1985 IBM PC/AT 5170, enhanced 8 MHz model   
668i8530286  // 1988 IBM PS/2 Model 30-286 (VGA)   
669i8555081  // 1988 IBM PS/2 Model 55SX (VGA)   
670at   // 1987 AMI Bios and Diagnostics   
671atvga    // 19?? AT VGA 
672neat     // 1989 New Enhanced AT chipset, AMI BIOS   
673at386    // 19?? IBM AT 386 
674at486    // 19?? IBM AT 486 
666ibm5170   // 1984 IBM PC/AT 5170, original 6 MHz model
667ibm5170a  // 1985 IBM PC/AT 5170, enhanced 8 MHz model
668i8530286  // 1988 IBM PS/2 Model 30-286 (VGA)
669i8555081  // 1988 IBM PS/2 Model 55SX (VGA)
670at   // 1987 AMI Bios and Diagnostics
671atvga    // 19?? AT VGA
672neat     // 1989 New Enhanced AT chipset, AMI BIOS
673at386    // 19?? IBM AT 386
674at486    // 19?? IBM AT 486
675675ct486      // 1993? 486 with CS4031
676676ficpio2   // 1995 FIC 486-PIO-2
677at586    // 19?? AT 586 
677at586    // 19?? AT 586
678678c386sx16   // 1990 Commodore 386SX-16
679ficvt503   // 1997 FIC VT-503
679ficvt503   // 1997 FIC VT-503
680680megapc
681681megapcpl
682682ec1849
r11247r11248
703703
704704
705705// Osborne
706osborne1  // 1981 Osborne-1     
706osborne1  // 1981 Osborne-1
707707osbexec   // 1982 Osborne Executive
708708
709709// Research Machines
r11247r11248
713713mbc55x   // Sanyo MBC-550, MBC-555
714714
715715// Sinclair Research
716zx80     // 1980 Sinclair ZX-80     
717zx81     // 1981 Sinclair ZX-81     
718ts1000   // 1982 Timex Sinclair 1000
719ts1500   // Timex Sinclair 1500   
720ringo470  // Ringo 470   
721pc8300   // Your Computer - PC8300     
722pow3000   // Creon Enterprises - Power 3000     
723lambda   // Lambda 8300   
724tk85     // Microdigital TK85
716zx80     // 1980 Sinclair ZX-80
717zx81     // 1981 Sinclair ZX-81
718ts1000   // 1982 Timex Sinclair 1000
719ts1500   // Timex Sinclair 1500
720ringo470  // Ringo 470
721pc8300   // Your Computer - PC8300
722pow3000   // Creon Enterprises - Power 3000
723lambda   // Lambda 8300
724tk85     // Microdigital TK85
725725
726spectrum // 1982 ZX Spectrum     
727spec80k // 1987 ZX Spectrum 80k     
728specide // 1995 ZX Spectrum IDE     
729inves    // 1986 Inves Spectrum 48K+   
730tk90x    // 1985 TK90x Color Computer 
731tk95     // 1986 TK95 Color Computer   
732tc2048   // 198? TC2048   
733ts2068   // 1983 TS2068   
734uk2086   // 1986 UK2086   
726spectrum // 1982 ZX Spectrum
727spec80k // 1987 ZX Spectrum 80k
728specide // 1995 ZX Spectrum IDE
729inves    // 1986 Inves Spectrum 48K+
730tk90x    // 1985 TK90x Color Computer
731tk95     // 1986 TK95 Color Computer
732tc2048   // 198? TC2048
733ts2068   // 1983 TS2068
734uk2086   // 1986 UK2086
735735
736spec128    // 1986 ZX Spectrum 128     
737specpls2  // 1986 ZX Spectrum +2   
738specpl2a  // 1987 ZX Spectrum +2a
739specpls3  // 1987 ZX Spectrum +3   
740specpl3e  // 2000 ZX Spectrum +3e
741sp3e8bit  // 2002 ZX Spectrum +3e 8bit IDE   
742sp3ezcf   // 2002 ZX Spectrum +3e ZXCF   
743sp3eata   // 2002 ZX Spectrum +3e ZXATASP
736spec128    // 1986 ZX Spectrum 128
737specpls2  // 1986 ZX Spectrum +2
738specpl2a  // 1987 ZX Spectrum +2a
739specpls3  // 1987 ZX Spectrum +3
740specpl3e  // 2000 ZX Spectrum +3e
741sp3e8bit  // 2002 ZX Spectrum +3e 8bit IDE
742sp3ezcf   // 2002 ZX Spectrum +3e ZXCF
743sp3eata   // 2002 ZX Spectrum +3e ZXATASP
744744scorpio
745745profi
746746kay1024
r11247r11248
751751atmtb2
752752bestzx
753753
754ql   // 1984 Sinclair QL (UK)   
755ql_us    // 1984 Sinclair QL (USA)   
756ql_es    // 1984 Sinclair QL (Spain)   
757ql_fr    // 1984 Sinclair QL (France) 
758ql_de    // 1984 Sinclair QL (Germany)   
759ql_it    // 1984 Sinclair QL (Italy)   
760ql_se    // 1984 Sinclair QL (Sweden) 
761ql_dk    // 1984 Sinclair QL (Denmark)   
762ql_gr    // 1984 Sinclair QL (Greece) 
754ql   // 1984 Sinclair QL (UK)
755ql_us    // 1984 Sinclair QL (USA)
756ql_es    // 1984 Sinclair QL (Spain)
757ql_fr    // 1984 Sinclair QL (France)
758ql_de    // 1984 Sinclair QL (Germany)
759ql_it    // 1984 Sinclair QL (Italy)
760ql_se    // 1984 Sinclair QL (Sweden)
761ql_dk    // 1984 Sinclair QL (Denmark)
762ql_gr    // 1984 Sinclair QL (Greece)
763763//  tonto
764764//  megaopd
765765
766766// Sharp
767pc1245   // Pocket Computer 1245
768pc1250   // Pocket Computer 1250
769pc1251   // Pocket Computer 1251
770pc1255   // Pocket Computer 1255
771trs80pc3  // Tandy TRS80 PC-3
772pc1260   // Pocket Computer 1260
773pc1261   // Pocket Computer 1261
774pc1401   // Pocket Computer 1401
775pc1402   // Pocket Computer 1402
776pc1350   // Pocket Computer 1350
777pc1360   // Pocket Computer 1360
778pc1403   // Pocket Computer 1403
779pc1403h   // Pocket Computer 1403H   
780pc1450   // Pocket Computer 1450
781pc1500   // Pocket Computer 1500
767pc1245   // Pocket Computer 1245
768pc1250   // Pocket Computer 1250
769pc1251   // Pocket Computer 1251
770pc1255   // Pocket Computer 1255
771trs80pc3  // Tandy TRS80 PC-3
772pc1260   // Pocket Computer 1260
773pc1261   // Pocket Computer 1261
774pc1401   // Pocket Computer 1401
775pc1402   // Pocket Computer 1402
776pc1350   // Pocket Computer 1350
777pc1360   // Pocket Computer 1360
778pc1403   // Pocket Computer 1403
779pc1403h   // Pocket Computer 1403H
780pc1450   // Pocket Computer 1450
781pc1500   // Pocket Computer 1500
782782
783mz700       // 1982 Sharp MZ700   
784mz700j   // 1982 Sharp MZ700 Japan     
785mz800      // 1984 Sharp MZ800   
786mz1500   // 1984 Sharp MZ1500   
787mz2500   // 1985 Sharp MZ2500   
788mz2520   // 1985 Sharp MZ2520   
783mz700      // 1982 Sharp MZ700
784mz700j   // 1982 Sharp MZ700 Japan
785mz800      // 1984 Sharp MZ800
786mz1500   // 1984 Sharp MZ1500
787mz2500   // 1985 Sharp MZ2500
788mz2520   // 1985 Sharp MZ2520
789789
790mz80kj   // 1979 Sharp MZ80K     
791mz80k       // 1979 Sharp MZ80K   
792mz80a       // 1982 Sharp MZ80A   
793mz80b       // 1981 Sharp MZ80B   
794mz2000   // 1981 Sharp MZ2000   
795mz2200   // 1981 Sharp MZ2200   
790mz80kj   // 1979 Sharp MZ80K
791mz80k      // 1979 Sharp MZ80K
792mz80a      // 1982 Sharp MZ80A
793mz80b      // 1981 Sharp MZ80B
794mz2000   // 1981 Sharp MZ2000
795mz2200   // 1981 Sharp MZ2200
796796
797x1      // 1982 Sharp X1   
798x1twin   // 1986 Sharp X1 Twin     
799x1turbo   // 1984 Sharp X1 Turbo (Model 10)     
800x1turbo40 // 1985 Sharp X1 Turbo (Model 40)     
801//  x1turboz  // 1986 Sharp X1 TurboZ
797x1      // 1982 Sharp X1
798x1twin   // 1986 Sharp X1 Twin
799x1turbo   // 1984 Sharp X1 Turbo (Model 10)
800x1turbo40 // 1985 Sharp X1 Turbo (Model 40)
801//  x1turboz  // 1986 Sharp X1 TurboZ
802802
803x68000   // Sharp X68000 (1987)   
804x68kxvi   // Sharp X68000 XVI (1991)   
805x68030   // Sharp X68030 (1993)   
803x68000   // Sharp X68000 (1987)
804x68kxvi   // Sharp X68000 XVI (1991)
805x68030   // Sharp X68030 (1993)
806806
807807// Silicon Graphics
808sgi_ip2   // IP2: IRIS 2x00, 68020, 16MHz
809sgi_ip6   // IP6: 4D/PI, R2000, 20MHz
810ip204415  // IP20: Indigo 1, R4400, 150MHz   
811ip225015  // IP22: Indy, R5000, 150MHz   
812ip224613   // IP22: Indy, R4600, 133MHz   
813ip244415   // IP24: Indigo 2, R4400, 150MHz   
808sgi_ip2   // IP2: IRIS 2x00, 68020, 16MHz
809sgi_ip6   // IP6: 4D/PI, R2000, 20MHz
810ip204415  // IP20: Indigo 1, R4400, 150MHz
811ip225015  // IP22: Indy, R5000, 150MHz
812ip224613   // IP22: Indy, R4600, 133MHz
813ip244415   // IP24: Indigo 2, R4400, 150MHz
814814
815815// Texas Instruments
816ti990_10  // 1975 TI 990/10     
817ti990_4   // 1976 TI 990/4   
818990189   // 1978 TM 990/189   
819990189v   // 1980 TM 990/189 with Color Video Board     
816ti990_10  // 1975 TI 990/10
817ti990_4   // 1976 TI 990/4
818990189   // 1978 TM 990/189
819990189v   // 1980 TM 990/189 with Color Video Board
820820
821ti99_224  // 1983 TI 99/2 (24kb ROMs)
822ti99_232  // 1983 TI 99/2 (32kb ROMs)
823ti99_4   // 1979 TI-99/4
824ti99_4e   // 1980 TI-99/4 with 50Hz video
825ti99_4a   // 1981 TI-99/4A   
826ti99_4ae  // 1981 TI-99/4A with 50Hz video   
827ti99_4ev   // 1994 TI-99/4A with EVPC video card     
828ti99_8   // 1983 TI-99/8
829ti99_8e   // 1983 TI-99/8 with 50Hz video
821ti99_224  // 1983 TI 99/2 (24kb ROMs)
822ti99_232  // 1983 TI 99/2 (32kb ROMs)
823ti99_4   // 1979 TI-99/4
824ti99_4e   // 1980 TI-99/4 with 50Hz video
825ti99_4a   // 1981 TI-99/4A
826ti99_4ae  // 1981 TI-99/4A with 50Hz video
827ti99_4ev   // 1994 TI-99/4A with EVPC video card
828ti99_8   // 1983 TI-99/8
829ti99_8e   // 1983 TI-99/8 with 50Hz video
830830
831831// TI 99 clones
832tutor     // 1983? Tomy Tutor   
833pyuuta   // 1982 Tomy Pyuuta   
834geneve   // 1987? Myarc Geneve 9640   
835ti99_4p   // 1996 SNUG 99/4P (a.k.a. SGCPU)     
832tutor     // 1983? Tomy Tutor
833pyuuta   // 1982 Tomy Pyuuta
834geneve   // 1987? Myarc Geneve 9640
835ti99_4p   // 1996 SNUG 99/4P (a.k.a. SGCPU)
836836
837avigo    // 
837avigo    //
838838
839839// Texas Instruments Calculators
840ti73     // 1990 TI-73   
841ti81     // 1990 TI-81 (Z80 2 MHz)   
842ti81v2   // 1990 TI-81 (Z80 2 MHz)     
843ti85     // 1992 TI-85 (Z80 6 MHz)   
844ti82     // 1993 TI-82 (Z80 6 MHz)   
845ti83     // 1996 TI-83 (Z80 6 MHz)   
846ti86     // 1997 TI-86 (Z80 6 MHz)   
847ti83p    // 1999 TI-83 Plus (Z80 6 MHz) 
848ti83pse   // 2001 TI-83 Plus Silver Edition     
849//  ti84p  // 2004 TI-84 Plus 
850ti84pse   // 2004 TI-84 Plus Silver Edition     
851ti89     // 1998 TI-89   
852ti92     // 1995 TI-92   
853ti92p    // 1999 TI-92 Plus 
854v200     // 2002 Voyage 200 PLT   
855ti89t    // 2004 TI-89 Titanium 
840ti73     // 1990 TI-73
841ti81     // 1990 TI-81 (Z80 2 MHz)
842ti81v2   // 1990 TI-81 (Z80 2 MHz)
843ti85     // 1992 TI-85 (Z80 6 MHz)
844ti82     // 1993 TI-82 (Z80 6 MHz)
845ti83     // 1996 TI-83 (Z80 6 MHz)
846ti86     // 1997 TI-86 (Z80 6 MHz)
847ti83p    // 1999 TI-83 Plus (Z80 6 MHz)
848ti83pse   // 2001 TI-83 Plus Silver Edition
849//  ti84p  // 2004 TI-84 Plus
850ti84pse   // 2004 TI-84 Plus Silver Edition
851ti89     // 1998 TI-89
852ti92     // 1995 TI-92
853ti92p    // 1999 TI-92 Plus
854v200     // 2002 Voyage 200 PLT
855ti89t    // 2004 TI-89 Titanium
856856
857857// NEC
858858pc6001
r11247r11248
884884pc9821a
885885
886886// Cantab
887ace   // Jupiter Ace   
887ace   // Jupiter Ace
888888
889889// Sord
890890m5
r11247r11248
900900einst256
901901
902902// Intelligent Software
903ep64     // Enterprise 64
904ep128    // Enterprise 128   
905phc64    // Hegener & Glaser Mephisto PHC 64   
903ep64     // Enterprise 64
904ep128    // Enterprise 128
905phc64    // Hegener & Glaser Mephisto PHC 64
906906
907907// Non-Linear Systems
908908kaypro2x  // Kaypro 2 - 2/84
r11247r11248
915915
916916// VEB Mikroelektronik
917917// KC compact is partial CPC compatible
918kc85_2   // VEB KC 85/2   
919kc85_3   // VEB KC 85/3   
920kc85_4   // VEB KC 85/4   
921kc85_4d   // VEB KC 85/4 with disk interface   
922kc85_5   // VEB KC 85/5   
923mc8020   // MC 80.2x
924mc8030   // MC 80.3x
918kc85_2   // VEB KC 85/2
919kc85_3   // VEB KC 85/3
920kc85_4   // VEB KC 85/4
921kc85_4d   // VEB KC 85/4 with disk interface
922kc85_5   // VEB KC 85/5
923mc8020   // MC 80.2x
924mc8030   // MC 80.3x
925925lc80
926926lc80_2
927927sc80
928928
929929// Microbee Systems
930mbee      // Microbee 16 Standard or Plus   
931mbeeic   // Microbee 32 IC     
932mbeepc   // Microbee 32 PC     
933mbeepc85   // Microbee 32 PC85
930mbee      // Microbee 16 Standard or Plus
931mbeeic   // Microbee 32 IC
932mbeepc   // Microbee 32 PC
933mbeepc85   // Microbee 32 PC85
934934mbeepc85b   // Microbee 32 PC85 (Business version)
935935mbeepc85s   // Microbee 32 PC85 (Swedish)
936mbeeppc   // Microbee 32 PPC85   
936mbeeppc   // Microbee 32 PPC85
937937mbeett   // Microbee Teleterm
938mbee56   // Microbee 56K (CP/M)   
939mbee64   // Microbee 64K (CP/M)   
940mbee128   // Microbee 128K (CP/M)   
941mbee256   // Microbee 256TC (CP/M)   
938mbee56   // Microbee 56K (CP/M)
939mbee64   // Microbee 64K (CP/M)
940mbee128   // Microbee 128K (CP/M)
941mbee256   // Microbee 256TC (CP/M)
942942
943943// Tandy / Radio Shack
944trs80    // TRS-80 Model I - Level I BASIC   
945trs80l2   // TRS-80 Model I - Level II BASIC   
946sys80    // EACA System 80   
947lnw80    // LNW Research LNW-80 
944trs80    // TRS-80 Model I - Level I BASIC
945trs80l2   // TRS-80 Model I - Level II BASIC
946sys80    // EACA System 80
947lnw80    // LNW Research LNW-80
948948trs80m2
949949trs80m16
950trs80m3   // TRS-80 Model III - Radio Shack/Tandy
950trs80m3   // TRS-80 Model III - Radio Shack/Tandy
951951trs80m4
952952trs80m4p
953953ht1080z // Hradstechnika Szvetkezet HT-1080Z
r11247r11248
957957tandy2k
958958tandy2khd
959959
960coco     // Color Computer   
961cocoe    // Color Computer (Extended BASIC 1.0) 
962coco2    // Color Computer 2   
963coco2b   // Color Computer 2B (uses M6847T1 video chip)   
964coco3    // Color Computer 3 (NTSC) 
965coco3p   // Color Computer 3 (PAL)     
966coco3h   // Hacked Color Computer 3 (6309)     
967dragon32  // Dragon 32   
968dragon64  // Dragon 64   
969d64plus   // Dragon 64 + Compusense Plus addon   
970dgnalpha  // Dragon Alpha
971dgnbeta   // Dragon Beta   
972tanodr64  // Tano Dragon 64 (NTSC)   
973cp400    // Prologica CP400 
974mc10     // MC-10
975alice    // Matra & Hachette Ordinateur Alice 
976alice32 // Matra & Hachette Alice 32 
977alice90 // Matra & Hachette Alice 90 
960coco     // Color Computer
961cocoe    // Color Computer (Extended BASIC 1.0)
962coco2    // Color Computer 2
963coco2b   // Color Computer 2B (uses M6847T1 video chip)
964coco3    // Color Computer 3 (NTSC)
965coco3p   // Color Computer 3 (PAL)
966coco3h   // Hacked Color Computer 3 (6309)
967dragon32  // Dragon 32
968dragon64  // Dragon 64
969d64plus   // Dragon 64 + Compusense Plus addon
970dgnalpha  // Dragon Alpha
971dgnbeta   // Dragon Beta
972tanodr64  // Tano Dragon 64 (NTSC)
973cp400    // Prologica CP400
974mc10     // MC-10
975alice    // Matra & Hachette Ordinateur Alice
976alice32 // Matra & Hachette Alice 32
977alice90 // Matra & Hachette Alice 90
978978
979979// EACA
980cgenie   // Colour Genie EG2000   
981cgenienz  // Colour Genie EG2000 (New Zealand)   
980cgenie   // Colour Genie EG2000
981cgenienz  // Colour Genie EG2000 (New Zealand)
982982// system 80 trs80 compatible
983983
984// Video Technology
985crvision  // 1981 creatiVision   
986fnvision  // 1983 FunVision     
984// Video Technology
985crvision  // 1981 creatiVision
986fnvision  // 1983 FunVision
987987crvisioj
988988wizzard
989989rameses
990990vz2000
991991crvisio2
992992manager
993laser110  // 1983 Laser 110     
994las110de  // 1983 Sanyo Laser 110 (Germany)     
995laser200  // 1983 Laser 200 (color version of 110)   
996//  vz200de   // 1983 VZ-200 (Germany)   
997fellow   // 1983 Salora Fellow (Finland)
998tx8000   // 1983 Texet TX-8000 (U.K.)   
999laser210  // 1984 Laser 210 (200 with more memory)   
1000las210de  // 1984 Sanyo Laser 210 (Germany)     
1001vz200    // 1984 Dick Smith Electronics VZ-200   
993laser110  // 1983 Laser 110
994las110de  // 1983 Sanyo Laser 110 (Germany)
995laser200  // 1983 Laser 200 (color version of 110)
996//  vz200de   // 1983 VZ-200 (Germany)
997fellow   // 1983 Salora Fellow (Finland)
998tx8000   // 1983 Texet TX-8000 (U.K.)
999laser210  // 1984 Laser 210 (200 with more memory)
1000las210de  // 1984 Sanyo Laser 210 (Germany)
1001vz200    // 1984 Dick Smith Electronics VZ-200
10021002laser310  // 1984 Laser 310 (210 with diff. keyboard and RAM)
1003laser310h // 1984 Laser 310 with SHRG mod
1004vz300    // 1984 Dick Smith Electronics VZ-300   
1005laser350  // 1984? Laser 350   
1006laser500  // 1984? Laser 500   
1007laser700  // 1984? Laser 700   
1003laser310h // 1984 Laser 310 with SHRG mod
1004vz300    // 1984 Dick Smith Electronics VZ-300
1005laser350  // 1984? Laser 350
1006laser500  // 1984? Laser 500
1007laser700  // 1984? Laser 700
10081008socrates  // 1988 Socrates Educational Video System
10091009socratfc  // 1988 Socrates SAITOUT
10101010
10111011// Tangerine
1012microtan  // 1979 Microtan 65
1012microtan  // 1979 Microtan 65
10131013
1014oric1    // 1983 Oric 1 
1015orica    // 1984 Oric Atmos 
1016prav8d   // 1985 Pravetz 8D   
1017prav8dd   // 1989 Pravetz 8D (Disk ROM)     
1018telstrat  // ??? Oric Telestrat/Stratos     
1014oric1    // 1983 Oric 1
1015orica    // 1984 Oric Atmos
1016prav8d   // 1985 Pravetz 8D
1017prav8dd   // 1989 Pravetz 8D (Disk ROM)
1018telstrat  // ??? Oric Telestrat/Stratos
10191019
10201020// Philips
1021p2000t   // 1980 P2000T   
1022p2000m   // 1980 P2000M   
1023videopac  // 1979 Videopac G7000/C52   
1024g7400    // 1983 Videopac Plus G7400   
1025vg5k     // 1984 VG-5000   
1021p2000t   // 1980 P2000T
1022p2000m   // 1980 P2000M
1023videopac  // 1979 Videopac G7000/C52
1024g7400    // 1983 Videopac Plus G7400
1025vg5k     // 1984 VG-5000
10261026
10271027// Brandt
1028jopac   // 19?? Jopac JO7400   
1028jopac   // 19?? Jopac JO7400
10291029
10301030// Compukit
10311031uk101
r11247r11248
10361036c1pmf
10371037
10381038// ASCII & Microsoft
1039msx      // 1983 MSX 
1039msx      // 1983 MSX
10401040ax170
10411041canonv10
10421042canonv20
1043dpc100   // 1984 MSX Korea     
1044dpc180   // 1984 MSX Korea     
1045dpc200   // 1984 MSX Korea     
1043dpc100   // 1984 MSX Korea
1044dpc180   // 1984 MSX Korea
1045dpc200   // 1984 MSX Korea
10461046gsfc200
1047expert10  // 1983 MSX Brazil   
1048expert11  // 1984 MSX Brazil   
1049expert13  // 1984 MSX Brazil   
1050expertdp  // 1985 MSX Brazil   
1051expertpl  // 1984 MSX Brazil   
1047expert10  // 1983 MSX Brazil
1048expert11  // 1984 MSX Brazil
1049expert13  // 1984 MSX Brazil
1050expertdp  // 1985 MSX Brazil
1051expertpl  // 1984 MSX Brazil
10521052jvchc7gb
10531053mlf80
10541054mlfx1
1055cf1200   // 1984 MSX Japan     
1056cf2000   // 1983 MSX Japan     
1057cf2700   // 1984 MSX Japan     
1058cf3000   // 1984 MSX Japan     
1059cf3300   // 1985 MSX Japan     
1060fs1300   // 1985 MSX Japan     
1061fs4000   // 1985 MSX Japan     
1055cf1200   // 1984 MSX Japan
1056cf2000   // 1983 MSX Japan
1057cf2700   // 1984 MSX Japan
1058cf3000   // 1984 MSX Japan
1059cf3300   // 1985 MSX Japan
1060fs1300   // 1985 MSX Japan
1061fs4000   // 1985 MSX Japan
10621062nms801
10631063vg8000
10641064vg8010
10651065vg8010f
10661066vg802000
1067vg802020  // 1985 MSX
1067vg802020  // 1985 MSX
10681068piopx7
10691069mpc100
1070hotbit11  // 1985 MSX Brazil   
1071hotbit12  // 1985 MSX Brazil   
1072hotbi13b  // 1985 MSX Brazil   
1073hotbi13p  // 1985 MSX Brazil   
1074hotbit20  // 1986 MSX2 Brazil
1070hotbit11  // 1985 MSX Brazil
1071hotbit12  // 1985 MSX Brazil
1072hotbi13b  // 1985 MSX Brazil
1073hotbi13p  // 1985 MSX Brazil
1074hotbit20  // 1986 MSX2 Brazil
10751075hb10p
10761076hb20p
1077hb201    // 1985 MSX Japan   
1078hb201p   // 1985 MSX
1079hb501p   // 1984 MSX
1080hb55d    // 1983 MSX Germany   
1081hb55p    // 1983 MSX   
1082hb75d    // 1983 MSX Germany   
1083hb75p    // 1983 MSX   
1084svi728   // 1985 MSX
1085svi738   // 1985 MSX
1086svi738sw  // 1985 MSX
1077hb201    // 1985 MSX Japan
1078hb201p   // 1985 MSX
1079hb501p   // 1984 MSX
1080hb55d    // 1983 MSX Germany
1081hb55p    // 1983 MSX
1082hb75d    // 1983 MSX Germany
1083hb75p    // 1983 MSX
1084svi728   // 1985 MSX
1085svi738   // 1985 MSX
1086svi738sw  // 1985 MSX
10871087tadpc200
10881088tadpc20a
1089hx10     // 1984 MSX   
1090hx10s    // 1984 MSX   
1091hx20     // 1984 MSX   
1089hx10     // 1984 MSX
1090hx10s    // 1984 MSX
1091hx20     // 1984 MSX
10921092cx5m
10931093cx5m128
10941094cx5m2
r11247r11248
11021102bruc100
11031103
11041104
1105msx2     // 1985 MSX2
1105msx2     // 1985 MSX2
11061106ax350
11071107ax370
1108hbf9p    // 1985 MSX2 
1109hbf9s    // 1985 MSX2 
1110hbf500p   // 1985 MSX2   
1111hbf700d   // 1985 MSX2 Germany   
1112hbf700f   // 1985 MSX2   
1113hbf700p   // 1985 MSX2   
1114hbf700s   // 1985 MSX2 Spain   
1115hbg900ap  // 1986 MSX2   
1116hbg900p   // 1986 MSX2   
1117nms8220   // 1986 MSX2   
1118nms8220a  // 1986 MSX2   
1119vg8230   // 1986 MSX2   
1120vg8235   // 1986 MSX2   
1121vg8235f   // 1986 MSX2   
1122vg8240 // 1986 MSX2   
1123nms8245   // 1986 MSX2   
1124nms8245f   // 1986 MSX2   
1125nms8250   // 1986 MSX2   
1126nms8255   // 1986 MSX2   
1127nms8280   // 1986 MSX2   
1128nms8280g   // 1986 MSX2   
1129tpc310   // 1986 MSX2   
1108hbf9p    // 1985 MSX2
1109hbf9s    // 1985 MSX2
1110hbf500p   // 1985 MSX2
1111hbf700d   // 1985 MSX2 Germany
1112hbf700f   // 1985 MSX2
1113hbf700p   // 1985 MSX2
1114hbf700s   // 1985 MSX2 Spain
1115hbg900ap  // 1986 MSX2
1116hbg900p   // 1986 MSX2
1117nms8220   // 1986 MSX2
1118nms8220a  // 1986 MSX2
1119vg8230   // 1986 MSX2
1120vg8235   // 1986 MSX2
1121vg8235f   // 1986 MSX2
1122vg8240 // 1986 MSX2
1123nms8245   // 1986 MSX2
1124nms8245f   // 1986 MSX2
1125nms8250   // 1986 MSX2
1126nms8255   // 1986 MSX2
1127nms8280   // 1986 MSX2
1128nms8280g   // 1986 MSX2
1129tpc310   // 1986 MSX2
11301130hx23      // 1986 MSX2
1131hx23f   // 1986 MSX2     
1131hx23f   // 1986 MSX2
11321132cx7m      // 1986 MSX2
1133cx7m128   // 1986 MSX2   
1134fs5500   // 1985 MSX2 Japan   
1135fs4500   // 1986 MSX2 Japan   
1136fs4700   // 1986 MSX2 Japan   
1137fs5000   // 1986 MSX2 Japan   
1138fs4600   // 1986 MSX2 Japan   
1139fsa1     // 1986 MSX2 Japan     
1140fsa1a    // 1986 MSX2 Japan 
1141fsa1mk2   // 1987 MSX2 Japan   
1142fsa1f    // 1987 MSX2 Japan 
1143fsa1fm   // 1988 MSX2 Japan   
1144hbf500   // 1986 MSX2 Japan   
1145hbf900   // 1986 MSX2 Japan   
1146hbf900a   // 1986 MSX2 Japan   
1147hbf1     // 1986 MSX2 Japan     
1148hbf12    // 1987 MSX2 Japan 
1149hbf1xd   // 1987 MSX2 Japan   
1150hbf1xdm2  // 1988 MSX2 Japan   
1151phc23    // 1986 MSX2 Japan 
1152cpc300   // 1986 MSX2 Korea   
1153cpc300e   // 1986 MSX2 Korea   
1154cpc400   // 1986 MSX2 Korea   
1155cpc400s   // 1986 MSX2 Korea   
1156expert20 // 1986 MSX2 Korea   
1133cx7m128   // 1986 MSX2
1134fs5500   // 1985 MSX2 Japan
1135fs4500   // 1986 MSX2 Japan
1136fs4700   // 1986 MSX2 Japan
1137fs5000   // 1986 MSX2 Japan
1138fs4600   // 1986 MSX2 Japan
1139fsa1     // 1986 MSX2 Japan
1140fsa1a    // 1986 MSX2 Japan
1141fsa1mk2   // 1987 MSX2 Japan
1142fsa1f    // 1987 MSX2 Japan
1143fsa1fm   // 1988 MSX2 Japan
1144hbf500   // 1986 MSX2 Japan
1145hbf900   // 1986 MSX2 Japan
1146hbf900a   // 1986 MSX2 Japan
1147hbf1     // 1986 MSX2 Japan
1148hbf12    // 1987 MSX2 Japan
1149hbf1xd   // 1987 MSX2 Japan
1150hbf1xdm2  // 1988 MSX2 Japan
1151phc23    // 1986 MSX2 Japan
1152cpc300   // 1986 MSX2 Korea
1153cpc300e   // 1986 MSX2 Korea
1154cpc400   // 1986 MSX2 Korea
1155cpc400s   // 1986 MSX2 Korea
1156expert20 // 1986 MSX2 Korea
11571157
1158msx2p    // 1988 MSX2+ Japan   
1159fsa1fx   // 1988 MSX2+ Japan
1160fsa1wx   // 1988 MSX2+ Japan
1161fsa1wxa   // 1988 MSX2+ Japan
1162fsa1wsx   // 1989 MSX2+ Japan
1163hbf1xdj   // 1988 MSX2+ Japan
1164hbf1xv   // 1989 MSX2+ Japan
1165phc70fd   // 1988 MSX2+ Japan
1166phc70fd2  // 1988 MSX2+ Japan
1167phc35j   // 1989 MSX2+ Japan
1158msx2p    // 1988 MSX2+ Japan
1159fsa1fx   // 1988 MSX2+ Japan
1160fsa1wx   // 1988 MSX2+ Japan
1161fsa1wxa   // 1988 MSX2+ Japan
1162fsa1wsx   // 1989 MSX2+ Japan
1163hbf1xdj   // 1988 MSX2+ Japan
1164hbf1xv   // 1989 MSX2+ Japan
1165phc70fd   // 1988 MSX2+ Japan
1166phc70fd2  // 1988 MSX2+ Japan
1167phc35j   // 1989 MSX2+ Japan
11681168
11691169
11701170// NASCOM Microcomputers
1171nascom1   // 1978 Nascom 1   
1172nascom2   // 1979 Nascom 2   
1171nascom1   // 1978 Nascom 1
1172nascom2   // 1979 Nascom 2
11731173
11741174// Miles Gordon Technology
1175samcoupe  // 1989 Sam Coupe     
1175samcoupe  // 1989 Sam Coupe
11761176
11771177// Motorola
1178mekd2    // 1977 Motorola Evaluation Kit   
1178mekd2    // 1977 Motorola Evaluation Kit
11791179
11801180// DEC
1181pdp1     // 1961 DEC PDP1
1181pdp1     // 1961 DEC PDP1
11821182vt100 // 1978 Digital Equipment Corporation
11831183//vt100wp // 1978 Digital Equipment Corporation
11841184//vt100stp // 1978 Digital Equipment Corporation
r11247r11248
11991199mc7105 // Elektronika MC7105
12001200
12011201// Memotech
1202mtx512   // 1983 Memotech MTX 512   
1203mtx500   // 1983 Memotech MTX 500   
1204rs128    // 1984 Memotech RS 128   
1202mtx512   // 1983 Memotech MTX 512
1203mtx500   // 1983 Memotech MTX 500
1204rs128    // 1984 Memotech RS 128
12051205
12061206// Mattel
1207intvkbd   // 1981 - Mattel Intellivision Keyboard Component 
1208// (Test marketed, later recalled)   
1209aquarius  // 1983 Aquarius   
1210aquarius_qd  // 1983 Aquarius w/ Quick Disk     
1211//  aquariu2  // 1984 Aquarius II
1207intvkbd   // 1981 - Mattel Intellivision Keyboard Component
1208// (Test marketed, later recalled)
1209aquarius  // 1983 Aquarius
1210aquarius_qd  // 1983 Aquarius w/ Quick Disk
1211//  aquariu2  // 1984 Aquarius II
12121212
12131213// Exidy, Inc.
1214sorcerer    // Sorcerer   
1214sorcerer    // Sorcerer
12151215
12161216// Galaksija
12171217galaxy
12181218galaxyp
12191219
12201220// Lviv/L'vov
1221lviv     // Lviv/L'vov   
1221lviv     // Lviv/L'vov
12221222
12231223// Tesla
1224pmd851   // PMD-85.1
1225pmd852   // PMD-85.2
1226pmd852a   // PMD-85.2A   
1227pmd852b   // PMD-85.2B   
1228pmd853   // PMD-85.3
1224pmd851   // PMD-85.1
1225pmd852   // PMD-85.2
1226pmd852a   // PMD-85.2A
1227pmd852b   // PMD-85.2B
1228pmd853   // PMD-85.3
12291229
12301230// Didaktik
1231alfa     // Alfa (PMD-85.1 clone)
1231alfa     // Alfa (PMD-85.1 clone)
12321232
12331233// Statny
1234mato     // Mato (PMD-85.2 clone)
1234mato     // Mato (PMD-85.2 clone)
12351235
12361236// Zbrojovka Brno
1237c2717    // Consul 2717 (PMD-85.2 clone)   
1238c2717pmd  // Consul 2717 with PMD-32   
1237c2717    // Consul 2717 (PMD-85.2 clone)
1238c2717pmd  // Consul 2717 with PMD-32
12391239
12401240// Microkey
1241primoa32  // Primo A-32     
1242primoa48  // Primo A-48     
1243primoa64  // Primo A-64     
1244primob32  // Primo B-32     
1245primob48  // Primo B-48     
1246primob64  // Primo B-64     
1247primoc64  // Primo C-64     
1241primoa32  // Primo A-32
1242primoa48  // Primo A-48
1243primoa64  // Primo A-64
1244primob32  // Primo B-32
1245primob48  // Primo B-48
1246primob64  // Primo B-64
1247primoc64  // Primo C-64
12481248
12491249// Team Concepts
12501250// CPU not known, else should be easy, look into drivers/comquest.c
1251comquest  // Comquest Plus German
1251comquest  // Comquest Plus German
12521252
12531253// Hewlett Packard
12541254hp38g
r11247r11248
12641264hp9816
12651265
12661266// SpectraVideo
1267svi318   // SVI-318 (PAL)   
1268svi318n   // SVI-318 (NTSC)   
1269svi328   // SVI-328 (PAL)   
1270svi328n   // SVI-328 (NTSC)     
1271sv328p80  // SVI-328 (PAL) + SVI-806 80 column card     
1272sv328n80  // SVI-328 (NTSC) + SVI-806 80 column card   
1267svi318   // SVI-318 (PAL)
1268svi318n   // SVI-318 (NTSC)
1269svi328   // SVI-328 (PAL)
1270svi328n   // SVI-328 (NTSC)
1271sv328p80  // SVI-328 (PAL) + SVI-806 80 column card
1272sv328n80  // SVI-328 (NTSC) + SVI-806 80 column card
12731273
12741274// Andrew Donald Booth (this is the name of the designer, not a company)
12751275//  apexc53   // 1951(?) APEXC: All-Purpose Electronic X-ray Computer
12761276apexc    // 1955(?) APEXC: All-Purpose Electronic X-ray Computer
12771277
12781278// Corvus
1279concept    // 1982 Corvus Concept 
1279concept    // 1982 Corvus Concept
12801280
12811281// DAI
1282dai    // DAI 
1282dai    // DAI
12831283
12841284// Telenova
1285compis     // 1985 Telenova Compis   
1286compis2    // 1985 Telenova Compis   
1285compis     // 1985 Telenova Compis
1286compis2    // 1985 Telenova Compis
12871287
12881288// Multitech
1289mpf1   // 1979 Multitech Micro Professor 1
1289mpf1   // 1979 Multitech Micro Professor 1
12901290mpf1b      // 1979 Multitech Micro Professor 1B
12911291
12921292// Telercas Oy
r11247r11248
13011301nano
13021302
13031303// MIT
1304tx0_64kw  // April 1956 MIT TX-0 (64kw RAM)     
1305tx0_8kw   // 1962 MIT TX-0 (8kw RAM)   
1304tx0_64kw  // April 1956 MIT TX-0 (64kw RAM)
1305tx0_8kw   // 1962 MIT TX-0 (8kw RAM)
13061306
13071307// Luxor Datorer AB
13081308abc80
r11247r11248
13131313abc1600
13141314
13151315// Be Incorporated
1316bebox    // BeBox Dual603-66   
1317bebox2   // BeBox Dual603-133   
1316bebox    // BeBox Dual603-66
1317bebox2   // BeBox Dual603-133
13181318
13191319// Tiger Electronics
1320gamecom   // Tiger Game.com     
1320gamecom   // Tiger Game.com
13211321
13221322// Tiger Telematics
13231323gizmondo
13241324
13251325// Thomson
1326t9000    // 1980 Thomson T9000 (TO7 prototype)   
1327to7      // 1982 Thomson TO7 
1328to770    // 1984 Thomson TO7/70 
1329to770a   // 198? Thomson TO7/70 arabic version     
1330mo5      // 1984 Thomson MO5 
1331mo5e     // 1986 Thomson MO5E (export version)   
1332to9      // 1985 Thomson T09 
1333to8      // 1986 Thomson T08 
1334to8d     // 1987 Thomson T08D
1335to9p     // 1986 Thomson T09+
1336mo6      // 1986 Thomson MO6 
1337mo5nr    // 1986 Thomson MO5 NR 
1338pro128   // 1986 Olivetti Prodest PC 128
1326t9000    // 1980 Thomson T9000 (TO7 prototype)
1327to7      // 1982 Thomson TO7
1328to770    // 1984 Thomson TO7/70
1329to770a   // 198? Thomson TO7/70 arabic version
1330mo5      // 1984 Thomson MO5
1331mo5e     // 1986 Thomson MO5E (export version)
1332to9      // 1985 Thomson T09
1333to8      // 1986 Thomson T08
1334to8d     // 1987 Thomson T08D
1335to9p     // 1986 Thomson T09+
1336mo6      // 1986 Thomson MO6
1337mo5nr    // 1986 Thomson MO5 NR
1338pro128   // 1986 Olivetti Prodest PC 128
13391339
13401340// Cybiko, Inc.
13411341cybikov1  // Cybiko Wireless Intertainment System - Classic V1
13421342cybikov2  // Cybiko Wireless Intertainment System - Classic V2
1343cybikoxt  // Cybiko Wireless Intertainment System - Xtreme   
1343cybikoxt  // Cybiko Wireless Intertainment System - Xtreme
13441344
13451345// Dick Smith
13461346super80
r11247r11248
14571457// Spectrum clones
14581458
14591459// ICE-Felix
1460hc85   // 1985 HC-85     
1461hc88   // 1988 HC-88     
1462hc90   // 1990 HC-90     
1463hc91   // 1991 HC-91     
1464hc128   // 1991 HC-128     
1465hc2000  // 1992 HC-2000   
1460hc85   // 1985 HC-85
1461hc88   // 1988 HC-88
1462hc90   // 1990 HC-90
1463hc91   // 1991 HC-91
1464hc128   // 1991 HC-128
1465hc2000  // 1992 HC-2000
14661466
14671467cobrasp
14681468cobra80
14691469
1470cip01   // 1987 CIP-01     
1471cip03   // 1988 CIP-03     
1472jet    // 1990 JET   
1470cip01   // 1987 CIP-01
1471cip03   // 1988 CIP-03
1472jet    // 1990 JET
14731473
14741474// Didaktik Skalica
1475dgama87  // 1987 Didaktik Gama 87   
1476dgama88  // 1988 Didaktik Gama 88   
1477dgama89  // 1989 Didaktik Gama 89   
1478didakt90 // 1990 Didaktik Skalica 90     
1479didakm91 // 1991 Didaktik M 91
1480didaktk  // 1992 Didaktik Kompakt   
1481didakm93 // 1993 Didaktik M 93
1475dgama87  // 1987 Didaktik Gama 87
1476dgama88  // 1988 Didaktik Gama 88
1477dgama89  // 1989 Didaktik Gama 89
1478didakt90 // 1990 Didaktik Skalica 90
1479didakm91 // 1991 Didaktik M 91
1480didaktk  // 1992 Didaktik Kompakt
1481didakm93 // 1993 Didaktik M 93
14821482
1483mistrum // 1988 Mistrum     
1483mistrum // 1988 Mistrum
14841484
14851485// Russian clones
1486blitzs    // 1990 Blic   
1487byte     // 1990 Byte 
1488orizon   // 199? Orizon-Micro   
1489quorum48  // 1993 Kvorum 48K   
1490magic6   // 1993 Magic 6 
1491compani1  // 1990 Kompanion 1 
1486blitzs    // 1990 Blic
1487byte     // 1990 Byte
1488orizon   // 199? Orizon-Micro
1489quorum48  // 1993 Kvorum 48K
1490magic6   // 1993 Magic 6
1491compani1  // 1990 Kompanion 1
14921492spektrbk  // 1990 Spektr BK-001
14931493zvezda  // 1990 Zvezda
14941494
14951495// Kramer
1496kramermc   // 1987 Kramer MC 
1496kramermc   // 1987 Kramer MC
14971497
14981498// AC1
1499ac1    // 1984 Amateurcomputer AC1   
1500ac1_32  // 1984 Amateurcomputer AC1 (32 lines)
1501ac1scch // 1984 Amateurcomputer AC1 SCCH   
1499ac1    // 1984 Amateurcomputer AC1
1500ac1_32  // 1984 Amateurcomputer AC1 (32 lines)
1501ac1scch // 1984 Amateurcomputer AC1 SCCH
15021502
1503pcm   // PC/M Mugler   
1503pcm   // PC/M Mugler
15041504
15051505// Ei Nis
15061506pecom64
r11247r11248
15581558
15591559// Nakajima manufactured eletronic typewriters
15601560es210_es
1561drwrt200  // 199? NTS DreamWriter T200   
1562drwrt400  // 1996 NTS DreamWriter T400   
1563wales210  // 199? Walther ES-210 (German) 
1564dator3k   // 199? Dator 3000 (Spanish)   
1561drwrt200  // 199? NTS DreamWriter T200
1562drwrt400  // 1996 NTS DreamWriter T400
1563wales210  // 199? Walther ES-210 (German)
1564dator3k   // 199? Dator 3000 (Spanish)
15651565
15661566// Fujitsu
15671567fm7
r11247r11248
15971597
15981598//***************Games******************************************************
15991599// Computer Electronic
1600mk1      // Chess Champion MK I   
1600mk1      // Chess Champion MK I
16011601// Quelle International
1602mk2      // Chess Champion MK II 
1602mk2      // Chess Champion MK II
16031603
16041604// Novag
1605ssystem3  // Chess Champion Super System III / MK III
1605ssystem3  // Chess Champion Super System III / MK III
16061606supercon
16071607
16081608// Hegener & Glaser Munich
1609//  mephisto  // Mephisto
1609//  mephisto  // Mephisto
16101610mm2       // Mephisto 2
1611mm4       // Mephisto 4     
1612//   mm4tk       // Mephisto 4 Turbo Kit
1613mm5       // Mephisto 5.1 ROM 
1614mm5tk       // Mephisto 5.1 ROM Turbo Kit Speed 
1615mm50      // Mephisto 5.0 ROM   
1616rebel5    // Mephisto 5     
1617glasgow       // Glasgow   
1611mm4       // Mephisto 4
1612//   mm4tk       // Mephisto 4 Turbo Kit
1613mm5       // Mephisto 5.1 ROM
1614mm5tk       // Mephisto 5.1 ROM Turbo Kit Speed
1615mm50      // Mephisto 5.0 ROM
1616rebel5    // Mephisto 5
1617glasgow       // Glasgow
16181618amsterd       // Amsterdam
1619dallas    // Dallas     
1620dallas16      // Dallas   
1621dallas32      // Dallas   
1622roma      // Roma   
1623roma32    // Roma
1624polgar      // Polgar   
1625milano      // Milano   
1619dallas    // Dallas
1620dallas16      // Dallas
1621dallas32      // Dallas
1622roma      // Roma
1623roma32    // Roma
1624polgar      // Polgar
1625milano      // Milano
16261626
16271627
16281628// JAKKS Pacific, Inc. / HotGen, Ltd.
src/mess/formats/d88_dsk.c
r11247r11248
278278   floppy_image_read(floppy,header,0,D88_HEADER_LEN);
279279
280280#ifdef SPOT_DUPLICATES
281      // there exist many .d88 files with same data and different headers and
281      // there exist many .d88 files with same data and different headers and
282282      // this allows to spot duplicates, making easier to debug softlists.
283283      UINT32 temp_size = floppy_image_size(floppy);
284284      UINT8 tmp_copy[temp_size - D88_HEADER_LEN];
src/mess/formats/ap_dsk35.c
r11247r11248
5555        761     pad byte where head is turned off (0xFF here)
5656
5757    MFM Track layout for 1440K disks:
58       Pos   
59   --------- track ID
60   0   0x4E (x80)
61   80   00 (x12)
62   92   C2 (x3) Mark byte
63   93   FC Index mark
64   94   4E (x50)
65   --------- sector ID
66   144   00 (x12)
67   156   A1 (x3) Mark byte
68   159   FE Address mark
69   160   xx Track number
70   161   xx Side number
71   162   xx Sector number
72   163   xx Sector length
73   164/165   xx CRC
74   166   4E (x22)
75   --------- sector data
76   188   00 (x12)
77   200   A1 (x3) Mark byte
78   203   FB Data address mark
79   204   xx (x256) data
80   460   4E (x54)
81   (repeat from sector ID to fill track; end of track is padded with 4E)
58        Pos
59    --------- track ID
60    0   0x4E (x80)
61    80  00 (x12)
62    92  C2 (x3) Mark byte
63    93  FC Index mark
64    94  4E (x50)
65    --------- sector ID
66    144 00 (x12)
67    156 A1 (x3) Mark byte
68    159 FE Address mark
69    160 xx Track number
70    161 xx Side number
71    162 xx Sector number
72    163 xx Sector length
73    164/165 xx CRC
74    166 4E (x22)
75    --------- sector data
76    188 00 (x12)
77    200 A1 (x3) Mark byte
78    203 FB Data address mark
79    204 xx (x256) data
80    460 4E (x54)
81    (repeat from sector ID to fill track; end of track is padded with 4E)
8282
8383    Note : "Self synch refers to a technique whereby two zeroes are inserted
8484    between each synch byte written to the disk.", i.e. "0xFF, 0xFF, 0xFF,
r11247r11248
476476static floperr_t apple35_read_sector(floppy_image *floppy, int head, int track, int sector, void *buffer, size_t buflen)
477477{
478478   UINT32 data_offset;
479//   printf("Read sector: T %d S %d H %d\n", track, sector, head);
479//  printf("Read sector: T %d S %d H %d\n", track, sector, head);
480480   data_offset = apple35_get_offset(floppy, head, track, sector, NULL);
481481   if (data_offset == ~0)
482482      return FLOPPY_ERROR_SEEKERROR;
r11247r11248
506506
507507   assert(buflen == 524);
508508
509//   printf("Read sector TD: T %d S %d H %d\n", track, sector, head);
509//  printf("Read sector TD: T %d S %d H %d\n", track, sector, head);
510510
511511   /* first read the sector */
512512   err = apple35_read_sector(floppy, head, track, sector, ((UINT8 *) buffer) + 12, 512);
src/mess/formats/timex_dck.c
r11247r11248
114114DEVICE_IMAGE_UNLOAD( timex_cart )
115115{
116116   if (timex_cart.data)
117     {
117   {
118118      free (timex_cart.data);
119119      timex_cart.data = NULL;
120120   }
src/mess/mess.mak
r11247r11248
14401440   $(MESS_DRIVERS)/psx.o      \
14411441   $(MESS_MACHINE)/psxcd.o      \
14421442   $(MESS_MACHINE)/psxcddrv.o   \
1443   $(MESS_MACHINE)/psxcard.o     \
1443   $(MESS_MACHINE)/psxcard.o   \
14441444   $(MESS_DRIVERS)/pockstat.o   \
14451445   $(MESS_DRIVERS)/smc777.o   \
14461446
src/mess/drivers/dgn_beta.c
r11247r11248
334334   MCFG_SCREEN_VISIBLE_AREA(0, 699, 0, 549)
335335   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
336336   MCFG_SCREEN_UPDATE( dgnbeta )
337   
337
338338   MCFG_GFXDECODE(dgnbeta)
339339   MCFG_PALETTE_LENGTH(ARRAY_LENGTH(dgnbeta_palette) / 3)
340340   MCFG_PALETTE_INIT( dgnbeta )
src/mess/drivers/homelab.c
r11247r11248
228228
229229/* Driver */
230230
231/*    YEAR  NAME         PARENT  COMPAT  MACHINE     INPUT      INIT      COMPANY                 FULLNAME   FLAGS */
231/*    YEAR  NAME        PARENT  COMPAT  MACHINE     INPUT      INIT      COMPANY                 FULLNAME   FLAGS */
232232COMP( 1982, homelab2,   0   ,    0,    homelab,   homelab,   homelab, "Jozsef and Endre Lukacs", "Homelab 2 / Aircomp 16",       GAME_NOT_WORKING | GAME_NO_SOUND)
233233COMP( 1983, homelab3,   homelab2,0,    homelab3,   homelab,   homelab, "Jozsef and Endre Lukacs", "Homelab 3",       GAME_NOT_WORKING | GAME_NO_SOUND)
234234COMP( 1984, homelab4,   homelab2,0,    homelab3,   homelab,   homelab, "Jozsef and Endre Lukacs", "Homelab 4",       GAME_NOT_WORKING | GAME_NO_SOUND)
src/mess/drivers/pc8401a.c
r11247r11248
1818    - 8255 ports
1919    - MC6845 palette
2020    - MC6845 chargen ROM
21   - MC6845 screen update
21    - MC6845 screen update
2222
2323    - peripherals
2424        * PC-8431A Dual Floppy Drive
r11247r11248
6464static TIMER_DEVICE_CALLBACK( pc8401a_keyboard_tick )
6565{
6666   pc8401a_state *state = timer.machine().driver_data<pc8401a_state>();
67   
67
6868   state->scan_keyboard();
6969}
7070
r11247r11248
644644
645645   /* video hardware */
646646   MCFG_FRAGMENT_ADD(pc8500_video)
647   
647
648648   /* option ROM cartridge */
649649   MCFG_CARTSLOT_ADD("cart")
650650   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
src/mess/drivers/pc9801.c
r11247r11248
1313    - floppy disk hook-up;
1414    - POR mechanism isn't fully understood;
1515    - extra features;
16   - clean-up duplicating code;
16    - clean-up duplicating code;
1717
18   TODO (PC-9821):
19   - "set the software dip-switch" warning;
20   - asserts with i386: Invalid REP/opcode 40 combination, this is because POR bit mustn't be
21     setted to off
18    TODO (PC-9821):
19    - "set the software dip-switch" warning;
20    - asserts with i386: Invalid REP/opcode 40 combination, this is because POR bit mustn't be
21      setted to off
2222
2323========================================================================================
2424
r11247r11248
283283
284284   /* PC9801RS specific */
285285   UINT8 m_gate_a20; //A20 line
286   UINT8 m_por;       //Power-On Reset
286   UINT8 m_por;      //Power-On Reset
287287   UINT8 m_rom_bank;
288288   UINT8 m_fdc_ctrl;
289289   UINT32 m_ram_size;
r11247r11248
12281228   else if(offset >= 0x000a8000 && offset <= 0x000bffff)                   { pc9801_gvram_w(space,offset-0xa8000,data);           }
12291229   else if(offset >= 0x00100000 && offset <= 0x00100000+state->m_ram_size-1) { pc9801rs_ex_wram_w(space,offset-0x00100000,data);    }
12301230   //else
1231   //   printf("%08x %08x\n",offset,data);
1231   //  printf("%08x %08x\n",offset,data);
12321232
12331233}
12341234
r11247r11248
12421242static WRITE8_HANDLER( pc9810rs_fdc_ctrl_w )
12431243{
12441244   /*
1245   ---- x--- ready line?
1246   ---- --x- select type (1) 2hd (0) 2dd
1247   ---- ---x select irq
1248   */
1245    ---- x--- ready line?
1246    ---- --x- select type (1) 2hd (0) 2dd
1247    ---- ---x select irq
1248    */
12491249   pc9801_state *state = space->machine().driver_data<pc9801_state>();
12501250
12511251   state->m_fdc_ctrl = data;
r11247r11248
12861286
12871287static READ8_HANDLER( pc9801rs_2dd_r )
12881288{
1289//   pc9801_state *state = space->machine().driver_data<pc9801_state>();
1289//  pc9801_state *state = space->machine().driver_data<pc9801_state>();
12901290
1291//   if(state->m_fdc_ctrl & 1)
1292//      return 0xff;
1291//  if(state->m_fdc_ctrl & 1)
1292//      return 0xff;
12931293
12941294   if((offset & 1) == 0)
12951295   {
r11247r11248
13081308
13091309static WRITE8_HANDLER( pc9801rs_2dd_w )
13101310{
1311//   pc9801_state *state = space->machine().driver_data<pc9801_state>();
1311//  pc9801_state *state = space->machine().driver_data<pc9801_state>();
13121312
1313//   if(state->m_fdc_ctrl & 1)
1314//      return;
1313//  if(state->m_fdc_ctrl & 1)
1314//      return;
13151315
13161316   if((offset & 1) == 0)
13171317   {
r11247r11248
14811481   AM_RANGE(0x0064, 0x0067) AM_WRITE8(                        pc9801_vrtc_mask_w, 0xffffffff)
14821482   AM_RANGE(0x0068, 0x006b) AM_WRITE8(                        pc9821_video_ff_w,  0xffffffff) //mode FF / <undefined>
14831483   AM_RANGE(0x0070, 0x007b) AM_READWRITE8(pc9801_70_r,        pc9801_70_w,        0xffffffff) //display registers "GRCG" / i8253 pit
1484//   AM_RANGE(0x0080, 0x0083) SASI interface / <undefined>
1484//  AM_RANGE(0x0080, 0x0083) SASI interface / <undefined>
14851485   AM_RANGE(0x0090, 0x0097) AM_READWRITE8(pc9801rs_2hd_r,     pc9801rs_2hd_w,     0xffffffff)
14861486   AM_RANGE(0x00a0, 0x00af) AM_READWRITE8(pc9821_a0_r,        pc9821_a0_w,        0xffffffff) //upd7220 bitmap ports / display registers
1487//   AM_RANGE(0x00b0, 0x00b3) PC9861k (serial port?)
1488//   AM_RANGE(0x00b9, 0x00b9) PC9861k
1489//   AM_RANGE(0x00bb, 0x00bb) PC9861k
1487//  AM_RANGE(0x00b0, 0x00b3) PC9861k (serial port?)
1488//  AM_RANGE(0x00b9, 0x00b9) PC9861k
1489//  AM_RANGE(0x00bb, 0x00bb) PC9861k
14901490   AM_RANGE(0x00bc, 0x00bf) AM_READWRITE8(pc9810rs_fdc_ctrl_r,pc9810rs_fdc_ctrl_w,0xffffffff)
14911491   AM_RANGE(0x00c8, 0x00cf) AM_READWRITE8(pc9801rs_2dd_r,     pc9801rs_2dd_w,     0xffffffff)
1492//   AM_RANGE(0x00d8, 0x00df) AMD98 (sound?) board
1492//  AM_RANGE(0x00d8, 0x00df) AMD98 (sound?) board
14931493   AM_RANGE(0x00f0, 0x00ff) AM_READWRITE8(pc9801rs_f0_r,      pc9801rs_f0_w,      0xffffffff)
1494//   AM_RANGE(0x0188, 0x018b) YM2203 OPN board / <undefined>
1495//   AM_RANGE(0x018c, 0x018f) YM2203 OPN extended ports / <undefined>
1496//   AM_RANGE(0x0430, 0x0430) IDE bank register
1497//   AM_RANGE(0x0432, 0x0432) IDE bank register (mirror)
1498//   AM_RANGE(0x0439, 0x0439) ROM/RAM bank (NEC)
1499//   AM_RANGE(0x043d, 0x043d) ROM/RAM bank (NEC)
1494//  AM_RANGE(0x0188, 0x018b) YM2203 OPN board / <undefined>
1495//  AM_RANGE(0x018c, 0x018f) YM2203 OPN extended ports / <undefined>
1496//  AM_RANGE(0x0430, 0x0430) IDE bank register
1497//  AM_RANGE(0x0432, 0x0432) IDE bank register (mirror)
1498//  AM_RANGE(0x0439, 0x0439) ROM/RAM bank (NEC)
1499//  AM_RANGE(0x043d, 0x043d) ROM/RAM bank (NEC)
15001500   AM_RANGE(0x043c, 0x043f) AM_WRITE8(                        pc9801rs_bank_w,    0xffffffff) //ROM/RAM bank (EPSON)
1501//   AM_RANGE(0x04a0, 0x04af) EGC
1502//   AM_RANGE(0x04be, 0x04be) FDC "RPM" register
1503//   AM_RANGE(0x0642, 0x064f) IDE registers / <undefined>
1504//   AM_RANGE(0x074c, 0x074f) IDE status (r) - IDE control registers (w) / <undefined>
1505//   AM_RANGE(0x08e0, 0x08ea) <undefined> / EMM SIO registers
1506//   AM_RANGE(0x09a0, 0x09a0) GDC extended register r/w
1507//   AM_RANGE(0x09a8, 0x09a8) GDC 31KHz register r/w
1508//   AM_RANGE(0x0c07, 0x0c07) EPSON register w
1509//   AM_RANGE(0x0c03, 0x0c03) EPSON register 0 r
1510//   AM_RANGE(0x0c13, 0x0c14) EPSON register 1 r
1511//   AM_RANGE(0x0c24, 0x0c24) cs4231 PCM board register control
1512//   AM_RANGE(0x0c2b, 0x0c2b) cs4231 PCM board low byte control
1513//   AM_RANGE(0x0c2d, 0x0c2d) cs4231 PCM board hi byte control
1514//   AM_RANGE(0x0cc0, 0x0cc7) SCSI interface / <undefined>
1515//   AM_RANGE(0x0cfc, 0x0cff) PCI bus
1516//   AM_RANGE(0x3fd8, 0x3fdf) <undefined> / pit mirror ports
1517//   AM_RANGE(0x7fd8, 0x7fdf) <undefined> / mouse ppi8255 ports
1518//   AM_RANGE(0xa460, 0xa46f) cs4231 PCM extended port / <undefined>
1519//   AM_RANGE(0xbfdb, 0xbfdb) mouse timing port
1520//   AM_RANGE(0xc0d0, 0xc0d3) MIDI port, option 0 / <undefined>
1521//   AM_RANGE(0xc4d0, 0xc4d3) MIDI port, option 1 / <undefined>
1522//   AM_RANGE(0xc8d0, 0xc8d3) MIDI port, option 2 / <undefined>
1523//   AM_RANGE(0xccd0, 0xccd3) MIDI port, option 3 / <undefined>
1524//   AM_RANGE(0xd0d0, 0xd0d3) MIDI port, option 4 / <undefined>
1525//   AM_RANGE(0xd4d0, 0xd4d3) MIDI port, option 5 / <undefined>
1526//   AM_RANGE(0xd8d0, 0xd8d3) MIDI port, option 6 / <undefined>
1527//   AM_RANGE(0xdcd0, 0xdcd3) MIDI port, option 7 / <undefined>
1528//   AM_RANGE(0xe0d0, 0xe0d3) MIDI port, option 8 / <undefined>
1529//   AM_RANGE(0xe4d0, 0xe4d3) MIDI port, option 9 / <undefined>
1530//   AM_RANGE(0xe8d0, 0xe8d3) MIDI port, option A / <undefined>
1531//   AM_RANGE(0xecd0, 0xecd3) MIDI port, option B / <undefined>
1532//   AM_RANGE(0xf0d0, 0xf0d3) MIDI port, option C / <undefined>
1533//   AM_RANGE(0xf4d0, 0xf4d3) MIDI port, option D / <undefined>
1534//   AM_RANGE(0xf8d0, 0xf8d3) MIDI port, option E / <undefined>
1535//   AM_RANGE(0xfcd0, 0xfcd3) MIDI port, option F / <undefined>
1501//  AM_RANGE(0x04a0, 0x04af) EGC
1502//  AM_RANGE(0x04be, 0x04be) FDC "RPM" register
1503//  AM_RANGE(0x0642, 0x064f) IDE registers / <undefined>
1504//  AM_RANGE(0x074c, 0x074f) IDE status (r) - IDE control registers (w) / <undefined>
1505//  AM_RANGE(0x08e0, 0x08ea) <undefined> / EMM SIO registers
1506//  AM_RANGE(0x09a0, 0x09a0) GDC extended register r/w
1507//  AM_RANGE(0x09a8, 0x09a8) GDC 31KHz register r/w
1508//  AM_RANGE(0x0c07, 0x0c07) EPSON register w
1509//  AM_RANGE(0x0c03, 0x0c03) EPSON register 0 r
1510//  AM_RANGE(0x0c13, 0x0c14) EPSON register 1 r
1511//  AM_RANGE(0x0c24, 0x0c24) cs4231 PCM board register control
1512//  AM_RANGE(0x0c2b, 0x0c2b) cs4231 PCM board low byte control
1513//  AM_RANGE(0x0c2d, 0x0c2d) cs4231 PCM board hi byte control
1514//  AM_RANGE(0x0cc0, 0x0cc7) SCSI interface / <undefined>
1515//  AM_RANGE(0x0cfc, 0x0cff) PCI bus
1516//  AM_RANGE(0x3fd8, 0x3fdf) <undefined> / pit mirror ports
1517//  AM_RANGE(0x7fd8, 0x7fdf) <undefined> / mouse ppi8255 ports
1518//  AM_RANGE(0xa460, 0xa46f) cs4231 PCM extended port / <undefined>
1519//  AM_RANGE(0xbfdb, 0xbfdb) mouse timing port
1520//  AM_RANGE(0xc0d0, 0xc0d3) MIDI port, option 0 / <undefined>
1521//  AM_RANGE(0xc4d0, 0xc4d3) MIDI port, option 1 / <undefined>
1522//  AM_RANGE(0xc8d0, 0xc8d3) MIDI port, option 2 / <undefined>
1523//  AM_RANGE(0xccd0, 0xccd3) MIDI port, option 3 / <undefined>
1524//  AM_RANGE(0xd0d0, 0xd0d3) MIDI port, option 4 / <undefined>
1525//  AM_RANGE(0xd4d0, 0xd4d3) MIDI port, option 5 / <undefined>
1526//  AM_RANGE(0xd8d0, 0xd8d3) MIDI port, option 6 / <undefined>
1527//  AM_RANGE(0xdcd0, 0xdcd3) MIDI port, option 7 / <undefined>
1528//  AM_RANGE(0xe0d0, 0xe0d3) MIDI port, option 8 / <undefined>
1529//  AM_RANGE(0xe4d0, 0xe4d3) MIDI port, option 9 / <undefined>
1530//  AM_RANGE(0xe8d0, 0xe8d3) MIDI port, option A / <undefined>
1531//  AM_RANGE(0xecd0, 0xecd3) MIDI port, option B / <undefined>
1532//  AM_RANGE(0xf0d0, 0xf0d3) MIDI port, option C / <undefined>
1533//  AM_RANGE(0xf4d0, 0xf4d3) MIDI port, option D / <undefined>
1534//  AM_RANGE(0xf8d0, 0xf8d3) MIDI port, option E / <undefined>
1535//  AM_RANGE(0xfcd0, 0xfcd3) MIDI port, option F / <undefined>
15361536ADDRESS_MAP_END
15371537
15381538static ADDRESS_MAP_START( upd7220_1_map, AS_0, 8 )
r11247r11248
19011901static READ8_DEVICE_HANDLER( get_slave_ack )
19021902{
19031903   if (offset==7) { // IRQ = 7
1904      return    pic8259_acknowledge( device->machine().device( "pic8259_slave" ));
1904      return   pic8259_acknowledge( device->machine().device( "pic8259_slave" ));
19051905   }
19061906   return 0x00;
19071907}
r11247r11248
22092209      static const UINT8 default_memsw_data[0x10] =
22102210      {
22112211         0xe1, 0x48, 0xe1, 0x05, 0xe1, 0x04, 0xe1, 0x00, 0xe1, 0x01, 0xe1, 0x00, 0xe1, 0x00, 0xe1, 0x00
2212//         0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff
2212//          0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff
22132213      };
22142214
22152215      for(i=0;i<0x10;i++)
src/mess/drivers/mz2000.c
r11247r11248
11/***************************************************************************
22
3   Sharp MZ-2000
3    Sharp MZ-2000
44
5   driver by Angelo Salese
6   font conversion by Tomasz Slanina
5    driver by Angelo Salese
6    font conversion by Tomasz Slanina
77
8   Basically a simpler version of Sharp MZ-2500
8    Basically a simpler version of Sharp MZ-2500
99
10   TODO:
11   - cassette interface;
12   - implement remaining video capabilities
10    TODO:
11    - cassette interface;
12    - implement remaining video capabilities
1313
1414****************************************************************************/
1515
r11247r11248
341341    AM_RANGE(0xe4, 0xe7) AM_DEVREADWRITE("pit", pit8253_r, pit8253_w)
342342   AM_RANGE(0xe8, 0xeb) AM_DEVREADWRITE("z80pio_1", z80pio_ba_cd_r, z80pio_ba_cd_w)
343343    AM_RANGE(0xf0, 0xf3) AM_WRITE(timer_w)
344//   AM_RANGE(0xf4, 0xf7) CRTC
344//  AM_RANGE(0xf4, 0xf7) CRTC
345345   AM_RANGE(0xf5, 0xf5) AM_WRITE(mz2000_tvram_attr_w)
346346   AM_RANGE(0xf6, 0xf6) AM_WRITE(mz2000_gvram_mask_w)
347347   AM_RANGE(0xf7, 0xf7) AM_WRITE(mz2000_gvram_bank_w)
r11247r11248
557557static READ8_DEVICE_HANDLER( mz2000_portb_r )
558558{
559559   /*
560   x--- ---- break key
561   -x-- ---- read tape data
562   --x- ---- no tape signal
563   ---x ---- no tape write signal
564   ---- x--- end of tape reached
565   ---- ---x "blank" control
566   */
560    x--- ---- break key
561    -x-- ---- read tape data
562    --x- ---- no tape signal
563    ---x ---- no tape write signal
564    ---- x--- end of tape reached
565    ---- ---x "blank" control
566    */
567567   UINT8 res = 0xff ^ 0xe0;
568568
569569   res |= (cassette_input(device->machine().device("cassette")) > 0.00) ? 0x40 : 0x00;
r11247r11248
583583static WRITE8_DEVICE_HANDLER( mz2000_porta_w )
584584{
585585   /*
586   x--- ---- tape "APSS"
587   -x-- ---- tape "APLAY"
588   --x- ---- tape "AREW"
589   ---x ---- reverse video
590   ---- x--- tape stop
591   ---- -x-- tape play
592   ---- --x- tape ff
593   ---- ---x tape rewind
594   */
586    x--- ---- tape "APSS"
587    -x-- ---- tape "APLAY"
588    --x- ---- tape "AREW"
589    ---x ---- reverse video
590    ---- x--- tape stop
591    ---- -x-- tape play
592    ---- --x- tape ff
593    ---- ---x tape rewind
594    */
595595   //printf("A W %02x\n",data);
596596
597597   // ...
r11247r11248
608608{
609609   mz2000_state *state = device->machine().driver_data<mz2000_state>();
610610   /*
611      x--- ---- tape data write
612      -x-- ---- tape rec
613      --x- ---- tape ?
614      ---x ---- tape open
615      ---- x--- 0->1 transition = IPL reset
616       ---- -x-- beeper state
617       ---- --x- 0->1 transition = Work RAM reset
611        x--- ---- tape data write
612        -x-- ---- tape rec
613        --x- ---- tape ?
614        ---x ---- tape open
615        ---- x--- 0->1 transition = IPL reset
616        ---- -x-- beeper state
617        ---- --x- 0->1 transition = Work RAM reset
618618    */
619619   printf("C W %02x\n",data);
620620
r11247r11248
799799   ROM_REGION( 0x10000, "gvram", ROMREGION_ERASE00 )
800800
801801   ROM_REGION( 0x1800, "chargen", 0 )
802//   ROM_LOAD( "mzfont.rom", 0x0000, 0x0800, BAD_DUMP CRC(0631efc3) SHA1(99b206af5c9845995733d877e9e93e9681b982a8) ) //original has JP characters
802//  ROM_LOAD( "mzfont.rom", 0x0000, 0x0800, BAD_DUMP CRC(0631efc3) SHA1(99b206af5c9845995733d877e9e93e9681b982a8) ) //original has JP characters
803803   /* these are hand-crafted roms, converted from bmps floating around the net */
804804   ROM_LOAD( "font.bin",    0x0000, 0x0800, BAD_DUMP CRC(6ae6ce8e) SHA1(6adcdab9e4647429dd8deb73146264746b5eccda) )
805805   ROM_LOAD( "font400.bin", 0x0800, 0x1000, BAD_DUMP CRC(56c5d2bc) SHA1(fea655ff5eedacf8978fa3c185485db44376e24d) )
r11247r11248
820820   ROM_REGION( 0x10000, "gvram", ROMREGION_ERASE00 )
821821
822822   ROM_REGION( 0x1800, "chargen", 0 )
823//   ROM_LOAD( "mzfont.rom", 0x0000, 0x0800, BAD_DUMP CRC(0631efc3) SHA1(99b206af5c9845995733d877e9e93e9681b982a8) ) //original has JP characters
823//  ROM_LOAD( "mzfont.rom", 0x0000, 0x0800, BAD_DUMP CRC(0631efc3) SHA1(99b206af5c9845995733d877e9e93e9681b982a8) ) //original has JP characters
824824   /* these are hand-crafted roms, converted from bmps floating around the net */
825825   ROM_LOAD( "font.bin",    0x0000, 0x0800, BAD_DUMP CRC(6ae6ce8e) SHA1(6adcdab9e4647429dd8deb73146264746b5eccda) )
826826   ROM_LOAD( "font400.bin", 0x0800, 0x1000, BAD_DUMP CRC(56c5d2bc) SHA1(fea655ff5eedacf8978fa3c185485db44376e24d) )
src/mess/drivers/mc1000.c
r11247r11248
337337
338338   /* setup memory banking */
339339   UINT8 *rom = machine().region(Z80_TAG)->base();
340   
340
341341   program->install_readwrite_bank(0x0000, 0x1fff, "bank1");
342342   memory_configure_bank(machine(), "bank1", 0, 1, rom, 0);
343343   memory_configure_bank(machine(), "bank1", 1, 1, rom + 0xc000, 0);
r11247r11248
475475   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
476476   MCFG_SCREEN_SIZE(320, 25+192+26)
477477   MCFG_SCREEN_VISIBLE_AREA(0, 319, 1, 239)
478   
478
479479   MCFG_PALETTE_LENGTH(16)
480480
481481   MCFG_MC6847_ADD(MC6847_TAG, mc1000_mc6847_intf)
src/mess/drivers/cbmb.c
r11247r11248
22    commodore b series computer
33
44    PeT mess@utanet.at
5   
5
66    documentation
77     vice emulator
88     www.funet.fi
src/mess/drivers/pc88va.c
r11247r11248
14801480};
14811481
14821482static IRQ_CALLBACK(pc88va_irq_callback)
1483{   
1483{
14841484   return pic8259_acknowledge( device->machine().device( "pic8259_master" ) );
14851485}
14861486
src/mess/drivers/pc6001.c
r11247r11248
23262326static MACHINE_CONFIG_DERIVED( pc6001m2, pc6001 )
23272327
23282328   MCFG_MACHINE_RESET(pc6001m2)
2329   
2329
23302330   MCFG_SCREEN_MODIFY("screen")
23312331   MCFG_SCREEN_UPDATE(pc6001m2)
23322332   MCFG_PALETTE_LENGTH(16+16)
src/mess/drivers/mycom.c
r11247r11248
452452   mycom_state *state = device->machine().driver_data<mycom_state>();
453453
454454   state->m_rtc->address_w(data & 0x0f);
455   
455
456456   state->m_rtc->hold_w(BIT(data, 4));
457457   state->m_rtc->read_w(BIT(data, 5));
458458   state->m_rtc->write_w(BIT(data, 6));
src/mess/drivers/pes.c
r11247r11248
104104   UINT8 data;
105105   data = state->m_infifo[state->m_infifo_tail_ptr];
106106   // if fifo is empty (tail ptr == head ptr), do not increment the tail ptr, otherwise do.
107   if (state->m_infifo_tail_ptr != state->m_infifo_head_ptr) state->m_infifo_tail_ptr++;
107   if (state->m_infifo_tail_ptr != state->m_infifo_head_ptr) state->m_infifo_tail_ptr++;
108108   state->m_infifo_tail_ptr&=0x1F;
109109#ifdef DEBUG_SERIAL_CB
110110   fprintf(stderr,"callback: input to i8031/pes from pc/terminal: %02X\n",data);
r11247r11248
141141   logerror("port1 write: tms5220 data written: %02X\n", data);
142142#endif
143143   tms5220_data_w(state->m_speech, 0, data);
144   
144
145145}
146146
147147READ8_MEMBER( pes_state::port1_r )
r11247r11248
227227******************************************************************************/
228228/*static TIMER_CALLBACK( serial_read_cb )
229229{
230   machine.scheduler().timer_set(attotime::from_hz(10000), FUNC(outfifo_read_cb));
230    machine.scheduler().timer_set(attotime::from_hz(10000), FUNC(outfifo_read_cb));
231231}*/
232232
233233DRIVER_INIT( pes )
r11247r11248
267267    MCFG_CPU_ADD("maincpu", I80C31, CPU_CLOCK)
268268    MCFG_CPU_PROGRAM_MAP(i80c31_mem)
269269    MCFG_CPU_IO_MAP(i80c31_io)
270   
270
271271    /* sound hardware */
272272    MCFG_SPEAKER_STANDARD_MONO("mono")
273273    MCFG_SOUND_ADD("tms5220", TMS5220C, 720000) /* 720Khz clock, 10khz output */
r11247r11248
293293 Drivers
294294******************************************************************************/
295295
296/*    YEAR  NAME   PARENT   COMPAT   MACHINE      INPUT   INIT   COMPANY     FULLNAME            FLAGS */
296/*    YEAR  NAME    PARENT  COMPAT  MACHINE     INPUT   INIT    COMPANY     FULLNAME            FLAGS */
297297COMP( 1987, pes,   0,      0,      pes,      pes,   pes,   "Pacific Educational Systems",   "VPU-01 Speech box",   GAME_NOT_WORKING )
src/mess/drivers/x1.c
r11247r11248
99    - Rewrite keyboard input hook-up and decap/dump the keyboard MCU if possible;
1010    - Fix the 0xe80/0xe83 kanji ROM readback;
1111    - Fixe the 0xb00 RAM banking;
12    - x1turbo keyboard inputs are currently broken, use x1turbo40 for now;
12    - x1turbo keyboard inputs are currently broken, use x1turbo40 for now;
1313    - Hook-up remaining .tap image formats;
1414    - Implement APSS tape commands;
1515    - Sort out / redump the BIOS gfx roms;
1616    - X1Turbo: Implement SIO.
1717    - X1Twin: Hook-up the PC Engine part (actually needs his own driver?);
1818    - Implement SASI HDD interface;
19    - clean-ups!
19    - clean-ups!
2020    - There are various unclear video things, these are:
2121        - Implement the remaining scrn regs;
2222        - Implement the new features of the x1turboz, namely the 4096 color feature amongst other things
2323        - (anything else?)
24    - Driver Configuration switches:
25      - OPN for X1
26      - EMM, and hook-up for X1 too
27      - RAM size for EMM
28      - specific x1turboz features?
24    - Driver Configuration switches:
25        - OPN for X1
26        - EMM, and hook-up for X1 too
27        - RAM size for EMM
28        - specific x1turboz features?
2929
3030    per-game/program specific TODO:
31   - CZ8FB02 / CZ8FB03: doesn't load at all, they are 2hd floppies apparently;
32   - Chack'n Pop: game is too fast, presumably missing wait states;
31    - CZ8FB02 / CZ8FB03: doesn't load at all, they are 2hd floppies apparently;
32    - Chack'n Pop: game is too fast, presumably missing wait states;
3333    - Dragon Buster: it crashed to me once with a obj flag hang;
3434    - The Goonies (x1 only): goes offsync with the PCG beam positions;
35   - Graphtol: sets up x1turboz paletteram, graphic garbage due of it;
36    - Gyajiko2: hangs when it's supposed to load the character selection screen, FDC bug?
37    - Hydlide 3: can't get the user disk to work properly, could be a bad dump;
35    - Graphtol: sets up x1turboz paletteram, graphic garbage due of it;
36    - Gyajiko2: hangs when it's supposed to load the character selection screen, FDC bug?
37    - Hydlide 3: can't get the user disk to work properly, could be a bad dump;
3838    - Lupin the 3rd: don't know neither how to "data load" nor how to "create a character" ... does the game hangs?
39   - Might & Magic: uses 0xe80-3 kanji ports, should be a good test case for that;
40   - "newtype": trips a z80dma assert, worked around for now;
41   - Saziri: doesn't re-initialize the tilemap attribute vram when you start a play, making it to have missing colors if you don't start a play in time;
42   - Shilver Ghost: changes the vertical visible area during scrolling, and that doesn't work too well with current mc6845 core.
43   - Suikoden: shows a JP message error (DFJustin: "Problem with the disk device !! Please set a floppy disk properly and press the return key. Retrying.")
44   - Super Billiards (X1 Pack 14): has a slight PCG timing bug, that happens randomly;
45   - Trivia-Q: dunno what to do on the selection screen, missing inputs?
39    - Might & Magic: uses 0xe80-3 kanji ports, should be a good test case for that;
40    - "newtype": trips a z80dma assert, worked around for now;
41    - Saziri: doesn't re-initialize the tilemap attribute vram when you start a play, making it to have missing colors if you don't start a play in time;
42    - Shilver Ghost: changes the vertical visible area during scrolling, and that doesn't work too well with current mc6845 core.
43    - Suikoden: shows a JP message error (DFJustin: "Problem with the disk device !! Please set a floppy disk properly and press the return key. Retrying.")
44    - Super Billiards (X1 Pack 14): has a slight PCG timing bug, that happens randomly;
45    - Trivia-Q: dunno what to do on the selection screen, missing inputs?
4646    - Turbo Alpha: has z80dma / fdc bugs, doesn't show the presentation properly and then hangs;
4747    - Will 2: doesn't load, fdc issue presumably (note: it's a x1turbo game ONLY);
48   - X1F Demo ("New X1 Demo"): needs partial updates to work properly (note that INDEXED16 doesn't cope at all with partial updates);
48    - X1F Demo ("New X1 Demo"): needs partial updates to work properly (note that INDEXED16 doesn't cope at all with partial updates);
4949    - Ys 2: crashes after the disclaimer screen;
5050    - Ys 3: missing user disk, to hack it (and play with x1turboz features): bp 81ca,pc += 2
5151    - Ys 3: never uploads a valid 4096 palette, probably related to the fact that we don't have an user disk
r11247r11248
6565      cartridge slot and it doesn't exceed 64k (0x10000) of size.
6666    - Gruppe: shows a random bitmap graphic then returns "program load error" ... it wants that the floppy has write protection enabled (btanb)
6767    - Maidum: you need to load BOTH disk without write protection disabled, otherwise it refuses to run. (btanb)
68   - Marvelous: needs write protection disabled (btanb)
69   - Chack'n Pop: to load this game, do a files command on the "Jodan Dos" prompt then move the cursor up at the "Chack'n Pop" file.
70     Substitute bin with load and press enter. Finally, do a run once that it loaded correctly.
71   - Faeries Residence: to load this game, put a basic v2.0 in drive 0, then execute a NEWON command. Load game disks into drive 0 and 1 then
72     type run"START" (case sensitive)
73   - POPLEMON: same as above, but you need to type run"POP"
68    - Marvelous: needs write protection disabled (btanb)
69    - Chack'n Pop: to load this game, do a files command on the "Jodan Dos" prompt then move the cursor up at the "Chack'n Pop" file.
70      Substitute bin with load and press enter. Finally, do a run once that it loaded correctly.
71    - Faeries Residence: to load this game, put a basic v2.0 in drive 0, then execute a NEWON command. Load game disks into drive 0 and 1 then
72      type run"START" (case sensitive)
73    - POPLEMON: same as above, but you need to type run"POP"
7474
7575=================================================================================================
7676
r11247r11248
246246
247247static VIDEO_START( x1 )
248248{
249//   x1_state *state = machine.driver_data<x1_state>();
250//   state->m_avram = auto_alloc_array(machine, UINT8, 0x800);
251//   state->m_tvram = auto_alloc_array(machine, UINT8, 0x800);
252//   state->m_kvram = auto_alloc_array(machine, UINT8, 0x800);
253//   state->m_gfx_bitmap_ram = auto_alloc_array(machine, UINT8, 0xc000*2);
254//   state->m_pal_4096 = auto_alloc_array(machine, UINT8, 0x1000*3);
249//  x1_state *state = machine.driver_data<x1_state>();
250//  state->m_avram = auto_alloc_array(machine, UINT8, 0x800);
251//  state->m_tvram = auto_alloc_array(machine, UINT8, 0x800);
252//  state->m_kvram = auto_alloc_array(machine, UINT8, 0x800);
253//  state->m_gfx_bitmap_ram = auto_alloc_array(machine, UINT8, 0xc000*2);
254//  state->m_pal_4096 = auto_alloc_array(machine, UINT8, 0x1000*3);
255255}
256256
257257static void x1_draw_pixel(running_machine &machine, bitmap_t *bitmap,int y,int x,UINT16   pen,UINT8 width,UINT8 height)
r11247r11248
281281}
282282
283283#define mc6845_h_char_total    (state->m_crtc_vreg[0])
284#define mc6845_h_display       (state->m_crtc_vreg[1])
284#define mc6845_h_display      (state->m_crtc_vreg[1])
285285#define mc6845_h_sync_pos      (state->m_crtc_vreg[2])
286286#define mc6845_sync_width      (state->m_crtc_vreg[3])
287287#define mc6845_v_char_total      (state->m_crtc_vreg[4])
288#define mc6845_v_total_adj       (state->m_crtc_vreg[5])
288#define mc6845_v_total_adj      (state->m_crtc_vreg[5])
289289#define mc6845_v_display      (state->m_crtc_vreg[6])
290290#define mc6845_v_sync_pos      (state->m_crtc_vreg[7])
291291#define mc6845_mode_ctrl      (state->m_crtc_vreg[8])
292#define mc6845_tile_height       (state->m_crtc_vreg[9]+1)
293#define mc6845_cursor_y_start    (state->m_crtc_vreg[0x0a])
292#define mc6845_tile_height      (state->m_crtc_vreg[9]+1)
293#define mc6845_cursor_y_start   (state->m_crtc_vreg[0x0a])
294294#define mc6845_cursor_y_end    (state->m_crtc_vreg[0x0b])
295#define mc6845_start_addr        (((state->m_crtc_vreg[0x0c]<<8) & 0x3f00) | (state->m_crtc_vreg[0x0d] & 0xff))
295#define mc6845_start_addr      (((state->m_crtc_vreg[0x0c]<<8) & 0x3f00) | (state->m_crtc_vreg[0x0d] & 0xff))
296296#define mc6845_cursor_addr     (((state->m_crtc_vreg[0x0e]<<8) & 0x3f00) | (state->m_crtc_vreg[0x0f] & 0xff))
297#define mc6845_light_pen_addr     (((state->m_crtc_vreg[0x10]<<8) & 0x3f00) | (state->m_crtc_vreg[0x11] & 0xff))
297#define mc6845_light_pen_addr   (((state->m_crtc_vreg[0x10]<<8) & 0x3f00) | (state->m_crtc_vreg[0x11] & 0xff))
298298#define mc6845_update_addr     (((state->m_crtc_vreg[0x12]<<8) & 0x3f00) | (state->m_crtc_vreg[0x13] & 0xff))
299299
300300/* adjust tile index when we are under double height condition */
r11247r11248
327327static void draw_fgtilemap(running_machine &machine, bitmap_t *bitmap)
328328{
329329   /*
330      attribute table:
331      x--- ---- double width
332      -x-- ---- double height
333      --x- ---- PCG select
334      ---x ---- color blinking
335      ---- x--- reverse color
336      ---- -xxx color pen
330        attribute table:
331        x--- ---- double width
332        -x-- ---- double height
333        --x- ---- PCG select
334        ---x ---- color blinking
335        ---- x--- reverse color
336        ---- -xxx color pen
337337
338      x--- ---- select Kanji ROM
339      -x-- ---- Kanji side (0=left, 1=right)
340      --x- ---- Underline
341      ---x ---- Kanji ROM select (0=level 1, 1=level 2) (TODO: implement this)
342      ---- xxxx Kanji upper 4 bits
343   */
338        x--- ---- select Kanji ROM
339        -x-- ---- Kanji side (0=left, 1=right)
340        --x- ---- Underline
341        ---x ---- Kanji ROM select (0=level 1, 1=level 2) (TODO: implement this)
342        ---- xxxx Kanji upper 4 bits
343    */
344344
345345   x1_state *state = machine.driver_data<x1_state>();
346346   int y,x,res_x,res_y;
r11247r11248
773773   // E9 06 - APSS Rewind
774774   // E9 0A - Record
775775   /*
776   APSS is a Sharp invention and stands for Automatic Program Search System, it scans the tape for silent parts that are bigger than 4 seconds.
777   It's basically used for audio tapes in order to jump over the next/previous "track".
778   */
776    APSS is a Sharp invention and stands for Automatic Program Search System, it scans the tape for silent parts that are bigger than 4 seconds.
777    It's basically used for audio tapes in order to jump over the next/previous "track".
778    */
779779   state->m_cmt_current_cmd = cmd;
780780
781781   if(cassette_get_image(machine.device("cass")) == NULL) //avoid a crash if a disk game tries to access this
r11247r11248
13941394static WRITE8_HANDLER( x1_blackclip_w )
13951395{
13961396   /*
1397   -x-- ---- replace blanking duration with black
1398   --x- ---- replace bitmap palette 1 with black
1399   ---x ---- replace bitmap palette 0 with black
1400   ---- x--- enable text blackclip
1401   ---- -xxx palette color number for text black
1402   */
1397    -x-- ---- replace blanking duration with black
1398    --x- ---- replace bitmap palette 1 with black
1399    ---x ---- replace bitmap palette 0 with black
1400    ---- x--- enable text blackclip
1401    ---- -xxx palette color number for text black
1402    */
14031403   x1_state *state = space->machine().driver_data<x1_state>();
14041404   state->m_scrn_reg.blackclip = data;
14051405   if(data & 0x40)
r11247r11248
15131513      case 0: state->m_kanji_addr_latch = (data & 0xff)|(state->m_kanji_addr_latch&0xff00); break;
15141514      case 1: state->m_kanji_addr_latch = (data<<8)|(state->m_kanji_addr_latch&0x00ff);
15151515         //if(state->m_kanji_addr_latch != 0x720 && state->m_kanji_addr_latch != 0x730)
1516         //   printf("%08x\n",state->m_kanji_addr_latch);
1516         //  printf("%08x\n",state->m_kanji_addr_latch);
15171517         break;
15181518      case 2:
15191519      {
r11247r11248
15841584}
15851585
15861586/*
1587   CZ-141SF, CZ-127MF, X1turboZII, X1turboZ3 boards
1588   TODO: still not quite right
1587    CZ-141SF, CZ-127MF, X1turboZII, X1turboZ3 boards
1588    TODO: still not quite right
15891589*/
15901590static READ8_HANDLER( x1turbo_bank_r )
15911591{
15921592   x1_state *state = space->machine().driver_data<x1_state>();
15931593
1594//   printf("BANK access read\n");
1594//  printf("BANK access read\n");
15951595   return state->m_ex_bank & 0x3f;
15961596}
15971597
r11247r11248
16001600   x1_state *state = space->machine().driver_data<x1_state>();
16011601   //UINT8 *RAM = space->machine().region("maincpu")->base();
16021602   /*
1603   --x- ---- BML5: latch bit (doesn't have any real function)
1604   ---x ---- BMCS: select bank RAM, active low
1605   ---- xxxx BMNO: Bank memory ID
1606   */
1603    --x- ---- BML5: latch bit (doesn't have any real function)
1604    ---x ---- BMCS: select bank RAM, active low
1605    ---- xxxx BMNO: Bank memory ID
1606    */
16071607
16081608   state->m_ex_bank = data & 0x3f;
1609//   printf("BANK access write %02x\n",data);
1609//  printf("BANK access write %02x\n",data);
16101610}
16111611
16121612/* TODO: waitstate penalties */
r11247r11248
17011701{
17021702   x1_state *state = space->machine().driver_data<x1_state>();
17031703
1704   if(state->m_io_bank_mode == 1)                       { x1_ex_gfxram_w(space, offset, data); }
1704   if(state->m_io_bank_mode == 1)                     { x1_ex_gfxram_w(space, offset, data); }
17051705   // TODO: user could install ym2151 on plain X1 too
17061706   //0x700, 0x701
17071707//  else if(offset >= 0x0704 && offset <= 0x0707)   { z80ctc_w(space->machine().device("ctc"), offset-0x0704,data); }
r11247r11248
19001900   state->m_vdisp = (device->machine().primary_screen->vpos() < vblank_line) ? 0x80 : 0x00;
19011901   state->m_vsync = (device->machine().primary_screen->vpos() < vsync_line) ? 0x00 : 0x04;
19021902
1903//   popmessage("%d",vsync_line);
1904//   popmessage("%d",vblank_line);
1903//  popmessage("%d",vsync_line);
1904//  popmessage("%d",vblank_line);
19051905
19061906   res = state->m_ram_bank | state->m_sub_obf | state->m_vsync | state->m_vdisp;
19071907
r11247r11248
24852485   if(state->m_key_irq_vector)
24862486   {
24872487      //if(key1 == 0 && key2 == 0 && key3 == 0 && key4 == 0 && f_key == 0)
2488      //   return;
2488      //  return;
24892489
24902490      if((key1 != state->m_old_key1) || (key2 != state->m_old_key2) || (key3 != state->m_old_key3) || (key4 != state->m_old_key4) || (f_key != state->m_old_fkey))
24912491      {
r11247r11248
25102510
25112511   state->m_rtc.sec++;
25122512
2513   if((state->m_rtc.sec & 0x0f) >= 0x0a)             { state->m_rtc.sec+=0x10; state->m_rtc.sec&=0xf0; }
2514   if((state->m_rtc.sec & 0xf0) >= 0x60)             { state->m_rtc.min++; state->m_rtc.sec = 0; }
2515   if((state->m_rtc.min & 0x0f) >= 0x0a)             { state->m_rtc.min+=0x10; state->m_rtc.min&=0xf0; }
2516   if((state->m_rtc.min & 0xf0) >= 0x60)             { state->m_rtc.hour++; state->m_rtc.min = 0; }
2513   if((state->m_rtc.sec & 0x0f) >= 0x0a)            { state->m_rtc.sec+=0x10; state->m_rtc.sec&=0xf0; }
2514   if((state->m_rtc.sec & 0xf0) >= 0x60)            { state->m_rtc.min++; state->m_rtc.sec = 0; }
2515   if((state->m_rtc.min & 0x0f) >= 0x0a)            { state->m_rtc.min+=0x10; state->m_rtc.min&=0xf0; }
2516   if((state->m_rtc.min & 0xf0) >= 0x60)            { state->m_rtc.hour++; state->m_rtc.min = 0; }
25172517   if((state->m_rtc.hour & 0x0f) >= 0x0a)            { state->m_rtc.hour+=0x10; state->m_rtc.hour&=0xf0; }
25182518   if((state->m_rtc.hour & 0xff) >= 0x24)            { state->m_rtc.day++; state->m_rtc.wday++; state->m_rtc.hour = 0; }
25192519   if((state->m_rtc.wday & 0x0f) >= 0x07)            { state->m_rtc.wday = 0; }
r11247r11248
27082708
27092709   MCFG_MACHINE_RESET(x1turbo)
27102710
2711//   MCFG_Z80SIO_ADD( "sio", MAIN_CLOCK/4 , sio_intf )
2711//  MCFG_Z80SIO_ADD( "sio", MAIN_CLOCK/4 , sio_intf )
27122712   MCFG_Z80SIO0_ADD("sio", MAIN_CLOCK/4 , sio_intf )
27132713   MCFG_Z80DMA_ADD( "dma", MAIN_CLOCK/4 , x1_dma )
27142714
r11247r11248
27472747
27482748   ROM_REGION(0x1800, "cgrom", 0)
27492749   ROM_LOAD("fnt0808.x1",  0x00000, 0x00800, CRC(e3995a57) SHA1(1c1a0d8c9f4c446ccd7470516b215ddca5052fb2) )
2750   ROM_COPY("font",    0x1000, 0x00800, 0x1000 )
2750   ROM_COPY("font",   0x1000, 0x00800, 0x1000 )
27512751
27522752   ROM_REGION(0x20000, "kanji", ROMREGION_ERASEFF)
27532753
r11247r11248
27772777
27782778   ROM_REGION(0x1800, "cgrom", 0)
27792779   ROM_LOAD("ank8.rom", 0x00000, 0x00800, CRC(e3995a57) SHA1(1c1a0d8c9f4c446ccd7470516b215ddca5052fb2) )
2780   ROM_COPY("font",     0x00000, 0x00800, 0x1000 )
2780   ROM_COPY("font",    0x00000, 0x00800, 0x1000 )
27812781
27822782   ROM_REGION(0x20000, "kanji", ROMREGION_ERASEFF)
27832783
r11247r11248
28132813
28142814   ROM_REGION(0x4800, "cgrom", 0)
28152815   ROM_LOAD("fnt0808_turbo.x1", 0x00000, 0x00800, CRC(84a47530) SHA1(06c0995adc7a6609d4272417fe3570ca43bd0454) )
2816   ROM_COPY("font",             0x01000, 0x00800, 0x1000 )
2816   ROM_COPY("font",            0x01000, 0x00800, 0x1000 )
28172817
28182818   ROM_REGION(0x20000, "kanji", ROMREGION_ERASEFF)
28192819
r11247r11248
28472847
28482848   ROM_REGION(0x4800, "cgrom", 0)
28492849   ROM_LOAD("fnt0808_turbo.x1",0x00000, 0x0800, CRC(84a47530) SHA1(06c0995adc7a6609d4272417fe3570ca43bd0454) )
2850   ROM_COPY("font",            0x01000, 0x0800, 0x1000 )
2850   ROM_COPY("font",           0x01000, 0x0800, 0x1000 )
28512851
28522852   ROM_REGION(0x20000, "kanji", ROMREGION_ERASEFF)
28532853
src/mess/drivers/pocketc.c
r11247r11248
779779   MCFG_SCREEN_MODIFY("screen")
780780   MCFG_SCREEN_SIZE(608, 300)
781781   MCFG_SCREEN_VISIBLE_AREA(0, 608-1, 0, 300-1)
782   MCFG_SCREEN_UPDATE( pc1251 )   
782   MCFG_SCREEN_UPDATE( pc1251 )
783783   MCFG_GFXDECODE( pc1251 )
784784MACHINE_CONFIG_END
785785
src/mess/drivers/gb.c
r11247r11248
575575   MCFG_SCREEN_SIZE( 458, 154 )
576576   MCFG_SCREEN_VISIBLE_AREA(0*8, 20*8-1, 0*8, 18*8-1)
577577   MCFG_SCREEN_UPDATE( generic_bitmapped )
578   
578
579579   MCFG_GFXDECODE(gb)
580580   MCFG_PALETTE_LENGTH(4)
581581   MCFG_PALETTE_INIT(gb)
src/mess/drivers/glasgow.c
r11247r11248
132132static WRITE16_HANDLER( write_lcd_flag )
133133{
134134   glasgow_state *state = space->machine().driver_data<glasgow_state>();
135//   UINT8 lcd_flag;
135//  UINT8 lcd_flag;
136136   mboard_lcd_invert = 0;
137//   lcd_flag=data >> 8;
137//  lcd_flag=data >> 8;
138138   //beep_set_state(0, (data >> 8) & 1 ? 1 : 0);
139139   if ((data >> 8) == 0) {
140140      mboard_key_selector = 1;
r11247r11248
145145
146146//  The key function in the rom expects after writing to
147147//  the  a value from the second key row;
148//   if (lcd_flag != 0)
149//      state->m_led7 = 255;
150//   else
151//      state->m_led7 = 0;
148//  if (lcd_flag != 0)
149//      state->m_led7 = 255;
150//  else
151//      state->m_led7 = 0;
152152//
153153   logerror("LCD Flag 16 = %x \n", data);
154154}
r11247r11248
207207static WRITE32_HANDLER( write_lcd_flag32 )
208208{
209209   glasgow_state *state = space->machine().driver_data<glasgow_state>();
210//   UINT8 lcd_flag = data >> 24;
210//  UINT8 lcd_flag = data >> 24;
211211
212212   mboard_lcd_invert = 0;
213213
r11247r11248
221221   //logerror("LCD Flag 32 = %x \n", data >> 24);
222222   //beep_set_state(0, (data >> 24) & 1 ? 1 : 0);
223223
224//   if (lcd_flag != 0)
225//      state->m_led7 = 255;
226//   else
227//      state->m_led7 = 0;
224//  if (lcd_flag != 0)
225//      state->m_led7 = 255;
226//  else
227//      state->m_led7 = 0;
228228}
229229
230230static READ32_HANDLER( read_newkeys32 ) // Dallas 32, Roma 32
src/mess/drivers/a6809.c
r11247r11248
8080   "screen",
8181   0,   /* starting gfxnum */
8282   40, 25, 40,  /* x, y, size */
83   0    /* rev y order */
83   0   /* rev y order */
8484};
8585
8686static const via6522_interface via_intf =
src/mess/drivers/lcmate2.c
r11247r11248
102102/* Driver */
103103
104104/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT     COMPANY   FULLNAME       FLAGS */
105COMP( 1984, lcmate2,  0,       0,   lcmate2,    lcmate2,     0,   "Vtech",   "Laser Compumate 2", GAME_NOT_WORKING | GAME_NO_SOUND_HW)
105COMP( 1984, lcmate2,  0,       0,   lcmate2,   lcmate2,    0,   "Vtech",   "Laser Compumate 2", GAME_NOT_WORKING | GAME_NO_SOUND_HW)
106106
src/mess/drivers/smc777.c
r11247r11248
77    TODO:
88    - no real documentation, the entire driver is just a bunch of educated
99      guesses ...
10   - ROM/RAM bankswitch, it apparently happens after one instruction prefetching.
11     We currently use an hackish implementation until the MAME/MESS framework can
12     support that ...
13   - keyboard input is very sluggish;
14   - cursor stuck in Bird Crash;
15   - add mc6845 features;
16   - many other missing features;
10    - ROM/RAM bankswitch, it apparently happens after one instruction prefetching.
11      We currently use an hackish implementation until the MAME/MESS framework can
12      support that ...
13    - keyboard input is very sluggish;
14    - cursor stuck in Bird Crash;
15    - add mc6845 features;
16    - many other missing features;
1717
1818**************************************************************************************/
1919
r11247r11248
126126      for(x=0;x<x_width;x++)
127127      {
128128         /*
129         -x-- ---- blink
130         --xx x--- bg color (00 transparent, 01 white, 10 black, 11 complementary to fg color
131         ---- -xxx fg color
132         */
129            -x-- ---- blink
130            --xx x--- bg color (00 transparent, 01 white, 10 black, 11 complementary to fg color
131            ---- -xxx fg color
132            */
133133         int tile = vram[count];
134134         int color = attr[count] & 7;
135135         int bk_color = (attr[count] & 0x18) >> 3;
r11247r11248
396396{
397397   smc777_state *state = space->machine().driver_data<smc777_state>();
398398   /*
399   -x-- ---- shift key
400   ---- -x-- MCU data ready
401   ---- ---x handshake bit?
402   */
399    -x-- ---- shift key
400    ---- -x-- MCU data ready
401    ---- ---x handshake bit?
402    */
403403
404404   switch(state->m_keyb_cmd)
405405   {
r11247r11248
414414      default:
415415      {
416416         //if(offset == 1)
417         //   printf("Unknown keyboard command %02x read-back\n",state->m_keyb_cmd);
417         //  printf("Unknown keyboard command %02x read-back\n",state->m_keyb_cmd);
418418
419419         return (offset == 0) ? 0x00 : (space->machine().rand() & 0x5);
420420      }
r11247r11248
467467{
468468   smc777_state *state = space->machine().driver_data<smc777_state>();
469469   /*
470   ---x 0000 ram inibit signal
470    ---x 0000 ram inibit signal
471471    ---x 1001 beep
472472    all the rest is unknown at current time
473473    */
r11247r11248
615615
616616   low_offs = offset & 0xff;
617617
618   if(low_offs <= 0x07)                     { return smc777_vram_r(space,offset & 0xff07); }
618   if(low_offs <= 0x07)                    { return smc777_vram_r(space,offset & 0xff07); }
619619   else if(low_offs >= 0x08 && low_offs <= 0x0f) { return smc777_attr_r(space,offset & 0xff07); }
620620   else if(low_offs >= 0x10 && low_offs <= 0x17) { return smc777_pcg_r(space,offset & 0xff07); }
621621   else if(low_offs >= 0x18 && low_offs <= 0x19) { logerror("6845 read %02x",low_offs & 1); }
r11247r11248
641641   else if(low_offs == 0x74)                 { logerror("IEEE-488 ROM read\n"); }
642642   else if(low_offs == 0x75)                 { logerror("VTR Controller ROM read\n"); }
643643   else if(low_offs == 0x7e || low_offs == 0x7f) { logerror("Kanji ROM read %02x\n",low_offs & 1); }
644   else if(low_offs >= 0x80)                  { return smc777_fbuf_r(space,offset & 0xff7f); }
644   else if(low_offs >= 0x80)                 { return smc777_fbuf_r(space,offset & 0xff7f); }
645645
646646   logerror("Undefined read at %04x offset = %02x\n",cpu_get_pc(&space->device()),low_offs);
647647   return 0xff;
r11247r11248
653653
654654   low_offs = offset & 0xff;
655655
656   if(low_offs <= 0x07)                      { smc777_vram_w(space,offset & 0xff07,data); }
656   if(low_offs <= 0x07)                    { smc777_vram_w(space,offset & 0xff07,data); }
657657   else if(low_offs >= 0x08 && low_offs <= 0x0f) { smc777_attr_w(space,offset & 0xff07,data); }
658658   else if(low_offs >= 0x10 && low_offs <= 0x17) { smc777_pcg_w(space,offset & 0xff07,data); }
659659   else if(low_offs >= 0x18 && low_offs <= 0x19) { smc777_6845_w(space,low_offs & 1,data); }
r11247r11248
684684   else if(low_offs == 0x74)                 { logerror("IEEE-488 ROM write %02x\n",data); }
685685   else if(low_offs == 0x75)                 { logerror("VTR Controller ROM write %02x\n",data); }
686686   else if(low_offs == 0x7e || low_offs == 0x7f) { logerror("Kanji ROM write [%02x] %02x\n",low_offs & 1,data); }
687   else if(low_offs >= 0x80)                  { smc777_fbuf_w(space,offset & 0xff7f,data); }
688   else                                 { logerror("Undefined write at %04x offset = %02x data = %02x\n",cpu_get_pc(&space->device()),low_offs,data); }
687   else if(low_offs >= 0x80)                 { smc777_fbuf_w(space,offset & 0xff7f,data); }
688   else                                { logerror("Undefined write at %04x offset = %02x data = %02x\n",cpu_get_pc(&space->device()),low_offs,data); }
689689}
690690
691691static ADDRESS_MAP_START( smc777_io , AS_IO, 8)
r11247r11248
829829INPUT_PORTS_END
830830
831831/*
832   Keyboard data:
833   kana lock |= 0x80
834   numpad 0 to 9 = 0x30 - 0x39
835   / pad = 0x2f
836   * pad = 0x2a
837   - pad = 0x2d
838   + pad = 0x2b
839   ENTER pad = 0x0d
840   . pad = 0x2e
841   enter = 0x0d
842   space = 0x20
843   backspace = 0x08
844   CTRL (TAB?) = 0x09
845   cursor up = 0x17
846   cursor down = 0x1c
847   cursor left = 0x16
848   cursor right = 0x19
849   0 to 9 -> 0x30 to 0x39
850   S + 0 = 0x29
851   S + 1 = 0x21
852   S + 2 = 0x40
853   S + 3 = 0x23
854   S + 4 = 0x24
855   S + 5 = 0x25
856   S + 6 = 0x5e
857   S + 7 = 0x26
858   S + 8 = 0x2a
859   S + 9 = 0x28
860   F1 = 0x01 / 0x15
861   F2 = 0x02 / 0x18
862   F3 = 0x04 / 0x12
863   F4 = 0x06 / 0x05
864   F5 = 0x0b / 0x03
865   ESC = 0x1b
866   INS = 0x0f
867   DEL = 0x11
868   PG UP = 0x12
869   PG DOWN = 0x03
870   HOME = 0x14
871   END = 0x0e
872   ' = 0x2d / 0x5f
873   "P" row 1 ] = 0x5d / 0x7d
874   "P" row 2 ' / ~ = 0x60 / 0x7e
875   "L" row 1 ; / : = 0x3b / 0x3a
876   "L" row 2 = (unused)
877   "L" row 3 Yen / | = 0x5c / 0x7c
878   "M" row 1 , / < = 0x2c / 0x3c
879   "M" row 2 . / > = 0x2e / 0x3e
880   "M" row 3 / / ? = 0x2f / 0x3f
832    Keyboard data:
833    kana lock |= 0x80
834    numpad 0 to 9 = 0x30 - 0x39
835    / pad = 0x2f
836    * pad = 0x2a
837    - pad = 0x2d
838    + pad = 0x2b
839    ENTER pad = 0x0d
840    . pad = 0x2e
841    enter = 0x0d
842    space = 0x20
843    backspace = 0x08
844    CTRL (TAB?) = 0x09
845    cursor up = 0x17
846    cursor down = 0x1c
847    cursor left = 0x16
848    cursor right = 0x19
849    0 to 9 -> 0x30 to 0x39
850    S + 0 = 0x29
851    S + 1 = 0x21
852    S + 2 = 0x40
853    S + 3 = 0x23
854    S + 4 = 0x24
855    S + 5 = 0x25
856    S + 6 = 0x5e
857    S + 7 = 0x26
858    S + 8 = 0x2a
859    S + 9 = 0x28
860    F1 = 0x01 / 0x15
861    F2 = 0x02 / 0x18
862    F3 = 0x04 / 0x12
863    F4 = 0x06 / 0x05
864    F5 = 0x0b / 0x03
865    ESC = 0x1b
866    INS = 0x0f
867    DEL = 0x11
868    PG UP = 0x12
869    PG DOWN = 0x03
870    HOME = 0x14
871    END = 0x0e
872    ' = 0x2d / 0x5f
873    "P" row 1 ] = 0x5d / 0x7d
874    "P" row 2 ' / ~ = 0x60 / 0x7e
875    "L" row 1 ; / : = 0x3b / 0x3a
876    "L" row 2 = (unused)
877    "L" row 3 Yen / | = 0x5c / 0x7c
878    "M" row 1 , / < = 0x2c / 0x3c
879    "M" row 2 . / > = 0x2e / 0x3e
880    "M" row 3 / / ? = 0x2f / 0x3f
881881*/
882882
883883static const UINT8 smc777_keytable[2][0xa0] =
src/mess/drivers/scorpion.c
r11247r11248
234234   spectrum_state *state = machine.driver_data<spectrum_state>();
235235   device_t *beta = machine.device(BETA_DISK_TAG);
236236   UINT16 pc = cpu_get_reg(machine.device("maincpu"), STATE_GENPCBASE);
237   
237
238238   state->m_ram_disabled_by_beta = 0;
239239   if (betadisk_is_active(beta))
240240   {
src/mess/drivers/m20.c
r11247r11248
13130xfc903 checks for the string TEST at 0x3f4-0x3f6, does an int 0xfe if so, unknown purpose
1414
1515Error codes:
16Triangle    Test CPU registers and instructions
17Triangle    Test system RAM
184 vertical lines    Test CPU call and trap instructions
19Diamond    Initialize screen and printer drivers
20EC0    8255 parallel interface IC test failed
21EC1    6845 CRT controller IC test failed
22EC2    1797 floppy disk controller chip failed
23EC3    8253 timer IC failed
24EC4    8251 keyboard interface failed
25EC5    8251 keyboard test failed
26EC6    8259 PIC IC test failed
27EK0    Keyboard did not respond
28Ek1    Keyboard responds, but self test failed
29ED1    Disk drive 1 test failed
30ED0    Disk drive 0 test failed
31E10    Non-vectored interrupt error
32E11    Vectored interrupt error
16Triangle    Test CPU registers and instructions
17Triangle    Test system RAM
184 vertical lines    Test CPU call and trap instructions
19Diamond     Initialize screen and printer drivers
20EC0     8255 parallel interface IC test failed
21EC1     6845 CRT controller IC test failed
22EC2     1797 floppy disk controller chip failed
23EC3     8253 timer IC failed
24EC4     8251 keyboard interface failed
25EC5     8251 keyboard test failed
26EC6     8259 PIC IC test failed
27EK0     Keyboard did not respond
28Ek1     Keyboard responds, but self test failed
29ED1     Disk drive 1 test failed
30ED0     Disk drive 0 test failed
31E10     Non-vectored interrupt error
32E11     Vectored interrupt error
3333
3434*/
3535
src/mess/drivers/atarist.c
r11247r11248
24852485   MCFG_SCREEN_RAW_PARAMS(Y2/4, ATARIST_HTOT_PAL, ATARIST_HBEND_PAL, ATARIST_HBSTART_PAL, ATARIST_VTOT_PAL, ATARIST_VBEND_PAL, ATARIST_VBSTART_PAL)
24862486
24872487   MCFG_PALETTE_LENGTH(512)
2488   
2488
24892489   // sound hardware
24902490   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
24912491
src/mess/drivers/tx0.c
r11247r11248
15941594
15951595   /* basic machine hardware */
15961596   /* TX0 CPU @ approx. 167 kHz (no master clock, but the memory cycle time is
1597   approximately 6usec) */
1597    approximately 6usec) */
15981598   MCFG_CPU_MODIFY("maincpu")
15991599   MCFG_CPU_CONFIG(tx0_reset_param)
16001600   MCFG_CPU_PROGRAM_MAP(tx0_8kw_map)
src/mess/drivers/c128.c
r11247r11248
812812   MCFG_DEVICE_REMOVE("c1571")
813813
814814   MCFG_CBM_IEC_ADD("iec", c128d81_iec_bus)
815//   MCFG_C1563_ADD("c1563", "iec", 8)
815//  MCFG_C1563_ADD("c1563", "iec", 8)
816816   MCFG_C1581_ADD("c1581", "iec", 8)
817817MACHINE_CONFIG_END
818818
src/mess/drivers/eti660.c
r11247r11248
33    TODO:
44
55    - does not boot!
6   - reset key
6    - reset key
77    - allocate color ram
88    - quickload
99    - color on
src/mess/drivers/px8.c
r11247r11248
518518   AM_RANGE(0x00, 0x07) AM_READWRITE(gah40m_r, gah40m_w)
519519   AM_RANGE(0x0c, 0x0c) AM_DEVREADWRITE_LEGACY(I8251_TAG, msm8251_data_r, msm8251_data_w)
520520   AM_RANGE(0x0d, 0x0d) AM_DEVREADWRITE_LEGACY(I8251_TAG, msm8251_status_r, msm8251_control_w)
521//   AM_RANGE(0x0e, 0x0e) AM_DEVREADWRITE_LEGACY(SED1320_TAG, sed1330_status_r, sed1330_data_w)
522//   AM_RANGE(0x0f, 0x0f) AM_DEVREADWRITE_LEGACY(SED1320_TAG, sed1330_data_r, sed1330_command_w)
521//  AM_RANGE(0x0e, 0x0e) AM_DEVREADWRITE_LEGACY(SED1320_TAG, sed1330_status_r, sed1330_data_w)
522//  AM_RANGE(0x0f, 0x0f) AM_DEVREADWRITE_LEGACY(SED1320_TAG, sed1330_data_r, sed1330_command_w)
523523ADDRESS_MAP_END
524524
525525/*-------------------------------------------------
src/mess/drivers/pet.c
r11247r11248
677677   MCFG_SCREEN_SIZE(320, 200)
678678   MCFG_SCREEN_VISIBLE_AREA(0, 320 - 1, 0, 200 - 1)
679679   MCFG_SCREEN_UPDATE( pet )
680   
680
681681   MCFG_GFXDECODE( pet )
682682   MCFG_PALETTE_LENGTH(ARRAY_LENGTH(pet_palette) / 3)
683683   MCFG_PALETTE_INIT( pet )
src/mess/drivers/c16.c
r11247r11248
549549   MCFG_DEVICE_REMOVE("ted7360")
550550   MCFG_TED7360_ADD("ted7360", plus4_ted7360_intf)
551551   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
552   
552
553553   /* internal ram */
554554   MCFG_RAM_MODIFY(RAM_TAG)
555555   MCFG_RAM_DEFAULT_SIZE("64K")
src/mess/drivers/pcw.c
r11247r11248
13851385   MCFG_SCREEN_SIZE( PCW_PRINTER_WIDTH, PCW_PRINTER_HEIGHT )
13861386   MCFG_SCREEN_VISIBLE_AREA(0, PCW_PRINTER_WIDTH-1, 0, PCW_PRINTER_HEIGHT-1)
13871387   MCFG_SCREEN_UPDATE( pcw_printer )
1388   
1388
13891389   MCFG_DEFAULT_LAYOUT( layout_pcw )
13901390
13911391MACHINE_CONFIG_END
r11247r11248
13971397   MCFG_SCREEN_SIZE( PCW_PRINTER_WIDTH, PCW_PRINTER_HEIGHT )
13981398   MCFG_SCREEN_VISIBLE_AREA(0, PCW_PRINTER_WIDTH-1, 0, PCW_PRINTER_HEIGHT-1)
13991399   MCFG_SCREEN_UPDATE( pcw_printer )
1400   
1400
14011401   MCFG_DEFAULT_LAYOUT( layout_pcw )
14021402
14031403   /* internal ram */
src/mess/drivers/genpc.c
r11247r11248
22
33    drivers/genpc.c
44
5   Driver file for geenric PC machines
5    Driver file for geenric PC machines
66
77***************************************************************************/
88
r11247r11248
7676   PORT_INCLUDE( kb_keytronic_pc )
7777   PORT_INCLUDE( pcvideo_cga )
7878INPUT_PORTS_END
79   
79
8080static const unsigned i86_address_mask = 0x000fffff;
8181
8282static const kb_keytronic_interface pc_keytronic_intf =
8383{
84   DEVCB_DEVICE_LINE_MEMBER("mb", ibm5160_mb_device, keyboard_clock_w),   
84   DEVCB_DEVICE_LINE_MEMBER("mb", ibm5160_mb_device, keyboard_clock_w),
8585   DEVCB_DEVICE_LINE_MEMBER("mb", ibm5160_mb_device, keyboard_data_w)
8686};
8787
r11247r11248
9191   DEVCB_DEVICE_LINE("keyboard", kb_keytronic_data_w)
9292};
9393
94static DEVICE_INPUT_DEFAULTS_START(cga)
94static DEVICE_INPUT_DEFAULTS_START(cga)
9595   DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x20)
9696DEVICE_INPUT_DEFAULTS_END
9797
98static DEVICE_INPUT_DEFAULTS_START(vga)
98static DEVICE_INPUT_DEFAULTS_START(vga)
9999   DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x00)
100100DEVICE_INPUT_DEFAULTS_END
101101
r11247r11248
106106   MCFG_CPU_IO_MAP(pc8_io)
107107
108108   MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu",pc_keytronic_keyboard_intf)
109   
109
110110   /* video hardware */
111111   MCFG_PALETTE_LENGTH( 256 )
112112
r11247r11248
115115   MCFG_ISA8_BUS_DEVICE("mb:isa", 2, "fdc", ISA8_FDC)
116116   MCFG_ISA8_BUS_DEVICE("mb:isa", 3, "hdc", ISA8_HDC)
117117   MCFG_ISA8_BUS_DEVICE("mb:isa", 4, "adlib", ISA8_ADLIB)
118   
118
119119   /* keyboard */
120120   MCFG_KB_KEYTRONIC_ADD("keyboard", pc_keytronic_intf)
121121
r11247r11248
130130   MCFG_CPU_ADD("maincpu", V20, 4772720)
131131   MCFG_CPU_PROGRAM_MAP(pc8_map)
132132   MCFG_CPU_IO_MAP(pc8_io)
133   
133
134134   MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu",pc_keytronic_keyboard_intf)
135   
135
136136   MCFG_ISA8_BUS_DEVICE("mb:isa", 0, "hercules", ISA8_HERCULES)
137137   MCFG_ISA8_BUS_DEVICE("mb:isa", 1, "com", ISA8_COM)
138138   MCFG_ISA8_BUS_DEVICE("mb:isa", 2, "fdc", ISA8_FDC)
r11247r11248
141141
142142   /* video hardware */
143143   MCFG_PALETTE_LENGTH( 256 )
144   
144
145145   /* keyboard */
146146   MCFG_KB_KEYTRONIC_ADD("keyboard", pc_keytronic_intf)
147147   /* internal ram */
r11247r11248
152152
153153static MACHINE_CONFIG_START( pccga, genpc_state )
154154   /* basic machine hardware */
155   MCFG_CPU_ADD("maincpu",  I8086, 4772720)           
156   MCFG_CPU_PROGRAM_MAP(pc16_map)   
157   MCFG_CPU_IO_MAP(pc16_io)     
155   MCFG_CPU_ADD("maincpu",  I8086, 4772720)
156   MCFG_CPU_PROGRAM_MAP(pc16_map)
157   MCFG_CPU_IO_MAP(pc16_io)
158158   MCFG_CPU_CONFIG(i86_address_mask)
159   
159
160160   MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu",pc_keytronic_keyboard_intf)
161161   MCFG_DEVICE_INPUT_DEFAULTS(cga)
162   
162
163163   /* video hardware */
164164   MCFG_FRAGMENT_ADD( pcvideo_cga )
165165   MCFG_PALETTE_LENGTH( 256 )
r11247r11248
180180
181181static MACHINE_CONFIG_START( xtvga, genpc_state )
182182   /* basic machine hardware */
183   MCFG_CPU_ADD("maincpu",  I8086, 4772720)           
184   MCFG_CPU_PROGRAM_MAP(pc16_map)   
185   MCFG_CPU_IO_MAP(pc16_io)   
183   MCFG_CPU_ADD("maincpu",  I8086, 4772720)
184   MCFG_CPU_PROGRAM_MAP(pc16_map)
185   MCFG_CPU_IO_MAP(pc16_io)
186186   MCFG_CPU_CONFIG(i86_address_mask)
187   
187
188188   MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu",pc_keytronic_keyboard_intf)
189189   MCFG_DEVICE_INPUT_DEFAULTS(vga)
190     
190
191191   MCFG_ISA8_BUS_DEVICE("mb:isa", 1, "com", ISA8_COM)
192192   MCFG_ISA8_BUS_DEVICE("mb:isa", 2, "fdc", ISA8_FDC)
193193   MCFG_ISA8_BUS_DEVICE("mb:isa", 3, "hdc", ISA8_HDC)
194194   MCFG_ISA8_BUS_DEVICE("mb:isa", 4, "sblaster", ISA8_SOUND_BLASTER_1_0)
195   
195
196196   /* video hardware */
197197   MCFG_IBM_VGA_ADD( "vga" )
198198   MCFG_PALETTE_LENGTH( 256 )
r11247r11248
240240***************************************************************************/
241241
242242/*     YEAR     NAME        PARENT      COMPAT  MACHINE     INPUT       INIT        COMPANY     FULLNAME */
243COMP(  1987,   pc,         ibm5150,   0,      pccga,      pccga,      0,         "<generic>",  "PC (CGA)" , GAME_NO_SOUND)
244COMP ( 1987,   pcmda,      ibm5150,   0,      pcmda,      pcgen,      0,          "<generic>",  "PC (MDA)" , GAME_NO_SOUND)
245COMP ( 1987,   pcherc,     ibm5150,   0,      pcherc,     pcgen,      0,          "<generic>",  "PC (Hercules)" , GAME_NO_SOUND)
243COMP(  1987,   pc,         ibm5150,   0,      pccga,      pccga,      0,        "<generic>",  "PC (CGA)" , GAME_NO_SOUND)
244COMP ( 1987,   pcmda,      ibm5150,   0,      pcmda,      pcgen,      0,        "<generic>",  "PC (MDA)" , GAME_NO_SOUND)
245COMP ( 1987,   pcherc,     ibm5150,   0,      pcherc,     pcgen,      0,        "<generic>",  "PC (Hercules)" , GAME_NO_SOUND)
246246COMP ( 1987,   xtvga,      ibm5150,   0,      xtvga,      pcgen,      0,         "<generic>",  "PC (VGA)" , GAME_NOT_WORKING | GAME_NO_SOUND)
src/mess/drivers/mirage.c
r11247r11248
4949class mirage_state : public driver_device
5050{
5151public:
52    mirage_state(running_machine &machine, const driver_device_config_base &config)
52    mirage_state(running_machine &machine, const driver_device_config_base &config)
5353    : driver_device(machine, config) { }
5454
5555   virtual void machine_reset();
r11247r11248
101101   AM_RANGE(0xe801, 0xe801) AM_DEVREADWRITE_LEGACY("wd177x", wd17xx_track_r,wd17xx_track_w)
102102   AM_RANGE(0xe802, 0xe802) AM_DEVREADWRITE_LEGACY("wd177x", wd17xx_sector_r,wd17xx_sector_w)
103103   AM_RANGE(0xe803, 0xe803) AM_DEVREADWRITE_LEGACY("wd177x", wd17xx_data_r,wd17xx_data_w)
104//   AM_RANGE(0xec00, 0xecef) AM_DEVREADWRITE_LEGACY("es5503", es5503_r, es5503_w)
104//  AM_RANGE(0xec00, 0xecef) AM_DEVREADWRITE_LEGACY("es5503", es5503_r, es5503_w)
105105   AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION("osrom", 0)
106106ADDRESS_MAP_END
107107
108108// port A: front panel
109109static WRITE8_DEVICE_HANDLER( mirage_via_write_porta )
110110{
111//   printf("PORT A: %02x\n", data);
111//  printf("PORT A: %02x\n", data);
112112}
113113
114// port B:
115//   bit 7: OUT UART clock
116//   bit 4: OUT disk enable (motor on?)
117//    bit 3: OUT sample/play
118//   bit 2: OUT mic line/in
119//   bit 1: OUT upper/lower bank (64k halves)
120//   bit 0: OUT bank 0/bank 1 (32k halves)
114// port B:
115//  bit 7: OUT UART clock
116//  bit 4: OUT disk enable (motor on?)
117//  bit 3: OUT sample/play
118//  bit 2: OUT mic line/in
119//  bit 1: OUT upper/lower bank (64k halves)
120//  bit 0: OUT bank 0/bank 1 (32k halves)
121121
122122static WRITE8_DEVICE_HANDLER( mirage_via_write_portb )
123123{
r11247r11248
140140   return 0;
141141}
142142
143// port B:
144//    bit 6: IN FDC disk loaded
145//   bit 5: IN 5503 sync (?)
143// port B:
144//  bit 6: IN FDC disk loaded
145//  bit 5: IN 5503 sync (?)
146146static READ8_DEVICE_HANDLER( mirage_via_read_portb )
147147{
148148   return 0x60;
src/mess/drivers/at.c
r11247r11248
798798   MCFG_PC_LPT_ADD("lpt_1", at_lpt_config)
799799   MCFG_PC_LPT_ADD("lpt_2", at_lpt_config)
800800
801   /* harddisk */   
801   /* harddisk */
802802   MCFG_HARDDISK_ADD("harddisk")
803803   MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt)
804804
src/mess/drivers/v1050.c
r11247r11248
915915        PC1
916916        PC2
917917        PC3                 clock busy
918        PC4                 
919        PC5                 
920        PC6                 
921        PC7                 
918        PC4
919        PC5
920        PC6
921        PC7
922922
923923    */
924924
r11247r11248
934934        PC0
935935        PC1
936936        PC2
937        PC3                 
937        PC3
938938        PC4                 clock address write
939939        PC5                 clock data write
940940        PC6                 clock data read
src/mess/drivers/ql.c
r11247r11248
3838    - CST Thor XVI W40FF (40MB Winchester, 2 Floppies)
3939
4040
41   2011-02-22, P.Harvey-Smith,
42      Implemented Miracle Trump Card disk and ram interface.
43     
44      The trump card has some interesting memory mapping and re-mapping during initialisation which goes like this
45     
46      On rest the card ram is mapped into the entire $40000-$fffff area, this is the official 512K expansion ram area
47      plus the area set aside for addon card roms. The trump card onboard rom is also mapped in at $10000-$17fff.
48     
49      The main bios then performs a series of loops that initialise and size the ram, this will find either
50      0K, 256K, 512K or 768K of expansion ram depending on how many banks of ram are populated.
51     
52      After the ram test, the main bios looks for the signature longword of a cartridge rom at $0c000, this read
53      triggers the Trump Card to also map it's rom in at $c0000-$c7fff, the first addon rom area. If a cartridge
54      rom is found it is first initialised.
55     
56      The main bios goes on to search the addon card rom area from $c0000 by searching for the signature word for
57      an addon rom at $c0000 and upwards in 16K steps (there is a bug in JM and before that means they only find
58      the first addon, but this does not matter).
59     
60      The main bios finds the trump card addon rom at $c0000, and calls it's initialisation routine at $c011e, this
61      contains a jump instruction to jump to $10124 (in the lower mapped copy of the trumpcard rom).
62     
63      The first memory access in the $10000-$17fff range triggers the trumcard to page out the rom at $c0000, and
64      page the ram back in. Once it arrives at this state the ram will remain paged in until the next reset.
65     
66      I have implemented this with a pair of read handlers at $0c000-$0cfff and $10000-$17fff which do the apropreate
67      re-map of the upper area and then remove themselves from the address map and return it to simple rom handlers.
68     
69      On the Trump card the above is implemented with a pair of 16L8 PAL chips, the logic of these was decoded with
70      the assistance of Malcolm Lear, without who's help working all this out would have been a much harder process.
71           
41    2011-02-22, P.Harvey-Smith,
42        Implemented Miracle Trump Card disk and ram interface.
43
44        The trump card has some interesting memory mapping and re-mapping during initialisation which goes like this
45
46        On rest the card ram is mapped into the entire $40000-$fffff area, this is the official 512K expansion ram area
47        plus the area set aside for addon card roms. The trump card onboard rom is also mapped in at $10000-$17fff.
48
49        The main bios then performs a series of loops that initialise and size the ram, this will find either
50        0K, 256K, 512K or 768K of expansion ram depending on how many banks of ram are populated.
51
52        After the ram test, the main bios looks for the signature longword of a cartridge rom at $0c000, this read
53        triggers the Trump Card to also map it's rom in at $c0000-$c7fff, the first addon rom area. If a cartridge
54        rom is found it is first initialised.
55
56        The main bios goes on to search the addon card rom area from $c0000 by searching for the signature word for
57        an addon rom at $c0000 and upwards in 16K steps (there is a bug in JM and before that means they only find
58        the first addon, but this does not matter).
59
60        The main bios finds the trump card addon rom at $c0000, and calls it's initialisation routine at $c011e, this
61        contains a jump instruction to jump to $10124 (in the lower mapped copy of the trumpcard rom).
62
63        The first memory access in the $10000-$17fff range triggers the trumcard to page out the rom at $c0000, and
64        page the ram back in. Once it arrives at this state the ram will remain paged in until the next reset.
65
66        I have implemented this with a pair of read handlers at $0c000-$0cfff and $10000-$17fff which do the apropreate
67        re-map of the upper area and then remove themselves from the address map and return it to simple rom handlers.
68
69        On the Trump card the above is implemented with a pair of 16L8 PAL chips, the logic of these was decoded with
70        the assistance of Malcolm Lear, without who's help working all this out would have been a much harder process.
71
7272*/
7373
7474#define ADDRESS_MAP_MODERN
r11247r11248
266266
267267   if(LOG_DISK_READ)
268268      logerror("%s DiskIO:Read of %08X\n",machine().describe_context(),m_disk_io_base+offset);
269     
269
270270   switch (offset)
271271   {
272      case 0x0000   : result=wd17xx_r(m_fdc, offset); break;
273      case 0x0001   : result=wd17xx_r(m_fdc, offset); break;
272      case 0x0000   : result=wd17xx_r(m_fdc, offset); break;
273      case 0x0001   : result=wd17xx_r(m_fdc, offset); break;
274274      case 0x0002   : result=wd17xx_r(m_fdc, offset); break;
275275      case 0x0003   : result=wd17xx_r(m_fdc, offset); break;
276      default      : logerror("%s DiskIO undefined read : from %08X\n",machine().describe_context(),m_disk_io_base+offset); break;   
276      default      : logerror("%s DiskIO undefined read : from %08X\n",machine().describe_context(),m_disk_io_base+offset); break;
277277   }
278   
278
279279   return result;
280280}
281281
r11247r11248
286286
287287   switch (offset)
288288   {
289      case 0x0000   : wd17xx_w(m_fdc, offset, data); break;
290      case 0x0001   : wd17xx_w(m_fdc, offset, data); break;
289      case 0x0000   : wd17xx_w(m_fdc, offset, data); break;
290      case 0x0001   : wd17xx_w(m_fdc, offset, data); break;
291291      case 0x0002   : wd17xx_w(m_fdc, offset, data); break;
292292      case 0x0003   : wd17xx_w(m_fdc, offset, data); break;
293293      case 0x0004 : if(m_disk_type==DISK_TYPE_SANDY)
r11247r11248
296296                   m_printer_char=data;
297297      case 0x2000   : if(m_disk_type==DISK_TYPE_TRUMP)
298298                  trump_card_set_control(data);break;
299      default      : logerror("%s DiskIO undefined write : %02X to %08X\n",machine().describe_context(),data,m_disk_io_base+offset); break;     
299      default      : logerror("%s DiskIO undefined write : %02X to %08X\n",machine().describe_context(),data,m_disk_io_base+offset); break;
300300   }
301301}
302302
r11247r11248
305305   // If we have more than 640K them map extra ram into top 256K
306306   // else just map to unmap.
307307   if (ram_get_size(m_ram)>(640*1024))
308      space.install_ram(0x0c0000, 0x0fffff, NULL);
308      space.install_ram(0x0c0000, 0x0fffff, NULL);
309309   else
310310      space.unmap_readwrite(0x0c0000, 0x0fffff);
311   
311
312312   // Setup trumcard rom mapped to rom so unlink us
313313   space.install_rom(0x010000, 0x018000, &machine().region(M68008_TAG)->base()[TRUMP_ROM_BASE]);
314314
315   return machine().region(M68008_TAG)->base()[TRUMP_ROM_BASE+offset];   
315   return machine().region(M68008_TAG)->base()[TRUMP_ROM_BASE+offset];
316316}
317317
318318READ8_MEMBER( ql_state::cart_rom_r )
319319{
320   // Setup trumcard rom mapped in at $c0000   
320   // Setup trumcard rom mapped in at $c0000
321321   space.install_rom(0x0c0000, 0x0c8000, &machine().region(M68008_TAG)->base()[TRUMP_ROM_BASE]);
322322
323323   // Setup cart rom to rom handler, so unlink us
r11247r11248
330330{
331331   if(data & TRUMP_DRIVE0_MASK)
332332      wd17xx_set_drive(m_fdc,0);
333     
333
334334   if(data & TRUMP_DRIVE1_MASK)
335      wd17xx_set_drive(m_fdc,1);   
335      wd17xx_set_drive(m_fdc,1);
336336
337337   wd17xx_set_side(m_fdc,(data & TRUMP_SIDE_MASK) >> TRUMP_SIDE_SHIFT);
338338}
r11247r11248
345345
346346   if(data & SANDY_DRIVE0_MASK)
347347      wd17xx_set_drive(m_fdc,0);
348     
348
349349   if(data & SANDY_DRIVE1_MASK)
350      wd17xx_set_drive(m_fdc,1);   
350      wd17xx_set_drive(m_fdc,1);
351351
352352   wd17xx_set_side(m_fdc,(data & SANDY_SIDE_MASK) >> SANDY_SIDE_SHIFT);
353353   if (data & SANDY_SIDE_MASK)
r11247r11248
359359   {
360360      if(data & SANDY_PRINTER_STROBE)
361361         printer_output(m_printer,m_printer_char);
362         
363      if(data & SANDY_PRINTER_INTMASK)
362
363      if(data & SANDY_PRINTER_INTMASK)
364364         m_zx8302->extint_w(ASSERT_LINE);
365365   }
366}   
366}
367367
368368static READ_LINE_DEVICE_HANDLER( disk_io_dden_r )
369369{
370370   ql_state *state = device->machine().driver_data<ql_state>();
371   
371
372372   if(state->m_disk_type==DISK_TYPE_SANDY)
373373      return ((state->m_disk_io_byte & SANDY_DDEN_MASK) >> SANDY_DDEN_SHIFT);
374374   else
r11247r11248
397397static ADDRESS_MAP_START( ql_mem, AS_PROGRAM, 8, ql_state )
398398   AM_RANGE(0x000000, 0x00bfff) AM_ROM   // 48K System ROM
399399   AM_RANGE(0x00c000, 0x00ffff) AM_ROM AM_WRITENOP                   // 16K Cartridge ROM
400   AM_RANGE(0x010000, 0x017fff) AM_UNMAP                            // Trump card ROM is mapped in here
400   AM_RANGE(0x010000, 0x017fff) AM_UNMAP                           // Trump card ROM is mapped in here
401401   AM_RANGE(0x018000, 0x018003) AM_DEVREAD(ZX8302_TAG, zx8302_device, rtc_r)
402402   AM_RANGE(0x018000, 0x018001) AM_DEVWRITE(ZX8302_TAG, zx8302_device, rtc_w)
403403   AM_RANGE(0x018002, 0x018002) AM_DEVWRITE(ZX8302_TAG, zx8302_device, control_w)
r11247r11248
407407   AM_RANGE(0x018022, 0x018022) AM_DEVREADWRITE(ZX8302_TAG, zx8302_device, mdv_track_r, data_w)
408408   AM_RANGE(0x018023, 0x018023) AM_DEVREAD(ZX8302_TAG, zx8302_device, mdv_track_r) AM_WRITENOP
409409   AM_RANGE(0x018063, 0x018063) AM_DEVWRITE(ZX8301_TAG, zx8301_device, control_w)
410   AM_RANGE(0x01c000, 0x01ffff) AM_UNMAP                            // 16K Expansion I/O
410   AM_RANGE(0x01c000, 0x01ffff) AM_UNMAP                           // 16K Expansion I/O
411411   AM_RANGE(0x020000, 0x03ffff) AM_DEVREADWRITE(ZX8301_TAG, zx8301_device, data_r, data_w)
412412   AM_RANGE(0x040000, 0x0fffff) AM_RAM
413413ADDRESS_MAP_END
r11247r11248
878878   NULL
879879};
880880
881wd17xx_interface ql_wd17xx_interface =
881wd17xx_interface ql_wd17xx_interface =
882882{
883883   DEVCB_LINE(disk_io_dden_r),
884884   DEVCB_LINE(disk_io_intrq_w),
r11247r11248
916916//  MACHINE_START( ql )
917917//-------------------------------------------------
918918
919//
919//
920920// The 896K option is dealt with once the machine is up and running as
921// the Trump Card ROM is initally mapped in at $C0000-$C8000, as this is
921// the Trump Card ROM is initally mapped in at $C0000-$C8000, as this is
922922// oficially the expansion card rom area. Once the Trump Card has initialised
923// it maps the last 256K of ram into this area (asuming that it has 768K
923// it maps the last 256K of ram into this area (asuming that it has 768K
924924// onboard).
925925//
926926
r11247r11248
937937
938938void ql_state::machine_reset()
939939{
940   address_space    *program    = m_maincpu->memory().space(AS_PROGRAM);
940   address_space   *program   = m_maincpu->memory().space(AS_PROGRAM);
941941
942942   m_disk_type=input_port_read(machine(),QL_CONFIG_PORT) & DISK_TYPE_MASK;
943943   logerror("disktype=%d\n",m_disk_type);
r11247r11248
968968      case 640*1024:
969969         program->unmap_readwrite(0x0c0000, 0x0fffff);
970970         break;
971   }   
971   }
972972
973973   switch (m_disk_type)
974974   {
r11247r11248
10451045   MCFG_RAM_ADD(RAM_TAG)
10461046   MCFG_RAM_DEFAULT_SIZE("128K")
10471047   MCFG_RAM_EXTRA_OPTIONS("192K,256K,384K,640K,896K")
1048   
1048
10491049   // Parallel printer port on Sandy disk interface
10501050   MCFG_PRINTER_ADD(PRINTER_TAG)
10511051MACHINE_CONFIG_END
src/mess/drivers/mikrosha.c
r11247r11248
254254/* Driver */
255255/*    YEAR  NAME      PARENT  COMPAT    MACHINE     INPUT       INIT        COMPANY     FULLNAME        FLAGS */
256256COMP( 1987, mikrosha, radio86,0,      mikrosha,   mikrosha,   radio86,   "Lianozovo Electromechanical Factory",      "Mikrosha",      0)
257COMP( 1987, m86rk,      radio86,0,      mikrosha,   mikrosha,   radio86,   "<unknown>",      "Mikrosha-86RK",      0)
257COMP( 1987, m86rk,     radio86,0,      mikrosha,   mikrosha,   radio86,   "<unknown>",      "Mikrosha-86RK",      0)
src/mess/drivers/qx10.c
r11247r11248
1717    banking:
1818    - 0x1c = 0
1919    AM_RANGE(0x0000,0x1fff) ROM
20   AM_RANGE(0x2000,0xdfff) NOP
20    AM_RANGE(0x2000,0xdfff) NOP
2121    AM_RANGE(0xe000,0xffff) RAM
2222    - 0x1c = 1 0x20 = 1
2323    AM_RANGE(0x0000,0x7fff) RAM (0x18 selects bank)
r11247r11248
624624      if(data != 1 && data != 2 && data != 4)
625625         printf("%02x\n",data);
626626
627      if(data & 1)      { state->m_hgdc->bank_w(*space, 0, 0); } // B
627      if(data & 1)     { state->m_hgdc->bank_w(*space, 0, 0); } // B
628628      else if(data & 2) { state->m_hgdc->bank_w(*space, 0, 2); } // G
629629      else if(data & 4) { state->m_hgdc->bank_w(*space, 0, 4); } // R
630630   }
r11247r11248
655655   AM_RANGE(0x34, 0x34) AM_DEVREAD("upd765", upd765_status_r)
656656   AM_RANGE(0x35, 0x35) AM_DEVREADWRITE("upd765", upd765_data_r, upd765_data_w)
657657   AM_RANGE(0x38, 0x39) AM_DEVREADWRITE_MODERN("upd7220", upd7220_device, read, write)
658//   AM_RANGE(0x3a, 0x3a) GDC zoom
659//   AM_RANGE(0x3b, 0x3b) GDC light pen req
658//  AM_RANGE(0x3a, 0x3a) GDC zoom
659//  AM_RANGE(0x3b, 0x3b) GDC light pen req
660660   AM_RANGE(0x3c, 0x3c) AM_READWRITE(mc146818_data_r, mc146818_data_w)
661661   AM_RANGE(0x3d, 0x3d) AM_WRITE(mc146818_offset_w)
662662   AM_RANGE(0x40, 0x4f) AM_DEVREADWRITE("8237dma_1", i8237_r, i8237_w)
663663   AM_RANGE(0x50, 0x5f) AM_DEVREADWRITE("8237dma_2", i8237_r, i8237_w)
664//   AM_RANGE(0xfc, 0xfd) Multi-Font comms
664//  AM_RANGE(0xfc, 0xfd) Multi-Font comms
665665ADDRESS_MAP_END
666666
667667/* Input ports */
r11247r11248
10341034   ROM_LOAD( "m12020a.3e", 0x0000, 0x0800, CRC(fa27f333) SHA1(73d27084ca7b002d5f370220d8da6623a6e82132))
10351035
10361036   ROM_REGION( 0x1000, "chargen", 0 )
1037//   ROM_LOAD( "qge.2e",   0x0000, 0x0800, BAD_DUMP CRC(ed93cb81) SHA1(579e68bde3f4184ded7d89b72c6936824f48d10b))  //this one contains special characters only
1037//  ROM_LOAD( "qge.2e",   0x0000, 0x0800, BAD_DUMP CRC(ed93cb81) SHA1(579e68bde3f4184ded7d89b72c6936824f48d10b))  //this one contains special characters only
10381038   ROM_LOAD( "qge.2e",   0x0000, 0x1000, BAD_DUMP CRC(eb31a2d5) SHA1(6dc581bf2854a07ae93b23b6dfc9c7abd3c0569e))
10391039ROM_END
10401040
r11247r11248
10491049   ROM_LOAD( "m12020a.3e", 0x0000, 0x0800, CRC(fa27f333) SHA1(73d27084ca7b002d5f370220d8da6623a6e82132)) //mfont.rom
10501050
10511051   ROM_REGION( 0x1000, "chargen", 0 )
1052//   ROM_LOAD( "font.rom", 0x0000, 0x0800, BAD_DUMP CRC(04a6da6d) SHA1(ef9743476f6fb30ca9209cf700e985a7f85066bb)) //this one contains normal characters
1052//  ROM_LOAD( "font.rom", 0x0000, 0x0800, BAD_DUMP CRC(04a6da6d) SHA1(ef9743476f6fb30ca9209cf700e985a7f85066bb)) //this one contains normal characters
10531053   ROM_LOAD( "qge.2e",   0x0000, 0x1000, BAD_DUMP CRC(eb31a2d5) SHA1(6dc581bf2854a07ae93b23b6dfc9c7abd3c0569e))
10541054ROM_END
10551055
src/mess/drivers/tmc1800.c
r11247r11248
170170   address_space *program = m_maincpu->memory().space(AS_PROGRAM);
171171   UINT8 *ram = ram_get_ptr(m_ram);
172172   UINT8 *rom = machine().region(CDP1802_TAG)->base();
173   
173
174174   if (m_roc)
175175   {
176176      // monitor ROM
r11247r11248
356356
357357   PORT_START("RUN")
358358   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Run/Reset") PORT_CODE(KEYCODE_R) PORT_TOGGLE PORT_CHANGED(tmc2000_run_pressed, 0)
359   
359
360360   PORT_START("IN2")
361361   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
362362   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
src/mess/drivers/fmtowns.c
r11247r11248
23342334   m_towns_rtc_timer->adjust(attotime::zero,0,attotime::from_hz(1));
23352335   m_towns_kb_timer->adjust(attotime::zero,0,attotime::from_msec(10));
23362336   /* Why does enabling this timer break the driver? */
2337//   m_towns_freerun_counter->adjust(attotime::zero,0,attotime::from_usec(1));
2337//  m_towns_freerun_counter->adjust(attotime::zero,0,attotime::from_usec(1));
23382338}
23392339
23402340static const struct pit8253_config towns_pit8253_config =
r11247r11248
24802480   MCFG_CPU_PROGRAM_MAP(towns_mem)
24812481   MCFG_CPU_IO_MAP(towns_io)
24822482   MCFG_CPU_VBLANK_INT("screen", towns_vsync_irq)
2483   
2483
24842484   //    MCFG_MACHINE_RESET(towns)
24852485
24862486   /* video hardware */
r11247r11248
24902490   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
24912491   MCFG_SCREEN_SIZE(768,512)
24922492   MCFG_SCREEN_VISIBLE_AREA(0, 768-1, 0, 512-1)
2493   //   MCFG_SCREEN_UPDATE(towns)
2493   //  MCFG_SCREEN_UPDATE(towns)
24942494
24952495   MCFG_GFXDECODE(towns)
24962496
r11247r11248
26282628  ROM_REGION32_LE( 0x280000, "user", 0)
26292629   ROM_LOAD("fmt_dos.rom",  0x000000, 0x080000, CRC(112872ee) SHA1(57fd146478226f7f215caf63154c763a6d52165e) )
26302630   // F20 ROM space appears to be all 0xFF on an HR, so it is assumed to be not present
2631//   ROM_LOAD("fmt_f20.rom",  0x080000, 0x080000, CRC(9f55a20c) SHA1(1920711cb66340bb741a760de187de2f76040b8c) )
2631//  ROM_LOAD("fmt_f20.rom",  0x080000, 0x080000, CRC(9f55a20c) SHA1(1920711cb66340bb741a760de187de2f76040b8c) )
26322632   ROM_LOAD("fmt_dic.rom",  0x100000, 0x080000, CRC(82d1daa2) SHA1(7564020dba71deee27184824b84dbbbb7c72aa4e) )
26332633   ROM_LOAD("fmt_fnt.rom",  0x180000, 0x040000, CRC(dd6fd544) SHA1(a216482ea3162f348fcf77fea78e0b2e4288091a) )
26342634   ROM_LOAD("fmthr_sys.rom",0x200000, 0x040000, CRC(8aeff982) SHA1(a4ebf2e247a8e15a5f1ff003b657bbe3a67203d8) )
src/mess/drivers/a7800.c
r11247r11248
287287   MCFG_CARTSLOT_NOT_MANDATORY
288288   MCFG_CARTSLOT_START(a7800_cart)
289289   MCFG_CARTSLOT_LOAD(a7800_cart)
290   MCFG_CARTSLOT_PARTIALHASH(a7800_partialhash)   
290   MCFG_CARTSLOT_PARTIALHASH(a7800_partialhash)
291291   MCFG_CARTSLOT_INTERFACE("a7800_cart")
292292
293293   /* software lists */
src/mess/drivers/terak.c
r11247r11248
11/***************************************************************************
2   
2
33        Terak 8510A
44
55        23/02/2009 Skeleton driver.
r11247r11248
3636   terak_state *state = space->machine().driver_data<terak_state>();
3737   state->m_unit = (data >> 8) & 0x03;
3838   state->m_cmd  = (data >> 1) & 0x07;
39   logerror("terak_fdc_command_w %04x [%d %d]\n",data,state->m_unit,state->m_cmd);   
39   logerror("terak_fdc_command_w %04x [%d %d]\n",data,state->m_unit,state->m_cmd);
4040}
4141
4242static READ16_HANDLER(terak_fdc_data_r)
r11247r11248
5353static ADDRESS_MAP_START(terak_mem, AS_PROGRAM, 16)
5454   ADDRESS_MAP_UNMAP_HIGH
5555   AM_RANGE( 0x0000,  0xf5ff ) AM_RAM // RAM
56   
56
5757   AM_RANGE( 0173000, 0173177 ) AM_ROM // ROM
5858   AM_RANGE( 0177000, 0177001 ) AM_READWRITE(terak_fdc_status_r,terak_fdc_command_w)
5959   AM_RANGE( 0177002, 0177003 ) AM_READWRITE(terak_fdc_data_r,terak_fdc_data_w)
r11247r11248
6464INPUT_PORTS_END
6565
6666
67static MACHINE_RESET(terak)
68{   
67static MACHINE_RESET(terak)
68{
6969}
7070
7171static VIDEO_START( terak )
r11247r11248
8989    MCFG_CPU_PROGRAM_MAP(terak_mem)
9090
9191    MCFG_MACHINE_RESET(terak)
92   
92
9393    /* video hardware */
9494    MCFG_SCREEN_ADD("screen", RASTER)
9595    MCFG_SCREEN_REFRESH_RATE(50)
r11247r11248
114114/* Driver */
115115
116116/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT  COMPANY   FULLNAME       FLAGS */
117COMP( ????, terak,  0,       0,    terak,    terak,     0,        "Terak",   "Terak 8510A",      GAME_NOT_WORKING | GAME_NO_SOUND)
117COMP( ????, terak,  0,       0,    terak,   terak,    0,       "Terak",   "Terak 8510A",      GAME_NOT_WORKING | GAME_NO_SOUND)
118118
src/mess/drivers/sacstate.c
r11247r11248
11/***************************************************************************
2   
2
33        SacState 8008
44
55        23/02/2009 Skeleton driver.
r11247r11248
2222UINT8 val = 0x00;
2323static READ8_HANDLER(status_r)
2424{
25   UINT8 old_val = val;   
25   UINT8 old_val = val;
2626   sacstate_state *state = space->machine().driver_data<sacstate_state>();
2727   if (state->m_term_data!=0) old_val |= 0x04; // data in
2828   val = val ^ 0x40;
r11247r11248
5252static ADDRESS_MAP_START(sacstate_mem, AS_PROGRAM, 8)
5353   ADDRESS_MAP_UNMAP_HIGH
5454   AM_RANGE(0x000,0x7ff) AM_ROM
55   AM_RANGE(0x800,0xfff) AM_RAM   
55   AM_RANGE(0x800,0xfff) AM_RAM
5656ADDRESS_MAP_END
5757
5858static ADDRESS_MAP_START( sacstate_io , AS_IO, 8)
r11247r11248
7979   DEVCB_HANDLER(sacstate_kbd_put)
8080};
8181
82static MACHINE_RESET(sacstate)
83{   
82static MACHINE_RESET(sacstate)
83{
8484}
8585
8686static MACHINE_CONFIG_START( sacstate, sacstate_state )
8787    /* basic machine hardware */
8888    MCFG_CPU_ADD("maincpu",I8008, 800000)
8989    MCFG_CPU_PROGRAM_MAP(sacstate_mem)
90    MCFG_CPU_IO_MAP(sacstate_io)   
90    MCFG_CPU_IO_MAP(sacstate_io)
9191
9292    MCFG_MACHINE_RESET(sacstate)
93   
93
9494    /* video hardware */
9595    MCFG_FRAGMENT_ADD( generic_terminal )
9696   MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG,sacstate_terminal_intf)
r11247r11248
112112/* Driver */
113113
114114/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY   FULLNAME       FLAGS */
115COMP( ????, sacstate,  0,       0,    sacstate,    sacstate,     0,  "SacState",   "SacState 8008",      GAME_NOT_WORKING | GAME_NO_SOUND)
115COMP( ????, sacstate,  0,       0,   sacstate,   sacstate,    0,  "SacState",   "SacState 8008",      GAME_NOT_WORKING | GAME_NO_SOUND)
116116
src/mess/drivers/einstein.c
r11247r11248
4444    Kevin Thacker [MESS driver]
4545
4646
47   2011-Mar-14, Phill Harvey-Smith.
48      Having traced out the circuit of the TK02 80 coumn card, I have changed the
49      emulation to match what the hardware does, the emulation was mostly correct,
50      just some minor issues with the addressing of the VRAM, and bit 0 of the
51      status register is the latched output of the 6845 DE, and not vblank.
52     
53      Also added defines to stop the log being flooded with keyboard messages :)
47    2011-Mar-14, Phill Harvey-Smith.
48        Having traced out the circuit of the TK02 80 coumn card, I have changed the
49        emulation to match what the hardware does, the emulation was mostly correct,
50        just some minor issues with the addressing of the VRAM, and bit 0 of the
51        status register is the latched output of the 6845 DE, and not vblank.
5452
53        Also added defines to stop the log being flooded with keyboard messages :)
54
5555 ******************************************************************************/
5656
5757#include "emu.h"
r11247r11248
9595}
9696
9797/* TODO: Verify implementation */
98/* From traces of the TK02 board character ROM is addressed by the 6845 as follows
99   bit 0..2    ra0..ra2
100   bit 3..10   data 0..7 from VRAM
101   bit 11      ra3
102   bit 12      jumper M004, this could be used to select two different character
103            sets.
98/* From traces of the TK02 board character ROM is addressed by the 6845 as follows
99   bit 0..2     ra0..ra2
100   bit 3..10    data 0..7 from VRAM
101   bit 11       ra3
102   bit 12       jumper M004, this could be used to select two different character
103                sets.
104104*/
105105static MC6845_UPDATE_ROW( einstein_6845_update_row )
106106{
r11247r11248
433433   TMS9928A_reset();
434434
435435   /* a reset causes the fire int, adc int, keyboard int mask
436   to be set to 1, which causes all these to be DISABLED */
436    to be set to 1, which causes all these to be DISABLED */
437437   einstein->m_interrupt = 0;
438438   einstein->m_interrupt_mask = 0;
439439
r11247r11248
785785   MCFG_MACHINE_RESET(einstein)
786786
787787   /* this is actually clocked at the system clock 4 MHz, but this would be too fast for our
788   driver. So we update at 50Hz and hope this is good enough. */
788    driver. So we update at 50Hz and hope this is good enough. */
789789   MCFG_TIMER_ADD_PERIODIC("keyboard", einstein_keyboard_timer_callback, attotime::from_hz(50))
790790
791791   MCFG_Z80PIO_ADD(IC_I063, XTAL_X002 / 2, einstein_pio_intf)
src/mess/drivers/multi8.c
r11247r11248
4040};
4141
4242#define mc6845_h_char_total    (state->m_crtc_vreg[0])
43#define mc6845_h_display       (state->m_crtc_vreg[1])
43#define mc6845_h_display      (state->m_crtc_vreg[1])
4444#define mc6845_h_sync_pos      (state->m_crtc_vreg[2])
4545#define mc6845_sync_width      (state->m_crtc_vreg[3])
4646#define mc6845_v_char_total      (state->m_crtc_vreg[4])
47#define mc6845_v_total_adj       (state->m_crtc_vreg[5])
47#define mc6845_v_total_adj      (state->m_crtc_vreg[5])
4848#define mc6845_v_display      (state->m_crtc_vreg[6])
4949#define mc6845_v_sync_pos      (state->m_crtc_vreg[7])
5050#define mc6845_mode_ctrl      (state->m_crtc_vreg[8])
51#define mc6845_tile_height       (state->m_crtc_vreg[9]+1)
52#define mc6845_cursor_y_start    (state->m_crtc_vreg[0x0a])
51#define mc6845_tile_height      (state->m_crtc_vreg[9]+1)
52#define mc6845_cursor_y_start   (state->m_crtc_vreg[0x0a])
5353#define mc6845_cursor_y_end    (state->m_crtc_vreg[0x0b])
54#define mc6845_start_addr        (((state->m_crtc_vreg[0x0c]<<8) & 0x3f00) | (state->m_crtc_vreg[0x0d] & 0xff))
54#define mc6845_start_addr      (((state->m_crtc_vreg[0x0c]<<8) & 0x3f00) | (state->m_crtc_vreg[0x0d] & 0xff))
5555#define mc6845_cursor_addr     (((state->m_crtc_vreg[0x0e]<<8) & 0x3f00) | (state->m_crtc_vreg[0x0f] & 0xff))
56#define mc6845_light_pen_addr     (((state->m_crtc_vreg[0x10]<<8) & 0x3f00) | (state->m_crtc_vreg[0x11] & 0xff))
56#define mc6845_light_pen_addr   (((state->m_crtc_vreg[0x10]<<8) & 0x3f00) | (state->m_crtc_vreg[0x11] & 0xff))
5757#define mc6845_update_addr     (((state->m_crtc_vreg[0x12]<<8) & 0x3f00) | (state->m_crtc_vreg[0x13] & 0xff))
5858
5959static VIDEO_START( multi8 )
r11247r11248
535535{
536536   int vsync = (input_port_read(device->machine(), "VBLANK") & 0x1) << 5;
537537   /*
538   -x-- ---- kanji rom is present (0) yes
539   --x- ---- vsync
540   ---- --x- fdc rom is present (0) yes
541   */
538    -x-- ---- kanji rom is present (0) yes
539    --x- ---- vsync
540    ---- --x- fdc rom is present (0) yes
541    */
542542
543543   return 0x9f | vsync | 0x00;
544544}
src/mess/drivers/sms.c
r11247r11248
561561   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
562562   MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_PAL/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, PAL_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS + 240)
563563   MCFG_SCREEN_UPDATE(sms1)
564   
564
565565   MCFG_PALETTE_LENGTH(64+16)
566   MCFG_PALETTE_INIT(sms)   
566   MCFG_PALETTE_INIT(sms)
567567
568568   MCFG_DEFAULT_LAYOUT(layout_sms1)
569569
src/mess/drivers/pockstat.c
r11247r11248
769769   ps_intc_set_interrupt_line(field->port->machine(), PS_INT_BTN_RIGHT,   (buttons &  2) ? 1 : 0);
770770   ps_intc_set_interrupt_line(field->port->machine(), PS_INT_BTN_LEFT,   (buttons &  4) ? 1 : 0);
771771   ps_intc_set_interrupt_line(field->port->machine(), PS_INT_BTN_DOWN,   (buttons &  8) ? 1 : 0);
772   ps_intc_set_interrupt_line(field->port->machine(), PS_INT_BTN_UP,    (buttons & 16) ? 1 : 0);
772   ps_intc_set_interrupt_line(field->port->machine(), PS_INT_BTN_UP,   (buttons & 16) ? 1 : 0);
773773}
774774
775775static READ32_HANDLER(ps_rombank_r)
src/mess/drivers/homez80.c
r11247r11248
267267
268268static INTERRUPT_GEN( homez80_interrupt )
269269{
270   homez80_state *state = device->machine().driver_data<homez80_state>();   
270   homez80_state *state = device->machine().driver_data<homez80_state>();
271271   device_set_input_line(device, 0, (state->m_irq) ? HOLD_LINE : CLEAR_LINE);
272272   state->m_irq ^= 1;
273273}
src/mess/drivers/abc1600.c
r11247r11248
1010
1111    TODO:
1212
13   - floppy
14      - sector 0 not boot
15   - BUS0I/0X/1/2
16   - M68K bus errors
17   - short/long reset (RSTBUT)
18   - SCC interrupt
13    - floppy
14        - sector 0 not boot
15    - BUS0I/0X/1/2
16    - M68K bus errors
17    - short/long reset (RSTBUT)
18    - SCC interrupt
1919    - CIO (interrupt controller)
20      - RTC
21      - NVRAM
20        - RTC
21        - NVRAM
2222    - hard disk (Xebec S1410)
2323
2424*/
r11247r11248
183183{
184184   address_space *program = m_maincpu->memory().space(AS_PROGRAM);
185185   UINT8 data = 0;
186   
186
187187   if (X12)
188188   {
189189      if (X11)
r11247r11248
193193         case IORD0:
194194            data = iord0_r(*program, offset);
195195            break;
196         
196
197197         default:
198198            logerror("Unmapped read from virtual I/O %06x\n", offset);
199199         }
r11247r11248
207207            break;
208208
209209         case CRT:
210            if (A0)
210            if (A0)
211211               data = mc6845_register_r(m_crtc, 0);
212212            else
213213               data = mc6845_status_r(m_crtc, 0);
r11247r11248
526526READ8_MEMBER( abc1600_state::cause_r )
527527{
528528   /*
529   
530      bit      description
531     
532      0      RSTBUT
533      1      1
534      2      DMAOK
535      3      X16
536      4      X17
537      5      X18
538      6      X19
539      7      X20
540   
541   */
542   
529
530        bit     description
531
532        0       RSTBUT
533        1       1
534        2       DMAOK
535        3       X16
536        4       X17
537        5       X18
538        6       X19
539        7       X20
540
541    */
542
543543   UINT8 data = 0x02;
544   
544
545545   // DMA status
546546   data |= m_cause;
547   
547
548548   watchdog_reset(machine());
549549
550550   return data;
r11247r11248
558558WRITE8_MEMBER( abc1600_state::task_w )
559559{
560560   /*
561   
562      bit      description
563     
564      0      SEGA5
565      1      SEGA6
566      2      SEGA7
567      3      SEGA8
568      4     
569      5     
570      6      BOOTE
571      7      READ_MAGIC
572   
573   */
574561
562        bit     description
563
564        0       SEGA5
565        1       SEGA6
566        2       SEGA7
567        3       SEGA8
568        4
569        5
570        6       BOOTE
571        7       READ_MAGIC
572
573    */
574
575575   m_task = data;
576576
577577   if (LOG) logerror("Task %u BOOTE %u READ_MAGIC %u\n", m_task & 0x0f, BOOTE, READ_MAGIC);
r11247r11248
585585READ8_MEMBER( abc1600_state::segment_r )
586586{
587587   /*
588   
589      bit      description
590     
591      0      SEGD0
592      1      SEGD1
593      2      SEGD2
594      3      SEGD3
595      4      SEGD4
596      5      SEGD5
597      6      SEGD6
598      7      READ_MAGIC
599   
600   */
601588
589        bit     description
590
591        0       SEGD0
592        1       SEGD1
593        2       SEGD2
594        3       SEGD3
595        4       SEGD4
596        5       SEGD5
597        6       SEGD6
598        7       READ_MAGIC
599
600    */
601
602602   int segment = (A8 << 4) | ((offset >> 15) & 0x0f);
603603   UINT8 data = SEGMENT_DATA(segment);
604604
r11247r11248
613613WRITE8_MEMBER( abc1600_state::segment_w )
614614{
615615   /*
616   
617      bit      description
618     
619      0      SEGD0
620      1      SEGD1
621      2      SEGD2
622      3      SEGD3
623      4      SEGD4
624      5      SEGD5
625      6      SEGD6
626      7     
627   
628   */
629616
617        bit     description
618
619        0       SEGD0
620        1       SEGD1
621        2       SEGD2
622        3       SEGD3
623        4       SEGD4
624        5       SEGD5
625        6       SEGD6
626        7
627
628    */
629
630630   int segment = (A8 << 4) | ((offset >> 15) & 0x0f);
631631   SEGMENT_DATA(segment) = data & 0x7f;
632   
632
633633   if (LOG) logerror("Task %u Segment %u : %02x\n", m_task & 0x0f, segment, data);
634634}
635635
r11247r11248
641641READ8_MEMBER( abc1600_state::page_r )
642642{
643643   /*
644   
645      bit      description
646     
647      0      X11
648      1      X12
649      2      X13
650      3      X14
651      4      X15
652      5      X16
653      6      X17
654      7      X18
655644
656      8      X19
657      9      X20
658      10
659      11
660      12
661      13
662      14      _WP
663      15      NONX
664   
665   */
645        bit     description
666646
647        0       X11
648        1       X12
649        2       X13
650        3       X14
651        4       X15
652        5       X16
653        6       X17
654        7       X18
655
656        8       X19
657        9       X20
658        10
659        11
660        12
661        13
662        14      _WP
663        15      NONX
664
665    */
666
667667   int segment = (A8 << 4) | ((offset >> 15) & 0x0f);
668668   int page = (offset >> 11) & 0x0f;
669669   UINT16 data = PAGE_DATA(segment, page);
r11247r11248
679679WRITE8_MEMBER( abc1600_state::page_w )
680680{
681681   /*
682   
683      bit      description
684     
685      0      X11
686      1      X12
687      2      X13
688      3      X14
689      4      X15
690      5      X16
691      6      X17
692      7      X18
693682
694      8      X19
695      9      X20
696      10
697      11
698      12
699      13
700      14      _WP
701      15      NONX
702   
703   */
683        bit     description
704684
685        0       X11
686        1       X12
687        2       X13
688        3       X14
689        4       X15
690        5       X16
691        6       X17
692        7       X18
693
694        8       X19
695        9       X20
696        10
697        11
698        12
699        13
700        14      _WP
701        15      NONX
702
703    */
704
705705   int segment = (A8 << 4) | ((offset >> 15) & 0x0f);
706706   int page = (offset >> 11) & 0x0f;
707707
r11247r11248
724724//**************************************************************************
725725
726726//-------------------------------------------------
727//  update_drdy0 -
727//  update_drdy0 -
728728//-------------------------------------------------
729729
730730inline void abc1600_state::update_drdy0()
r11247r11248
743743
744744
745745//-------------------------------------------------
746//  update_drdy1 -
746//  update_drdy1 -
747747//-------------------------------------------------
748748
749749inline void abc1600_state::update_drdy1()
r11247r11248
762762
763763
764764//-------------------------------------------------
765//  update_drdy2 -
765//  update_drdy2 -
766766//-------------------------------------------------
767767
768768inline void abc1600_state::update_drdy2()
r11247r11248
771771   m_dma2->rdy_w(1);
772772}
773773
774   
774
775775//-------------------------------------------------
776//  get_dma_address -
776//  get_dma_address -
777777//-------------------------------------------------
778778
779779inline offs_t abc1600_state::get_dma_address(int index, UINT16 offset)
r11247r11248
781781   // A0 = DMA15, A1 = BA1, A2 = BA2
782782   UINT8 dmamap_addr = index | BIT(offset, 15);
783783   UINT8 dmamap = m_dmamap[dmamap_addr];
784   
784
785785   m_cause = (dmamap & 0x1f) << 3;
786786
787787   return ((dmamap & 0x1f) << 16) | offset;
r11247r11248
843843WRITE8_MEMBER( abc1600_state::dmamap_w )
844844{
845845   /*
846   
847      bit      description
848     
849      0      X16
850      1      X17
851      2      X18
852      3      X19
853      4      X20
854      5     
855      6     
856      7      _R/W
857   
858   */
859   
846
847        bit     description
848
849        0       X16
850        1       X17
851        2       X18
852        3       X19
853        4       X20
854        5
855        6
856        7       _R/W
857
858    */
859
860860   m_dmamap[offset & 7] = data;
861861}
862862
r11247r11248
873873WRITE8_MEMBER( abc1600_state::fw0_w )
874874{
875875   /*
876   
877      bit      description
878     
879      0      SEL1
880      1      SEL2
881      2      SEL3
882      3      MOTOR
883      4      LC/PC
884      5      LC/PC
885      6     
886      7     
887   
888   */
889876
877        bit     description
878
879        0       SEL1
880        1       SEL2
881        2       SEL3
882        3       MOTOR
883        4       LC/PC
884        5       LC/PC
885        6
886        7
887
888    */
889
890890   logerror("FW0 %02x\n", data);
891891
892892   // drive select
893893   if (BIT(data, 0)) wd17xx_set_drive(m_fdc, 0);
894894   if (BIT(data, 1)) wd17xx_set_drive(m_fdc, 1);
895895   if (BIT(data, 2)) wd17xx_set_drive(m_fdc, 2);
896   
896
897897   // floppy motor
898898   floppy_mon_w(m_floppy, !BIT(data, 3));
899899}
r11247r11248
906906WRITE8_MEMBER( abc1600_state::fw1_w )
907907{
908908   /*
909   
910      bit      description
911     
912      0      MR
913      1      DDEN
914      2      HLT
915      3      MINI
916      4      HLD
917      5      P0
918      6      P1
919      7      P2
920   
921   */
922   
909
910        bit     description
911
912        0       MR
913        1       DDEN
914        2       HLT
915        3       MINI
916        4       HLD
917        5       P0
918        6       P1
919        7       P2
920
921    */
922
923923   logerror("FW1 %02x\n", data);
924924
925925   // FDC master reset
926926   wd17xx_mr_w(m_fdc, BIT(data, 0));
927   
927
928928   // density select
929929   wd17xx_dden_w(m_fdc, BIT(data, 1));
930930}
r11247r11248
937937WRITE8_MEMBER( abc1600_state::spec_contr_reg_w )
938938{
939939   int state = !BIT(data, 3);
940   
940
941941   switch (data & 0x07)
942942   {
943943   case 0: // CS7
944944      m_cs7 = state;
945945      break;
946   
946
947947   case 1:
948948      break;
949   
949
950950   case 2: // _BTCE
951951      m_btce = state;
952952      break;
953   
953
954954   case 3: // _ATCE
955955      m_atce = state;
956956      break;
957   
957
958958   case 4: // PARTST
959959      m_partst = state;
960960      break;
961   
961
962962   case 5: // _DMADIS
963963      m_dmadis = state;
964964      break;
965   
965
966966   case 6: // SYSSCC
967967      m_sysscc = state;
968968      update_drdy1();
969969      break;
970   
970
971971   case 7: // SYSFS
972972      m_sysfs = state;
973973      update_drdy0();
r11247r11248
991991
992992/*
993993
994   Supervisor Data map
994    Supervisor Data map
995995
996   AM_RANGE(0x00000, 0x03fff) AM_ROM AM_REGION(MC68008P8_TAG, 0)
997   AM_RANGE(0x80000, 0x80001) AM_MIRROR(0x7f800) AM_MASK(0x7f801) AM_READWRITE(page_r, page_w)
998   AM_RANGE(0x80002, 0x80002) AM_MIRROR(0x7f800) AM_NOP
999   AM_RANGE(0x80003, 0x80003) AM_MIRROR(0x7f800) AM_MASK(0x7f800) AM_READWRITE(segment_r, segment_w)
1000   AM_RANGE(0x80007, 0x80007) AM_READWRITE(cause_r, task_w)
996    AM_RANGE(0x00000, 0x03fff) AM_ROM AM_REGION(MC68008P8_TAG, 0)
997    AM_RANGE(0x80000, 0x80001) AM_MIRROR(0x7f800) AM_MASK(0x7f801) AM_READWRITE(page_r, page_w)
998    AM_RANGE(0x80002, 0x80002) AM_MIRROR(0x7f800) AM_NOP
999    AM_RANGE(0x80003, 0x80003) AM_MIRROR(0x7f800) AM_MASK(0x7f800) AM_READWRITE(segment_r, segment_w)
1000    AM_RANGE(0x80007, 0x80007) AM_READWRITE(cause_r, task_w)
10011001
1002   Virtual Address Map
1003   
1004   AM_RANGE(0x000000, 0x0fffff) AM_RAM
1005   AM_RANGE(0x100000, 0x17ffff) AM_RAM AM_MEMBER(m_video_ram)
1006   AM_RANGE(0x1ff000, 0x1ff007) AM_DEVREADWRITE_LEGACY(SAB1797_02P_TAG, wd17xx_r, wd17xx_w) // A2,A1
1007   AM_RANGE(0x1ff100, 0x1ff100) AM_DEVWRITE_LEGACY(SY6845E_TAG, mc6845_address_w)
1008   AM_RANGE(0x1ff101, 0x1ff101) AM_DEVREADWRITE_LEGACY(SY6845E_TAG, mc6845_register_r, mc6845_register_w)
1009   AM_RANGE(0x1ff200, 0x1ff207) AM_DEVREADWRITE_LEGACY(Z80DART_TAG, z80dart_ba_cd_r, z80dart_ba_cd_w) // A2,A1
1010   AM_RANGE(0x1ff300, 0x1ff300) AM_DEVREADWRITE_LEGACY(Z8410AB1_0_TAG, z80dma_r, z80dma_w)
1011   AM_RANGE(0x1ff400, 0x1ff400) AM_DEVREADWRITE_LEGACY(Z8410AB1_1_TAG, z80dma_r, z80dma_w)
1012   AM_RANGE(0x1ff500, 0x1ff500) AM_DEVREADWRITE_LEGACY(Z8410AB1_2_TAG, z80dma_r, z80dma_w)
1013   AM_RANGE(0x1ff600, 0x1ff607) AM_DEVREADWRITE(Z8530B1_TAG, scc8530_r, scc8530_w) // A2,A1
1014   AM_RANGE(0x1ff700, 0x1ff707) AM_DEVREADWRITE(Z8536B1_TAG, z8536_r, z8536_w) // A2,A1
1015   AM_RANGE(0x1ff800, 0x1ff800) AM_READ(iord0_w)
1016   AM_RANGE(0x1ff800, 0x1ff807) AM_WRITE(iowr0_w)
1017   AM_RANGE(0x1ff900, 0x1ff907) AM_WRITE(iowr1_w)
1018   AM_RANGE(0x1ffa00, 0x1ffa07) AM_WRITE(iowr2_w)
1019   AM_RANGE(0x1ffb00, 0x1ffb00) AM_WRITE(fw0_w)
1020   AM_RANGE(0x1ffb01, 0x1ffb01) AM_WRITE(fw1_w)
1021   AM_RANGE(0x1ffd00, 0x1ffd07) AM_WRITE(dmamap_w)
1022   AM_RANGE(0x1ffe00, 0x1ffe00) AM_WRITE(spec_contr_reg_w)
1002    Virtual Address Map
10231003
1004    AM_RANGE(0x000000, 0x0fffff) AM_RAM
1005    AM_RANGE(0x100000, 0x17ffff) AM_RAM AM_MEMBER(m_video_ram)
1006    AM_RANGE(0x1ff000, 0x1ff007) AM_DEVREADWRITE_LEGACY(SAB1797_02P_TAG, wd17xx_r, wd17xx_w) // A2,A1
1007    AM_RANGE(0x1ff100, 0x1ff100) AM_DEVWRITE_LEGACY(SY6845E_TAG, mc6845_address_w)
1008    AM_RANGE(0x1ff101, 0x1ff101) AM_DEVREADWRITE_LEGACY(SY6845E_TAG, mc6845_register_r, mc6845_register_w)
1009    AM_RANGE(0x1ff200, 0x1ff207) AM_DEVREADWRITE_LEGACY(Z80DART_TAG, z80dart_ba_cd_r, z80dart_ba_cd_w) // A2,A1
1010    AM_RANGE(0x1ff300, 0x1ff300) AM_DEVREADWRITE_LEGACY(Z8410AB1_0_TAG, z80dma_r, z80dma_w)
1011    AM_RANGE(0x1ff400, 0x1ff400) AM_DEVREADWRITE_LEGACY(Z8410AB1_1_TAG, z80dma_r, z80dma_w)
1012    AM_RANGE(0x1ff500, 0x1ff500) AM_DEVREADWRITE_LEGACY(Z8410AB1_2_TAG, z80dma_r, z80dma_w)
1013    AM_RANGE(0x1ff600, 0x1ff607) AM_DEVREADWRITE(Z8530B1_TAG, scc8530_r, scc8530_w) // A2,A1
1014    AM_RANGE(0x1ff700, 0x1ff707) AM_DEVREADWRITE(Z8536B1_TAG, z8536_r, z8536_w) // A2,A1
1015    AM_RANGE(0x1ff800, 0x1ff800) AM_READ(iord0_w)
1016    AM_RANGE(0x1ff800, 0x1ff807) AM_WRITE(iowr0_w)
1017    AM_RANGE(0x1ff900, 0x1ff907) AM_WRITE(iowr1_w)
1018    AM_RANGE(0x1ffa00, 0x1ffa07) AM_WRITE(iowr2_w)
1019    AM_RANGE(0x1ffb00, 0x1ffb00) AM_WRITE(fw0_w)
1020    AM_RANGE(0x1ffb01, 0x1ffb01) AM_WRITE(fw1_w)
1021    AM_RANGE(0x1ffd00, 0x1ffd07) AM_WRITE(dmamap_w)
1022    AM_RANGE(0x1ffe00, 0x1ffe00) AM_WRITE(spec_contr_reg_w)
1023
10241024*/
10251025
10261026
r11247r11248
11921192READ8_MEMBER( abc1600_state::cio_pa_r )
11931193{
11941194   /*
1195     
1196      bit      description
1197     
1198      PA0      BUS2
1199      PA1      BUS1
1200      PA2      BUS0X*2
1201      PA3      BUS0X*3
1202      PA4      BUS0X*4
1203      PA5      BUS0X*5
1204      PA6      BUS0X
1205      PA7      BUS0I
1206     
1207   */
1208   
1195
1196        bit     description
1197
1198        PA0     BUS2
1199        PA1     BUS1
1200        PA2     BUS0X*2
1201        PA3     BUS0X*3
1202        PA4     BUS0X*4
1203        PA5     BUS0X*5
1204        PA6     BUS0X
1205        PA7     BUS0I
1206
1207    */
1208
12091209   return 0;
12101210}
12111211
12121212READ8_MEMBER( abc1600_state::cio_pb_r )
12131213{
12141214   /*
1215     
1216      bit      description
1217     
1218      PB0     
1219      PB1      POWERFAIL
1220      PB2     
1221      PB3     
1222      PB4      MINT
1223      PB5      _PREN-1
1224      PB6      _PREN-0
1225      PB7      FINT
1226     
1227   */
1228   
1215
1216        bit     description
1217
1218        PB0
1219        PB1     POWERFAIL
1220        PB2
1221        PB3
1222        PB4     MINT
1223        PB5     _PREN-1
1224        PB6     _PREN-0
1225        PB7     FINT
1226
1227    */
1228
12291229   UINT8 data = 0;
1230   
1230
12311231   // floppy interrupt
12321232   data |= wd17xx_intrq_r(m_fdc) << 7;
12331233
r11247r11248
12371237WRITE8_MEMBER( abc1600_state::cio_pb_w )
12381238{
12391239   /*
1240     
1241      bit      description
1242     
1243      PB0      PRBR
1244      PB1     
1245      PB2     
1246      PB3     
1247      PB4     
1248      PB5     
1249      PB6     
1250      PB7     
1251     
1252   */
12531240
1241        bit     description
1242
1243        PB0     PRBR
1244        PB1
1245        PB2
1246        PB3
1247        PB4
1248        PB5
1249        PB6
1250        PB7
1251
1252    */
1253
12541254   // printer baudrate
12551255   int prbr = BIT(data, 0);
12561256
r11247r11248
12611261READ8_MEMBER( abc1600_state::cio_pc_r )
12621262{
12631263   /*
1264     
1265      bit      description
1266     
1267      PC0      1
1268      PC1      DATA IN
1269      PC2      1
1270      PC3      1
1271     
1272   */
12731264
1265        bit     description
1266
1267        PC0     1
1268        PC1     DATA IN
1269        PC2     1
1270        PC3     1
1271
1272    */
1273
12741274   UINT8 data = 0x0d;
12751275
1276   // data in   
1276   // data in
12771277   data |= (m_rtc->dio_r() | m_nvram->do_r()) << 1;
1278   
1278
12791279   return data;
12801280}
12811281
12821282WRITE8_MEMBER( abc1600_state::cio_pc_w )
12831283{
12841284   /*
1285     
1286      bit      description
1287     
1288      PC0      CLOCK
1289      PC1      DATA OUT
1290      PC2      RTC CS
1291      PC3      NVRAM CS
1292     
1293   */
12941285
1286        bit     description
1287
1288        PC0     CLOCK
1289        PC1     DATA OUT
1290        PC2     RTC CS
1291        PC3     NVRAM CS
1292
1293    */
1294
12951295   int clock = BIT(data, 0);
12961296   int data_out = BIT(data, 1);
12971297   int rtc_cs = BIT(data, 2);
12981298   int nvram_cs = BIT(data, 3);
12991299
13001300   logerror("CLK %u DATA %u RTC %u NVRAM %u\n", clock, data_out, rtc_cs, nvram_cs);
1301   
1301
13021302   m_rtc->cs_w(rtc_cs);
13031303   m_rtc->dio_w(data_out);
13041304   m_rtc->clk_w(clock);
1305   
1305
13061306   m_nvram->cs_w(nvram_cs);
13071307   m_nvram->di_w(data_out);
13081308   m_nvram->sk_w(clock);
r11247r11248
13441344static const wd17xx_interface fdc_intf =
13451345{
13461346   DEVCB_NULL,
1347   DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pb7_w),
1347   DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pb7_w),
13481348   DEVCB_DRIVER_LINE_MEMBER(abc1600_state, drq_w),
13491349   { FLOPPY_0, NULL, NULL, NULL }
13501350};
src/mess/drivers/hp9k.c
r11247r11248
11/***************************************************************************
22
33    Skeleton driver for HP9816 (HP Series 200 series, Technical Desktops)
4
4
55    see for docs: http://www.hpmuseum.net/collection_document.php
6 
7   TODO: everything!
86
7    TODO: everything!
8
99****************************************************************************/
1010
1111#include "emu.h"
src/mess/drivers/compis.c
r11247r11248
7878void compis_state::video_start()
7979{
8080   // find memory regions
81//   m_char_rom = machine.region("pcg")->base();
81//  m_char_rom = machine.region("pcg")->base();
8282
8383   VIDEO_START_NAME(generic_bitmapped)(machine());
8484}
r11247r11248
131131   AM_RANGE( 0x60000, 0x6ffff) AM_RAM
132132   AM_RANGE( 0x70000, 0x7ffff) AM_RAM
133133
134//   AM_RANGE( 0x80000, 0xeffff) AM_NOP
134//  AM_RANGE( 0x80000, 0xeffff) AM_NOP
135135   AM_RANGE( 0xe8000, 0xeffff) AM_ROM AM_REGION("bios",0) AM_WRITE8(vram_w,0xffff)
136136   AM_RANGE( 0xf0000, 0xfffff) AM_ROM AM_REGION("bios",0) AM_WRITE8(vram_w,0xffff)
137137ADDRESS_MAP_END
src/mess/drivers/ami1200.c
r11247r11248
11/*
2    Amiga 1200
2    Amiga 1200
33
44    Preliminary MAME driver by Mariusz Wojcieszek
55    CD-ROM controller by Ernesto Corvi
src/mess/drivers/trs80m2.c
r11247r11248
311311{
312312   /*
313313
314      bit     description
314        bit     description
315315
316      0       DATA
317      1       CLOCK
318      2       LED
319      3
320      4       LED
321      5
322      6
323      7
316        0       DATA
317        1       CLOCK
318        2       LED
319        3
320        4       LED
321        5
322        6
323        7
324324
325   */
325    */
326326
327327   int kbdata = BIT(data, 0);
328328   int kbclk = BIT(data, 1);
r11247r11248
355355{
356356   /*
357357
358      bit     description
358        bit     description
359359
360      0       D
361      1       C
362      2       B
363      3       A
364      4
365      5
366      6
367      7
360        0       D
361        1       C
362        2       B
363        3       A
364        4
365        5
366        6
367        7
368368
369   */
369    */
370370
371371   m_key_latch = BITSWAP8(data, 7, 6, 5, 4, 0, 1, 2, 3) & 0x0f;
372372}
src/mess/drivers/votrtnt.c
r11247r11248
198198/*
199199static ACIA6850_INTERFACE( acia_intf )
200200{
201   9600, // rx clock, actually based on dipswitches
202   9600, // tx clock, actually based on dipswitches
203   DEVCB_NULL, // rx callback
204   DEVCB_NULL, // tx callback
205   DEVCB_NULL,
206   DEVCB_NULL,
207   DEVCB_NULL,
208   DEVCB_NULL
201    9600, // rx clock, actually based on dipswitches
202    9600, // tx clock, actually based on dipswitches
203    DEVCB_NULL, // rx callback
204    DEVCB_NULL, // tx callback
205    DEVCB_NULL,
206    DEVCB_NULL,
207    DEVCB_NULL,
208    DEVCB_NULL
209209};*/
210210
211211/******************************************************************************
src/mess/drivers/pdp11.c
r11247r11248
11/***************************************************************************
2   
2
33        PDP-11
44
55        23/02/2009 Skeleton driver.
r11247r11248
4848}
4949
5050READ16_MEMBER(pdp11_state::term_rx_status_r)
51{   
51{
5252   return m_term_status;
5353}
5454
r11247r11248
7474INPUT_PORTS_END
7575
7676
77static MACHINE_RESET(pdp11)
78{   
79   // Load M9301-YA
77static MACHINE_RESET(pdp11)
78{
79   // Load M9301-YA
8080   UINT8* user1 = machine.region("user1")->base();
8181   UINT8* maincpu = machine.region("maincpu")->base();
8282   int i;
83   
83
8484   for(i=0;i<0x100;i++) {
8585      UINT8 nib1 = user1[i+0x000] ^ 0x00;
8686      UINT8 nib2 = user1[i+0x200] ^ 0x01;
8787      UINT8 nib3 = user1[i+0x400] ^ 0x0f;
8888      UINT8 nib4 = user1[i+0x600] ^ 0x0e;
89           
89
9090      maincpu[0xea00 + i*2 + 1] = (nib1 << 4) + nib2;
9191      maincpu[0xea00 + i*2 + 0] = (nib3 << 4) + nib4;
9292   }
r11247r11248
9595      UINT8 nib2 = user1[i+0x200] ^ 0x01;
9696      UINT8 nib3 = user1[i+0x400] ^ 0x0f;
9797      UINT8 nib4 = user1[i+0x600] ^ 0x0e;
98           
98
9999      maincpu[0xf600 + (i-0x100)*2 + 1] = (nib1 << 4) + nib2;
100100      maincpu[0xf600 + (i-0x100)*2 + 0] = (nib3 << 4) + nib4;
101101   }
102102}
103103
104static MACHINE_RESET(pdp11ub2)
105{   
104static MACHINE_RESET(pdp11ub2)
105{
106106   // Load M9312
107107   UINT8* user1 = machine.region("user1")->base();
108108   UINT8* maincpu = machine.region("maincpu")->base();
109109   int i;
110   
110
111111   //   3   2   1   8
112112   //   7   6   5   4
113113   // ~11 ~10   9   0
114   //  15  14  13 ~12   
114   //  15  14  13 ~12
115115   for(i=0;i<0x100;i++) {
116116      UINT8 nib1 = user1[i*4+0];
117117      UINT8 nib2 = user1[i*4+1];
118118      UINT8 nib3 = user1[i*4+2];
119119      UINT8 nib4 = user1[i*4+3];
120           
120
121121      maincpu[0xea00 + i*2 + 0] = (nib2 << 4) + ((nib1 & 0x0e) | (nib3 & 1));
122122      maincpu[0xea00 + i*2 + 1] = ((nib4 ^ 0x01)<<4) + ((nib1 & 0x01) | ((nib3 ^ 0x0c) & 0x0e));
123123   }
124   
124
125125   cpu_set_reg(machine.device("maincpu"), T11_PC, 0xea10);    // diag*/
126   //cpu_set_reg(machine.device("maincpu"), T11_PC, 0xea64);    // no-diag
126   //cpu_set_reg(machine.device("maincpu"), T11_PC, 0xea64);    // no-diag
127127}
128128
129static MACHINE_RESET(pdp11qb)
129static MACHINE_RESET(pdp11qb)
130130{
131131   cpu_set_reg(machine.device("maincpu"), T11_PC, 0xea00);
132132}
r11247r11248
159159   MCFG_CPU_PROGRAM_MAP(pdp11_mem)
160160
161161   MCFG_MACHINE_RESET(pdp11)
162   
162
163163   /* video hardware */
164164   MCFG_FRAGMENT_ADD( generic_terminal )
165165   MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, terminal_intf)
r11247r11248
171171
172172static MACHINE_CONFIG_DERIVED( pdp11qb, pdp11 )
173173   MCFG_MACHINE_RESET(pdp11qb)
174   
174
175175   MCFG_CPU_MODIFY("maincpu")
176176   MCFG_CPU_CONFIG(mxv11_data)
177177   MCFG_CPU_PROGRAM_MAP(pdp11qb_mem)
r11247r11248
179179
180180/* ROM definition */
181181ROM_START( pdp11ub )
182   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )   
182   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
183183   ROM_REGION( 0x1000, "user1", ROMREGION_ERASEFF )
184184   ROM_LOAD( "23-034a9.bin", 0x0000, 0x0200, CRC(01c5d78d) SHA1(b447c67bfd5134c142240a919f23a949e1953fb2))
185185   ROM_LOAD( "23-035a9.bin", 0x0200, 0x0200, CRC(c456df6c) SHA1(188c8ece6a2d67911016f55dd22b698a40aff515))
r11247r11248
188188ROM_END
189189
190190ROM_START( pdp11ub2 )
191   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )   
191   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
192192   ROM_REGION( 0x1000, "user1", ROMREGION_ERASEFF )
193193   ROM_LOAD( "23-248f1.bin", 0x0000, 0x0400, CRC(ecda1a6d) SHA1(b2bf770dda349fdd469235871564280baf06301d))
194194   //ROM_LOAD( "23-616f1-1666.bin", 0x0000, 0x0400, CRC(a3dfb5aa) SHA1(7f06c624ae3fbb49535258b8722b5a3c548da3ba))
195195ROM_END
196196
197197ROM_START( pdp11qb )
198   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )   
198   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
199199   ROM_LOAD16_BYTE( "m7195fa.1", 0xc000, 0x2000, CRC(0fa58752) SHA1(4bcd006790a60f2998ee8377ac5e2c18ef330930))
200200   ROM_LOAD16_BYTE( "m7195fa.2", 0xc001, 0x2000, CRC(15b6f60c) SHA1(80dd4f8ca3c27babb5e75111b04241596a07c53a))
201201ROM_END
202202/* Driver */
203203
204204/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY   FULLNAME       FLAGS */
205COMP( ????, pdp11ub,  0,       0,    pdp11,      pdp11,     0,   "Digital Equipment Corporation",   "PDP-11 [Unibus](M9301-YA)",      GAME_NOT_WORKING | GAME_NO_SOUND)
206COMP( ????, pdp11ub2, pdp11ub, 0,    pdp11ub2, pdp11,     0,   "Digital Equipment Corporation",   "PDP-11 [Unibus](M9312)",      GAME_NOT_WORKING | GAME_NO_SOUND)
207COMP( ????, pdp11qb,  pdp11ub, 0,    pdp11qb,  pdp11,     0,   "Digital Equipment Corporation",   "PDP-11 [Q-BUS] (M7195 - MXV11)",      GAME_NOT_WORKING | GAME_NO_SOUND)
205COMP( ????, pdp11ub,  0,       0,   pdp11,     pdp11,    0,   "Digital Equipment Corporation",   "PDP-11 [Unibus](M9301-YA)",      GAME_NOT_WORKING | GAME_NO_SOUND)
206COMP( ????, pdp11ub2, pdp11ub, 0,   pdp11ub2, pdp11,    0,   "Digital Equipment Corporation",   "PDP-11 [Unibus](M9312)",      GAME_NOT_WORKING | GAME_NO_SOUND)
207COMP( ????, pdp11qb,  pdp11ub, 0,   pdp11qb,  pdp11,    0,   "Digital Equipment Corporation",   "PDP-11 [Q-BUS] (M7195 - MXV11)",      GAME_NOT_WORKING | GAME_NO_SOUND)
208208
src/mess/drivers/a5105.c
r11247r11248
2525      : driver_device(machine, config),
2626      m_hgdc(*this, "upd7220"),
2727      m_cass(*this, "cassette"),
28        m_beep(*this, "beep")
28      m_beep(*this, "beep")
2929      { }
3030
3131   required_device<upd7220_device> m_hgdc;
r11247r11248
150150{
151151   a5105_state *state = space->machine().driver_data<a5105_state>();
152152   /*
153      xxxx ---- unknown
154      ---- xxxx keyboard mux
155   */
153        xxxx ---- unknown
154        ---- xxxx keyboard mux
155    */
156156
157157   state->m_key_mux = data;
158158}
r11247r11248
161161{
162162   a5105_state *state = space->machine().driver_data<a5105_state>();
163163/*port $ab
164      ---- 100x tape motor, active low
165      ---- 101x tape data
166      ---- 110x led (color green)
167      ---- 111x key click, active high
164        ---- 100x tape motor, active low
165        ---- 101x tape data
166        ---- 110x led (color green)
167        ---- 111x key click, active high
168168*/
169169   switch (data & 6)
170170   {
r11247r11248
217217static ADDRESS_MAP_START( a5105_io , AS_IO, 8)
218218   ADDRESS_MAP_UNMAP_HIGH
219219   ADDRESS_MAP_GLOBAL_MASK(0xff)
220//   AM_RANGE(0x40, 0x4b) fdc, upd765?
221//   AM_RANGE(0x80, 0x83) z80ctc
222//   AM_RANGE(0x90, 0x93) ppi8255?
220//  AM_RANGE(0x40, 0x4b) fdc, upd765?
221//  AM_RANGE(0x80, 0x83) z80ctc
222//  AM_RANGE(0x90, 0x93) ppi8255?
223223   AM_RANGE(0x98, 0x99) AM_DEVREADWRITE_MODERN("upd7220", upd7220_device, read, write)
224224
225225   AM_RANGE(0x9c, 0x9c) AM_WRITE(pcg_val_w)
226//   AM_RANGE(0x9d, 0x9d) crtc area (ff-based), palette routes here
226//  AM_RANGE(0x9d, 0x9d) crtc area (ff-based), palette routes here
227227   AM_RANGE(0x9e, 0x9e) AM_WRITE(pcg_addr_w)
228228
229//   AM_RANGE(0xa0, 0xa1) ay8910?
229//  AM_RANGE(0xa0, 0xa1) ay8910?
230230   AM_RANGE(0xa8, 0xa8) AM_READWRITE(a5105_memsel_r,a5105_memsel_w)
231231   AM_RANGE(0xa9, 0xa9) AM_READ(key_r)
232232   AM_RANGE(0xaa, 0xaa) AM_READWRITE(key_mux_r,key_mux_w)
src/mess/drivers/applix.c
r11247r11248
11/***************************************************************************
22
33    Skeleton driver for Applix 1616 computer
4
4
55    See for docs: http;//www.microbee-mspp.org.au
66    You need to sign up and make an introductory thread.
77    Then you will be granted permission to visit the repository.
8 
9   TODO: everything!
8
9    TODO: everything!
1010    - Required device Z8530 Z80SCC (not emulated, but it is just a dual-channel
1111      serial controller, possibly just like the other ones)
1212    - Keyboard is a standard pc keyboard
src/mess/drivers/nc.c
r11247r11248
478478   char filename[MAX_DRIVER_NAME_CHARS + 5];
479479
480480   sprintf(filename,"%s.hack", machine.system().name);
481   
481
482482   state->m_file = global_alloc(emu_file(machine.options().memcard_directory(), OPEN_FLAG_WRITE));
483483   state->m_file->open(filename);
484484}
src/mess/drivers/mac.c
r11247r11248
786786
787787   MCFG_VIDEO_START(macv8)
788788   MCFG_VIDEO_RESET(macrbv)
789   
789
790790   MCFG_SCREEN_MODIFY("screen")
791791   MCFG_SCREEN_UPDATE(macrbvvram)
792792
r11247r11248
818818
819819   MCFG_VIDEO_START(macsonora)
820820   MCFG_VIDEO_RESET(macrbv)
821   
821
822822   MCFG_SCREEN_MODIFY("screen")
823823   MCFG_SCREEN_UPDATE(macrbvvram)
824824
src/mess/drivers/nes.c
r11247r11248
556556   MCFG_CARTSLOT_EXTENSION_LIST("nes,unf")
557557   MCFG_CARTSLOT_NOT_MANDATORY
558558   MCFG_CARTSLOT_LOAD(nes_cart)
559   MCFG_CARTSLOT_PARTIALHASH(nes_partialhash)   
559   MCFG_CARTSLOT_PARTIALHASH(nes_partialhash)
560560
561561   MCFG_FLOPPY_DRIVE_ADD(FLOPPY_0, nes_floppy_config)
562562MACHINE_CONFIG_END
src/mess/drivers/mz700.c
r11247r11248
380380
381381   MCFG_GFXDECODE(mz800)
382382   MCFG_VIDEO_START(mz800)
383   
383
384384   MCFG_SCREEN_MODIFY("screen")
385385   MCFG_SCREEN_UPDATE(mz800)
386386
src/mess/drivers/next.c
r11247r11248
11/***************************************************************************
22
3   NeXT
3    NeXT
44
5   05/11/2009 Skeleton driver.
5    05/11/2009 Skeleton driver.
66
7   TODO:
8   - needs MCS1850 RTC device emulation to remove the ROM patch;
7    TODO:
8    - needs MCS1850 RTC device emulation to remove the ROM patch;
99
10   DASM notes:
11   - Jumping to 0x21ee means that the system POST failed
12   - 0x258c: ROM test (check with 0x1a)
10    DASM notes:
11    - Jumping to 0x21ee means that the system POST failed
12    - 0x258c: ROM test (check with 0x1a)
1313
1414****************************************************************************/
1515
r11247r11248
9393   if(!space->debugger_access())
9494      printf("%08x\n",cpu_get_pc(&space->device()));
9595   /*
96   x--- ---- ---- ---- ---- ---- ---- ---- dsp reset
97   -x-- ---- ---- ---- ---- ---- ---- ---- dsp block end
98   --x- ---- ---- ---- ---- ---- ---- ---- dsp unpacked
99   ---x ---- ---- ---- ---- ---- ---- ---- dsp mode b
100   ---- x--- ---- ---- ---- ---- ---- ---- dsp mode a
101   ---- -x-- ---- ---- ---- ---- ---- ---- remote int
102   ---- ---x ---- ---- ---- ---- ---- ---- local int
103   ---- ---- ---x ---- ---- ---- ---- ---- dram 256k
104   ---- ---- ---- ---x ---- ---- ---- ---- dram 1m
105   ---- ---- ---- ---- x--- ---- ---- ---- "timer on ipl7"
106   ---- ---- ---- ---- -xxx ---- ---- ---- rom waitstates
107   ---- ---- ---- ---- ---- x--- ---- ---- ROM 1M
108   ---- ---- ---- ---- ---- -x-- ---- ---- MCS1850 rtdata
109   ---- ---- ---- ---- ---- --x- ---- ---- MCS1850 rtclk
110   ---- ---- ---- ---- ---- ---x ---- ---- MCS1850 rtce
111   ---- ---- ---- ---- ---- ---- x--- ---- rom overlay
112   ---- ---- ---- ---- ---- ---- -x-- ---- dsp ie
113   ---- ---- ---- ---- ---- ---- --x- ---- mem en
114   ---- ---- ---- ---- ---- ---- ---- ---x led
115   */
96    x--- ---- ---- ---- ---- ---- ---- ---- dsp reset
97    -x-- ---- ---- ---- ---- ---- ---- ---- dsp block end
98    --x- ---- ---- ---- ---- ---- ---- ---- dsp unpacked
99    ---x ---- ---- ---- ---- ---- ---- ---- dsp mode b
100    ---- x--- ---- ---- ---- ---- ---- ---- dsp mode a
101    ---- -x-- ---- ---- ---- ---- ---- ---- remote int
102    ---- ---x ---- ---- ---- ---- ---- ---- local int
103    ---- ---- ---x ---- ---- ---- ---- ---- dram 256k
104    ---- ---- ---- ---x ---- ---- ---- ---- dram 1m
105    ---- ---- ---- ---- x--- ---- ---- ---- "timer on ipl7"
106    ---- ---- ---- ---- -xxx ---- ---- ---- rom waitstates
107    ---- ---- ---- ---- ---- x--- ---- ---- ROM 1M
108    ---- ---- ---- ---- ---- -x-- ---- ---- MCS1850 rtdata
109    ---- ---- ---- ---- ---- --x- ---- ---- MCS1850 rtclk
110    ---- ---- ---- ---- ---- ---x ---- ---- MCS1850 rtce
111    ---- ---- ---- ---- ---- ---- x--- ---- rom overlay
112    ---- ---- ---- ---- ---- ---- -x-- ---- dsp ie
113    ---- ---- ---- ---- ---- ---- --x- ---- mem en
114    ---- ---- ---- ---- ---- ---- ---- ---x led
115    */
116116
117117   return state->m_scr2;
118118}
r11247r11248
128128static READ32_HANDLER( next_scr1_r )
129129{
130130   /*
131      xxxx ---- ---- ---- ---- ---- ---- ---- slot ID
132      ---- ---- xxxx xxxx ---- ---- ---- ---- DMA type
133      ---- ---- ---- ---- xxxx ---- ---- ---- cpu type
134      ---- ---- ---- ---- ---- xxxx ---- ---- board revision
135      ---- ---- ---- ---- ---- ---- -xx- ---- video mem speed
136      ---- ---- ---- ---- ---- ---- ---x x--- mem speed
137      ---- ---- ---- ---- ---- ---- ---- -xxx cpu speed
138   */
131        xxxx ---- ---- ---- ---- ---- ---- ---- slot ID
132        ---- ---- xxxx xxxx ---- ---- ---- ---- DMA type
133        ---- ---- ---- ---- xxxx ---- ---- ---- cpu type
134        ---- ---- ---- ---- ---- xxxx ---- ---- board revision
135        ---- ---- ---- ---- ---- ---- -xx- ---- video mem speed
136        ---- ---- ---- ---- ---- ---- ---x x--- mem speed
137        ---- ---- ---- ---- ---- ---- ---- -xxx cpu speed
138    */
139139
140140   return 0x00012002; // TODO
141141}
src/mess/drivers/prof80.c
r11247r11248
188188static TIMER_CALLBACK( floppy_motor_off_tick )
189189{
190190   prof80_state *state = machine.driver_data<prof80_state>();
191   
191
192192   state->floppy_motor_off();
193193}
194194
src/mess/drivers/lisa.c
r11247r11248
155155   MCFG_CPU_ADD(KB_COP421_TAG, COP421, 3900000) // ?
156156   MCFG_CPU_IO_MAP(kb_cop_io_map)
157157   MCFG_CPU_CONFIG(cop_intf)
158   
158
159159   MCFG_CPU_ADD("fdccpu", M6504, 2000000)        /* 16.000 MHz / 8 in when DIS asserted, 16.000 MHz / 9 otherwise (?) */
160160   MCFG_CPU_PROGRAM_MAP(lisa_fdc_map)
161161
src/mess/drivers/pasopia.c
r11247r11248
770770{
771771   { "ctc" },
772772   { "z80pio_0" },
773//   { "upd765" }, /* TODO */
773//  { "upd765" }, /* TODO */
774774   { NULL }
775775};
776776
src/mess/drivers/kaypro.c
r11247r11248
293293   MCFG_MC6845_ADD("crtc", MC6845, 2000000, kaypro2x_crtc) /* comes out of ULA - needs to be measured */
294294
295295   MCFG_VIDEO_START( kaypro )
296   
296
297297   /* sound hardware */
298298   MCFG_SPEAKER_STANDARD_MONO("mono")
299299   MCFG_SOUND_ADD("beep", BEEP, 0)
src/mess/drivers/pc8001.c
r11247r11248
453453READ8_MEMBER( pc8001_state::dma_io_r )
454454{
455455   address_space *program = m_maincpu->memory().space(AS_PROGRAM);
456   
456
457457   return program->read_byte(offset);
458458}
459459
460460WRITE8_MEMBER( pc8001_state::dma_io_w )
461461{
462462   address_space *program = m_maincpu->memory().space(AS_PROGRAM);
463   
463
464464   program->write_byte(offset, data);
465465}
466466
r11247r11248
498498
499499   /* setup memory banking */
500500   UINT8 *ram = ram_get_ptr(m_ram);
501   
501
502502   memory_configure_bank(machine(), "bank1", 1, 1, machine().region("n80")->base(), 0);
503503   program->install_read_bank(0x0000, 0x5fff, "bank1");
504504   program->unmap_write(0x0000, 0x5fff);
src/mess/drivers/pc8801.c
r11247r11248
3333    - Blue Moon Story: moans with a kanji msg;.
3434    - Bubblegum Crisis: crashes due of a spurious irq (works if you soft reset the emulation when it triggers the halt opcode);
3535    - Can Can Bunny: bitmap artifacts on intro, could be either ALU or floppy issues;
36   - Fire Hawk: tries to r/w the opn ports (probably crashed due to floppy?)
36    - Fire Hawk: tries to r/w the opn ports (probably crashed due to floppy?)
3737    - Grobda: palette is ugly (parent pc8801 only);
3838    - Hang-On: typical busted attributes for a N-BASIC game
3939    - Wanderers from Ys: user data disk looks screwed? It loads with everything as maximum as per now ...
r11247r11248
6666      * with 0x2000 ROM size you can load 2d and 2hd floppies;
6767    - Later models have palette bugs with some games (Alphos, Tokyo Nampa Street).
6868      This is because you have to set up the V1 / V2 DIP-SW to V1 for those games (it's the BIOS that sets up to analog and never changes back otherwise).
69   - password for "AY-1: Fortress Solomon" is "123" then press enter, any other key pressed makes it to fail the check (you must soft reset the machine)
69    - password for "AY-1: Fortress Solomon" is "123" then press enter, any other key pressed makes it to fail the check (you must soft reset the machine)
7070
7171    Bankswitch Notes:
7272    - 0x31 - graphic banking
src/mess/drivers/68ksbc.c
r11247r11248
33    Skeleton driver for 68k Single Board Computer
44
55    29/03/2011
6
6
77    http://www.kmitl.ac.th/~kswichit/68k/68k.html
8
8
99    TODO:
1010    - Add RTC (type DS12887)
1111    - Add UART (type mc6850)
r11247r11248
4949   UINT8 m_term_data;
5050};
5151
52//bit 0 high = a key is ready; bit 1 high = ready to output to terminal
52//bit 0 high = a key is ready; bit 1 high = ready to output to terminal
5353READ16_MEMBER( c68ksbc_state::c68ksbc_status_r )
5454{
5555   if (m_term_data)
src/mess/drivers/lc80.c
r11247r11248
116116   DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0),   /* interrupt handler */
117117   DEVCB_DRIVER_LINE_MEMBER(lc80_state, ctc_z0_w),         /* ZC/TO0 callback */
118118   DEVCB_DRIVER_LINE_MEMBER(lc80_state, ctc_z1_w),         /* ZC/TO1 callback */
119   DEVCB_DRIVER_LINE_MEMBER(lc80_state, ctc_z2_w)          /* ZC/TO2 callback */
119   DEVCB_DRIVER_LINE_MEMBER(lc80_state, ctc_z2_w)        /* ZC/TO2 callback */
120120};
121121
122122/* Z80-PIO Interface */
src/mess/drivers/apple1.c
r11247r11248
227227
228228   MCFG_MACHINE_RESET( apple1 )
229229   MCFG_QUANTUM_TIME(attotime::from_hz(60))
230   
230
231231   MCFG_SCREEN_ADD("screen", RASTER)
232232   MCFG_SCREEN_REFRESH_RATE(60)
233233   /* Video is blanked for 70 out of 262 scanlines per refresh cycle.
r11247r11248
243243   MCFG_SCREEN_VISIBLE_AREA(0, 40 * 7 - 1, 0, 24 * 8 - 1)
244244   MCFG_SCREEN_UPDATE(apple1)
245245
246   
246
247247   MCFG_GFXDECODE(apple1)
248248   MCFG_PALETTE_LENGTH(2)
249249   MCFG_PALETTE_INIT(black_and_white)
src/mess/drivers/ibmpc.c
r11247r11248
15715759x7268.bin: Second late IBM 5160 PC/XT BIOS/BASIC 1.1. vissible in memory at F8000-FFFFF. (EPROM)
158158  ROM_LOAD( "62x0819.bin", 0xf0000, 0x8000, CRC(758ff036) SHA1(045e27a70407d89b7956ecae4d275bd2f6b0f8e2))
159159  ROM_LOAD( "59x7268.bin", 0xf8000, 0x8000, CRC(4f417635) SHA1(daa61762d3afdd7262e34edf1a3d2df9a05bcebb))
160 
160
16116178x7460.bin: IBM 5162 PC/XT 286 BIOS. vissible in even memory at F0000-FFFFF (mirror at E0000-EFFFF).
16216278x7461.bin: IBM 5162 PC/XT 286 BIOS. vissible in odd memory at F0000-FFFFF (mirror at E0000-EFFFF).
163163  ROM_LOAD16_BYTE( "78x7460.bin", 0xf0000, 0x8000, CRC(1db4bd8f) SHA1(7be669fbb998d8b4626fefa7cd1208d3b2a88c31))
r11247r11248
207207
20820859x7291.bin: Second version Hard drive controller ROM. Visible in memory at C8000-C8FFF.
209209  ROM_LOAD( "59x7291.bin", 0xc8000, 0x1000, CRC(25920437) SHA1(de970bcc5c6f1b588fbc4c76617165ce8eb2bf1d))
210 
210
211211104839e.bin: Hard drive controller Z80 firmware ROM. Not mapped in PC memory. (Mapped in Z80 microcontroller memory at 0000-7FFF)
212212  ROM_LOAD( "104839e.bin", 0x0000, 0x1000, CRC(3ad32fcc) SHA1(0127fa520aaee91285cb46a640ed835b4554e4b3))
213213
r11247r11248
225225  ROM_LOAD( "6137322.bin", 0x8000, 0x8000, CRC(5e6cc82f) SHA1(45b3ffb5a9c51986862f8d47b3e03dcaaf4073d5))
226226  ROM_LOAD( "6137323.bin", 0x0000, 0x8000, CRC(f564f342) SHA1(c5ef17fd1569043cb59f61faf828ea8b0ee95526))
227227
228 
228
229229XC215 C 0.bin: IBM Music feature card Z80 firmware ROM. Not mapped in PC memory. (Mapped in Z80 microcontroller memory at 0000-7FFF)
230230  ROM_LOAD( "xc215 c 0.bin", 0x0000, 0x8000, CRC(28c58a4f) SHA1(e7edf28d20e6c146e3144526c89cd6beea64663b))
231231
r11247r11248
288288
289289static INPUT_PORTS_START( ibm5150 )
290290   PORT_INCLUDE( kb_keytronic_pc )      /* IN4 - IN11 */
291//   PORT_INCLUDE( pc_mouse_microsoft )   /* IN12 - IN14 */
292//   PORT_INCLUDE( pc_joystick )         /* IN15 - IN19 */
291//  PORT_INCLUDE( pc_mouse_microsoft )  /* IN12 - IN14 */
292//  PORT_INCLUDE( pc_joystick )         /* IN15 - IN19 */
293293   PORT_INCLUDE( pcvideo_cga )
294294INPUT_PORTS_END
295295
r11247r11248
297297
298298static const kb_keytronic_interface pc_keytronic_intf =
299299{
300   DEVCB_DEVICE_LINE_MEMBER("mb", ibm5160_mb_device, keyboard_clock_w),   
300   DEVCB_DEVICE_LINE_MEMBER("mb", ibm5160_mb_device, keyboard_clock_w),
301301   DEVCB_DEVICE_LINE_MEMBER("mb", ibm5160_mb_device, keyboard_data_w)
302302};
303303
r11247r11248
307307   DEVCB_DEVICE_LINE("keyboard", kb_keytronic_data_w)
308308};
309309
310static DEVICE_INPUT_DEFAULTS_START(cga)
310static DEVICE_INPUT_DEFAULTS_START(cga)
311311   DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x20)
312312DEVICE_INPUT_DEFAULTS_END
313313
r11247r11248
320320
321321   MCFG_IBM5150_MOTHERBOARD_ADD("mb","maincpu",pc_keytronic_keyboard_intf)
322322   MCFG_DEVICE_INPUT_DEFAULTS(cga)
323   
323
324324   /* video hardware */
325325   MCFG_FRAGMENT_ADD( pcvideo_cga )
326326
r11247r11248
348348
349349   MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu",pc_keytronic_keyboard_intf)
350350   MCFG_DEVICE_INPUT_DEFAULTS(cga)
351   
351
352352   /* video hardware */
353353   MCFG_FRAGMENT_ADD( pcvideo_cga )
354354
r11247r11248
358358
359359   /* keyboard */
360360   MCFG_KB_KEYTRONIC_ADD("keyboard", pc_keytronic_intf)
361   
361
362362   /* internal ram */
363363   MCFG_RAM_ADD(RAM_TAG)
364364   MCFG_RAM_DEFAULT_SIZE("640K")
src/mess/drivers/pegasus.c
r11247r11248
508508   MCFG_GFXDECODE(pegasus)
509509   MCFG_PALETTE_LENGTH(2)
510510   MCFG_PALETTE_INIT(black_and_white)
511   
511
512512   /* devices */
513513   MCFG_PIA6821_ADD( "pia_s", pegasus_pia_s_intf )
514514   MCFG_PIA6821_ADD( "pia_u", pegasus_pia_u_intf )
src/mess/drivers/tsispch.c
r11247r11248
194194{
195195   UINT8 data;
196196   /* the only dipswitch I'm really sure about is s4-7 which enables the test mode
197    * The switches are, for normal operation on my unit:
198    * ON ON OFF OFF OFF OFF OFF OFF
199    * which makes this register read 0xFC
200    * When s4-7 is turned on, it reads 0xBC
201    */
197     * The switches are, for normal operation on my unit:
198     * ON ON OFF OFF OFF OFF OFF OFF
199     * which makes this register read 0xFC
200     * When s4-7 is turned on, it reads 0xBC
201     */
202202   data = input_port_read(machine(), "s4");
203203   return data;
204204}
r11247r11248
206206WRITE8_MEMBER( tsispch_state::peripheral_w )
207207{
208208   /* These are the 4 debug leds on the pcb inside the case.
209      They are called on the silkscreen, '6','5','4',and '3', and
210      are connected to bits 1, 2, 3, and 4 of this register.
211      Bit 4 also connects to the 'talking' LED on the front panel.
212      When 0 is written to a bit, the led turns on.
213      See notes at beginning of file for more info.
214   */
209       They are called on the silkscreen, '6','5','4',and '3', and
210       are connected to bits 1, 2, 3, and 4 of this register.
211       Bit 4 also connects to the 'talking' LED on the front panel.
212       When 0 is written to a bit, the led turns on.
213       See notes at beginning of file for more info.
214    */
215215   tsispch_state *state = machine().driver_data<tsispch_state>();
216216   state->m_paramReg = data;
217217   cputag_set_input_line(machine(), "dsp", INPUT_LINE_RESET, BIT(data,6)?CLEAR_LINE:ASSERT_LINE);
r11247r11248
525525 Drivers
526526******************************************************************************/
527527
528/*    YEAR  NAME   PARENT   COMPAT   MACHINE      INPUT   INIT   COMPANY     FULLNAME            FLAGS */
528/*    YEAR  NAME    PARENT  COMPAT  MACHINE     INPUT   INIT    COMPANY     FULLNAME            FLAGS */
529529COMP( 1985, prose2k,   0,      0,      prose2k,      prose2k,   prose2k,   "Telesensory Systems Inc/Speech Plus",   "Prose 2000/2020",   GAME_NOT_WORKING | GAME_NO_SOUND )
src/mess/drivers/special.c
r11247r11248
456456   MCFG_SCREEN_SIZE(512, 256)
457457   MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
458458
459    MCFG_VIDEO_START(specialp)   
459    MCFG_VIDEO_START(specialp)
460460MACHINE_CONFIG_END
461461
462462static MACHINE_CONFIG_DERIVED( specimx, special )
r11247r11248
469469    /* video hardware */
470470   MCFG_SCREEN_MODIFY("screen")
471471   MCFG_SCREEN_UPDATE(specimx)
472   
472
473473   MCFG_VIDEO_START(specimx)
474474
475475   MCFG_PALETTE_LENGTH(16)
src/mess/drivers/fidelz80.c
r11247r11248
264264
265265There are 8 LEDs, and an 8 digit 14 segment VFD with commas and periods.
266266This display is the same one as can be found on the speak and spell.
267
267
268268       A       * comma
269269  ***********  *
270270 * *I  *J K* *
271271F*  *  *  *  *B
272272 *   * * *   *
273  G**** *****H
273  G**** *****H
274274 *   * * *   *
275275E*  *  *  *  *C
276276 * *N  *M L* *
r11247r11248
3783786 - LED column G, button column G
3793797 - LED column H, button column H
3803808 - button column I
3819 -
3819 -
382382
383383The rows/columns are indicated on the game board:
384384
385385
386 ABCDEFGH   I
386 ABCDEFGH   I
387387--------------
388388|            | 8
389389|            | 7
390|            | 6
390|            | 6
391391|            | 5
392392|            | 4
393393|            | 3
r11247r11248
436436Hardware:
437437---------
438438
439On the board are 13 chips.
439On the board are 13 chips.
440440
441441The CPU is a Z80A running at 3.9MHz, with 20K of ROM and 1K of RAM mapped.
442442I/O is composed of an 8255 triple port adaptor, and a Z80A PIO parallel I/O
r11247r11248
446446same as on the other talking chess boards.  The TSI chip is running at 26.37KHz.
447447It uses a 470K resistor and a 100pf capacitor.
448448
449The "perfect" clock would be 1/RC most likely (actually this will be skewed a tad by
449The "perfect" clock would be 1/RC most likely (actually this will be skewed a tad by
450450duty cycle of the oscillator) which with those parts values gives 21.27KHz.  The
451451formula is probably more likely to be 1/1.2RC or so.
452452
r11247r11248
461461Memory map:
462462-----------
463463
4640000-1FFF: 8K ROM 101-64018
4640000-1FFF: 8K ROM 101-64018
4654652000-3FFF: 8K ROM 101-64019 (also used on the sensory champ. chess challenger)
4664664000-5FFF: 4K ROM 101-32024
4674676000-7FFF: 1K of RAM (2114 * 2)
r11247r11248
475475
476476Decoding isn't performed using a selector, but instead address lines are used.
477477
478A2 connects to /CE on the 8255
478A2 connects to /CE on the 8255
479479A3 connects to /CE on the Z80A PIO
480480
481481A1 connects to control/data select on PIO & A0 of 8255
r11247r11248
11691169
11701170    ROM_REGION(0x1000, "mcu", 0)
11711171    ROM_LOAD("100-1009.bin", 0x0000, 0x0400, CRC(60eb343f) SHA1(8a63e95ebd62e123bdecc330c0484a47c354bd1a))
1172   
1172
11731173    ROM_REGION(0x2000, "speech", 0)
11741174    ROM_LOAD("101-32118.bin", 0x0000, 0x1000, CRC(A0B8BB8F) SHA1(F56852108928D5C6CACCFC8166FA347D6760A740))
11751175ROM_END
r11247r11248
11821182
11831183    ROM_REGION(0x1000, "mcu", 0)
11841184    ROM_LOAD("100-1009.bin", 0x0000, 0x0400, CRC(60eb343f) SHA1(8a63e95ebd62e123bdecc330c0484a47c354bd1a))
1185   
1185
11861186    ROM_REGION(0x2000, "speech", 0)
11871187    ROM_LOAD("101-32118.bin", 0x0000, 0x1000, CRC(A0B8BB8F) SHA1(F56852108928D5C6CACCFC8166FA347D6760A740))
11881188ROM_END
src/mess/drivers/mephisto.c
r11247r11248
5454*/
5555
5656/*  Mephisto 4 Turbo Kit 18mhz - (mm4tk)
57   This is a replacement rom combining the turbo kit initial rom with the original MM IV.
58   The Turbo Kit powers up to it's tiny rom, copies itself to ram, banks in normal rom,
59   copies that to faster SRAM, then patches the checksum and the LED blink delays.
60   If someone else wants to code up the power up banking, feel free
57    This is a replacement rom combining the turbo kit initial rom with the original MM IV.
58    The Turbo Kit powers up to it's tiny rom, copies itself to ram, banks in normal rom,
59    copies that to faster SRAM, then patches the checksum and the LED blink delays.
60    If someone else wants to code up the power up banking, feel free
6161
62   There is an undumped MM V Turbo Kit, which will be the exact same except for location of
63   the patches. The mm5tk just needs the normal mm5 ROM swapped out for that one to
64   blinks the LEDs a little slower.
62    There is an undumped MM V Turbo Kit, which will be the exact same except for location of
63    the patches. The mm5tk just needs the normal mm5 ROM swapped out for that one to
64    blinks the LEDs a little slower.
6565
66   -- Cowering (2011)
66    -- Cowering (2011)
6767*/
6868
6969
src/mess/drivers/supercon.c
r11247r11248
4646   int m_remove_led_flag;
4747   int m_selecting;
4848   int m_save_key_data;
49   attotime m_wait_time;
49   attotime m_wait_time;
5050   int *m_current_field;
5151   int m_confirm_board_click;
5252   int m_board[64];
r11247r11248
383383
384384/* Only if valid data and mouse button is pressed */
385385
386      if (key_data && input_port_read(space->machine(), "BUTTON_L"))
386      if (key_data && input_port_read(space->machine(), "BUTTON_L"))
387387      {
388388
389389/* Set or remove pieces */
src/mess/drivers/pc.c
r11247r11248
19211921   MCFG_SPEAKER_STANDARD_MONO("mono")
19221922   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
19231923   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
1924   
1924
19251925   /* keyboard */
19261926   MCFG_KB_KEYTRONIC_ADD("keyboard", pc_keytronic_intf)
19271927
r11247r11248
24812481   ROMX_LOAD( "p1_t_pls.rf4", 0xfe000, 0x2000, CRC(c8210ffb) SHA1(f2d1a6c90e4708bcc56186b2fb906fa852667084), ROM_BIOS(4))
24822482   ROM_SYSTEM_BIOS(4, "t3", "Test RAM")
24832483   ROMX_LOAD( "p1_t_ram.rf4", 0xfe000, 0x2000, CRC(e42f5a61) SHA1(ce2554eae8f0d2b6d482890dd198cf7e2d29c655), ROM_BIOS(5))
2484   
2484
24852485   ROM_LOAD( "boot_net.rf4", 0x0000, 0x2000, CRC(316c2030) SHA1(d043325596455772252e465b85321f1b5c529d0b)) // NET BUIS
24862486   ROM_REGION(0x2000,"gfx1", ROMREGION_ERASE00)
24872487   ROM_LOAD( "poisk.cga", 0x0000, 0x0800, CRC(f6eb39f0) SHA1(0b788d8d7a8e92cc612d044abcb2523ad964c200))
r11247r11248
25622562
25632563***************************************************************************/
25642564
2565/*     YEAR     NAME        PARENT      COMPAT     MACHINE     INPUT       INIT        COMPANY     FULLNAME */
2565/*     YEAR     NAME        PARENT      COMPAT      MACHINE     INPUT       INIT        COMPANY     FULLNAME */
25662566COMP(  1984,   dgone,      ibm5150,   0,   pccga,     pccga,      pccga,   "Data General",  "Data General/One" , GAME_NOT_WORKING)   /* CGA, 2x 3.5" disk drives */
25672567COMP(  1985,   bw230,      ibm5150,   0,   pccga,      bondwell,   bondwell,   "Bondwell Holding",  "BW230 (PRO28 Series)", 0 )
25682568COMP(  1988,   europc,     ibm5150,   0,   europc,    europc,      europc,     "Schneider Rdf. AG",  "EURO PC", GAME_NOT_WORKING)
25692569
25702570// pcjr (better graphics, better sound)
2571COMP(  1983,   ibmpcjr,    ibm5150,   0,   ibmpcjr,    tandy1t,   pcjr,       "International Business Machines",  "IBM PC Jr", GAME_IMPERFECT_COLORS )
2571COMP(  1983,   ibmpcjr,    ibm5150,   0,   ibmpcjr,   tandy1t,   pcjr,       "International Business Machines",  "IBM PC Jr", GAME_IMPERFECT_COLORS )
25722572COMP(  1985,   ibmpcjx,    ibm5150,   0,   ibmpcjr,    tandy1t,   pcjr,       "International Business Machines",  "IBM PC JX", GAME_IMPERFECT_COLORS | GAME_NOT_WORKING)
25732573
25742574// tandy 1000
src/mess/drivers/pce.c
r11247r11248
291291   unsigned long length, const char *functions)
292292{
293293   if ( ( length <= PCE_HEADER_SIZE ) || ( length & PCE_HEADER_SIZE ) ) {
294         dest.compute(&data[PCE_HEADER_SIZE], length - PCE_HEADER_SIZE, functions);   
295   } else {     
296      dest.compute(data, length, functions);   
294         dest.compute(&data[PCE_HEADER_SIZE], length - PCE_HEADER_SIZE, functions);
295   } else {
296      dest.compute(data, length, functions);
297297   }
298298}
299299
src/mess/drivers/cosmicos.c
r11247r11248
44
55    http://retro.hansotten.nl/index.php?page=1802-cosmicos
66
7   
7
88    HEX-monitor
99
1010    0 - start user program
src/mess/drivers/polgar.c
r11247r11248
135135         output_set_led_value(i,!BIT(state->m_latch_data,i));
136136         output_set_led_value(10+i,!BIT(state->m_latch_data,7-i));
137137      }
138     
139138
139
140140   //logerror("LCD Status  Data = %d\n",data);
141141
142142
r11247r11248
160160   else
161161      output_set_led_value(LED_offset+offset,0);
162162
163//   logerror("milano_write_led Offset = %d Data = %d\n",offset,data);
163//  logerror("milano_write_led Offset = %d Data = %d\n",offset,data);
164164}
165165
166166static WRITE8_HANDLER ( write_led )
r11247r11248
214214   {
215215      line=get_first_cleared_bit(state->m_latch_data);
216216      tmp=input_port_read(space->machine(),  board_lines[line]);
217     
217
218218      if (tmp != 0xff)
219219         data=convert_imputmask(tmp);
220220
src/mess/drivers/argo.c
r11247r11248
293293
294294               /* Take care of flashing characters */
295295               //if ((chr & 0x80) && (m_framecnt & 0x08))
296               //   chr = 0x20;
296               //  chr = 0x20;
297297
298298               chr &= 0x7f;
299299
src/mess/drivers/gba.c
r11247r11248
20862086   if (scanline == 224)
20872087   {
20882088      // FIXME: some games are very picky with this trigger!
2089      // * Mario & Luigi SuperStar Saga loses pieces of gfx for 225-227.
2089      // * Mario & Luigi SuperStar Saga loses pieces of gfx for 225-227.
20902090      // * Driver 2 does not work with values > 217.
2091      // * Prince of Persia Sands of Time, Rayman Hoodlum's Revenge, Rayman 3 breaks for large
2091      // * Prince of Persia Sands of Time, Rayman Hoodlum's Revenge, Rayman 3 breaks for large
20922092      //   values (say > 200, but exact threshold varies).
2093      // * Scooby-Doo Unmasked and Mystery Mayhem have problems with large values (missing dialogue
2093      // * Scooby-Doo Unmasked and Mystery Mayhem have problems with large values (missing dialogue
20942094      //   text).
2095      // * Nicktoons Racign does not start with 227; and it resets before going to the race with
2095      // * Nicktoons Racign does not start with 227; and it resets before going to the race with
20962096      //   values > 206.
20972097      // * Phil of Future does not start for values > 221.
2098      // * Sabrina Teenage Witch does not even reach the Ubi Soft logo if we use the VBL exit value
2099      //   227; it does not display title screen graphics when using 225-226; the intro is broken
2098      // * Sabrina Teenage Witch does not even reach the Ubi Soft logo if we use the VBL exit value
2099      //   227; it does not display title screen graphics when using 225-226; the intro is broken
21002100      //   with anything between 207-224.
21012101      // * Anstoss Action has broken field graphics for values > 223.
2102      // However, taking smaller values breaks raster effects in a LOT of games (e.g. Castlevania
2103      // series, Final Fantasy series, Tales of Phantasia, Banjo Pilot, NES 'collections' by Hudson,
2104      // Jaleco and Technos, plus tons of racing games, which show garbage in the lower half of the
2105      // screen with smaller values).
2102      // However, taking smaller values breaks raster effects in a LOT of games (e.g. Castlevania
2103      // series, Final Fantasy series, Tales of Phantasia, Banjo Pilot, NES 'collections' by Hudson,
2104      // Jaleco and Technos, plus tons of racing games, which show garbage in the lower half of the
2105      // screen with smaller values).
21062106      // Already choosing 224 instead of 227 makes some glitches to appear in the bottom scanlines.
2107      // Other test cases are EA Sport games (like FIFA or Madden) which have various degrees of
2107      // Other test cases are EA Sport games (like FIFA or Madden) which have various degrees of
21082108      // glitchness depending on the value used here.
21092109      // More work on IRQs is definitely necessary!
21102110      int ch, ctrl;
src/mess/drivers/kc.c
r11247r11248
434434   MCFG_MACHINE_RESET( kc85_4 )
435435
436436   MCFG_VIDEO_START( kc85_4 )
437   
437
438438   MCFG_SCREEN_MODIFY("screen")
439439   MCFG_SCREEN_UPDATE( kc85_4 )
440440MACHINE_CONFIG_END

Previous 15994 Revisions Next


© 1998-2018 The MESS Team