| 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 |
| r11247 | r11248 | |
|---|---|---|
| 10 | 10 | that you have read the license and understand and accept it fully. |
| 11 | 11 | |
| 12 | 12 | ***************************************************************************/ |
| 13 | ||
| 13 | ||
| 14 | 14 | /*************************************************************************** |
| 15 | 15 | |
| 16 | 16 | history.c |
| r11247 | r11248 | |
|---|---|---|
| 333 | 333 | hIcon = LoadIconFromFile(buffer); |
| 334 | 334 | if (hIcon) |
| 335 | 335 | break; |
| 336 | ||
| 336 | ||
| 337 | 337 | int cl = driver_list::clone(*drv); |
| 338 | 338 | if (cl!=-1) drv = &driver_list::driver(cl); else drv = NULL; |
| 339 | 339 | } |
| r11247 | r11248 | |
|---|---|---|
| 708 | 708 | |
| 709 | 709 | case CT_TRACKBAR: |
| 710 | 710 | // 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; | |
| 718 | 718 | |
| 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; | |
| 726 | 726 | |
| 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 | */ | |
| 737 | 737 | |
| 738 | 738 | // do we specify default options for this control? if so, we need to specify |
| 739 | 739 | // the range |
| r11247 | r11248 | |
|---|---|---|
| 50 | 50 | External variables |
| 51 | 51 | ***************************************************************************/ |
| 52 | 52 | |
| 53 | const struct OSDJoystick DIJoystick = | |
| 53 | const struct OSDJoystick DIJoystick = | |
| 54 | 54 | { |
| 55 | 55 | DIJoystick_init, /* init */ |
| 56 | 56 | DIJoystick_exit, /* exit */ |
| r11247 | r11248 | |
| 122 | 122 | static const GUID guidNULL = {0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}; |
| 123 | 123 | |
| 124 | 124 | /*************************************************************************** |
| 125 | External OSD functions | |
| 125 | External OSD functions | |
| 126 | 126 | ***************************************************************************/ |
| 127 | 127 | /* |
| 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 | |
| 129 | 129 | initialization was successful, nonzero otherwise. |
| 130 | 130 | */ |
| 131 | 131 | static int DIJoystick_init(void) |
| r11247 | r11248 | |
| 167 | 167 | /*ErrorMsg("DirectInput EnumDevices didn't find any joysticks");*/ |
| 168 | 168 | return 0; |
| 169 | 169 | } |
| 170 | ||
| 170 | ||
| 171 | 171 | return 0; |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | /* |
| 175 | ||
| 175 | put here cleanup routines to be executed when the program is terminated. | |
| 176 | 176 | */ |
| 177 | 177 | static void DIJoystick_exit(void) |
| 178 | 178 | { |
| r11247 | r11248 | |
| 185 | 185 | |
| 186 | 186 | for (i = 0; i < This.num_joysticks; i++) |
| 187 | 187 | ExitJoystick(&This.joysticks[i]); |
| 188 | ||
| 188 | ||
| 189 | 189 | This.num_joysticks = 0; |
| 190 | 190 | } |
| 191 | 191 | |
| r11247 | r11248 | |
| 193 | 193 | { |
| 194 | 194 | HRESULT hr; |
| 195 | 195 | DWORD i; |
| 196 | ||
| 196 | ||
| 197 | 197 | This.m_bCoinSlot = 0; |
| 198 | 198 | |
| 199 | 199 | for (i = 0; i < This.num_joysticks; i++) |
| r11247 | r11248 | |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | /* |
| 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. | |
| 229 | 229 | */ |
| 230 | 230 | |
| 231 | 231 | static int DIJoystick_is_joy_pressed(int joycode) |
| r11247 | r11248 | |
| 246 | 246 | if (joy_num == 0 || This.num_joysticks < joy_num) |
| 247 | 247 | return 0; |
| 248 | 248 | joy_num--; |
| 249 | ||
| 249 | ||
| 250 | 250 | if (This.joysticks[joy_num].use_joystick == FALSE) |
| 251 | 251 | return 0; |
| 252 | 252 | |
| r11247 | r11248 | |
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | /* sticks */ |
| 308 | ||
| 308 | ||
| 309 | 309 | axis = GET_JOYCODE_AXIS(joycode); |
| 310 | 310 | dir = GET_JOYCODE_DIR(joycode); |
| 311 | ||
| 311 | ||
| 312 | 312 | if (axis == 0 || This.joysticks[joy_num].num_axes < axis) |
| 313 | 313 | return 0; |
| 314 | 314 | axis--; |
| r11247 | r11248 | |
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | /*************************************************************************** |
| 407 | ||
| 407 | Internal functions | |
| 408 | 408 | ***************************************************************************/ |
| 409 | 409 | |
| 410 | 410 | BOOL CALLBACK DIJoystick_EnumDeviceProc(LPDIDEVICEINSTANCE pdidi, LPVOID pv) |
| r11247 | r11248 | |
| 461 | 461 | DirectXDecodeError(hr)); |
| 462 | 462 | } |
| 463 | 463 | #endif |
| 464 | ||
| 464 | ||
| 465 | 465 | /* Set axis dead zone to 0; we need accurate #'s for analog joystick reading. */ |
| 466 | 466 | |
| 467 | 467 | hr = SetDIDwordProperty(joystick->did, DIPROP_DEADZONE, lpddoi->dwOfs, DIPH_BYOFFSET, 0); |
| r11247 | r11248 | |
| 533 | 533 | ErrorMsg("DirectInput CreateDevice() joystick failed: %s\n", DirectXDecodeError(hr)); |
| 534 | 534 | return; |
| 535 | 535 | } |
| 536 | ||
| 536 | ||
| 537 | 537 | /* get a did2 interface to work with polling (most) joysticks */ |
| 538 | 538 | hr = IDirectInputDevice_QueryInterface(didTemp, |
| 539 | 539 | IID_IDirectInputDevice2, |
| r11247 | r11248 | |
| 551 | 551 | return; |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | ||
| 554 | ||
| 555 | 555 | hr = IDirectInputDevice2_SetCooperativeLevel(joystick->did, GetMainWindow(), |
| 556 | 556 | DISCL_NONEXCLUSIVE | DISCL_BACKGROUND); |
| 557 | 557 | if (FAILED(hr)) |
| r11247 | r11248 | |
| 622 | 622 | } |
| 623 | 623 | |
| 624 | 624 | hr = IDirectInputDevice2_Acquire(joystick->did); |
| 625 | if (FAILED(hr)) | |
| 625 | if (FAILED(hr)) | |
| 626 | 626 | { |
| 627 | 627 | ErrorMsg("DirectInputDevice Acquire joystick failed!\n"); |
| 628 | 628 | return; |
| r11247 | r11248 | |
| 638 | 638 | static void ExitJoystick(joystick_type *joystick) |
| 639 | 639 | { |
| 640 | 640 | DWORD i; |
| 641 | ||
| 641 | ||
| 642 | 642 | if (joystick->did != NULL) |
| 643 | 643 | { |
| 644 | 644 | IDirectInputDevice_Unacquire(joystick->did); |
| 645 | 645 | IDirectInputDevice_Release(joystick->did); |
| 646 | 646 | joystick->did = NULL; |
| 647 | 647 | } |
| 648 | ||
| 648 | ||
| 649 | 649 | for (i = 0; i < joystick->num_axes; i++) |
| 650 | 650 | { |
| 651 | 651 | if (joystick->axes[i].name) |
| 652 | 652 | free(joystick->axes[i].name); |
| 653 | 653 | joystick->axes[i].name = NULL; |
| 654 | 654 | } |
| 655 | ||
| 655 | ||
| 656 | 656 | if (joystick->name != NULL) |
| 657 | 657 | { |
| 658 | 658 | free(joystick->name); |
| r11247 | r11248 | |
|---|---|---|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | /*************************************************************************** |
| 138 | ||
| 138 | Internal function definitions | |
| 139 | 139 | ***************************************************************************/ |
| 140 | 140 | |
| 141 | 141 | static BOOL IsMultiDir(int nType) |
| r11247 | r11248 | |
| 196 | 196 | static TCHAR * FixSlash(TCHAR *s) |
| 197 | 197 | { |
| 198 | 198 | int len = 0; |
| 199 | ||
| 199 | ||
| 200 | 200 | if (s) |
| 201 | 201 | len = _tcslen(s); |
| 202 | 202 | |
| r11247 | r11248 | |
| 249 | 249 | static void Directories_OnSelChange(HWND hDlg) |
| 250 | 250 | { |
| 251 | 251 | UpdateDirectoryList(hDlg); |
| 252 | ||
| 252 | ||
| 253 | 253 | if (ComboBox_GetCurSel(GetDlgItem(hDlg, IDC_DIR_COMBO)) == 0 |
| 254 | 254 | || ComboBox_GetCurSel(GetDlgItem(hDlg, IDC_DIR_COMBO)) == 1) |
| 255 | 255 | { |
| r11247 | r11248 | |
| 302 | 302 | memset(&LVCol, 0, sizeof(LVCOLUMN)); |
| 303 | 303 | LVCol.mask = LVCF_WIDTH; |
| 304 | 304 | LVCol.cx = rectClient.right - rectClient.left - GetSystemMetrics(SM_CXHSCROLL); |
| 305 | ||
| 305 | ||
| 306 | 306 | res = ListView_InsertColumn(GetDlgItem(hDlg, IDC_DIR_LIST), 0, &LVCol); |
| 307 | 307 | |
| 308 | 308 | /* Keep a temporary copy of the directory strings in g_pDirInfo. */ |
| r11247 | r11248 | |
| 494 | 494 | /* Last item is placeholder for append */ |
| 495 | 495 | if (nItem == ListView_GetItemCount(hList) - 1) |
| 496 | 496 | { |
| 497 | Directories_OnInsert(hDlg); | |
| 497 | Directories_OnInsert(hDlg); | |
| 498 | 498 | return; |
| 499 | 499 | } |
| 500 | 500 | } |
| r11247 | r11248 | |
| 541 | 541 | } |
| 542 | 542 | |
| 543 | 543 | UpdateDirectoryList(hDlg); |
| 544 | ||
| 545 | 544 | |
| 545 | ||
| 546 | 546 | nCount = ListView_GetItemCount(hList); |
| 547 | 547 | if (nCount <= 1) |
| 548 | 548 | return; |
| r11247 | r11248 | |
| 710 | 710 | |
| 711 | 711 | /************************************************************************** |
| 712 | 712 | |
| 713 | ||
| 713 | Use the shell to select a Directory. | |
| 714 | 714 | |
| 715 | 715 | **************************************************************************/ |
| 716 | 716 | |
| 717 | 717 | static int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData) |
| 718 | 718 | { |
| 719 | 719 | /* |
| 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 | */ | |
| 723 | 723 | if (uMsg == BFFM_INITIALIZED) |
| 724 | 724 | { |
| 725 | 725 | if ((const char*)lpData != NULL) |
| r11247 | r11248 | |
| 729 | 729 | return 0; |
| 730 | 730 | } |
| 731 | 731 | |
| 732 | BOOL BrowseForDirectory(HWND hwnd, LPCTSTR pStartDir, TCHAR* pResult) | |
| 732 | BOOL BrowseForDirectory(HWND hwnd, LPCTSTR pStartDir, TCHAR* pResult) | |
| 733 | 733 | { |
| 734 | 734 | BOOL bResult = FALSE; |
| 735 | 735 | IMalloc* piMalloc = 0; |
| 736 | 736 | BROWSEINFO Info; |
| 737 | 737 | LPITEMIDLIST pItemIDList = NULL; |
| 738 | 738 | TCHAR buf[MAX_PATH]; |
| 739 | ||
| 739 | ||
| 740 | 740 | if (!SUCCEEDED(SHGetMalloc(&piMalloc))) |
| 741 | 741 | return FALSE; |
| 742 | 742 |
| r11247 | r11248 | |
|---|---|---|
| 14 | 14 | /*************************************************************************** |
| 15 | 15 | |
| 16 | 16 | Screenshot.c |
| 17 | ||
| 17 | ||
| 18 | 18 | Win32 DIB handling. |
| 19 | ||
| 19 | ||
| 20 | 20 | Created 7/1/98 by Mike Haaland (mhaaland@hypertech.com) |
| 21 | ||
| 21 | ||
| 22 | 22 | ***************************************************************************/ |
| 23 | 23 | |
| 24 | 24 | // standard windows headers |
| r11247 | r11248 | |
| 145 | 145 | HDC hdc = GetDC(GetMainWindow()); |
| 146 | 146 | m_hDDB = DIBToDDB(hdc, m_hDIB, NULL); |
| 147 | 147 | ReleaseDC(GetMainWindow(),hdc); |
| 148 | ||
| 148 | ||
| 149 | 149 | current_image_game = nGame; |
| 150 | 150 | current_image_type = nType; |
| 151 | 151 | |
| r11247 | r11248 | |
| 198 | 198 | new_filename = (char*)malloc(strlen(filename) + 1); |
| 199 | 199 | if (!new_filename) |
| 200 | 200 | return NULL; |
| 201 | ||
| 201 | ||
| 202 | 202 | // change all backslashes to forward slashes |
| 203 | 203 | for (i = 0; filename[i]; i++) |
| 204 | 204 | new_filename[i] = (filename[i] != '\\') ? filename[i] : '/'; |
| r11247 | r11248 | |
| 365 | 365 | nColors = lpbi->biClrUsed ? lpbi->biClrUsed : 1 << lpbi->biBitCount; |
| 366 | 366 | |
| 367 | 367 | 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) + | |
| 370 | 370 | ((bmInfo->bmiHeader.biCompression == BI_BITFIELDS) ? 3 : 0)); |
| 371 | 371 | else |
| 372 | 372 | lpDIBBits = (LPVOID)(bmInfo->bmiColors + nColors); |
| r11247 | r11248 | |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 | hBM = CreateDIBitmap(hDC, /* handle to device context */ |
| 383 | (LPBITMAPINFOHEADER)lpbi, /* pointer to bitmap info header | |
| 383 | (LPBITMAPINFOHEADER)lpbi, /* pointer to bitmap info header */ | |
| 384 | 384 | (LONG)CBM_INIT, /* initialization flag */ |
| 385 | 385 | lpDIBBits, /* pointer to initialization data */ |
| 386 | 386 | (LPBITMAPINFO)lpbi, /* pointer to bitmap info */ |
| r11247 | r11248 | |
| 419 | 419 | pixel_ptr = 0; |
| 420 | 420 | row = p->height - 1; |
| 421 | 421 | lineWidth = p->width; |
| 422 | ||
| 422 | ||
| 423 | 423 | if (p->color_type != 2 && p->num_palette <= 256) |
| 424 | 424 | nColors = p->num_palette; |
| 425 | 425 | |
| 426 | bi.biSize = sizeof(BITMAPINFOHEADER); | |
| 426 | bi.biSize = sizeof(BITMAPINFOHEADER); | |
| 427 | 427 | bi.biWidth = p->width; |
| 428 | 428 | bi.biHeight = p->height; |
| 429 | 429 | bi.biPlanes = 1; |
| 430 | 430 | 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; | |
| 436 | 436 | bi.biClrUsed = nColors; |
| 437 | 437 | bi.biClrImportant = nColors; |
| 438 | ||
| 438 | ||
| 439 | 439 | effWidth = (long)(((long)lineWidth*bi.biBitCount + 31) / 32) * 4; |
| 440 | ||
| 440 | ||
| 441 | 441 | dibSize = (effWidth * bi.biHeight); |
| 442 | 442 | hDIB = GlobalAlloc(GMEM_FIXED, bi.biSize + (nColors * sizeof(RGBQUAD)) + dibSize); |
| 443 | ||
| 443 | ||
| 444 | 444 | if (!hDIB) |
| 445 | 445 | { |
| 446 | 446 | return FALSE; |
| r11247 | r11248 | |
| 454 | 454 | { |
| 455 | 455 | int i; |
| 456 | 456 | /* |
| 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 | */ | |
| 460 | 460 | for (i = 0; i < nColors; i++) |
| 461 | 461 | { |
| 462 | 462 | RGBQUAD rgb; |
| 463 | ||
| 463 | ||
| 464 | 464 | rgb.rgbRed = p->palette[i * 3 + 0]; |
| 465 | 465 | rgb.rgbGreen = p->palette[i * 3 + 1]; |
| 466 | 466 | rgb.rgbBlue = p->palette[i * 3 + 2]; |
| 467 | 467 | rgb.rgbReserved = (BYTE)0; |
| 468 | ||
| 469 | pRgb[i] = rgb; | |
| 470 | } | |
| 471 | } | |
| 472 | ||
| 468 | ||
| 469 | pRgb[i] = rgb; | |
| 470 | } | |
| 471 | } | |
| 472 | ||
| 473 | 473 | bmInfo = (LPBITMAPINFO)hDIB; |
| 474 | ||
| 474 | ||
| 475 | 475 | /* Create a halftone palette if colors > 256. */ |
| 476 | 476 | if (0 == nColors || nColors > 256) |
| 477 | 477 | { |
| r11247 | r11248 | |
| 484 | 484 | UINT nSize = sizeof(LOGPALETTE) + (sizeof(PALETTEENTRY) * nColors); |
| 485 | 485 | LOGPALETTE *pLP = (LOGPALETTE *)malloc(nSize); |
| 486 | 486 | int i; |
| 487 | ||
| 487 | ||
| 488 | 488 | pLP->palVersion = 0x300; |
| 489 | 489 | pLP->palNumEntries = nColors; |
| 490 | ||
| 490 | ||
| 491 | 491 | for (i = 0; i < nColors; i++) |
| 492 | 492 | { |
| 493 | 493 | 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; | |
| 495 | 495 | pLP->palPalEntry[i].peBlue = bmInfo->bmiColors[i].rgbBlue; |
| 496 | 496 | pLP->palPalEntry[i].peFlags = 0; |
| 497 | 497 | } |
| 498 | ||
| 498 | ||
| 499 | 499 | *pPal = CreatePalette(pLP); |
| 500 | ||
| 500 | ||
| 501 | 501 | free (pLP); |
| 502 | 502 | } |
| 503 | ||
| 503 | ||
| 504 | 504 | copy_size = dibSize; |
| 505 | 505 | pixel_ptr = (char*)lpDIBBits; |
| 506 | 506 | *phDIB = hDIB; |
| r11247 | r11248 | |
| 513 | 513 | png_info p; |
| 514 | 514 | UINT32 i; |
| 515 | 515 | int bytespp; |
| 516 | ||
| 516 | ||
| 517 | 517 | if (png_read_file((core_file*)mfile, &p) != PNGERR_NONE) |
| 518 | 518 | return 0; |
| 519 | 519 | |
| r11247 | r11248 | |
| 529 | 529 | png_free(&p); |
| 530 | 530 | return 0; |
| 531 | 531 | } |
| 532 | ||
| 532 | ||
| 533 | 533 | /* Convert < 8 bit to 8 bit */ |
| 534 | 534 | png_expand_buffer_8bit(&p); |
| 535 | ||
| 535 | ||
| 536 | 536 | if (!AllocatePNG(&p, phDIB, pPAL)) |
| 537 | 537 | { |
| 538 | 538 | logerror("Unable to allocate memory for artwork\n"); |
| r11247 | r11248 | |
| 558 | 558 | ptr[2] = bTmp; |
| 559 | 559 | ptr += 3; |
| 560 | 560 | } |
| 561 | } | |
| 561 | } | |
| 562 | 562 | store_pixels(p.image + i * (p.width * bytespp), p.width * bytespp); |
| 563 | 563 | } |
| 564 | 564 |
| r11247 | r11248 | |
|---|---|---|
| 294 | 294 | { MUIOPTION_OFFSET_CLONES, "0", OPTION_BOOLEAN, NULL }, |
| 295 | 295 | { MUIOPTION_STRETCH_SCREENSHOT_LARGER, "0", OPTION_BOOLEAN, NULL }, |
| 296 | 296 | { 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 }, | |
| 299 | 299 | { MUIOPTION_EXEC_COMMAND, "", OPTION_STRING, NULL }, |
| 300 | 300 | { MUIOPTION_EXEC_WAIT, "0", OPTION_INTEGER, NULL }, |
| 301 | 301 | |
| r11247 | r11248 | |
| 316 | 316 | { MUIOPTION_MAMEINFO_FILE, MUIMAMEINFO_FILE, OPTION_STRING, NULL }, |
| 317 | 317 | |
| 318 | 318 | { NULL, NULL, OPTION_HEADER, "NAVIGATION KEY CODES" }, |
| 319 | { MUIOPTION_UI_KEY_UP, "KEYCODE_UP", | |
| 319 | { MUIOPTION_UI_KEY_UP, "KEYCODE_UP", | |
| 320 | 320 | { MUIOPTION_UI_KEY_DOWN, "KEYCODE_DOWN", OPTION_STRING, NULL }, |
| 321 | 321 | { 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 }, | |
| 324 | 324 | { MUIOPTION_UI_KEY_PGUP, "KEYCODE_PGUP", OPTION_STRING, NULL }, |
| 325 | 325 | { MUIOPTION_UI_KEY_PGDWN, "KEYCODE_PGDN", OPTION_STRING, NULL }, |
| 326 | 326 | { 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 }, | |
| 331 | 331 | |
| 332 | 332 | { MUIOPTION_UI_KEY_CONTEXT_FILTERS, "KEYCODE_LCONTROL KEYCODE_F", OPTION_STRING, NULL }, |
| 333 | 333 | { MUIOPTION_UI_KEY_SELECT_RANDOM, "KEYCODE_LCONTROL KEYCODE_R", OPTION_STRING, NULL }, |
| r11247 | r11248 | |
| 431 | 431 | |
| 432 | 432 | /*static void memory_error(const char *message) |
| 433 | 433 | { |
| 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); | |
| 436 | 436 | } |
| 437 | 437 | */ |
| 438 | 438 | /* |
| 439 | 439 | |
| 440 | 440 | void AddOptions(winui_options *opts, const options_entry *entrylist, BOOL is_global) |
| 441 | 441 | { |
| 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; | |
| 452 | 452 | |
| 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; | |
| 456 | 456 | |
| 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 | } | |
| 469 | 469 | #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; | |
| 473 | 473 | #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 | } | |
| 481 | 481 | } |
| 482 | 482 | |
| 483 | 483 | */ |
| r11247 | r11248 | |
| 506 | 506 | // create a memory pool for our data |
| 507 | 507 | //options_memory_pool = pool_alloc_lib(memory_error); |
| 508 | 508 | //if (!options_memory_pool) |
| 509 | // | |
| 509 | // return FALSE; | |
| 510 | 510 | |
| 511 | 511 | // set up the MAME32 settings (these get placed in MAME32ui.ini |
| 512 | 512 | //settings = options_create(memory_error); |
| r11247 | r11248 | |
| 528 | 528 | { |
| 529 | 529 | options_entry entry[2] = { { 0 }, { 0 } }; |
| 530 | 530 | snprintf(buffer, ARRAY_LENGTH(buffer), "%s%s", driver_list::driver(i).name, perGameOptions[j].name); |
| 531 | ||
| 531 | ||
| 532 | 532 | entry[0].name = core_strdup(buffer); |
| 533 | 533 | entry[0].defvalue = perGameOptions[j].defvalue; |
| 534 | 534 | entry[0].flags = perGameOptions[j].flags; |
| r11247 | r11248 | |
| 652 | 652 | |
| 653 | 653 | static input_seq *options_get_input_seq(winui_options &opts, const char *name) |
| 654 | 654 | { |
| 655 | /* static input_seq seq; | |
| 656 | const char *seq_string; | |
| 655 | /* static input_seq seq; | |
| 656 | const char *seq_string; | |
| 657 | 657 | |
| 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;*/ | |
| 661 | 661 | return NULL; |
| 662 | 662 | } |
| 663 | 663 | |
| r11247 | r11248 | |
| 1151 | 1151 | |
| 1152 | 1152 | void SetHistoryTab(int tab, BOOL show) |
| 1153 | 1153 | { |
| 1154 | astring error_string; | |
| 1154 | astring error_string; | |
| 1155 | 1155 | if (show) |
| 1156 | 1156 | settings.set_value(MUIOPTION_HISTORY_TAB, tab, OPTION_PRIORITY_CMDLINE,error_string); |
| 1157 | 1157 | else |
| r11247 | r11248 | |
| 2374 | 2374 | { |
| 2375 | 2375 | file_error filerr; |
| 2376 | 2376 | core_file *file; |
| 2377 | ||
| 2378 | 2377 | |
| 2378 | ||
| 2379 | 2379 | filerr = core_fopen(filename, OPEN_FLAG_READ, &file); |
| 2380 | 2380 | if (filerr == FILERR_NONE) |
| 2381 | 2381 | { |
| r11247 | r11248 | |
| 2389 | 2389 | { |
| 2390 | 2390 | file_error filerr; |
| 2391 | 2391 | core_file *file; |
| 2392 | ||
| 2393 | 2392 | |
| 2393 | ||
| 2394 | 2394 | filerr = core_fopen(filename, OPEN_FLAG_READ, &file); |
| 2395 | 2395 | if (filerr == FILERR_NONE) |
| 2396 | 2396 | { |
| r11247 | r11248 | |
| 2413 | 2413 | if (filerr == FILERR_NONE) |
| 2414 | 2414 | { |
| 2415 | 2415 | astring inistring; |
| 2416 | #ifdef MESS | |
| 2417 | opts.output_ini(inistring); | |
| 2416 | #ifdef MESS | |
| 2417 | opts.output_ini(inistring); | |
| 2418 | 2418 | #else |
| 2419 | 2419 | opts.output_ini(inistring,baseopts); |
| 2420 | 2420 | #endif |
| r11247 | r11248 | |
| 2423 | 2423 | } |
| 2424 | 2424 | } |
| 2425 | 2425 | /*else |
| 2426 | { | |
| 2427 | filerr = osd_rmfile(filename); | |
| 2428 | }*/ | |
| 2426 | { | |
| 2427 | filerr = osd_rmfile(filename); | |
| 2428 | }*/ | |
| 2429 | 2429 | |
| 2430 | 2430 | return filerr; |
| 2431 | 2431 | } |
| r11247 | r11248 | |
| 2440 | 2440 | if (filerr == FILERR_NONE) |
| 2441 | 2441 | { |
| 2442 | 2442 | astring inistring; |
| 2443 | #ifdef MESS | |
| 2444 | opts.output_ini(inistring); | |
| 2443 | #ifdef MESS | |
| 2444 | opts.output_ini(inistring); | |
| 2445 | 2445 | #else |
| 2446 | 2446 | opts.output_ini(inistring,baseopts); |
| 2447 | 2447 | #endif |
| r11247 | r11248 | |
| 2450 | 2450 | } |
| 2451 | 2451 | } |
| 2452 | 2452 | /*else |
| 2453 | { | |
| 2454 | filerr = osd_rmfile(filename); | |
| 2455 | }*/ | |
| 2453 | { | |
| 2454 | filerr = osd_rmfile(filename); | |
| 2455 | }*/ | |
| 2456 | 2456 | |
| 2457 | 2457 | return filerr; |
| 2458 | 2458 | } |
| r11247 | r11248 | |
| 2562 | 2562 | LPTREEFOLDER lpFolder; |
| 2563 | 2563 | int i; |
| 2564 | 2564 | options_entry entries[2] = { { 0 }, { 0 } }; |
| 2565 | ||
| 2565 | ||
| 2566 | 2566 | memcpy(entries, filterOptions, sizeof(filterOptions)); |
| 2567 | 2567 | |
| 2568 | 2568 | numFolders = GetNumFolders(); |
| r11247 | r11248 | |
| 2726 | 2726 | |
| 2727 | 2727 | BOOL IsGlobalOption(const char *option_name) |
| 2728 | 2728 | { |
| 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; | |
| 2750 | 2750 | |
| 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'; | |
| 2756 | 2756 | |
| 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 | }*/ | |
| 2762 | 2762 | return FALSE; |
| 2763 | 2763 | } |
| 2764 | 2764 | |
| r11247 | r11248 | |
| 2781 | 2781 | const game_driver *driver = NULL; |
| 2782 | 2782 | |
| 2783 | 2783 | CreateGameOptions(opts, game_num); |
| 2784 | // Copy over the defaults | |
| 2784 | // Copy over the defaults | |
| 2785 | 2785 | ui_parse_ini_file(opts, CONFIGNAME); |
| 2786 | 2786 | |
| 2787 | 2787 | if (opt_type == OPTIONS_GLOBAL) |
| r11247 | r11248 | |
| 2789 | 2789 | return; |
| 2790 | 2790 | } |
| 2791 | 2791 | |
| 2792 | // debug builds: parse "debug.ini" as well | |
| 2792 | // debug builds: parse "debug.ini" as well | |
| 2793 | 2793 | #ifdef MAME_DEBUG |
| 2794 | 2794 | ui_parse_ini_file(opts, "debug"); |
| 2795 | 2795 | #endif |
| r11247 | r11248 | |
| 2798 | 2798 | driver = &driver_list::driver(game_num); |
| 2799 | 2799 | } |
| 2800 | 2800 | |
| 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 | |
| 2802 | 2802 | if (driver != NULL) |
| 2803 | 2803 | { |
| 2804 | 2804 | const game_driver *parent = NULL; |
| r11247 | r11248 | |
| 2810 | 2810 | if (parent != NULL) { |
| 2811 | 2811 | if (gp!=-1) gparent= &driver_list::driver(gp); |
| 2812 | 2812 | } |
| 2813 | ||
| 2814 | 2813 | |
| 2814 | ||
| 2815 | 2815 | astring *basename; |
| 2816 | 2816 | astring *srcname; |
| 2817 | 2817 | machine_config config(*driver,opts); |
| 2818 | 2818 | |
| 2819 | // parse "vector.ini" for vector games | |
| 2819 | // parse "vector.ini" for vector games | |
| 2820 | 2820 | if (isDriverVector(&config)) |
| 2821 | 2821 | { |
| 2822 | 2822 | ui_parse_ini_file(opts, "vector"); |
| r11247 | r11248 | |
| 2825 | 2825 | { |
| 2826 | 2826 | return; |
| 2827 | 2827 | } |
| 2828 | // parse "horizont.ini" for horizontal games | |
| 2828 | // parse "horizont.ini" for horizontal games | |
| 2829 | 2829 | if (!DriverIsVertical(game_num)) |
| 2830 | 2830 | { |
| 2831 | 2831 | ui_parse_ini_file(opts, "horizont"); |
| r11247 | r11248 | |
| 2834 | 2834 | { |
| 2835 | 2835 | return; |
| 2836 | 2836 | } |
| 2837 | // parse "vertical.ini" for vertical games | |
| 2837 | // parse "vertical.ini" for vertical games | |
| 2838 | 2838 | if (DriverIsVertical(game_num)) |
| 2839 | 2839 | { |
| 2840 | 2840 | ui_parse_ini_file(opts, "vertical"); |
| r11247 | r11248 | |
| 2845 | 2845 | } |
| 2846 | 2846 | |
| 2847 | 2847 | |
| 2848 | // then parse "<sourcefile>.ini" | |
| 2848 | // then parse "<sourcefile>.ini" | |
| 2849 | 2849 | basename = core_filename_extract_base(astring_alloc(), driver->source_file, TRUE); |
| 2850 | 2850 | srcname = astring_assemble_3(astring_alloc(), "source", PATH_SEPARATOR, astring_c(basename)); |
| 2851 | 2851 | ui_parse_ini_file(opts, astring_c(srcname)); |
| r11247 | r11248 | |
| 2857 | 2857 | return; |
| 2858 | 2858 | } |
| 2859 | 2859 | |
| 2860 | // then parent the grandparent, parent, and game-specific INIs | |
| 2860 | // then parent the grandparent, parent, and game-specific INIs | |
| 2861 | 2861 | if (gparent != NULL) |
| 2862 | 2862 | ui_parse_ini_file(opts, gparent->name); |
| 2863 | 2863 | if (parent != NULL) |
| r11247 | r11248 | |
| 2892 | 2892 | const game_driver *driver = NULL; |
| 2893 | 2893 | astring *filename = NULL; |
| 2894 | 2894 | |
| 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 | }*/ | |
| 2906 | 2906 | |
| 2907 | 2907 | if (game_num >= 0) |
| 2908 | 2908 | { |
| r11247 | r11248 | |
| 2911 | 2911 | |
| 2912 | 2912 | if (opt_type == OPTIONS_GLOBAL) |
| 2913 | 2913 | { |
| 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. | |
| 2915 | 2915 | //if (NULL == opts) |
| 2916 | 2916 | //return; |
| 2917 | 2917 | global = opts; |
| r11247 | r11248 | |
| 2932 | 2932 | switch (opt_type) |
| 2933 | 2933 | { |
| 2934 | 2934 | case OPTIONS_SOURCE: |
| 2935 | // determine the <sourcefile> | |
| 2935 | // determine the <sourcefile> | |
| 2936 | 2936 | basename = core_filename_extract_base(astring_alloc(), driver->source_file, TRUE); |
| 2937 | 2937 | srcname = astring_assemble_3(astring_alloc(), "source", PATH_SEPARATOR, astring_c(basename)); |
| 2938 | 2938 | filename = astring_cpyc(astring_alloc(),astring_c(srcname)); |
| r11247 | r11248 | |
| 2965 | 2965 | char* utf8_filename; |
| 2966 | 2966 | |
| 2967 | 2967 | /* |
| 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 | */ | |
| 2971 | 2971 | pathname = astring_assemble_3(astring_alloc(), GetIniDir(), PATH_SEPARATOR, "source"); |
| 2972 | 2972 | match = astring_assemble_3(astring_alloc(), astring_c(pathname), PATH_SEPARATOR, "*.ini"); |
| 2973 | 2973 | if ((hFindFile = win_find_first_file_utf8(astring_c(match), &findFileData)) != INVALID_HANDLE_VALUE) |
| r11247 | r11248 | |
|---|---|---|
| 63 | 63 | {"CPU", "cpu", FOLDER_CPU, IDI_CPU, 0, 0, CreateCPUFolders }, |
| 64 | 64 | {"Sound", "sound", FOLDER_SND, IDI_SOUND, 0, 0, CreateSoundFolders }, |
| 65 | 65 | {"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 }, | |
| 68 | 68 | {"Working", "working", FOLDER_WORKING, IDI_WORKING, F_WORKING, F_NONWORKING, NULL, DriverIsBroken, FALSE }, |
| 69 | 69 | {"Not Working", "nonworking", FOLDER_NONWORKING, IDI_NONWORKING, F_NONWORKING, F_WORKING, NULL, DriverIsBroken, TRUE }, |
| 70 | 70 | {"Originals", "originals", FOLDER_ORIGINAL, IDI_FOLDER, F_ORIGINALS, F_CLONES, NULL, DriverIsClone, FALSE }, |
| r11247 | r11248 | |
| 75 | 75 | {"Lightgun", "lightgun", FOLDER_LIGHTGUN, IDI_FOLDER, 0, 0, NULL, DriverUsesLightGun, TRUE }, |
| 76 | 76 | {"Stereo", "stereo", FOLDER_STEREO, IDI_SOUND, 0, 0, NULL, DriverIsStereo, TRUE }, |
| 77 | 77 | {"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 }, | |
| 83 | 83 | { NULL } |
| 84 | 84 | }; |
| 85 | 85 | |
| r11247 | r11248 | |
| 132 | 132 | extern const SPLITTERINFO g_splitterInfo[] = |
| 133 | 133 | { |
| 134 | 134 | { 0.25, IDC_SPLITTER, IDC_TREE, IDC_LIST, AdjustSplitter1Rect }, |
| 135 | // | |
| 135 | // { 0.4, IDC_SPLITTER2, IDC_LIST, IDC_SWTAB, AdjustSplitter1Rect }, | |
| 136 | 136 | { 0.5, IDC_SPLITTER2, IDC_LIST, IDC_SSFRAME, AdjustSplitter2Rect }, |
| 137 | 137 | { -1 } |
| 138 | 138 | }; |
| r11247 | r11248 | |
|---|---|---|
| 43 | 43 | ifndef DIRECTINPUT |
| 44 | 44 | DIRECTINPUT = 7 |
| 45 | 45 | endif |
| 46 | ||
| 47 | 46 | |
| 48 | 47 | |
| 48 | ||
| 49 | 49 | ########################################################################### |
| 50 | 50 | ################## END USER-CONFIGURABLE OPTIONS ###################### |
| 51 | 51 | ########################################################################### |
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | #------------------------------------------------- |
| 55 | # append "ui" to the emulator name | |
| 55 | # append "ui" to the emulator name | |
| 56 | 56 | #------------------------------------------------- |
| 57 | 57 | |
| 58 | 58 | EMULATOR = $(PREFIX)$(NAME)ui$(SUFFIX)$(SUFFIX64)$(SUFFIXDEBUG)$(EXE) |
| r11247 | r11248 | |
| 202 | 202 | ifdef WIN95_MULTIMON |
| 203 | 203 | CFLAGS += -DWIN95_MULTIMON |
| 204 | 204 | endif |
| 205 | ||
| 206 | 205 | |
| 206 | ||
| 207 | 207 | # add the windows libaries, 3 additional libs at the end for UI |
| 208 | 208 | LIBS += \ |
| 209 | 209 | -luser32 \ |
| r11247 | r11248 | |
| 333 | 333 | endif |
| 334 | 334 | |
| 335 | 335 | # extra dependencies |
| 336 | $(WINOBJ)/drawdd.o : | |
| 336 | $(WINOBJ)/drawdd.o : | |
| 337 | 337 | $(WINOBJ)/drawgdi.o : $(SRC)/emu/rendersw.c |
| 338 | 338 | |
| 339 | 339 | # add debug-specific files |
| r11247 | r11248 | |
| 370 | 370 | |
| 371 | 371 | |
| 372 | 372 | #------------------------------------------------- |
| 373 | # rules for creating helpids.c | |
| 373 | # rules for creating helpids.c | |
| 374 | 374 | #------------------------------------------------- |
| 375 | 375 | |
| 376 | 376 | $(UISRC)/helpids.c : $(UIOBJ)/mkhelp$(EXE) $(UISRC)/resource.h $(UISRC)/resource.hm $(UISRC)/mameui.rc |
| r11247 | r11248 | |
|---|---|---|
| 23 | 23 | |
| 24 | 24 | #ifdef _MSC_VER |
| 25 | 25 | #ifndef NONAMELESSUNION |
| 26 | #define NONAMELESSUNION | |
| 26 | #define NONAMELESSUNION | |
| 27 | 27 | #endif |
| 28 | 28 | #endif |
| 29 | 29 | |
| r11247 | r11248 | |
| 196 | 196 | Button_SetCheck(GetDlgItem(hDlg,IDC_KEY_GUI),GetKeyGUI()); |
| 197 | 197 | Button_SetCheck(GetDlgItem(hDlg,IDC_BROADCAST),GetBroadcast()); |
| 198 | 198 | Button_SetCheck(GetDlgItem(hDlg,IDC_RANDOM_BG),GetRandomBackground()); |
| 199 | ||
| 199 | ||
| 200 | 200 | Button_SetCheck(GetDlgItem(hDlg,IDC_HIDE_MOUSE),GetHideMouseOnStartup()); |
| 201 | 201 | |
| 202 | 202 | // Get the current value of the control |
| r11247 | r11248 | |
| 295 | 295 | case IDC_SCREENSHOT_BORDERCOLOR: |
| 296 | 296 | { |
| 297 | 297 | for (i=0;i<16;i++) |
| 298 | | |
| 298 | | |
| 299 | 299 | |
| 300 | 300 | cc.lStructSize = sizeof(CHOOSECOLOR); |
| 301 | 301 | cc.hwndOwner = hDlg; |
| r11247 | r11248 | |
| 304 | 304 | cc.Flags = CC_ANYCOLOR | CC_RGBINIT | CC_SOLIDCOLOR; |
| 305 | 305 | if (!ChooseColor(&cc)) |
| 306 | 306 | 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]); | |
| 309 | 309 | SetScreenshotBorderColor(cc.rgbResult); |
| 310 | 310 | UpdateScreenShot(); |
| 311 | 311 | return TRUE; |
| r11247 | r11248 | |
| 319 | 319 | SetKeyGUI(Button_GetCheck(GetDlgItem(hDlg, IDC_KEY_GUI))); |
| 320 | 320 | SetBroadcast(Button_GetCheck(GetDlgItem(hDlg, IDC_BROADCAST))); |
| 321 | 321 | SetRandomBackground(Button_GetCheck(GetDlgItem(hDlg, IDC_RANDOM_BG))); |
| 322 | ||
| 322 | ||
| 323 | 323 | SetHideMouseOnStartup(Button_GetCheck(GetDlgItem(hDlg,IDC_HIDE_MOUSE))); |
| 324 | 324 | |
| 325 | 325 | if( Button_GetCheck(GetDlgItem(hDlg,IDC_RESET_PLAYCOUNT ) ) ) |
| r11247 | r11248 | |
| 356 | 356 | SetFilterInherit(checked); |
| 357 | 357 | // LineUpIcons does just a ResetListView(), which is what we want here |
| 358 | 358 | PostMessage(GetMainWindow(),WM_COMMAND, MAKEWPARAM(ID_VIEW_LINEUPICONS, FALSE),(LPARAM)NULL); |
| 359 | ||
| 359 | ||
| 360 | 360 | checked = Button_GetCheck(GetDlgItem(hDlg,IDC_NOOFFSET_CLONES)); |
| 361 | 361 | if (checked != GetOffsetClones()) |
| 362 | 362 | { |
| 363 | 363 | SetOffsetClones(checked); |
| 364 | 364 | // LineUpIcons does just a ResetListView(), which is what we want here |
| 365 | 365 | PostMessage(GetMainWindow(),WM_COMMAND, MAKEWPARAM(ID_VIEW_LINEUPICONS, FALSE),(LPARAM)NULL); |
| 366 | ||
| 366 | ||
| 367 | 367 | nCurSelection = ComboBox_GetCurSel(GetDlgItem(hDlg,IDC_SNAPNAME)); |
| 368 | 368 | if (nCurSelection != CB_ERR) { |
| 369 | 369 | const char* snapname_selection = (const char*)ComboBox_GetItemData(GetDlgItem(hDlg,IDC_SNAPNAME), nCurSelection); |
| r11247 | r11248 | |
| 403 | 403 | static DWORD dwFilters; |
| 404 | 404 | static DWORD dwpFilters; |
| 405 | 405 | static LPCFOLDERDATA lpFilterRecord; |
| 406 | char | |
| 406 | char | |
| 407 | 407 | int i; |
| 408 | 408 | |
| 409 | 409 | switch (Msg) |
| r11247 | r11248 | |
| 419 | 419 | if (folder != NULL) |
| 420 | 420 | { |
| 421 | 421 | char tmp[80]; |
| 422 | ||
| 422 | ||
| 423 | 423 | win_set_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_EDIT), g_FilterText); |
| 424 | 424 | Edit_SetSel(GetDlgItem(hDlg, IDC_FILTER_EDIT), 0, -1); |
| 425 | 425 | // Mask out non filter flags |
| r11247 | r11248 | |
| 434 | 434 | if( lpParent ) |
| 435 | 435 | { |
| 436 | 436 | /* Check the Parent Filters and inherit them on child, |
| 437 | ||
| 437 | * No need to promote all games to parent folder, works as is */ | |
| 438 | 438 | dwpFilters = lpParent->m_dwFlags & F_MASK; |
| 439 | 439 | /*Check all possible Filters if inherited solely from parent, e.g. not being set explicitly on our folder*/ |
| 440 | 440 | if( (dwpFilters & F_CLONES) && !(dwFilters & F_CLONES) ) |
| r11247 | r11248 | |
| 562 | 562 | { |
| 563 | 563 | case IDOK: |
| 564 | 564 | dwFilters = 0; |
| 565 | ||
| 565 | ||
| 566 | 566 | win_get_window_text_utf8(GetDlgItem(hDlg, IDC_FILTER_EDIT), g_FilterText, FILTERTEXT_LEN); |
| 567 | ||
| 567 | ||
| 568 | 568 | // see which buttons are checked |
| 569 | 569 | for (i = 0; g_lpFilterList[i].m_dwFilterType; i++) |
| 570 | 570 | { |
| r11247 | r11248 | |
| 587 | 587 | case IDCANCEL: |
| 588 | 588 | EndDialog(hDlg, 0); |
| 589 | 589 | return TRUE; |
| 590 | ||
| 590 | ||
| 591 | 591 | default: |
| 592 | 592 | // Handle unchecking mutually exclusive filters |
| 593 | 593 | if (wNotifyCode == BN_CLICKED) |
| r11247 | r11248 | |
| 672 | 672 | #else |
| 673 | 673 | tvis.DUMMYUNIONNAME.item = tvi; |
| 674 | 674 | #endif |
| 675 | ||
| 675 | ||
| 676 | 676 | hti = TreeView_InsertItem(GetDlgItem(hDlg,IDC_CUSTOM_TREE),&tvis); |
| 677 | 677 | |
| 678 | 678 | /* look for children of this custom folder */ |
| r11247 | r11248 | |
| 692 | 692 | tvis.item = tvi; |
| 693 | 693 | #else |
| 694 | 694 | tvis.DUMMYUNIONNAME.item = tvi; |
| 695 | #endif | |
| 695 | #endif | |
| 696 | 696 | hti_child = TreeView_InsertItem(GetDlgItem(hDlg,IDC_CUSTOM_TREE),&tvis); |
| 697 | 697 | if (folders[jj] == default_selection) |
| 698 | 698 | res = TreeView_SelectItem(GetDlgItem(hDlg,IDC_CUSTOM_TREE),hti_child); |
| r11247 | r11248 | |
| 707 | 707 | } |
| 708 | 708 | |
| 709 | 709 | } |
| 710 | ||
| 710 | ||
| 711 | 711 | } |
| 712 | 712 | } |
| 713 | ||
| 713 | ||
| 714 | 714 | win_set_window_text_utf8(GetDlgItem(hDlg,IDC_CUSTOMFILE_GAME), |
| 715 | 715 | ModifyThe(driver_list::driver(driver_index).description)); |
| 716 | 716 | |
| r11247 | r11248 | |
| 727 | 727 | if (TreeView_GetItem(GetDlgItem(hDlg,IDC_CUSTOM_TREE),&tvi) == TRUE) |
| 728 | 728 | { |
| 729 | 729 | /* should look for New... */ |
| 730 | ||
| 730 | ||
| 731 | 731 | default_selection = (LPTREEFOLDER)tvi.lParam; /* start here next time */ |
| 732 | 732 | |
| 733 | 733 | AddToCustomFolder((LPTREEFOLDER)tvi.lParam,driver_index); |
| r11247 | r11248 | |
|---|---|---|
| 13 | 13 | |
| 14 | 14 | /*************************************************************************** |
| 15 | 15 | |
| 16 | ||
| 16 | directdraw.c | |
| 17 | 17 | |
| 18 | Direct Draw routines. | |
| 19 | ||
| 18 | Direct Draw routines. | |
| 19 | ||
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | |
| 22 | 22 | // standard windows headers |
| r11247 | r11248 | |
| 35 | 35 | #include <tchar.h> |
| 36 | 36 | |
| 37 | 37 | /*************************************************************************** |
| 38 | ||
| 38 | function prototypes | |
| 39 | 39 | ***************************************************************************/ |
| 40 | 40 | |
| 41 | 41 | static BOOL WINAPI DDEnumInfo(GUID FAR *lpGUID, |
| 42 | LPTSTR lpDriverDescription, | |
| 43 | LPTSTR lpDriverName, | |
| 42 | LPTSTR lpDriverDescription, | |
| 43 | LPTSTR lpDriverName, | |
| 44 | 44 | LPVOID lpContext, |
| 45 | 45 | HMONITOR hm); |
| 46 | 46 | |
| 47 | 47 | static BOOL WINAPI DDEnumOldInfo(GUID FAR *lpGUID, |
| 48 | 48 | LPTSTR lpDriverDescription, |
| 49 | LPTSTR lpDriverName, | |
| 49 | LPTSTR lpDriverName, | |
| 50 | 50 | LPVOID lpContext); |
| 51 | 51 | |
| 52 | 52 | static void CalculateDisplayModes(void); |
| r11247 | r11248 | |
| 54 | 54 | static HRESULT CALLBACK EnumDisplayModesCallback2(DDSURFACEDESC2* pddsd, LPVOID Context); |
| 55 | 55 | |
| 56 | 56 | /*************************************************************************** |
| 57 | ||
| 57 | External variables | |
| 58 | 58 | ***************************************************************************/ |
| 59 | 59 | |
| 60 | 60 | /*************************************************************************** |
| 61 | ||
| 61 | Internal structures | |
| 62 | 62 | ***************************************************************************/ |
| 63 | 63 | |
| 64 | 64 | typedef struct |
| r11247 | r11248 | |
| 71 | 71 | IUnknown FAR *pUnkOuter); |
| 72 | 72 | |
| 73 | 73 | /*************************************************************************** |
| 74 | ||
| 74 | Internal variables | |
| 75 | 75 | ***************************************************************************/ |
| 76 | 76 | |
| 77 | 77 | #define MAX_DISPLAYS 100 |
| r11247 | r11248 | |
| 86 | 86 | static IDirectDraw4* g_pDirectDraw4; |
| 87 | 87 | |
| 88 | 88 | /*************************************************************************** |
| 89 | ||
| 89 | External functions | |
| 90 | 90 | ***************************************************************************/ |
| 91 | 91 | |
| 92 | 92 | /**************************************************************************** |
| 93 | * | |
| 93 | * DirectDrawInitialize | |
| 94 | 94 | * |
| 95 | * | |
| 95 | * Initialize the DirectDraw variables. | |
| 96 | 96 | * |
| 97 | * | |
| 97 | * This entails the following functions: | |
| 98 | 98 | * |
| 99 | * | |
| 99 | * DirectDrawCreate | |
| 100 | 100 | * |
| 101 | 101 | ****************************************************************************/ |
| 102 | 102 | |
| 103 | 103 | #if !defined(LPDIRECTDRAWENUMERATE) |
| 104 | 104 | #if defined(UNICODE) |
| 105 | 105 | |
| 106 | typedef HRESULT (WINAPI* LPDIRECTDRAWENUMERATEW)(LPDDENUMCALLBACKW lpCallback, LPVOID lpContext); | |
| 106 | typedef HRESULT (WINAPI* LPDIRECTDRAWENUMERATEW)(LPDDENUMCALLBACKW lpCallback, LPVOID lpContext); | |
| 107 | 107 | |
| 108 | 108 | #define LPDIRECTDRAWENUMERATE LPDIRECTDRAWENUMERATEW |
| 109 | 109 | |
| r11247 | r11248 | |
| 112 | 112 | |
| 113 | 113 | #else |
| 114 | 114 | |
| 115 | typedef HRESULT (WINAPI* LPDIRECTDRAWENUMERATEA)(LPDDENUMCALLBACKA lpCallback, LPVOID lpContext); | |
| 115 | typedef HRESULT (WINAPI* LPDIRECTDRAWENUMERATEA)(LPDDENUMCALLBACKA lpCallback, LPVOID lpContext); | |
| 116 | 116 | |
| 117 | 117 | #define LPDIRECTDRAWENUMERATE LPDIRECTDRAWENUMERATEA |
| 118 | 118 | |
| r11247 | r11248 | |
| 160 | 160 | g_pDirectDraw2 = NULL; |
| 161 | 161 | g_pDirectDraw4 = NULL; |
| 162 | 162 | hr = ddc(NULL, &pDirectDraw1, NULL); |
| 163 | if (FAILED(hr)) | |
| 163 | if (FAILED(hr)) | |
| 164 | 164 | { |
| 165 | 165 | ErrorMsg("DirectDrawCreate failed: %s", DirectXDecodeError(hr)); |
| 166 | 166 | return FALSE; |
| r11247 | r11248 | |
| 179 | 179 | return FALSE; |
| 180 | 180 | } |
| 181 | 181 | } |
| 182 | ||
| 182 | ||
| 183 | 183 | memset(&ddCaps, 0, sizeof(DDCAPS)); |
| 184 | 184 | memset(&ddHelCaps, 0, sizeof(DDCAPS)); |
| 185 | 185 | ddCaps.dwSize = sizeof(DDCAPS); |
| r11247 | r11248 | |
| 195 | 195 | IDirectDraw_Release(pDirectDraw1); |
| 196 | 196 | |
| 197 | 197 | /* |
| 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 | */ | |
| 202 | 202 | pDDEnumEx = (LPDIRECTDRAWENUMERATEEX) GetProcAddress((HINSTANCE)g_hDLL, SDirectDrawEnumerateEx); |
| 203 | 203 | |
| 204 | 204 | /* |
| 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 | */ | |
| 208 | 208 | if (pDDEnumEx) |
| 209 | 209 | { |
| 210 | pDDEnumEx(DDEnumInfo, NULL, | |
| 210 | pDDEnumEx(DDEnumInfo, NULL, | |
| 211 | 211 | DDENUM_ATTACHEDSECONDARYDEVICES | DDENUM_DETACHEDSECONDARYDEVICES); |
| 212 | 212 | } |
| 213 | 213 | else |
| r11247 | r11248 | |
| 216 | 216 | |
| 217 | 217 | lpDDEnum = (LPDIRECTDRAWENUMERATE) GetProcAddress((HINSTANCE)g_hDLL, SDirectDrawEnumerate); |
| 218 | 218 | /* |
| 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 | */ | |
| 224 | 224 | if (lpDDEnum) |
| 225 | 225 | { |
| 226 | 226 | lpDDEnum(DDEnumOldInfo, NULL); |
| r11247 | r11248 | |
| 236 | 236 | |
| 237 | 237 | /**************************************************************************** |
| 238 | 238 | * |
| 239 | * | |
| 239 | * DirectDraw_Close | |
| 240 | 240 | * |
| 241 | * | |
| 241 | * Terminate our usage of DirectDraw. | |
| 242 | 242 | * |
| 243 | 243 | ****************************************************************************/ |
| 244 | 244 | |
| 245 | 245 | void DirectDraw_Close(void) |
| 246 | 246 | { |
| 247 | 247 | int i; |
| 248 | ||
| 248 | ||
| 249 | 249 | for (i = 0; i < g_nNumDisplays; i++) |
| 250 | 250 | { |
| 251 | 251 | free(g_Displays[i].name); |
| r11247 | r11248 | |
| 255 | 255 | free(g_Displays[i].lpguid); |
| 256 | 256 | g_Displays[i].lpguid = NULL; |
| 257 | 257 | } |
| 258 | ||
| 258 | ||
| 259 | 259 | } |
| 260 | 260 | g_nNumDisplays = 0; |
| 261 | ||
| 261 | ||
| 262 | 262 | /* |
| 263 | Destroy any lingering IDirectDraw object. | |
| 264 | */ | |
| 265 | if (g_pDirectDraw2) | |
| 263 | Destroy any lingering IDirectDraw object. | |
| 264 | */ | |
| 265 | if (g_pDirectDraw2) | |
| 266 | 266 | { |
| 267 | 267 | IDirectDraw2_Release(g_pDirectDraw2); |
| 268 | 268 | g_pDirectDraw2 = NULL; |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | if (g_pDirectDraw4) | |
| 271 | if (g_pDirectDraw4) | |
| 272 | 272 | { |
| 273 | 273 | IDirectDraw4_Release(g_pDirectDraw4); |
| 274 | 274 | g_pDirectDraw4 = NULL; |
| r11247 | r11248 | |
| 283 | 283 | |
| 284 | 284 | /****************************************************************************/ |
| 285 | 285 | /* |
| 286 | ||
| 286 | Return a list of 16, 24 and 32 bit DirectDraw modes. | |
| 287 | 287 | */ |
| 288 | 288 | struct tDisplayModes* DirectDraw_GetDisplayModes(void) |
| 289 | 289 | { |
| r11247 | r11248 | |
| 318 | 318 | /****************************************************************************/ |
| 319 | 319 | |
| 320 | 320 | static BOOL WINAPI DDEnumInfo(GUID FAR *lpGUID, |
| 321 | LPTSTR lpDriverDescription, | |
| 322 | LPTSTR lpDriverName, | |
| 321 | LPTSTR lpDriverDescription, | |
| 322 | LPTSTR lpDriverName, | |
| 323 | 323 | LPVOID lpContext, |
| 324 | 324 | HMONITOR hm) |
| 325 | 325 | { |
| 326 | 326 | g_Displays[g_nNumDisplays].name = (TCHAR*)malloc((_tcslen(lpDriverDescription) + 1) * sizeof(TCHAR)); |
| 327 | 327 | _tcscpy(g_Displays[g_nNumDisplays].name, lpDriverDescription); |
| 328 | ||
| 328 | ||
| 329 | 329 | if (lpGUID == NULL) |
| 330 | 330 | g_Displays[g_nNumDisplays].lpguid = NULL; |
| 331 | 331 | else |
| r11247 | r11248 | |
| 333 | 333 | g_Displays[g_nNumDisplays].lpguid = (LPGUID)malloc(sizeof(GUID)); |
| 334 | 334 | memcpy(g_Displays[g_nNumDisplays].lpguid, lpGUID, sizeof(GUID)); |
| 335 | 335 | } |
| 336 | ||
| 336 | ||
| 337 | 337 | g_nNumDisplays++; |
| 338 | 338 | if (g_nNumDisplays == MAX_DISPLAYS) |
| 339 | 339 | return DDENUMRET_CANCEL; |
| r11247 | r11248 | |
| 343 | 343 | |
| 344 | 344 | static BOOL WINAPI DDEnumOldInfo(GUID FAR *lpGUID, |
| 345 | 345 | LPTSTR lpDriverDescription, |
| 346 | LPTSTR lpDriverName, | |
| 346 | LPTSTR lpDriverName, | |
| 347 | 347 | LPVOID lpContext) |
| 348 | 348 | { |
| 349 | 349 | return DDEnumInfo(lpGUID, lpDriverDescription, lpDriverName, lpContext, NULL); |
| r11247 | r11248 | |
| 390 | 390 | if (pddsd2->dwRefreshRate != 0) |
| 391 | 391 | g_bRefresh = TRUE; |
| 392 | 392 | } |
| 393 | ||
| 393 | ||
| 394 | 394 | if (pDisplayModes->m_nNumModes == MAXMODES) |
| 395 | 395 | return DDENUMRET_CANCEL; |
| 396 | 396 | else |
| r11247 | r11248 | |
|---|---|---|
| 153 | 153 | * |
| 154 | 154 | * Returns zero if the first n characters of s1 and s2 are equal, |
| 155 | 155 | * ignoring case. |
| 156 | * | |
| 156 | * stolen from datafile.c | |
| 157 | 157 | **************************************************************************/ |
| 158 | 158 | static int ci_strncmp (const char *s1, const char *s2, int n) |
| 159 | 159 | { |
| r11247 | r11248 | |
| 217 | 217 | void InitTree(LPCFOLDERDATA lpFolderData, LPCFILTER_ITEM lpFilterList) |
| 218 | 218 | { |
| 219 | 219 | LONG_PTR l; |
| 220 | ||
| 220 | ||
| 221 | 221 | g_lpFolderData = lpFolderData; |
| 222 | 222 | g_lpFilterList = lpFilterList; |
| 223 | 223 | |
| 224 | 224 | InitFolders(); |
| 225 | 225 | |
| 226 | 226 | /* this will subclass the treeview (where WM_DRAWITEM gets sent for |
| 227 | ||
| 227 | the header control) */ | |
| 228 | 228 | l = GetWindowLongPtr(GetTreeView(), GWLP_WNDPROC); |
| 229 | 229 | g_lpTreeWndProc = (WNDPROC)l; |
| 230 | 230 | SetWindowLongPtr(GetTreeView(), GWLP_WNDPROC, (LONG_PTR)TreeWndProc); |
| r11247 | r11248 | |
| 336 | 336 | //Filter out the Bioses on all Folders, except for the Bios Folder |
| 337 | 337 | if( lpFolder->m_nFolderId != FOLDER_BIOS ) |
| 338 | 338 | { |
| 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; | |
| 341 | 341 | } |
| 342 | ||
| 342 | ||
| 343 | 343 | if( GetFilterInherit() ) |
| 344 | 344 | { |
| 345 | 345 | if( lpFolder ) |
| r11247 | r11248 | |
| 348 | 348 | if( lpParent ) |
| 349 | 349 | { |
| 350 | 350 | /* 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 */ | |
| 353 | 353 | dwMask |= lpParent->m_dwFlags; |
| 354 | 354 | } |
| 355 | 355 | } |
| r11247 | r11248 | |
| 358 | 358 | if (strlen(GetSearchText()) && _stricmp(GetSearchText(), SEARCH_PROMPT)) |
| 359 | 359 | { |
| 360 | 360 | 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) | |
| 362 | 362 | return TRUE; |
| 363 | 363 | } |
| 364 | 364 | /*Filter Text is already global*/ |
| 365 | 365 | 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 && | |
| 368 | 368 | MyStrStrI(driver_list::driver(nGame).manufacturer,GetFilterText()) == NULL) |
| 369 | 369 | { |
| 370 | 370 | return TRUE; |
| r11247 | r11248 | |
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | /*************************************************************************** |
| 425 | ||
| 425 | private functions | |
| 426 | 426 | ***************************************************************************/ |
| 427 | 427 | |
| 428 | 428 | void CreateSourceFolders(int parent_index) |
| r11247 | r11248 | |
| 437 | 437 | for (jj = 0; jj < nGames; jj++) |
| 438 | 438 | { |
| 439 | 439 | const char *s = GetDriverFilename(jj); |
| 440 | ||
| 440 | ||
| 441 | 441 | if (s == NULL || s[0] == '\0') |
| 442 | 442 | continue; |
| 443 | 443 | |
| r11247 | r11248 | |
| 455 | 455 | { |
| 456 | 456 | // nope, it's a source file we haven't seen before, make it. |
| 457 | 457 | LPTREEFOLDER lpTemp; |
| 458 | lpTemp = NewFolder(s, next_folder_id, parent_index, IDI_SOURCE, | |
| 458 | lpTemp = NewFolder(s, next_folder_id, parent_index, IDI_SOURCE, | |
| 459 | 459 | GetFolderFlags(numFolders)); |
| 460 | 460 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 461 | 461 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| r11247 | r11248 | |
| 491 | 491 | int screens = DriverNumScreens(jj); |
| 492 | 492 | char s[2]; |
| 493 | 493 | itoa(screens, s, 10); |
| 494 | ||
| 494 | ||
| 495 | 495 | // look for an existant screens treefolder for this game |
| 496 | 496 | // (likely to be the previous one, so start at the end) |
| 497 | 497 | for (i=numFolders-1;i>=start_folder;i--) |
| r11247 | r11248 | |
| 506 | 506 | { |
| 507 | 507 | // nope, it's a screen file we haven't seen before, make it. |
| 508 | 508 | LPTREEFOLDER lpTemp; |
| 509 | lpTemp = NewFolder(s, next_folder_id, parent_index, IDI_FOLDER, | |
| 509 | lpTemp = NewFolder(s, next_folder_id, parent_index, IDI_FOLDER, | |
| 510 | 510 | GetFolderFlags(numFolders)); |
| 511 | 511 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 512 | 512 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| r11247 | r11248 | |
| 535 | 535 | int nGames = driver_list::total(); |
| 536 | 536 | int start_folder = numFolders; |
| 537 | 537 | LPTREEFOLDER lpFolder = treeFolders[parent_index]; |
| 538 | ||
| 538 | ||
| 539 | 539 | |
| 540 | 540 | // no games in top level folder |
| 541 | 541 | SetAllBits(lpFolder->m_lpGameBits,FALSE); |
| r11247 | r11248 | |
| 550 | 550 | manufacturer += iChars; |
| 551 | 551 | //shift to next start char |
| 552 | 552 | if( s != NULL && *s != 0 ) |
| 553 | ||
| 553 | ||
| 554 | 554 | const char *t = TrimManufacturer(s); |
| 555 | 555 | for (i=numFolders-1;i>=start_folder;i--) |
| 556 | 556 | { |
| r11247 | r11248 | |
| 564 | 564 | if (i == start_folder-1) |
| 565 | 565 | { |
| 566 | 566 | // 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, | |
| 568 | 568 | GetFolderFlags(numFolders)); |
| 569 | 569 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 570 | 570 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| r11247 | r11248 | |
| 607 | 607 | while( *s ) |
| 608 | 608 | { |
| 609 | 609 | /* combinations where to end string */ |
| 610 | ||
| 611 | if ( | |
| 610 | ||
| 611 | if ( | |
| 612 | 612 | ( (*s == ' ') && ( s[1] == '(' || s[1] == '/' || s[1] == '+' ) ) || |
| 613 | 613 | ( *s == ']' ) || |
| 614 | 614 | ( *s == '/' ) || |
| r11247 | r11248 | |
| 690 | 690 | { |
| 691 | 691 | ptmp += 14; |
| 692 | 692 | } |
| 693 | ||
| 693 | ||
| 694 | 694 | while ( (*ptmp != ')' ) && (*ptmp != '/' ) && *ptmp != '\0') |
| 695 | 695 | { |
| 696 | 696 | if (*ptmp == ' ' && ci_strncmp(ptmp, " license", 8) == 0) |
| r11247 | r11248 | |
| 703 | 703 | } |
| 704 | 704 | *t++ = *ptmp++; |
| 705 | 705 | } |
| 706 | ||
| 706 | ||
| 707 | 707 | *t = '\0'; |
| 708 | 708 | } |
| 709 | 709 | |
| r11247 | r11248 | |
| 726 | 726 | //start analyzing from the back, as these are usually suffixes |
| 727 | 727 | for(i=strlen(s)-1; i>=0;i-- ) |
| 728 | 728 | { |
| 729 | ||
| 729 | ||
| 730 | 730 | l = strlen(strTemp); |
| 731 | 731 | for(k=l;k>=0; k--) |
| 732 | 732 | strTemp[k+1] = strTemp[k]; |
| r11247 | r11248 | |
| 745 | 745 | if( j!=l) |
| 746 | 746 | { |
| 747 | 747 | memset(strTemp2, '\0', 256 ); |
| 748 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 748 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 749 | 749 | } |
| 750 | 750 | } |
| 751 | 751 | break; |
| r11247 | r11248 | |
| 760 | 760 | if( j!=l) |
| 761 | 761 | { |
| 762 | 762 | memset(strTemp2, '\0', 256 ); |
| 763 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 763 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 764 | 764 | } |
| 765 | 765 | } |
| 766 | 766 | break; |
| r11247 | r11248 | |
| 775 | 775 | if( j!=l) |
| 776 | 776 | { |
| 777 | 777 | memset(strTemp2, '\0', 256 ); |
| 778 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 778 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 779 | 779 | } |
| 780 | 780 | } |
| 781 | 781 | break; |
| r11247 | r11248 | |
| 790 | 790 | if( j!=l) |
| 791 | 791 | { |
| 792 | 792 | memset(strTemp2, '\0', 256 ); |
| 793 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 793 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 794 | 794 | } |
| 795 | 795 | } |
| 796 | 796 | break; |
| r11247 | r11248 | |
| 805 | 805 | if( j!=l) |
| 806 | 806 | { |
| 807 | 807 | memset(strTemp2, '\0', 256 ); |
| 808 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 808 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 809 | 809 | } |
| 810 | 810 | } |
| 811 | 811 | break; |
| r11247 | r11248 | |
| 820 | 820 | if( j!=l) |
| 821 | 821 | { |
| 822 | 822 | memset(strTemp2, '\0', 256 ); |
| 823 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 823 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 824 | 824 | } |
| 825 | 825 | } |
| 826 | 826 | break; |
| r11247 | r11248 | |
| 835 | 835 | if( j!=l) |
| 836 | 836 | { |
| 837 | 837 | memset(strTemp2, '\0', 256 ); |
| 838 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 838 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 839 | 839 | } |
| 840 | 840 | } |
| 841 | 841 | break; |
| r11247 | r11248 | |
| 850 | 850 | if( j!=l) |
| 851 | 851 | { |
| 852 | 852 | memset(strTemp2, '\0', 256 ); |
| 853 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 853 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 854 | 854 | } |
| 855 | 855 | } |
| 856 | 856 | break; |
| r11247 | r11248 | |
| 865 | 865 | if( j!=l) |
| 866 | 866 | { |
| 867 | 867 | memset(strTemp2, '\0', 256 ); |
| 868 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 868 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 869 | 869 | } |
| 870 | 870 | } |
| 871 | 871 | break; |
| r11247 | r11248 | |
| 880 | 880 | if( j!=l) |
| 881 | 881 | { |
| 882 | 882 | memset(strTemp2, '\0', 256 ); |
| 883 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 883 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 884 | 884 | } |
| 885 | 885 | } |
| 886 | 886 | break; |
| r11247 | r11248 | |
| 895 | 895 | if( j!=l) |
| 896 | 896 | { |
| 897 | 897 | memset(strTemp2, '\0', 256 ); |
| 898 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 898 | strncpy(strTemp2, s, strlen(s)-j ); | |
| 899 | 899 | } |
| 900 | 900 | } |
| 901 | 901 | break; |
| r11247 | r11248 | |
| 923 | 923 | // enumerate through all devices |
| 924 | 924 | for (bool gotone = config.m_devicelist.first(device); gotone; gotone = device->next(device)) |
| 925 | 925 | { |
| 926 | ||
| 926 | ||
| 927 | 927 | // get the name |
| 928 | 928 | const char *dev_name = device->devconfig().name(); |
| 929 | ||
| 929 | ||
| 930 | 930 | // do we have a folder for this device? |
| 931 | 931 | folder = NULL; |
| 932 | 932 | for (j = 0; j < device_folder_count; j++) |
| r11247 | r11248 | |
| 944 | 944 | LPTREEFOLDER lpTemp; |
| 945 | 945 | |
| 946 | 946 | lpTemp = NewFolder(device->devconfig().name(), next_folder_id, parent_index, IDI_CPU, |
| 947 | ||
| 947 | ||
| 948 | 948 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 949 | 949 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| 950 | 950 | |
| r11247 | r11248 | |
| 981 | 981 | machine_config config(driver_list::driver(i),MameUIGlobal()); |
| 982 | 982 | |
| 983 | 983 | // enumerate through all devices |
| 984 | ||
| 984 | ||
| 985 | 985 | for (bool gotone = config.m_devicelist.first(device); gotone; gotone = device->next(device)) |
| 986 | 986 | { |
| 987 | 987 | // get the name |
| r11247 | r11248 | |
| 1004 | 1004 | LPTREEFOLDER lpTemp; |
| 1005 | 1005 | |
| 1006 | 1006 | lpTemp = NewFolder(device->devconfig().name(), next_folder_id, parent_index, IDI_SOUND, |
| 1007 | ||
| 1007 | ||
| 1008 | 1008 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 1009 | 1009 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| 1010 | 1010 | |
| r11247 | r11248 | |
| 1036 | 1036 | // create our subfolders |
| 1037 | 1037 | LPTREEFOLDER lpProt, lpWrongCol, lpImpCol, lpImpGraph, lpMissSnd, lpImpSnd, lpFlip, lpArt; |
| 1038 | 1038 | lpProt = NewFolder("Unemulated Protection", next_folder_id, parent_index, IDI_FOLDER, |
| 1039 | ||
| 1039 | ||
| 1040 | 1040 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 1041 | 1041 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| 1042 | 1042 | |
| r11247 | r11248 | |
| 1048 | 1048 | ExtraFolderData[next_folder_id++]->m_dwFlags = 0; |
| 1049 | 1049 | AddFolder(lpProt); |
| 1050 | 1050 | lpWrongCol = NewFolder("Wrong Colors", next_folder_id, parent_index, IDI_FOLDER, |
| 1051 | ||
| 1051 | ||
| 1052 | 1052 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 1053 | 1053 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| 1054 | 1054 | |
| r11247 | r11248 | |
| 1061 | 1061 | AddFolder(lpWrongCol); |
| 1062 | 1062 | |
| 1063 | 1063 | lpImpCol = NewFolder("Imperfect Colors", next_folder_id, parent_index, IDI_FOLDER, |
| 1064 | ||
| 1064 | ||
| 1065 | 1065 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 1066 | 1066 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| 1067 | 1067 | |
| r11247 | r11248 | |
| 1074 | 1074 | AddFolder(lpImpCol); |
| 1075 | 1075 | |
| 1076 | 1076 | lpImpGraph = NewFolder("Imperfect Graphics", next_folder_id, parent_index, IDI_FOLDER, |
| 1077 | ||
| 1077 | ||
| 1078 | 1078 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 1079 | 1079 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| 1080 | 1080 | |
| r11247 | r11248 | |
| 1087 | 1087 | AddFolder(lpImpGraph); |
| 1088 | 1088 | |
| 1089 | 1089 | lpMissSnd = NewFolder("Missing Sound", next_folder_id, parent_index, IDI_FOLDER, |
| 1090 | ||
| 1090 | ||
| 1091 | 1091 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 1092 | 1092 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| 1093 | 1093 | |
| r11247 | r11248 | |
| 1100 | 1100 | AddFolder(lpMissSnd); |
| 1101 | 1101 | |
| 1102 | 1102 | lpImpSnd = NewFolder("Imperfect Sound", next_folder_id, parent_index, IDI_FOLDER, |
| 1103 | ||
| 1103 | ||
| 1104 | 1104 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 1105 | 1105 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| 1106 | 1106 | |
| r11247 | r11248 | |
| 1113 | 1113 | AddFolder(lpImpSnd); |
| 1114 | 1114 | |
| 1115 | 1115 | lpFlip = NewFolder("No Cocktail", next_folder_id, parent_index, IDI_FOLDER, |
| 1116 | ||
| 1116 | ||
| 1117 | 1117 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 1118 | 1118 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| 1119 | 1119 | |
| r11247 | r11248 | |
| 1126 | 1126 | AddFolder(lpFlip); |
| 1127 | 1127 | |
| 1128 | 1128 | lpArt = NewFolder("Requires Artwork", next_folder_id, parent_index, IDI_FOLDER, |
| 1129 | ||
| 1129 | ||
| 1130 | 1130 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA) ); |
| 1131 | 1131 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| 1132 | 1132 | |
| r11247 | r11248 | |
| 1173 | 1173 | if (driver_list::driver(jj).flags & GAME_REQUIRES_ARTWORK) |
| 1174 | 1174 | { |
| 1175 | 1175 | AddGame(lpArt,jj); |
| 1176 | } | |
| 1176 | } | |
| 1177 | 1177 | } |
| 1178 | 1178 | } |
| 1179 | 1179 | |
| r11247 | r11248 | |
| 1186 | 1186 | LPTREEFOLDER lpFolder = treeFolders[parent_index]; |
| 1187 | 1187 | const rom_entry *region, *rom; |
| 1188 | 1188 | //const char *name; |
| 1189 | const game_driver *gamedrv; | |
| 1189 | const game_driver *gamedrv; | |
| 1190 | 1190 | |
| 1191 | 1191 | // create our two subfolders |
| 1192 | 1192 | LPTREEFOLDER lpBad, lpNo; |
| 1193 | 1193 | lpBad = NewFolder("Bad Dump", next_folder_id, parent_index, IDI_FOLDER, |
| 1194 | ||
| 1194 | ||
| 1195 | 1195 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 1196 | 1196 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| 1197 | 1197 | |
| r11247 | r11248 | |
| 1203 | 1203 | ExtraFolderData[next_folder_id++]->m_dwFlags = 0; |
| 1204 | 1204 | AddFolder(lpBad); |
| 1205 | 1205 | lpNo = NewFolder("No Dump", next_folder_id, parent_index, IDI_FOLDER, |
| 1206 | ||
| 1206 | ||
| 1207 | 1207 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 1208 | 1208 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| 1209 | 1209 | |
| r11247 | r11248 | |
| 1223 | 1223 | const rom_source *source; |
| 1224 | 1224 | gamedrv = &driver_list::driver(jj); |
| 1225 | 1225 | |
| 1226 | if (!gamedrv->rom) | |
| 1226 | if (!gamedrv->rom) | |
| 1227 | 1227 | continue; |
| 1228 | 1228 | bBadDump = FALSE; |
| 1229 | 1229 | bNoDump = FALSE; |
| 1230 | 1230 | /* Allocate machine config */ |
| 1231 | 1231 | machine_config config(*gamedrv,MameUIGlobal()); |
| 1232 | ||
| 1232 | ||
| 1233 | 1233 | for (source = rom_first_source(config); source != NULL; source = rom_next_source(*source)) |
| 1234 | 1234 | { |
| 1235 | 1235 | for (region = rom_first_region(*source); region; region = rom_next_region(region)) |
| r11247 | r11248 | |
| 1239 | 1239 | if (ROMREGION_ISROMDATA(region) || ROMREGION_ISDISKDATA(region) ) |
| 1240 | 1240 | { |
| 1241 | 1241 | //name = ROM_GETNAME(rom); |
| 1242 | hash_collection hashes(ROM_GETHASHDATA(rom)); | |
| 1242 | hash_collection hashes(ROM_GETHASHDATA(rom)); | |
| 1243 | 1243 | if (hashes.flag(hash_collection::FLAG_BAD_DUMP)) |
| 1244 | 1244 | bBadDump = TRUE; |
| 1245 | 1245 | if (hashes.flag(hash_collection::FLAG_NO_DUMP)) |
| r11247 | r11248 | |
| 1280 | 1280 | |
| 1281 | 1281 | if (s[4] == '?') |
| 1282 | 1282 | s[4] = '\0'; |
| 1283 | ||
| 1283 | ||
| 1284 | 1284 | // look for an extant year treefolder for this game |
| 1285 | 1285 | // (likely to be the previous one, so start at the end) |
| 1286 | 1286 | for (i=numFolders-1;i>=start_folder;i--) |
| r11247 | r11248 | |
| 1296 | 1296 | // nope, it's a year we haven't seen before, make it. |
| 1297 | 1297 | LPTREEFOLDER lpTemp; |
| 1298 | 1298 | lpTemp = NewFolder(s, next_folder_id, parent_index, IDI_YEAR, |
| 1299 | ||
| 1299 | ||
| 1300 | 1300 | ExtraFolderData[next_folder_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 1301 | 1301 | memset(ExtraFolderData[next_folder_id], 0, sizeof(EXFOLDERDATA)); |
| 1302 | 1302 | |
| r11247 | r11248 | |
| 1370 | 1370 | |
| 1371 | 1371 | // currently "cached" parent |
| 1372 | 1372 | HTREEITEM hti_parent = NULL; |
| 1373 | int index_parent = -1; | |
| 1373 | int index_parent = -1; | |
| 1374 | 1374 | |
| 1375 | 1375 | res = TreeView_DeleteAllItems(hTreeView); |
| 1376 | 1376 | |
| r11247 | r11248 | |
| 1415 | 1415 | // not a top level branch, so look for parent |
| 1416 | 1416 | if (treeFolders[i]->m_nParent != index_parent) |
| 1417 | 1417 | { |
| 1418 | ||
| 1418 | ||
| 1419 | 1419 | hti_parent = TreeView_GetRoot(hTreeView); |
| 1420 | 1420 | while (1) |
| 1421 | 1421 | { |
| r11247 | r11248 | |
| 1448 | 1448 | tvi.iSelectedImage = 0; |
| 1449 | 1449 | tvi.pszText = treeFolders[i]->m_lptTitle; |
| 1450 | 1450 | tvi.lParam = (LPARAM)treeFolders[i]; |
| 1451 | ||
| 1451 | ||
| 1452 | 1452 | #if defined(__GNUC__) /* bug in commctrl.h */ |
| 1453 | 1453 | tvs.item = tvi; |
| 1454 | 1454 | #else |
| r11247 | r11248 | |
| 1485 | 1485 | SetCurrentFolder((LPTREEFOLDER)tvi.lParam); |
| 1486 | 1486 | return; |
| 1487 | 1487 | } |
| 1488 | ||
| 1488 | ||
| 1489 | 1489 | hti_next = TreeView_GetChild(hTreeView,hti); |
| 1490 | 1490 | if (hti_next == NULL) |
| 1491 | 1491 | { |
| r11247 | r11248 | |
| 1511 | 1511 | |
| 1512 | 1512 | } |
| 1513 | 1513 | |
| 1514 | /* | |
| 1514 | /* | |
| 1515 | 1515 | * Does this folder have an INI associated with it? |
| 1516 | 1516 | * Currently only TRUE for FOLDER_VECTOR and children |
| 1517 | 1517 | * of FOLDER_SOURCE. |
| r11247 | r11248 | |
| 1556 | 1556 | /* Allocate and initialize a NEW TREEFOLDER */ |
| 1557 | 1557 | static LPTREEFOLDER NewFolder(const char *lpTitle, |
| 1558 | 1558 | UINT nFolderId, int nParent, UINT nIconId, DWORD dwFlags) |
| 1559 | { | |
| 1559 | { | |
| 1560 | 1560 | LPTREEFOLDER lpFolder = (LPTREEFOLDER)malloc(sizeof(TREEFOLDER)); |
| 1561 | 1561 | memset(lpFolder, '\0', sizeof (TREEFOLDER)); |
| 1562 | 1562 | lpFolder->m_lpTitle = (LPSTR)malloc(strlen(lpTitle) + 1); |
| r11247 | r11248 | |
| 1629 | 1629 | AddFolder(NewFolder(fData->m_lpTitle, fData->m_nFolderId, -1, |
| 1630 | 1630 | fData->m_nIconId, dwFolderFlags)); |
| 1631 | 1631 | } |
| 1632 | ||
| 1632 | ||
| 1633 | 1633 | numExtraFolders = InitExtraFolders(); |
| 1634 | 1634 | |
| 1635 | 1635 | for (i = 0; i < numExtraFolders; i++) |
| r11247 | r11248 | |
| 1730 | 1730 | |
| 1731 | 1731 | GetClipBox(hDC, &rcClip); |
| 1732 | 1732 | GetClientRect(hWnd, &rcClient); |
| 1733 | ||
| 1733 | ||
| 1734 | 1734 | // Create a compatible memory DC |
| 1735 | 1735 | memDC = CreateCompatibleDC(hDC); |
| 1736 | 1736 | |
| r11247 | r11248 | |
| 1738 | 1738 | bitmap = CreateCompatibleBitmap(hDC, rcClient.right - rcClient.left, |
| 1739 | 1739 | rcClient.bottom - rcClient.top); |
| 1740 | 1740 | hOldBitmap = (HBITMAP)SelectObject(memDC, bitmap); |
| 1741 | ||
| 1741 | ||
| 1742 | 1742 | // First let the control do its default drawing. |
| 1743 | 1743 | CallWindowProc(g_lpTreeWndProc, hWnd, uMsg, (WPARAM)memDC, 0); |
| 1744 | 1744 | |
| 1745 | 1745 | // Draw bitmap in the background |
| 1746 | 1746 | |
| 1747 | 1747 | { |
| 1748 | HPALETTE hPAL; | |
| 1748 | HPALETTE hPAL; | |
| 1749 | 1749 | HDC maskDC; |
| 1750 | 1750 | HBITMAP maskBitmap; |
| 1751 | 1751 | HDC tempDC; |
| r11247 | r11248 | |
| 1758 | 1758 | RECT rcRoot; |
| 1759 | 1759 | |
| 1760 | 1760 | // Now create a mask |
| 1761 | maskDC = CreateCompatibleDC(hDC); | |
| 1762 | ||
| 1761 | maskDC = CreateCompatibleDC(hDC); | |
| 1762 | ||
| 1763 | 1763 | // Create monochrome bitmap for the mask |
| 1764 | 1764 | maskBitmap = CreateBitmap(rcClient.right - rcClient.left, |
| 1765 | rcClient.bottom - rcClient.top, | |
| 1765 | rcClient.bottom - rcClient.top, | |
| 1766 | 1766 | 1, 1, NULL); |
| 1767 | 1767 | |
| 1768 | 1768 | hOldMaskBitmap = (HBITMAP)SelectObject(maskDC, maskBitmap); |
| r11247 | r11248 | |
| 1770 | 1770 | |
| 1771 | 1771 | // Create the mask from the memory DC |
| 1772 | 1772 | BitBlt(maskDC, 0, 0, rcClient.right - rcClient.left, |
| 1773 | rcClient.bottom - rcClient.top, memDC, | |
| 1773 | rcClient.bottom - rcClient.top, memDC, | |
| 1774 | 1774 | rcClient.left, rcClient.top, SRCCOPY); |
| 1775 | 1775 | |
| 1776 | 1776 | tempDC = CreateCompatibleDC(hDC); |
| r11247 | r11248 | |
| 1778 | 1778 | |
| 1779 | 1779 | imageDC = CreateCompatibleDC(hDC); |
| 1780 | 1780 | bmpImage = CreateCompatibleBitmap(hDC, |
| 1781 | rcClient.right - rcClient.left, | |
| 1781 | rcClient.right - rcClient.left, | |
| 1782 | 1782 | rcClient.bottom - rcClient.top); |
| 1783 | 1783 | hOldBmpImage = (HBITMAP)SelectObject(imageDC, bmpImage); |
| 1784 | 1784 | |
| r11247 | r11248 | |
| 1792 | 1792 | RealizePalette(hDC); |
| 1793 | 1793 | SelectPalette(imageDC, hPAL, FALSE); |
| 1794 | 1794 | } |
| 1795 | ||
| 1795 | ||
| 1796 | 1796 | // Get x and y offset |
| 1797 | 1797 | TreeView_GetItemRect(hWnd, TreeView_GetRoot(hWnd), &rcRoot, FALSE); |
| 1798 | 1798 | rcRoot.left = -GetScrollPos(hWnd, SB_HORZ); |
| r11247 | r11248 | |
| 1800 | 1800 | // Draw bitmap in tiled manner to imageDC |
| 1801 | 1801 | for (i = rcRoot.left; i < rcClient.right; i += bmDesc->bmWidth) |
| 1802 | 1802 | 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, | |
| 1804 | 1804 | tempDC, 0, 0, SRCCOPY); |
| 1805 | 1805 | |
| 1806 | 1806 | // Set the background in memDC to black. Using SRCPAINT with black and any other |
| r11247 | r11248 | |
| 1814 | 1814 | // Set the foreground to black. See comment above. |
| 1815 | 1815 | SetBkColor(imageDC, RGB(255,255,255)); |
| 1816 | 1816 | 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, | |
| 1818 | 1818 | rcClip.bottom - rcClip.top, |
| 1819 | 1819 | maskDC, rcClip.left, rcClip.top, SRCAND); |
| 1820 | 1820 | |
| 1821 | 1821 | // Combine the foreground with the background |
| 1822 | 1822 | BitBlt(imageDC, rcClip.left, rcClip.top, rcClip.right - rcClip.left, |
| 1823 | rcClip.bottom - rcClip.top, | |
| 1823 | rcClip.bottom - rcClip.top, | |
| 1824 | 1824 | memDC, rcClip.left, rcClip.top, SRCPAINT); |
| 1825 | 1825 | |
| 1826 | 1826 | // Draw the final image to the screen |
| 1827 | 1827 | BitBlt(hDC, rcClip.left, rcClip.top, rcClip.right - rcClip.left, |
| 1828 | rcClip.bottom - rcClip.top, | |
| 1828 | rcClip.bottom - rcClip.top, | |
| 1829 | 1829 | imageDC, rcClip.left, rcClip.top, SRCCOPY); |
| 1830 | ||
| 1830 | ||
| 1831 | 1831 | SelectObject(maskDC, hOldMaskBitmap); |
| 1832 | 1832 | SelectObject(tempDC, hOldHBitmap); |
| 1833 | 1833 | SelectObject(imageDC, hOldBmpImage); |
| r11247 | r11248 | |
| 1858 | 1858 | if (GetBackgroundBitmap() != NULL) |
| 1859 | 1859 | { |
| 1860 | 1860 | switch (uMsg) |
| 1861 | { | |
| 1861 | { | |
| 1862 | 1862 | case WM_MOUSEMOVE: |
| 1863 | 1863 | { |
| 1864 | 1864 | if (MouseHasBeenMoved()) |
| r11247 | r11248 | |
| 1955 | 1955 | memset(ExtraFolderData, 0, (MAX_EXTRA_FOLDERS * MAX_EXTRA_SUBFOLDERS)* sizeof(LPEXFOLDERDATA)); |
| 1956 | 1956 | |
| 1957 | 1957 | /* NPW 9-Feb-2003 - MSVC stat() doesn't like stat() called with an empty |
| 1958 | * string | |
| 1959 | */ | |
| 1958 | * string | |
| 1959 | */ | |
| 1960 | 1960 | if (dir[0] == '\0') |
| 1961 | 1961 | dir = "."; |
| 1962 | 1962 | |
| r11247 | r11248 | |
| 2034 | 2034 | if (ext && *(ext + 1) && !mame_stricmp(ext + 1, "ini")) |
| 2035 | 2035 | { |
| 2036 | 2036 | ExtraFolderData[count] =(EXFOLDERDATA*) malloc(sizeof(EXFOLDERDATA)); |
| 2037 | if (ExtraFolderData[count]) | |
| 2037 | if (ExtraFolderData[count]) | |
| 2038 | 2038 | { |
| 2039 | 2039 | *ext = '\0'; |
| 2040 | 2040 | |
| r11247 | r11248 | |
| 2113 | 2113 | LPTREEFOLDER lpFolder = treeFolders[parent_index]; |
| 2114 | 2114 | |
| 2115 | 2115 | current_id = lpFolder->m_nFolderId; |
| 2116 | ||
| 2116 | ||
| 2117 | 2117 | id = lpFolder->m_nFolderId - MAX_FOLDERS; |
| 2118 | 2118 | |
| 2119 | 2119 | /* "folder\title.ini" */ |
| 2120 | 2120 | |
| 2121 | sprintf( fname, "%s\\%s.ini", | |
| 2122 | GetFolderDir(), | |
| 2121 | sprintf( fname, "%s\\%s.ini", | |
| 2122 | GetFolderDir(), | |
| 2123 | 2123 | ExtraFolderData[id]->m_szTitle); |
| 2124 | ||
| 2124 | ||
| 2125 | 2125 | fp = fopen(fname, "r"); |
| 2126 | 2126 | if (fp == NULL) |
| 2127 | 2127 | return FALSE; |
| 2128 | ||
| 2128 | ||
| 2129 | 2129 | while ( fgets(readbuf, 256, fp) ) |
| 2130 | 2130 | { |
| 2131 | 2131 | /* do we have [...] ? */ |
| r11247 | r11248 | |
| 2137 | 2137 | { |
| 2138 | 2138 | continue; |
| 2139 | 2139 | } |
| 2140 | ||
| 2140 | ||
| 2141 | 2141 | *p = '\0'; |
| 2142 | 2142 | name = &readbuf[1]; |
| 2143 | ||
| 2143 | ||
| 2144 | 2144 | /* is it [FOLDER_SETTINGS]? */ |
| 2145 | 2145 | |
| 2146 | 2146 | if (strcmp(name, "FOLDER_SETTINGS") == 0) |
| r11247 | r11248 | |
| 2164 | 2164 | |
| 2165 | 2165 | current_id = next_folder_id++; |
| 2166 | 2166 | /* create a new folder with this name, |
| 2167 | ||
| 2167 | and the flags for this folder as read from the registry */ | |
| 2168 | 2168 | 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); | |
| 2171 | 2171 | ExtraFolderData[current_id] = (EXFOLDERDATA*)malloc(sizeof(EXFOLDERDATA)); |
| 2172 | 2172 | memset(ExtraFolderData[current_id], 0, sizeof(EXFOLDERDATA)); |
| 2173 | 2173 | |
| r11247 | r11248 | |
| 2257 | 2257 | BOOL retval; |
| 2258 | 2258 | char filename[MAX_PATH]; |
| 2259 | 2259 | char new_filename[MAX_PATH]; |
| 2260 | ||
| 2260 | ||
| 2261 | 2261 | if (lpFolder->m_nParent >= 0) |
| 2262 | 2262 | { |
| 2263 | 2263 | // a child extra folder was renamed, so do the rename and save the parent |
| r11247 | r11248 | |
| 2282 | 2282 | free(old_title); |
| 2283 | 2283 | return TRUE; |
| 2284 | 2284 | } |
| 2285 | ||
| 2285 | ||
| 2286 | 2286 | // a parent extra folder was renamed, so rename the file |
| 2287 | 2287 | |
| 2288 | 2288 | snprintf(new_filename,ARRAY_LENGTH(new_filename),"%s\\%s.ini",GetFolderDir(),new_name); |
| r11247 | r11248 | |
| 2400 | 2400 | } |
| 2401 | 2401 | |
| 2402 | 2402 | /* need to loop over all our TREEFOLDERs--first the root one, then each child. |
| 2403 | ||
| 2403 | start with the root */ | |
| 2404 | 2404 | |
| 2405 | 2405 | folder_data = root_folder; |
| 2406 | 2406 | |
| r11247 | r11248 | |
| 2408 | 2408 | |
| 2409 | 2409 | for (i=0;i<driver_list::total();i++) |
| 2410 | 2410 | { |
| 2411 | int driver_index = GetIndexFromSortedIndex(i); | |
| 2411 | int driver_index = GetIndexFromSortedIndex(i); | |
| 2412 | 2412 | if (TestBit(folder_data->m_lpGameBits,driver_index)) |
| 2413 | 2413 | { |
| 2414 | 2414 | fprintf(fp,"%s\n",driver_list::driver(driver_index).name); |
| r11247 | r11248 | |
| 2424 | 2424 | treeFolders[folder_data->m_nParent] == root_folder) |
| 2425 | 2425 | { |
| 2426 | 2426 | fprintf(fp,"\n[%s]\n",folder_data->m_lpTitle); |
| 2427 | ||
| 2427 | ||
| 2428 | 2428 | for (i=0;i<driver_list::total();i++) |
| 2429 | 2429 | { |
| 2430 | int driver_index = GetIndexFromSortedIndex(i); | |
| 2430 | int driver_index = GetIndexFromSortedIndex(i); | |
| 2431 | 2431 | if (TestBit(folder_data->m_lpGameBits,driver_index)) |
| 2432 | 2432 | { |
| 2433 | 2433 | fprintf(fp,"%s\n",driver_list::driver(driver_index).name); |
| r11247 | r11248 | |
|---|---|---|
| 10 | 10 | that you have read the license and understand and accept it fully. |
| 11 | 11 | |
| 12 | 12 | ***************************************************************************/ |
| 13 | ||
| 13 | ||
| 14 | 14 | /*************************************************************************** |
| 15 | 15 | |
| 16 | 16 | columnedit.c |
| r11247 | r11248 | |
| 38 | 38 | { |
| 39 | 39 | LV_ITEM lvi; |
| 40 | 40 | TCHAR buf[80]; |
| 41 | //int nFrom, nTo; | |
| 42 | BOOL b_res; | |
| 41 | //int nFrom, nTo; | |
| 42 | BOOL b_res; | |
| 43 | 43 | |
| 44 | 44 | //nFrom = ListView_GetItemCount(hFrom); |
| 45 | 45 | //nTo = ListView_GetItemCount(hTo); |
| r11247 | r11248 | |
| 76 | 76 | LV_ITEM lvi; |
| 77 | 77 | TCHAR buf[80]; |
| 78 | 78 | int nMaxpos; |
| 79 | BOOL b_res; | |
| 80 | ||
| 79 | BOOL b_res; | |
| 80 | ||
| 81 | 81 | lvi.iItem = ListView_GetNextItem(hWnd, -1, LVIS_SELECTED | LVIS_FOCUSED); |
| 82 | 82 | nMaxpos = ListView_GetItemCount(hWnd); |
| 83 | if (lvi.iItem == -1 || | |
| 83 | if (lvi.iItem == -1 || | |
| 84 | 84 | (lvi.iItem < 2 && bDown == FALSE) || // Disallow moving First column |
| 85 | 85 | (lvi.iItem == 0 && bDown == TRUE) || // "" |
| 86 | 86 | (lvi.iItem == nMaxpos - 1 && bDown == TRUE)) |
| r11247 | r11248 | |
| 137 | 137 | hShown = GetDlgItem(hDlg, IDC_LISTSHOWCOLUMNS); |
| 138 | 138 | hAvailable = GetDlgItem(hDlg, IDC_LISTAVAILABLECOLUMNS); |
| 139 | 139 | /*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); | |
| 142 | 142 | dwView = LVS_SHOWSELALWAYS | LVS_LIST; |
| 143 | 143 | |
| 144 | 144 | /* 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); | |
| 151 | 151 | |
| 152 | 152 | pfnGetColumnInfo(order, shown); |
| 153 | 153 | |
| 154 | 154 | showMsg = TRUE; |
| 155 | 155 | nShown = 0; |
| 156 | 156 | 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; | |
| 161 | 161 | lvi.iImage = -1; |
| 162 | 162 | |
| 163 | 163 | /* Get the Column Order and save it */ |
| 164 | 164 | pfnGetRealColumnOrder(order); |
| 165 | 165 | |
| 166 | 166 | for (i = 0 ; i < nColumnMax; i++) |
| 167 | { | |
| 167 | { | |
| 168 | 168 | lvi.pszText = (TCHAR *) names[order[i]]; |
| 169 | 169 | lvi.lParam = order[i]; |
| 170 | 170 | |
| r11247 | r11248 | |
| 200 | 200 | NMHDR *nm = (NMHDR *)lParam; |
| 201 | 201 | NM_LISTVIEW *pnmv; |
| 202 | 202 | int nPos; |
| 203 | ||
| 203 | ||
| 204 | 204 | switch (nm->code) |
| 205 | 205 | { |
| 206 | 206 | case NM_DBLCLK: |
| r11247 | r11248 | |
| 231 | 231 | break; |
| 232 | 232 | } |
| 233 | 233 | return TRUE; |
| 234 | ||
| 234 | ||
| 235 | 235 | case LVN_ITEMCHANGED: |
| 236 | 236 | // Don't handle this message for now |
| 237 | 237 | pnmv = (NM_LISTVIEW *)nm; |
| r11247 | r11248 | |
| 284 | 284 | if (ListView_GetItemCount(nm->hwndFrom) != 0) |
| 285 | 285 | { |
| 286 | 286 | EnableWindow(GetDlgItem(hDlg, IDC_BUTTONADD), FALSE); |
| 287 | ||
| 287 | ||
| 288 | 288 | if (ListView_GetNextItem(hShown, -1, LVIS_SELECTED | LVIS_FOCUSED) == 0 ) |
| 289 | 289 | { |
| 290 | 290 | EnableWindow(GetDlgItem(hDlg, IDC_BUTTONREMOVE), FALSE); |
| r11247 | r11248 | |
|---|---|---|
| 339 | 339 | ****************************************************************************/ |
| 340 | 340 | static UINT8 ParseOpen(const char *pszFilename) |
| 341 | 341 | { |
| 342 | /* Open file up in binary mode */ | |
| 342 | /* Open file up in binary mode */ | |
| 343 | 343 | fp =global_alloc(emu_file("", OPEN_FLAG_READ)); |
| 344 | 344 | fp->open(pszFilename); |
| 345 | 345 | |
| r11247 | r11248 | |
| 597 | 597 | { |
| 598 | 598 | static struct tDatafileIndex *hist_idx = 0; |
| 599 | 599 | static struct tDatafileIndex *mame_idx = 0; |
| 600 | // | |
| 600 | // const game_driver *clone_of = NULL; | |
| 601 | 601 | int history = 0, mameinfo = 0; |
| 602 | 602 | int err = 0; |
| 603 | 603 | |
| r11247 | r11248 | |
| 662 | 662 | break; |
| 663 | 663 | err = load_datafile_text (gdrv, buffer+len, bufsize-len, |
| 664 | 664 | mame_idx, DATAFILE_TAG_MAME); |
| 665 | ||
| 665 | ||
| 666 | 666 | 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; | |
| 668 | 668 | } while (err && gdrv); |
| 669 | 669 | |
| 670 | 670 | if (err) mameinfo = 0; |
| r11247 | r11248 | |
|---|---|---|
| 695 | 695 | void Picker_SetSelectedPick(HWND hWnd, int nIndex) |
| 696 | 696 | { |
| 697 | 697 | BOOL res; |
| 698 | ||
| 698 | ||
| 699 | 699 | if (nIndex < 0) |
| 700 | 700 | nIndex = 0; |
| 701 | 701 | |
| r11247 | r11248 | |
| 1355 | 1355 | GetClientRect(hWnd, &rcClient); |
| 1356 | 1356 | rcTmpBmp.right = rcClient.right; |
| 1357 | 1357 | /* We also need to check whether it is the last item |
| 1358 | ||
| 1358 | The update region has to be extended to the bottom if it is */ | |
| 1359 | 1359 | if (nItem == ListView_GetItemCount(hWnd) - 1) |
| 1360 | 1360 | rcTmpBmp.bottom = rcClient.bottom; |
| 1361 | 1361 | |
| r11247 | r11248 | |
| 1398 | 1398 | res = ListView_GetItemRect_Modified(hWnd, nItem, &rect, LVIR_ICON); |
| 1399 | 1399 | |
| 1400 | 1400 | /* indent width of icon + the space between the icon and text |
| 1401 | ||
| 1401 | * so left of clone icon starts at text of parent | |
| 1402 | 1402 | */ |
| 1403 | 1403 | indent_space = rect.right - rect.left + offset; |
| 1404 | 1404 | } |
| r11247 | r11248 | |
|---|---|---|
| 29 | 29 | |
| 30 | 30 | // allocate the machine config |
| 31 | 31 | windows_options pCurrentOpts; |
| 32 | load_options(pCurrentOpts, OPTIONS_GLOBAL, driver_index); | |
| 32 | load_options(pCurrentOpts, OPTIONS_GLOBAL, driver_index); | |
| 33 | 33 | config->mconfig = global_alloc(machine_config(driver_list::driver(driver_index),pCurrentOpts)); |
| 34 | 34 | |
| 35 | 35 | // other stuff |
| r11247 | r11248 | |
| 49 | 49 | config->mconfig = NULL; |
| 50 | 50 | } |
| 51 | 51 | /*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 | }*/ | |
| 56 | 56 | free(config); |
| 57 | 57 | } |
| r11247 | r11248 | |
|---|---|---|
| 10 | 10 | that you have read the license and understand and accept it fully. |
| 11 | 11 | |
| 12 | 12 | ***************************************************************************/ |
| 13 | ||
| 13 | ||
| 14 | 14 | /*************************************************************************** |
| 15 | 15 | |
| 16 | 16 | mui_audit.c |
| r11247 | r11248 | |
| 75 | 75 | static volatile BOOL bCancel = FALSE; |
| 76 | 76 | |
| 77 | 77 | /*************************************************************************** |
| 78 | External functions | |
| 78 | External functions | |
| 79 | 79 | ***************************************************************************/ |
| 80 | 80 | |
| 81 | 81 | void AuditDialog(HWND hParent) |
| r11247 | r11248 | |
| 121 | 121 | return "No"; |
| 122 | 122 | |
| 123 | 123 | //case UNKNOWN : |
| 124 | // | |
| 124 | // return "?"; | |
| 125 | 125 | |
| 126 | 126 | default: |
| 127 | 127 | dprintf("unknown audit value %i\n",audit_result); |
| r11247 | r11248 | |
| 149 | 149 | /*************************************************************************** |
| 150 | 150 | Internal functions |
| 151 | 151 | ***************************************************************************/ |
| 152 | // Verifies the ROM set while calling SetRomAuditResults | |
| 152 | // Verifies the ROM set while calling SetRomAuditResults | |
| 153 | 153 | int MameUIVerifyRomSet(int game) |
| 154 | 154 | { |
| 155 | 155 | driver_enumerator enumerator(MameUIGlobal(), driver_list::driver(game)); |
| 156 | 156 | enumerator.next(); |
| 157 | 157 | media_auditor auditor(enumerator); |
| 158 | 158 | media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST); |
| 159 | ||
| 159 | ||
| 160 | 160 | // output the summary of the audit |
| 161 | 161 | astring summary_string; |
| 162 | 162 | auditor.summarize(&summary_string); |
| 163 | DetailsPrintf("%s", summary_string.cstr()); | |
| 164 | ||
| 163 | DetailsPrintf("%s", summary_string.cstr()); | |
| 164 | ||
| 165 | 165 | SetRomAuditResults(game, summary); |
| 166 | 166 | return summary; |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | // Verifies the Sample set while calling SetSampleAuditResults | |
| 169 | // Verifies the Sample set while calling SetSampleAuditResults | |
| 170 | 170 | int MameUIVerifySampleSet(int game) |
| 171 | 171 | { |
| 172 | 172 | driver_enumerator enumerator(MameUIGlobal(), driver_list::driver(game)); |
| 173 | 173 | enumerator.next(); |
| 174 | 174 | media_auditor auditor(enumerator); |
| 175 | 175 | media_auditor::summary summary = auditor.audit_samples(); |
| 176 | ||
| 176 | ||
| 177 | 177 | // output the summary of the audit |
| 178 | 178 | astring summary_string; |
| 179 | 179 | auditor.summarize(&summary_string); |
| 180 | DetailsPrintf("%s", summary_string.cstr()); | |
| 181 | ||
| 180 | DetailsPrintf("%s", summary_string.cstr()); | |
| 181 | ||
| 182 | 182 | SetSampleAuditResults(game, summary); |
| 183 | 183 | return summary; |
| 184 | 184 | } |
| r11247 | r11248 | |
| 255 | 255 | { |
| 256 | 256 | bCancel = TRUE; |
| 257 | 257 | if (GetExitCodeThread(hThread, &dwExitCode) && (dwExitCode == STILL_ACTIVE)) |
| 258 | { | |
| 258 | { | |
| 259 | 259 | PostMessage(hDlg, WM_COMMAND, wParam, lParam); |
| 260 | 260 | return 1; |
| 261 | 261 | } |
| r11247 | r11248 | |
| 279 | 279 | } |
| 280 | 280 | return 1; |
| 281 | 281 | } |
| 282 | return 0; | |
| 282 | return 0; | |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | /* Callback for the Audit property sheet */ |
| r11247 | r11248 | |
| 357 | 357 | { |
| 358 | 358 | int retval; |
| 359 | 359 | TCHAR buffer[200]; |
| 360 | ||
| 360 | ||
| 361 | 361 | retval = MameUIVerifySampleSet(sample_index); |
| 362 | ||
| 362 | ||
| 363 | 363 | switch (retval) |
| 364 | 364 | { |
| 365 | 365 | case media_auditor::CORRECT: |
| r11247 | r11248 | |
| 375 | 375 | |
| 376 | 376 | case media_auditor::NOTFOUND: |
| 377 | 377 | break; |
| 378 | ||
| 378 | ||
| 379 | 379 | case media_auditor::INCORRECT: |
| 380 | 380 | samples_incorrect++; |
| 381 | 381 | _stprintf(buffer, TEXT("%i"), samples_incorrect); |
| 382 | 382 | SendDlgItemMessage(hAudit, IDC_SAMPLES_INCORRECT, WM_SETTEXT, 0, (LPARAM)buffer); |
| 383 | 383 | _stprintf(buffer, TEXT("%i"), samples_correct + samples_incorrect); |
| 384 | 384 | SendDlgItemMessage(hAudit, IDC_SAMPLES_TOTAL, WM_SETTEXT, 0, (LPARAM)buffer); |
| 385 | ||
| 385 | ||
| 386 | 386 | break; |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | 389 | sample_index++; |
| 390 | 390 | SendDlgItemMessage(hAudit, IDC_SAMPLES_PROGRESS, PBM_SETPOS, sample_index, 0); |
| 391 | ||
| 391 | ||
| 392 | 392 | if (sample_index == driver_list::total()) |
| 393 | 393 | { |
| 394 | 394 | DetailsPrintf("Audit complete.\n"); |
| r11247 | r11248 | |
| 410 | 410 | hEdit = GetDlgItem(hAudit, IDC_AUDIT_DETAILS); |
| 411 | 411 | if (hEdit == NULL) |
| 412 | 412 | hEdit = GetDlgItem(hAudit, IDC_AUDIT_DETAILS_PROP); |
| 413 | ||
| 413 | ||
| 414 | 414 | if (hEdit == NULL) |
| 415 | 415 | { |
| 416 | 416 | dprintf("audit detailsprintf() can't find any audit control\n"); |
| r11247 | r11248 | |
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | va_start(marker, fmt); |
| 421 | ||
| 421 | ||
| 422 | 422 | vsprintf(buffer, fmt, marker); |
| 423 | ||
| 423 | ||
| 424 | 424 | va_end(marker); |
| 425 | 425 | |
| 426 | 426 | t_s = tstring_from_utf8(ConvertToWindowsNewlines(buffer)); |
| r11247 | r11248 | |
| 430 | 430 | textLength = Edit_GetTextLength(hEdit); |
| 431 | 431 | Edit_SetSel(hEdit, textLength, textLength); |
| 432 | 432 | SendMessage( hEdit, EM_REPLACESEL, FALSE, (WPARAM)(LPCTSTR)win_tstring_strdup(t_s) ); |
| 433 | ||
| 433 | ||
| 434 | 434 | osd_free(t_s); |
| 435 | 435 | } |
| 436 | 436 | |
| r11247 | r11248 | |
| 445 | 445 | case media_auditor::CORRECT: |
| 446 | 446 | ptr = "Passed"; |
| 447 | 447 | break; |
| 448 | ||
| 448 | ||
| 449 | 449 | case media_auditor::BEST_AVAILABLE: |
| 450 | 450 | ptr = "Best available"; |
| 451 | 451 | break; |
| 452 | ||
| 452 | ||
| 453 | 453 | case media_auditor::NOTFOUND: |
| 454 | 454 | ptr = "Not found"; |
| 455 | 455 | break; |
| 456 | ||
| 456 | ||
| 457 | 457 | case media_auditor::INCORRECT: |
| 458 | 458 | ptr = "Failed"; |
| 459 | 459 | break; |
| r11247 | r11248 | |
|---|---|---|
| 10 | 10 | that you have read the license and understand and accept it fully. |
| 11 | 11 | |
| 12 | 12 | ***************************************************************************/ |
| 13 | ||
| 13 | ||
| 14 | 14 | /*************************************************************************** |
| 15 | 15 | |
| 16 | 16 | splitters.c |
| 17 | 17 | |
| 18 | Splitter GUI code. - Tree, spliiter, list, splitter, pict | |
| 18 | Splitter GUI code. - Tree, spliiter, list, splitter, pict | |
| 19 | 19 | |
| 20 | 20 | Created 12/03/98 (C) by Mike Haaland (mhaaland@hypertech.com) |
| 21 | 21 | |
| r11247 | r11248 | |
| 56 | 56 | |
| 57 | 57 | splitter = (HZSPLITTER*)malloc(sizeof(HZSPLITTER) * nSplitterCount); |
| 58 | 58 | if (!splitter) |
| 59 | goto error; | |
| 59 | goto error; | |
| 60 | 60 | memset(splitter, 0, sizeof(HZSPLITTER) * nSplitterCount); |
| 61 | 61 | |
| 62 | 62 | nSplitterOffset = (int*)malloc(sizeof(int) * nSplitterCount); |
| 63 | 63 | if (!nSplitterOffset) |
| 64 | goto error; | |
| 65 | memset(nSplitterOffset, 0, sizeof(int) * nSplitterCount); | |
| 64 | goto error; | |
| 65 | memset(nSplitterOffset, 0, sizeof(int) * nSplitterCount); | |
| 66 | 66 | |
| 67 | 67 | return TRUE; |
| 68 | 68 | |
| r11247 | r11248 | |
| 142 | 142 | void RecalcSplitters(void) |
| 143 | 143 | { |
| 144 | 144 | int i; |
| 145 | ||
| 145 | ||
| 146 | 146 | for (i = 0; i < numSplitters; i++) |
| 147 | 147 | { |
| 148 | 148 | CalcSplitter(GetParent(splitter[i].m_hWnd), &splitter[i]); |
| 149 | 149 | nSplitterOffset[i] = splitter[i].m_dragRect.left; |
| 150 | 150 | } |
| 151 | ||
| 151 | ||
| 152 | 152 | for (i = numSplitters - 1; i >= 0; i--) |
| 153 | 153 | { |
| 154 | 154 | CalcSplitter(GetParent(splitter[i].m_hWnd), &splitter[i]); |
| r11247 | r11248 | |
| 332 | 332 | |
| 333 | 333 | // Erase the old tracking image |
| 334 | 334 | OnInvertTracker(hWnd, &lpCurSpltr->m_dragRect); |
| 335 | ||
| 335 | ||
| 336 | 336 | // calc the new one based on p.x draw it |
| 337 | 337 | nWidth = lpCurSpltr->m_dragRect.right - lpCurSpltr->m_dragRect.left; |
| 338 | 338 | lpCurSpltr->m_dragRect.right = pt.x + nWidth / 2; |
| r11247 | r11248 | |
|---|---|---|
| 12 | 12 | ***************************************************************************/ |
| 13 | 13 | |
| 14 | 14 | /*************************************************************************** |
| 15 | ||
| 15 | ||
| 16 | 16 | directinput.c |
| 17 | 17 | |
| 18 | 18 | Direct Input routines. |
| 19 | ||
| 19 | ||
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | // standard windows headers |
| 22 | 22 | #define WIN32_LEAN_AND_MEAN |
| r11247 | r11248 | |
| 28 | 28 | #include "directinput.h" |
| 29 | 29 | |
| 30 | 30 | /*************************************************************************** |
| 31 | ||
| 31 | function prototypes | |
| 32 | 32 | ***************************************************************************/ |
| 33 | 33 | |
| 34 | 34 | /*************************************************************************** |
| 35 | ||
| 35 | External variables | |
| 36 | 36 | ***************************************************************************/ |
| 37 | 37 | |
| 38 | 38 | /*************************************************************************** |
| 39 | ||
| 39 | Internal structures | |
| 40 | 40 | ***************************************************************************/ |
| 41 | 41 | |
| 42 | 42 | /*************************************************************************** |
| 43 | ||
| 43 | Internal variables | |
| 44 | 44 | ***************************************************************************/ |
| 45 | 45 | |
| 46 | 46 | static LPDIRECTINPUT di = NULL; |
| r11247 | r11248 | |
| 48 | 48 | static HANDLE hDLL = NULL; |
| 49 | 49 | |
| 50 | 50 | /*************************************************************************** |
| 51 | ||
| 51 | External functions | |
| 52 | 52 | ***************************************************************************/ |
| 53 | 53 | |
| 54 | 54 | /**************************************************************************** |
| 55 | * | |
| 55 | * DirectInputInitialize | |
| 56 | 56 | * |
| 57 | * | |
| 57 | * Initialize the DirectInput variables. | |
| 58 | 58 | * |
| 59 | * | |
| 59 | * This entails the following functions: | |
| 60 | 60 | * |
| 61 | * | |
| 61 | * DirectInputCreate | |
| 62 | 62 | * |
| 63 | 63 | ****************************************************************************/ |
| 64 | 64 | |
| r11247 | r11248 | |
| 94 | 94 | |
| 95 | 95 | hr = dic(GetModuleHandle(NULL), DIRECTINPUT_VERSION, &di, NULL); |
| 96 | 96 | |
| 97 | if (FAILED(hr)) | |
| 97 | if (FAILED(hr)) | |
| 98 | 98 | { |
| 99 | 99 | hr = dic(GetModuleHandle(NULL), 0x0300, &di, NULL); |
| 100 | 100 | |
| r11247 | r11248 | |
| 110 | 110 | |
| 111 | 111 | /**************************************************************************** |
| 112 | 112 | * |
| 113 | * | |
| 113 | * DirectInputClose | |
| 114 | 114 | * |
| 115 | * | |
| 115 | * Terminate our usage of DirectInput. | |
| 116 | 116 | * |
| 117 | 117 | ****************************************************************************/ |
| 118 | 118 | |
| 119 | 119 | void DirectInputClose() |
| 120 | 120 | { |
| 121 | 121 | /* |
| 122 | Release any lingering IDirectInput object. | |
| 123 | */ | |
| 124 | if (di) | |
| 122 | Release any lingering IDirectInput object. | |
| 123 | */ | |
| 124 | if (di) | |
| 125 | 125 | { |
| 126 | 126 | IDirectInput_Release(di); |
| 127 | 127 | di = NULL; |
| r11247 | r11248 | |
| 162 | 162 | return di; |
| 163 | 163 | } |
| 164 | 164 | /*************************************************************************** |
| 165 | ||
| 165 | Internal functions | |
| 166 | 166 | ***************************************************************************/ |
| r11247 | r11248 | |
|---|---|---|
| 55 | 55 | { |
| 56 | 56 | HMODULE hKernelModule; |
| 57 | 57 | READDIRECTORYCHANGESFUNC pfnReadDirectoryChanges; |
| 58 | ||
| 58 | ||
| 59 | 59 | HWND hwndTarget; |
| 60 | 60 | UINT nMessage; |
| 61 | 61 | |
| r11247 | r11248 | |
| 233 | 233 | // allocate our own copy of the path list |
| 234 | 234 | pszPathList = (LPSTR) alloca(strlen(pWatcher->pszPathList) + 1); |
| 235 | 235 | strcpy(pszPathList, pWatcher->pszPathList); |
| 236 | ||
| 236 | ||
| 237 | 237 | nSubIndex = 0; |
| 238 | 238 | do |
| 239 | 239 | { |
| r11247 | r11248 | |
|---|---|---|
| 175 | 175 | { DIERR_INCOMPLETEEFFECT, "DIERR_INCOMPLETEEFFECT" }, |
| 176 | 176 | { DIERR_NOTBUFFERED, "DIERR_NOTBUFFERED" }, |
| 177 | 177 | { DIERR_EFFECTPLAYING, "DIERR_EFFECTPLAYING" }, |
| 178 | // | |
| 178 | // { DIERR_UNPLUGGED, "DIERR_UNPLUGGED" }, | |
| 179 | 179 | |
| 180 | 180 | { E_NOINTERFACE, "E_NOINTERFACE" } |
| 181 | 181 | |
| r11247 | r11248 | |
| 192 | 192 | { |
| 193 | 193 | int i; |
| 194 | 194 | static char tmp[64]; |
| 195 | ||
| 195 | ||
| 196 | 196 | for (i = 0; i < (sizeof(g_ErrorCode) / sizeof(g_ErrorCode[0])); i++) |
| 197 | 197 | { |
| 198 | 198 | if (g_ErrorCode[i].hr == errorval) |
| r11247 | r11248 | |
|---|---|---|
| 41 | 41 | #include <shlwapi.h> |
| 42 | 42 | |
| 43 | 43 | /*************************************************************************** |
| 44 | ||
| 44 | function prototypes | |
| 45 | 45 | ***************************************************************************/ |
| 46 | 46 | |
| 47 | 47 | /*************************************************************************** |
| 48 | ||
| 48 | External variables | |
| 49 | 49 | ***************************************************************************/ |
| 50 | 50 | |
| 51 | 51 | /*************************************************************************** |
| 52 | ||
| 52 | Internal structures | |
| 53 | 53 | ***************************************************************************/ |
| 54 | 54 | static struct DriversInfo |
| 55 | 55 | { |
| r11247 | r11248 | |
| 71 | 71 | |
| 72 | 72 | |
| 73 | 73 | /*************************************************************************** |
| 74 | ||
| 74 | External functions | |
| 75 | 75 | ***************************************************************************/ |
| 76 | 76 | |
| 77 | 77 | /* |
| 78 | ||
| 78 | ErrorMsg | |
| 79 | 79 | */ |
| 80 | 80 | void __cdecl ErrorMsg(const char* fmt, ...) |
| 81 | 81 | { |
| r11247 | r11248 | |
| 111 | 111 | |
| 112 | 112 | void __cdecl dprintf(const char* fmt, ...) |
| 113 | 113 | { |
| 114 | char | |
| 114 | char | |
| 115 | 115 | va_list va; |
| 116 | 116 | |
| 117 | 117 | va_start(va, fmt); |
| r11247 | r11248 | |
| 129 | 129 | HDC hDC; |
| 130 | 130 | |
| 131 | 131 | hDC = GetDC(hWnd); |
| 132 | ||
| 132 | ||
| 133 | 133 | nBPP = GetDeviceCaps(hDC, BITSPIXEL) * GetDeviceCaps(hDC, PLANES); |
| 134 | 134 | |
| 135 | 135 | ReleaseDC(hWnd, hDC); |
| r11247 | r11248 | |
| 153 | 153 | { |
| 154 | 154 | FARPROC lpfnDLLI = GetProcAddress(hModule, "DllInstall"); |
| 155 | 155 | |
| 156 | if (NULL != lpfnDLLI) | |
| 156 | if (NULL != lpfnDLLI) | |
| 157 | 157 | { |
| 158 | 158 | /* comctl 4.71 or greater */ |
| 159 | 159 | |
| 160 | 160 | // see if we can find out exactly |
| 161 | ||
| 161 | ||
| 162 | 162 | DLLGETVERSIONPROC pDllGetVersion; |
| 163 | 163 | pDllGetVersion = (DLLGETVERSIONPROC)GetProcAddress(hModule, "DllGetVersion"); |
| 164 | 164 | |
| 165 | 165 | /* 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. */ | |
| 169 | 169 | |
| 170 | 170 | if(pDllGetVersion) |
| 171 | 171 | { |
| r11247 | r11248 | |
| 197 | 197 | HINSTANCE hErr; |
| 198 | 198 | LPCTSTR msg = 0; |
| 199 | 199 | LPTSTR tName; |
| 200 | ||
| 200 | ||
| 201 | 201 | tName = tstring_from_utf8(cName); |
| 202 | 202 | if( !tName ) |
| 203 | 203 | return; |
| 204 | 204 | |
| 205 | 205 | hErr = ShellExecute(hWnd, NULL, tName, NULL, NULL, SW_SHOWNORMAL); |
| 206 | if ((FPTR)hErr > 32) | |
| 206 | if ((FPTR)hErr > 32) | |
| 207 | 207 | { |
| 208 | 208 | osd_free(tName); |
| 209 | 209 | return; |
| r11247 | r11248 | |
| 216 | 216 | break; |
| 217 | 217 | |
| 218 | 218 | case ERROR_FILE_NOT_FOUND: |
| 219 | msg = TEXT("The specified file was not found."); | |
| 219 | msg = TEXT("The specified file was not found."); | |
| 220 | 220 | break; |
| 221 | 221 | |
| 222 | 222 | case SE_ERR_NOASSOC : |
| r11247 | r11248 | |
| 238 | 238 | default: |
| 239 | 239 | msg = TEXT("Unknown error."); |
| 240 | 240 | } |
| 241 | ||
| 241 | ||
| 242 | 242 | MessageBox(NULL, msg, tName, MB_OK); |
| 243 | ||
| 243 | ||
| 244 | 244 | osd_free(tName); |
| 245 | 245 | } |
| 246 | 246 | |
| r11247 | r11248 | |
| 249 | 249 | char* cp = (char*)pFirst; |
| 250 | 250 | char* s1; |
| 251 | 251 | char* s2; |
| 252 | ||
| 252 | ||
| 253 | 253 | while (*cp) |
| 254 | 254 | { |
| 255 | 255 | s1 = cp; |
| 256 | 256 | s2 = (char*)pSrch; |
| 257 | ||
| 257 | ||
| 258 | 258 | while (*s1 && *s2 && !mame_strnicmp(s1, s2, 1)) |
| 259 | 259 | s1++, s2++; |
| 260 | ||
| 260 | ||
| 261 | 261 | if (!*s2) |
| 262 | 262 | return cp; |
| 263 | ||
| 263 | ||
| 264 | 264 | cp++; |
| 265 | 265 | } |
| 266 | 266 | return NULL; |
| r11247 | r11248 | |
| 324 | 324 | const screen_device_config *screen = config->first_screen(); |
| 325 | 325 | |
| 326 | 326 | if (screen != NULL) { |
| 327 | // parse "vector.ini" for vector games | |
| 327 | // parse "vector.ini" for vector games | |
| 328 | 328 | if (SCREEN_TYPE_VECTOR == screen->screen_type()) |
| 329 | 329 | { |
| 330 | 330 | return TRUE; |
| r11247 | r11248 | |
| 340 | 340 | for (; screen != NULL; screen = screen->next_screen()) { |
| 341 | 341 | i++; |
| 342 | 342 | } |
| 343 | return i; | |
| 343 | return i; | |
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | |
| r11247 | r11248 | |
| 403 | 403 | { |
| 404 | 404 | for (rom = rom_first_file(region); rom; rom = rom_next_file(rom)) |
| 405 | 405 | { |
| 406 | gameinfo->usesRoms = TRUE; | |
| 407 | break; | |
| 406 | gameinfo->usesRoms = TRUE; | |
| 407 | break; | |
| 408 | 408 | } |
| 409 | 409 | } |
| 410 | 410 | } |
| 411 | 411 | gameinfo->usesSamples = FALSE; |
| 412 | ||
| 412 | ||
| 413 | 413 | { |
| 414 | 414 | const device_config_sound_interface *sound = NULL; |
| 415 | 415 | const char * const * samplenames = NULL; |
| r11247 | r11248 | |
| 423 | 423 | { |
| 424 | 424 | gameinfo->usesSamples = TRUE; |
| 425 | 425 | break; |
| 426 | } | |
| 427 | } | |
| 426 | } | |
| 427 | } | |
| 428 | 428 | } |
| 429 | 429 | } |
| 430 | 430 | |
| r11247 | r11248 | |
| 434 | 434 | { |
| 435 | 435 | const input_port_config *port; |
| 436 | 436 | ioport_list portlist; |
| 437 | ||
| 437 | ||
| 438 | 438 | input_port_list_init(portlist, gamedrv->ipt, NULL, 0, FALSE, NULL); |
| 439 | 439 | for (device_config *cfg = config.m_devicelist.first(); cfg != NULL; cfg = cfg->next()) |
| 440 | 440 | { |
| r11247 | r11248 | |
| 447 | 447 | { |
| 448 | 448 | const input_field_config *field; |
| 449 | 449 | for (field = port->fieldlist; field != NULL; field = field->next) |
| 450 | ||
| 450 | ||
| 451 | 451 | UINT32 type; |
| 452 | 452 | type = field->type; |
| 453 | 453 | if (type == IPT_END) |
| 454 | 454 | break; |
| 455 | if (type == IPT_DIAL || type == IPT_PADDLE || | |
| 455 | if (type == IPT_DIAL || type == IPT_PADDLE || | |
| 456 | 456 | type == IPT_TRACKBALL_X || type == IPT_TRACKBALL_Y || |
| 457 | 457 | type == IPT_AD_STICK_X || type == IPT_AD_STICK_Y) |
| 458 | 458 | gameinfo->usesTrackball = TRUE; |
| r11247 | r11248 | |
| 550 | 550 | } |
| 551 | 551 | |
| 552 | 552 | BOOL DriverIsVertical(int driver_index) { |
| 553 | return GetDriversInfo(driver_index)->isVertical; | |
| 553 | return GetDriversInfo(driver_index)->isVertical; | |
| 554 | 554 | } |
| 555 | 555 | |
| 556 | 556 | void FlushFileCaches(void) |
| r11247 | r11248 | |
| 564 | 564 | } |
| 565 | 565 | |
| 566 | 566 | /*************************************************************************** |
| 567 | ||
| 567 | Win32 wrappers | |
| 568 | 568 | ***************************************************************************/ |
| 569 | 569 | |
| 570 | 570 | BOOL SafeIsAppThemed(void) |
| r11247 | r11248 | |
| 572 | 572 | BOOL bResult = FALSE; |
| 573 | 573 | HMODULE hThemes; |
| 574 | 574 | BOOL (WINAPI *pfnIsAppThemed)(void); |
| 575 | ||
| 575 | ||
| 576 | 576 | hThemes = LoadLibrary(TEXT("uxtheme.dll")); |
| 577 | 577 | if (hThemes != NULL) |
| 578 | 578 | { |
| r11247 | r11248 | |
| 606 | 606 | TCHAR* t_exefilename = tstring_from_utf8(exefilename); |
| 607 | 607 | if( !t_exefilename ) |
| 608 | 608 | return icon; |
| 609 | ||
| 609 | ||
| 610 | 610 | icon = ExtractIcon(inst, t_exefilename, iconindex); |
| 611 | ||
| 611 | ||
| 612 | 612 | osd_free(t_exefilename); |
| 613 | ||
| 613 | ||
| 614 | 614 | return icon; |
| 615 | 615 | } |
| 616 | 616 | |
| r11247 | r11248 | |
| 636 | 636 | // win_create_file_utf8 |
| 637 | 637 | //============================================================ |
| 638 | 638 | |
| 639 | HANDLE win_create_file_utf8(const char* filename, DWORD desiredmode, DWORD sharemode, | |
| 640 | LPSECURITY_ATTRIBUTES securityattributes, DWORD creationdisposition, | |
| 641 | DWORD flagsandattributes, HANDLE templatehandle) | |
| 639 | HANDLE win_create_file_utf8(const char* filename, DWORD desiredmode, DWORD sharemode, | |
| 640 | LPSECURITY_ATTRIBUTES securityattributes, DWORD creationdisposition, | |
| 641 | DWORD flagsandattributes, HANDLE templatehandle) | |
| 642 | 642 | { |
| 643 | 643 | HANDLE result = 0; |
| 644 | 644 | TCHAR* t_filename = tstring_from_utf8(filename); |
| 645 | 645 | if( !t_filename ) |
| 646 | 646 | return result; |
| 647 | ||
| 647 | ||
| 648 | 648 | result = CreateFile(t_filename, desiredmode, sharemode, securityattributes, creationdisposition, |
| 649 | 649 | flagsandattributes, templatehandle); |
| 650 | 650 | |
| 651 | 651 | osd_free(t_filename); |
| 652 | ||
| 652 | ||
| 653 | 653 | return result; |
| 654 | 654 | } |
| 655 | 655 | |
| r11247 | r11248 | |
| 662 | 662 | DWORD result = 0; |
| 663 | 663 | TCHAR* t_buffer = NULL; |
| 664 | 664 | char* utf8_buffer = NULL; |
| 665 | ||
| 665 | ||
| 666 | 666 | if( bufferlength > 0 ) { |
| 667 | 667 | t_buffer = (TCHAR*)malloc((bufferlength * sizeof(TCHAR)) + 1); |
| 668 | 668 | if( !t_buffer ) |
| 669 | 669 | return result; |
| 670 | 670 | } |
| 671 | ||
| 671 | ||
| 672 | 672 | result = GetCurrentDirectory(bufferlength, t_buffer); |
| 673 | ||
| 673 | ||
| 674 | 674 | if( bufferlength > 0 ) { |
| 675 | 675 | utf8_buffer = utf8_from_tstring(t_buffer); |
| 676 | 676 | if( !utf8_buffer ) { |
| r11247 | r11248 | |
| 678 | 678 | return result; |
| 679 | 679 | } |
| 680 | 680 | } |
| 681 | ||
| 681 | ||
| 682 | 682 | strncpy(buffer, utf8_buffer, bufferlength); |
| 683 | ||
| 683 | ||
| 684 | 684 | if( utf8_buffer ) |
| 685 | 685 | osd_free(utf8_buffer); |
| 686 | ||
| 686 | ||
| 687 | 687 | if( t_buffer ) |
| 688 | 688 | free(t_buffer); |
| 689 | ||
| 689 | ||
| 690 | 690 | return result; |
| 691 | 691 | } |
| 692 | 692 | |
| r11247 | r11248 | |
| 700 | 700 | TCHAR* t_filename = tstring_from_utf8(filename); |
| 701 | 701 | if( !t_filename ) |
| 702 | 702 | return result; |
| 703 | ||
| 703 | ||
| 704 | 704 | result = FindFirstFile(t_filename, findfiledata); |
| 705 | ||
| 705 | ||
| 706 | 706 | osd_free(t_filename); |
| 707 | ||
| 707 | ||
| 708 | 708 | return result; |
| 709 | 709 | } |
| 710 | 710 |
| r11247 | r11248 | |
|---|---|---|
| 14 | 14 | /*************************************************************************** |
| 15 | 15 | |
| 16 | 16 | help.c |
| 17 | ||
| 18 | Help wrapper code. | |
| 19 | ||
| 17 | ||
| 18 | Help wrapper code. | |
| 19 | ||
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | |
| 22 | 22 | // standard windows headers |
| r11247 | r11248 | |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /*************************************************************************** |
| 98 | Internal functions | |
| 98 | Internal functions | |
| 99 | 99 | ***************************************************************************/ |
| 100 | 100 | |
| 101 | 101 | static void Help_Load(void) |
| r11247 | r11248 | |
|---|---|---|
| 214 | 214 | |
| 215 | 215 | |
| 216 | 216 | //static void ComputeFileHash(software_picker_info *pPickerInfo, |
| 217 | // | |
| 217 | // file_info *pFileInfo, const unsigned char *pBuffer, unsigned int nLength) | |
| 218 | 218 | //{ |
| 219 | 219 | //const char *functions; |
| 220 | 220 | |
| r11247 | r11248 | |
| 229 | 229 | |
| 230 | 230 | /*static BOOL SoftwarePicker_CalculateHash(HWND hwndPicker, int nIndex) |
| 231 | 231 | { |
| 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; | |
| 241 | 241 | |
| 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]; | |
| 245 | 245 | |
| 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; | |
| 252 | 252 | |
| 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'; | |
| 258 | 258 | |
| 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 | } | |
| 308 | 308 | |
| 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 | } | |
| 318 | 318 | |
| 319 | ||
| 319 | return rc; | |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | */ |
| r11247 | r11248 | |
| 325 | 325 | { |
| 326 | 326 | software_picker_info *pPickerInfo; |
| 327 | 327 | file_info *pFileInfo; |
| 328 | // | |
| 328 | // const char *nHashFunctionsUsed = NULL; | |
| 329 | 329 | //unsigned int nCalculatedHashes = 0; |
| 330 | // | |
| 330 | // iodevice_t type; | |
| 331 | 331 | |
| 332 | 332 | pPickerInfo = GetSoftwarePickerInfo(hwndPicker); |
| 333 | 333 | assert((nIndex >= 0) && (nIndex < pPickerInfo->file_index_length)); |
| r11247 | r11248 | |
| 336 | 336 | // Determine which hash functions we need to use for this file, and which hashes |
| 337 | 337 | // have already been calculated |
| 338 | 338 | /*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 | }*/ | |
| 345 | 345 | |
| 346 | 346 | // 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++; | |
| 352 | 352 | |
| 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 | }*/ | |
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | |
| r11247 | r11248 | |
| 690 | 690 | pFileInfo = pPickerInfo->file_index[pPickerInfo->current_position]; |
| 691 | 691 | if (!pFileInfo->hash_realized) |
| 692 | 692 | { |
| 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 | }*/ | |
| 699 | 699 | SoftwarePicker_RealizeHash(hwndPicker, pPickerInfo->current_position); |
| 700 | 700 | |
| 701 | 701 | // under normal circumstances this will be redundant, but in the unlikely |
| r11247 | r11248 | |
| 727 | 727 | LPCTSTR s = NULL; |
| 728 | 728 | //const char *pszUtf8 = NULL; |
| 729 | 729 | unsigned int nHashFunction = 0; |
| 730 | // | |
| 730 | // char szBuffer[256]; | |
| 731 | 731 | TCHAR* t_buf; |
| 732 | 732 | |
| 733 | 733 | pPickerInfo = GetSoftwarePickerInfo(hwndPicker); |
| r11247 | r11248 | |
| 751 | 751 | case MESS_COLUMN_MANUFACTURER: |
| 752 | 752 | case MESS_COLUMN_YEAR: |
| 753 | 753 | 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 | }*/ | |
| 781 | 781 | break; |
| 782 | 782 | |
| 783 | 783 | case MESS_COLUMN_CRC: |
| r11247 | r11248 | |
| 789 | 789 | case MESS_COLUMN_MD5: nHashFunction = hash_collection::HASH_MD5; break; |
| 790 | 790 | case MESS_COLUMN_SHA1: nHashFunction = hash_collection::HASH_SHA1; break; |
| 791 | 791 | } |
| 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 | }*/ | |
| 801 | 801 | break; |
| 802 | 802 | } |
| 803 | 803 | return s; |
| r11247 | r11248 | |
|---|---|---|
| 878 | 878 | windows_options mame_opts; |
| 879 | 879 | astring error_string; |
| 880 | 880 | // set up MAME options |
| 881 | // mame_opts = mame_options_init(mame_win_options); | |
| 882 | ||
| 881 | // mame_opts = mame_options_init(mame_win_options); | |
| 882 | ||
| 883 | 883 | // Tell mame were to get the INIs |
| 884 | 884 | mame_opts.set_value(OPTION_INIPATH, GetIniDir(), OPTION_PRIORITY_CMDLINE,error_string); |
| 885 | 885 | |
| r11247 | r11248 | |
| 905 | 905 | |
| 906 | 906 | if (g_szSelectedSoftware[0] && g_szSelectedDevice[0]) { |
| 907 | 907 | 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 | |
| 909 | 909 | g_szSelectedSoftware[0] = 0; |
| 910 | 910 | g_szSelectedDevice[0] = 0; |
| 911 | 911 | } |
| r11247 | r11248 | |
| 970 | 970 | for (i = 0; i < __argc; i++) |
| 971 | 971 | osd_free(utf8_argv[i]); |
| 972 | 972 | free(utf8_argv); |
| 973 | ||
| 973 | ||
| 974 | 974 | exit(rc); |
| 975 | 975 | } |
| 976 | 976 | if (!Win32UI_init(hInstance, lpCmdLine, nCmdShow)) |
| r11247 | r11248 | |
| 1300 | 1300 | HWND hwndSoftwareList; |
| 1301 | 1301 | |
| 1302 | 1302 | ShowWindow(GetDlgItem(hMain,IDC_SWTAB),SW_SHOW); |
| 1303 | ||
| 1303 | ||
| 1304 | 1304 | hwndSoftwarePicker = GetDlgItem(GetMainWindow(), IDC_SWLIST); |
| 1305 | 1305 | hwndSoftwareDevView = GetDlgItem(GetMainWindow(), IDC_SWDEVVIEW); |
| 1306 | 1306 | hwndSoftwareList = GetDlgItem(GetMainWindow(), IDC_SOFTLIST); |
| r11247 | r11248 | |
| 2104 | 2104 | static void Win32UI_exit() |
| 2105 | 2105 | { |
| 2106 | 2106 | MySoftwareListClose(); |
| 2107 | ||
| 2107 | ||
| 2108 | 2108 | if (g_bDoBroadcast == TRUE) |
| 2109 | 2109 | { |
| 2110 | 2110 | ATOM a = GlobalAddAtom(TEXT("")); |
| r11247 | r11248 | |
| 3368 | 3368 | { |
| 3369 | 3369 | ResetListView(); |
| 3370 | 3370 | MessUpdateSoftwareList(); |
| 3371 | UpdateScreenShot(); | |
| 3371 | UpdateScreenShot(); | |
| 3372 | 3372 | } |
| 3373 | 3373 | } |
| 3374 | 3374 | return TRUE; |
| r11247 | r11248 | |
| 5164 | 5164 | win_message_box_utf8(hwndList, "Cannot allocate small icon image list", "Allocation error - Exiting", IDOK); |
| 5165 | 5165 | PostQuitMessage(0); |
| 5166 | 5166 | } |
| 5167 | ||
| 5167 | ||
| 5168 | 5168 | hLarge = ImageList_Create(dwLargeIconSize, dwLargeIconSize, |
| 5169 | 5169 | ILC_COLORDDB | ILC_MASK, icon_count, icon_count + grow); |
| 5170 | 5170 | |
| r11247 | r11248 | |
| 5280 | 5280 | { |
| 5281 | 5281 | machine_config config1(driver_list::driver(index1),MameUIGlobal()); |
| 5282 | 5282 | machine_config config2(driver_list::driver(index2),MameUIGlobal()); |
| 5283 | ||
| 5283 | ||
| 5284 | 5284 | value = isDriverVector(&config1) - isDriverVector(&config2); |
| 5285 | 5285 | } |
| 5286 | 5286 | break; |
| r11247 | r11248 | |
| 5697 | 5697 | // call the MAME core function to check the save state file |
| 5698 | 5698 | //rc = state_manager::check_file(NULL, pSaveState, selected_filename, MameMessageBox); |
| 5699 | 5699 | //if (rc) |
| 5700 | // | |
| 5700 | // return; | |
| 5701 | 5701 | |
| 5702 | 5702 | memset(&playopts, 0, sizeof(playopts)); |
| 5703 | 5703 | #ifdef MESS |
| r11247 | r11248 | |
| 5905 | 5905 | /* Redraw list view */ |
| 5906 | 5906 | if (hBackground != NULL && showSoftware) |
| 5907 | 5907 | InvalidateRect(hwndList, NULL, FALSE); |
| 5908 | #endif | |
| 5908 | #endif | |
| 5909 | 5909 | } |
| 5910 | 5910 | |
| 5911 | 5911 | static void AdjustMetrics(void) |
| r11247 | r11248 | |
|---|---|---|
| 10 | 10 | that you have read the license and understand and accept it fully. |
| 11 | 11 | |
| 12 | 12 | ***************************************************************************/ |
| 13 | ||
| 13 | ||
| 14 | 14 | /*************************************************************************** |
| 15 | 15 | |
| 16 | 16 | Properties.c |
| 17 | 17 | |
| 18 | 18 | Properties Popup and Misc UI support routines. |
| 19 | ||
| 19 | ||
| 20 | 20 | Created 8/29/98 by Mike Haaland (mhaaland@hypertech.com) |
| 21 | 21 | |
| 22 | 22 | ***************************************************************************/ |
| r11247 | r11248 | |
| 25 | 25 | |
| 26 | 26 | MSH - 20070809 |
| 27 | 27 | -- |
| 28 | Notes on properties and ini files, reset and reset to default. | |
| 28 | Notes on properties and ini files, reset and reset to default. | |
| 29 | 29 | ---------------------------------------------------------------------------- |
| 30 | 30 | Each ini contains a complete option set. |
| 31 | 31 | |
| r11247 | r11248 | |
| 247 | 247 | { |
| 248 | 248 | const TCHAR* m_pText; |
| 249 | 249 | const char* m_pData; |
| 250 | } g_ComboBoxVideo[] = | |
| 250 | } g_ComboBoxVideo[] = | |
| 251 | 251 | { |
| 252 | 252 | { TEXT("None"), "none" }, |
| 253 | 253 | { TEXT("GDI"), "gdi" }, |
| r11247 | r11248 | |
| 260 | 260 | { |
| 261 | 261 | const TCHAR* m_pText; |
| 262 | 262 | const int m_pData; |
| 263 | } g_ComboBoxD3DVersion[] = | |
| 263 | } g_ComboBoxD3DVersion[] = | |
| 264 | 264 | { |
| 265 | 265 | { TEXT("Version 9"), 9 }, |
| 266 | 266 | { TEXT("Version 8"), 8 }, |
| r11247 | r11248 | |
| 272 | 272 | { |
| 273 | 273 | const TCHAR* m_pText; |
| 274 | 274 | const int m_pData; |
| 275 | } g_ComboBoxSelectScreen[] = | |
| 275 | } g_ComboBoxSelectScreen[] = | |
| 276 | 276 | { |
| 277 | 277 | { TEXT("Screen 0"), 0 }, |
| 278 | 278 | { TEXT("Screen 1"), 1 }, |
| r11247 | r11248 | |
| 285 | 285 | { |
| 286 | 286 | const TCHAR* m_pText; |
| 287 | 287 | const char* m_pData; |
| 288 | } g_ComboBoxView[] = | |
| 288 | } g_ComboBoxView[] = | |
| 289 | 289 | { |
| 290 | 290 | { TEXT("Auto"), "auto" }, |
| 291 | { TEXT("Standard"), "standard" }, | |
| 292 | { TEXT("Pixel Aspect"), "pixel" }, | |
| 291 | { TEXT("Standard"), "standard" }, | |
| 292 | { TEXT("Pixel Aspect"), "pixel" }, | |
| 293 | 293 | { TEXT("Cocktail"), "cocktail" }, |
| 294 | 294 | }; |
| 295 | 295 | #define NUMVIEW (sizeof(g_ComboBoxView) / sizeof(g_ComboBoxView[0])) |
| r11247 | r11248 | |
| 300 | 300 | { |
| 301 | 301 | const TCHAR* m_pText; |
| 302 | 302 | const char* m_pData; |
| 303 | } g_ComboBoxDevice[] = | |
| 303 | } g_ComboBoxDevice[] = | |
| 304 | 304 | { |
| 305 | 305 | { TEXT("None"), "none" }, |
| 306 | 306 | { TEXT("Keyboard"), "keyboard" }, |
| r11247 | r11248 | |
| 315 | 315 | { |
| 316 | 316 | const TCHAR* m_pText; |
| 317 | 317 | const char* m_pData; |
| 318 | } g_ComboBoxSnapView[] = | |
| 318 | } g_ComboBoxSnapView[] = | |
| 319 | 319 | { |
| 320 | 320 | { TEXT("Internal"), "internal" }, |
| 321 | 321 | { TEXT("Auto"), "auto" }, |
| 322 | { TEXT("Standard"), "standard" }, | |
| 323 | { TEXT("Pixel Aspect"), "pixel" }, | |
| 322 | { TEXT("Standard"), "standard" }, | |
| 323 | { TEXT("Pixel Aspect"), "pixel" }, | |
| 324 | 324 | { TEXT("Cocktail"), "cocktail" }, |
| 325 | 325 | }; |
| 326 | 326 | #define NUMSNAPVIEW (sizeof(g_ComboBoxSnapView) / sizeof(g_ComboBoxSnapView[0])) |
| r11247 | r11248 | |
| 483 | 483 | PROPSHEETPAGE *pspage; |
| 484 | 484 | TCHAR* t_description = 0; |
| 485 | 485 | OPTIONS_TYPE default_type = opt_type; |
| 486 | ||
| 486 | ||
| 487 | 487 | if (highlight_brush == NULL) |
| 488 | 488 | highlight_brush = CreateSolidBrush(HIGHLIGHT_COLOR); |
| 489 | 489 | |
| r11247 | r11248 | |
| 529 | 529 | |
| 530 | 530 | ZeroMemory(&pshead, sizeof(PROPSHEETHEADER)); |
| 531 | 531 | |
| 532 | // Set the game to audio to this game | |
| 532 | // Set the game to audio to this game | |
| 533 | 533 | InitGameAudit(game_num); |
| 534 | 534 | |
| 535 | 535 | // Create the propery sheets |
| r11247 | r11248 | |
| 626 | 626 | |
| 627 | 627 | gotone = cpu->next(cpu); |
| 628 | 628 | } |
| 629 | ||
| 629 | ||
| 630 | 630 | return buf; |
| 631 | 631 | } |
| 632 | 632 | |
| 633 | 633 | /* Build Sound system info string */ |
| 634 | 634 | static char *GameInfoSound(UINT nIndex) |
| 635 | 635 | { |
| 636 | static char buf[1024]; | |
| 636 | static char buf[1024]; | |
| 637 | 637 | |
| 638 | 638 | buf[0] = 0; |
| 639 | ||
| 639 | ||
| 640 | 640 | machine_config config(driver_list::driver(nIndex),pCurrentOpts); |
| 641 | ||
| 641 | ||
| 642 | 642 | /* iterate over sound chips */ |
| 643 | 643 | const device_config_sound_interface *sound = NULL; |
| 644 | 644 | bool gotone = config.m_devicelist.first(sound); |
| r11247 | r11248 | |
| 701 | 701 | |
| 702 | 702 | if (isDriverVector(&config)) |
| 703 | 703 | { |
| 704 | strcpy(buf, "Vector Game"); | |
| 704 | strcpy(buf, "Vector Game"); | |
| 705 | 705 | } |
| 706 | 706 | else |
| 707 | 707 | { |
| 708 | 708 | const screen_device_config *screen = config.first_screen(); |
| 709 | 709 | if (screen == NULL) { |
| 710 | strcpy(buf, "Screenless Game"); | |
| 710 | strcpy(buf, "Screenless Game"); | |
| 711 | 711 | } |
| 712 | 712 | else { |
| 713 | 713 | for (; screen != NULL; screen = screen->next_screen()) { |
| r11247 | r11248 | |
| 752 | 752 | int audit_result = GetRomAuditResults(driver_index); |
| 753 | 753 | memset(buffer,0,sizeof(char)*1024); |
| 754 | 754 | if ( bRomStatus ) |
| 755 | ||
| 755 | ||
| 756 | 756 | if (IsAuditResultKnown(audit_result) == FALSE) |
| 757 | ||
| 757 | ||
| 758 | 758 | strcpy(buffer, "Unknown"); |
| 759 | 759 | } |
| 760 | 760 | else if (IsAuditResultYes(audit_result)) |
| 761 | 761 | { |
| 762 | 762 | if (DriverIsBroken(driver_index)) |
| 763 | ||
| 763 | ||
| 764 | 764 | strcpy(buffer, "Not working"); |
| 765 | ||
| 765 | ||
| 766 | 766 | if (driver_list::driver(driver_index).flags & GAME_UNEMULATED_PROTECTION) |
| 767 | 767 | { |
| 768 | 768 | if (*buffer != '\0') |
| r11247 | r11248 | |
| 805 | 805 | strcat(buffer, "\r\n"); |
| 806 | 806 | strcat(buffer, "Screen flipping is not supported"); |
| 807 | 807 | } |
| 808 | ||
| 808 | ||
| 809 | 809 | { |
| 810 | 810 | if (*buffer != '\0') |
| 811 | 811 | strcat(buffer, "\r\n"); |
| 812 | 812 | strcat(buffer, "Game requires artwork"); |
| 813 | } | |
| 814 | } | |
| 813 | } | |
| 814 | } | |
| 815 | 815 | else |
| 816 | 816 | { |
| 817 | 817 | strcpy(buffer, "Working"); |
| 818 | ||
| 818 | ||
| 819 | 819 | if (driver_list::driver(driver_index).flags & GAME_UNEMULATED_PROTECTION) |
| 820 | 820 | { |
| 821 | 821 | if (*buffer != '\0') |
| r11247 | r11248 | |
| 863 | 863 | if (*buffer != '\0') |
| 864 | 864 | strcat(buffer, "\r\n"); |
| 865 | 865 | strcat(buffer, "Game requires artwork"); |
| 866 | } | |
| 866 | } | |
| 867 | 867 | } |
| 868 | 868 | } |
| 869 | 869 | else |
| r11247 | r11248 | |
| 886 | 886 | else |
| 887 | 887 | { |
| 888 | 888 | strcpy(buffer, "Working"); |
| 889 | } | |
| 889 | } | |
| 890 | 890 | if (driver_list::driver(driver_index).flags & GAME_UNEMULATED_PROTECTION) |
| 891 | 891 | { |
| 892 | 892 | if (*buffer != '\0') |
| r11247 | r11248 | |
| 934 | 934 | if (*buffer != '\0') |
| 935 | 935 | strcat(buffer, "\r\n"); |
| 936 | 936 | strcat(buffer, "Game requires artwork"); |
| 937 | } | |
| 937 | } | |
| 938 | 938 | } |
| 939 | 939 | return buffer; |
| 940 | 940 | } |
| r11247 | r11248 | |
| 944 | 944 | { |
| 945 | 945 | static char buffer[1024]; |
| 946 | 946 | |
| 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); | |
| 948 | 948 | return buffer; |
| 949 | 949 | } |
| 950 | 950 | |
| r11247 | r11248 | |
| 959 | 959 | OPTIONS_VERTICAL == opt_type || OPTIONS_HORIZONTAL == opt_type) |
| 960 | 960 | strcpy(buf, "Global folder options\nDefault options used by all games in the folder"); |
| 961 | 961 | 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); | |
| 963 | 963 | return buf; |
| 964 | 964 | } |
| 965 | 965 | |
| r11247 | r11248 | |
| 976 | 976 | nParentIndex = GetParentIndex(&driver_list::driver(nIndex)); |
| 977 | 977 | sprintf(buf, "%s - \"%s\"", |
| 978 | 978 | ConvertAmpersandString(ModifyThe(driver_list::driver(nParentIndex).description)), |
| 979 | driver_list::driver(nParentIndex).name); | |
| 979 | driver_list::driver(nParentIndex).name); | |
| 980 | 980 | } |
| 981 | 981 | |
| 982 | 982 | return buf; |
| r11247 | r11248 | |
| 1013 | 1013 | win_set_window_text_utf8(GetDlgItem(hDlg, IDC_PROP_COLORS), GameInfoColors(g_nGame)); |
| 1014 | 1014 | win_set_window_text_utf8(GetDlgItem(hDlg, IDC_PROP_CLONEOF), GameInfoCloneOf(g_nGame)); |
| 1015 | 1015 | win_set_window_text_utf8(GetDlgItem(hDlg, IDC_PROP_SOURCE), GameInfoSource(g_nGame)); |
| 1016 | ||
| 1016 | ||
| 1017 | 1017 | if (DriverIsClone(g_nGame)) |
| 1018 | 1018 | { |
| 1019 | 1019 | ShowWindow(GetDlgItem(hDlg, IDC_PROP_CLONEOF_TEXT), SW_SHOW); |
| r11247 | r11248 | |
| 1034 | 1034 | /* Handle all options property pages */ |
| 1035 | 1035 | INT_PTR CALLBACK GameOptionsProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam) |
| 1036 | 1036 | { |
| 1037 | // RECT rc; | |
| 1038 | // int nParentIndex = -1; | |
| 1037 | // RECT rc; | |
| 1038 | // int nParentIndex = -1; | |
| 1039 | 1039 | switch (Msg) |
| 1040 | 1040 | { |
| 1041 | 1041 | case WM_INITDIALOG: |
| r11247 | r11248 | |
| 1055 | 1055 | EnableWindow(GetDlgItem(hDlg, IDC_USE_DEFAULT), (g_bUseDefaults) ? FALSE : TRUE); |
| 1056 | 1056 | EnableWindow(GetDlgItem(hDlg, IDC_PROP_RESET), g_bReset); |
| 1057 | 1057 | ShowWindow(hDlg, SW_SHOW); |
| 1058 | ||
| 1058 | ||
| 1059 | 1059 | return 1; |
| 1060 | 1060 | |
| 1061 | 1061 | case WM_HSCROLL: |
| r11247 | r11248 | |
| 1077 | 1077 | case WM_COMMAND: |
| 1078 | 1078 | { |
| 1079 | 1079 | /* Below, 'changed' is used to signify the 'Apply' |
| 1080 | * button should be enabled. | |
| 1081 | */ | |
| 1080 | * button should be enabled. | |
| 1081 | */ | |
| 1082 | 1082 | WORD wID = GET_WM_COMMAND_ID(wParam, lParam); |
| 1083 | 1083 | HWND hWndCtrl = GET_WM_COMMAND_HWND(wParam, lParam); |
| 1084 | 1084 | WORD wNotifyCode = GET_WM_COMMAND_CMD(wParam, lParam); |
| r11247 | r11248 | |
| 1156 | 1156 | //options_copy(pCurrentOpts, pDefaultOpts); |
| 1157 | 1157 | // repopulate the controls with the new data |
| 1158 | 1158 | UpdateProperties(hDlg, properties_datamap, pCurrentOpts); |
| 1159 | ||
| 1159 | ||
| 1160 | 1160 | g_bUseDefaults = pCurrentOpts == pDefaultOpts; |
| 1161 | 1161 | // This evaluates properly |
| 1162 | 1162 | g_bReset = (pCurrentOpts == pOrigOpts) ? FALSE : TRUE; |
| r11247 | r11248 | |
| 1189 | 1189 | UpdateProperties(hDlg, properties_datamap, pCurrentOpts); |
| 1190 | 1190 | changed = TRUE; |
| 1191 | 1191 | /* |
| 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); | |
| 1198 | 1198 | |
| 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 | */ | |
| 1207 | 1207 | } |
| 1208 | 1208 | break; |
| 1209 | 1209 | default: |
| r11247 | r11248 | |
| 1218 | 1218 | // combo box |
| 1219 | 1219 | if ((wNotifyCode == CBN_SELCHANGE) || (wNotifyCode == CBN_SELENDOK)) |
| 1220 | 1220 | { |
| 1221 | ||
| 1221 | ||
| 1222 | 1222 | } |
| 1223 | 1223 | } |
| 1224 | 1224 | else if (!_tcscmp(szClass, WC_BUTTON) && (GetWindowLong(hWndCtrl, GWL_STYLE) & BS_CHECKBOX)) |
| r11247 | r11248 | |
| 1241 | 1241 | } |
| 1242 | 1242 | |
| 1243 | 1243 | // 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 | }*/ | |
| 1253 | 1253 | } |
| 1254 | 1254 | break; |
| 1255 | 1255 | |
| 1256 | 1256 | case WM_NOTIFY: |
| 1257 | 1257 | { |
| 1258 | 1258 | // Set to true if we are exiting the properites dialog |
| 1259 | BOOL bClosing = ((LPPSHNOTIFY) lParam)->lParam; | |
| 1259 | BOOL bClosing = ((LPPSHNOTIFY) lParam)->lParam; | |
| 1260 | 1260 | |
| 1261 | 1261 | switch (((NMHDR *) lParam)->code) |
| 1262 | 1262 | { |
| 1263 | //We'll need to use a CheckState Table | |
| 1263 | //We'll need to use a CheckState Table | |
| 1264 | 1264 | //Because this one gets called for all kinds of other things too, and not only if a check is set |
| 1265 | 1265 | case PSN_SETACTIVE: |
| 1266 | 1266 | /* Initialize the controls. */ |
| r11247 | r11248 | |
| 1279 | 1279 | if (bClosing) |
| 1280 | 1280 | { |
| 1281 | 1281 | //if (NULL == pCurrentOpts) |
| 1282 | // | |
| 1282 | // return TRUE; | |
| 1283 | 1283 | } |
| 1284 | 1284 | |
| 1285 | 1285 | // Read the datamap |
| r11247 | r11248 | |
| 1287 | 1287 | |
| 1288 | 1288 | // Copy current options to orignal options. |
| 1289 | 1289 | //options_copy(pOrigOpts, pCurrentOpts); |
| 1290 | ||
| 1290 | ||
| 1291 | 1291 | // Repopulate the controls? WTF? We just read them, they should be fine. |
| 1292 | 1292 | UpdateProperties(hDlg, properties_datamap, pCurrentOpts); |
| 1293 | 1293 | |
| r11247 | r11248 | |
| 1327 | 1327 | |
| 1328 | 1328 | ResetDataMap(hDlg); |
| 1329 | 1329 | SetWindowLongPtr(hDlg, DWLP_MSGRESULT, FALSE); |
| 1330 | return 1; | |
| 1330 | return 1; | |
| 1331 | 1331 | |
| 1332 | 1332 | case PSN_RESET: |
| 1333 | 1333 | // Reset to the original values. Disregard changes |
| r11247 | r11248 | |
| 1347 | 1347 | HelpFunction((HWND)((LPHELPINFO)lParam)->hItemHandle, MAMEUICONTEXTHELP, HH_TP_HELP_WM_HELP, GetHelpIDs()); |
| 1348 | 1348 | break; |
| 1349 | 1349 | |
| 1350 | case WM_CONTEXTMENU: | |
| 1350 | case WM_CONTEXTMENU: | |
| 1351 | 1351 | HelpFunction((HWND)wParam, MAMEUICONTEXTHELP, HH_TP_HELP_CONTEXTMENU, GetHelpIDs()); |
| 1352 | break; | |
| 1352 | break; | |
| 1353 | 1353 | |
| 1354 | 1354 | } |
| 1355 | 1355 | EnableWindow(GetDlgItem(hDlg, IDC_PROP_RESET), g_bReset); |
| r11247 | r11248 | |
| 1368 | 1368 | // It appears these are here to clear the global struct we are removing! |
| 1369 | 1369 | // FIXME |
| 1370 | 1370 | //if (g_nGame > -1) |
| 1371 | // | |
| 1371 | // SetGameUsesDefaults(g_nGame,g_bUseDefaults); | |
| 1372 | 1372 | |
| 1373 | 1373 | /* aspect ratio */ |
| 1374 | 1374 | hCtrl = GetDlgItem(hWnd, IDC_ASPECTRATION); |
| r11247 | r11248 | |
| 1624 | 1624 | int in_window = 0; |
| 1625 | 1625 | |
| 1626 | 1626 | nIndex = g_nGame; |
| 1627 | ||
| 1627 | ||
| 1628 | 1628 | d3d = !mame_stricmp(pCurrentOpts.value(WINOPTION_VIDEO), "d3d"); |
| 1629 | 1629 | ddraw = !mame_stricmp(pCurrentOpts.value(WINOPTION_VIDEO), "ddraw"); |
| 1630 | 1630 | gdi = !d3d && !ddraw; |
| r11247 | r11248 | |
| 1662 | 1662 | |
| 1663 | 1663 | EnableWindow(GetDlgItem(hWnd,IDC_D3D_FILTER),d3d); |
| 1664 | 1664 | EnableWindow(GetDlgItem(hWnd,IDC_D3D_VERSION),d3d); |
| 1665 | ||
| 1665 | ||
| 1666 | 1666 | //Switchres and D3D or ddraw enable the per screen parameters |
| 1667 | 1667 | |
| 1668 | 1668 | EnableWindow(GetDlgItem(hWnd, IDC_NUMSCREENS), (ddraw || d3d)); |
| r11247 | r11248 | |
| 1721 | 1721 | else |
| 1722 | 1722 | { |
| 1723 | 1723 | BOOL use_lightgun; |
| 1724 | // Older than XP | |
| 1724 | // Older than XP | |
| 1725 | 1725 | Button_Enable(GetDlgItem(hWnd,IDC_LIGHTGUN),TRUE); |
| 1726 | 1726 | use_lightgun = Button_GetCheck(GetDlgItem(hWnd,IDC_LIGHTGUN)); |
| 1727 | 1727 | Button_Enable(GetDlgItem(hWnd,IDC_DUAL_LIGHTGUN),use_lightgun); |
| r11247 | r11248 | |
| 1752 | 1752 | EnableWindow(GetDlgItem(hWnd,IDC_AUDIO_LATENCY_TEXT),sound); |
| 1753 | 1753 | SetSamplesEnabled(hWnd, nIndex, sound); |
| 1754 | 1754 | } |
| 1755 | ||
| 1755 | ||
| 1756 | 1756 | if (Button_GetCheck(GetDlgItem(hWnd, IDC_AUTOFRAMESKIP))) |
| 1757 | 1757 | EnableWindow(GetDlgItem(hWnd, IDC_FRAMESKIP), FALSE); |
| 1758 | 1758 | else |
| r11247 | r11248 | |
| 1943 | 1943 | |
| 1944 | 1944 | static BOOL DefaultInputReadControl(datamap *map, HWND dialog, HWND control, windows_options *opts, const char *option_name) |
| 1945 | 1945 | { |
| 1946 | TCHAR *input_option_value; | |
| 1946 | TCHAR *input_option_value; | |
| 1947 | 1947 | int input_option_index; |
| 1948 | 1948 | char *op_val; |
| 1949 | 1949 | astring error_string; |
| 1950 | 1950 | |
| 1951 | 1951 | 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); | |
| 1953 | 1953 | op_val = utf8_from_tstring(input_option_value); |
| 1954 | 1954 | opts->set_value(OPTION_CTRLR, op_val, OPTION_PRIORITY_CMDLINE,error_string); |
| 1955 | 1955 | assert(!error_string); |
| r11247 | r11248 | |
| 1990 | 1990 | (void)ComboBox_InsertString(control, index, TEXT("Standard")); |
| 1991 | 1991 | (void)ComboBox_SetItemData(control, index, ""); |
| 1992 | 1992 | index++; |
| 1993 | ||
| 1993 | ||
| 1994 | 1994 | t_ctrldir = tstring_from_utf8(GetCtrlrDir()); |
| 1995 | 1995 | if( !t_ctrldir ) |
| 1996 | 1996 | { |
| r11247 | r11248 | |
| 2000 | 2000 | } |
| 2001 | 2001 | |
| 2002 | 2002 | _stprintf (path, TEXT("%s\\*.*"), t_ctrldir); |
| 2003 | ||
| 2003 | ||
| 2004 | 2004 | osd_free(t_ctrldir); |
| 2005 | 2005 | |
| 2006 | 2006 | hFind = FindFirstFile(path, &FindFileData); |
| 2007 | 2007 | |
| 2008 | 2008 | if (hFind != INVALID_HANDLE_VALUE) |
| 2009 | 2009 | { |
| 2010 | do | |
| 2010 | do | |
| 2011 | 2011 | { |
| 2012 | 2012 | // copy the filename |
| 2013 | 2013 | _tcscpy (root,FindFileData.cFileName); |
| r11247 | r11248 | |
| 2034 | 2034 | } |
| 2035 | 2035 | } |
| 2036 | 2036 | while (FindNextFile (hFind, &FindFileData) != 0); |
| 2037 | ||
| 2037 | ||
| 2038 | 2038 | FindClose (hFind); |
| 2039 | 2039 | } |
| 2040 | 2040 | |
| 2041 | 2041 | (void)ComboBox_SetCurSel(control, selected); |
| 2042 | ||
| 2042 | ||
| 2043 | 2043 | if( t_buf ) |
| 2044 | 2044 | osd_free(t_buf); |
| 2045 | 2045 | |
| r11247 | r11248 | |
| 2075 | 2075 | else |
| 2076 | 2076 | { |
| 2077 | 2077 | snprintf(option_value, ARRAY_LENGTH(option_value), "auto"); |
| 2078 | } | |
| 2078 | } | |
| 2079 | 2079 | opts->set_value(option_name, option_value, OPTION_PRIORITY_CMDLINE,error_string); |
| 2080 | 2080 | assert(!error_string); |
| 2081 | 2081 | } |
| r11247 | r11248 | |
| 2149 | 2149 | |
| 2150 | 2150 | } |
| 2151 | 2151 | } |
| 2152 | if (devmode.dmDisplayFrequency >= 10 ) | |
| 2152 | if (devmode.dmDisplayFrequency >= 10 ) | |
| 2153 | 2153 | { |
| 2154 | 2154 | // I have some devmode "vga" which specifes 1 Hz, which is probably bogus, so we filter it out |
| 2155 | 2155 | |
| r11247 | r11248 | |
| 2190 | 2190 | |
| 2191 | 2191 | snprintf(screen_option, ARRAY_LENGTH(screen_option), "screen%d", GetSelectedScreen(hWnd)); |
| 2192 | 2192 | |
| 2193 | if (pCurrentOpts.value(screen_option) == NULL | |
| 2193 | if (pCurrentOpts.value(screen_option) == NULL | |
| 2194 | 2194 | || (mame_stricmp(pCurrentOpts.value(screen_option), "") == 0 ) |
| 2195 | 2195 | || (mame_stricmp(pCurrentOpts.value(screen_option), "auto") == 0 ) ) |
| 2196 | 2196 | { |
| r11247 | r11248 | |
| 2259 | 2259 | datamap_add(properties_datamap, IDC_VOLUME, DM_INT, OPTION_VOLUME); |
| 2260 | 2260 | datamap_add(properties_datamap, IDC_VOLUMEDISP, DM_INT, OPTION_VOLUME); |
| 2261 | 2261 | |
| 2262 | // core input options | |
| 2262 | // core input options | |
| 2263 | 2263 | datamap_add(properties_datamap, IDC_COINLOCKOUT, DM_BOOL, OPTION_COIN_LOCKOUT); |
| 2264 | 2264 | datamap_add(properties_datamap, IDC_DEFAULT_INPUT, DM_STRING, OPTION_CTRLR); |
| 2265 | 2265 | datamap_add(properties_datamap, IDC_USE_MOUSE, DM_BOOL, OPTION_MOUSE); |
| r11247 | r11248 | |
| 2315 | 2315 | datamap_add(properties_datamap, IDC_KEEPASPECT, DM_BOOL, WINOPTION_KEEPASPECT); |
| 2316 | 2316 | datamap_add(properties_datamap, IDC_PRESCALE, DM_INT, WINOPTION_PRESCALE); |
| 2317 | 2317 | datamap_add(properties_datamap, IDC_PRESCALEDISP, DM_INT, WINOPTION_PRESCALE); |
| 2318 | // datamap_add(properties_datamap, IDC_EFFECT, | |
| 2318 | // datamap_add(properties_datamap, IDC_EFFECT, DM_STRING, OPTION_EFFECT); | |
| 2319 | 2319 | datamap_add(properties_datamap, IDC_WAITVSYNC, DM_BOOL, WINOPTION_WAITVSYNC); |
| 2320 | 2320 | datamap_add(properties_datamap, IDC_SYNCREFRESH, DM_BOOL, WINOPTION_SYNCREFRESH); |
| 2321 | 2321 | |
| r11247 | r11248 | |
| 2351 | 2351 | |
| 2352 | 2352 | // input device options |
| 2353 | 2353 | datamap_add(properties_datamap, IDC_DUAL_LIGHTGUN, DM_BOOL, WINOPTION_DUAL_LIGHTGUN); |
| 2354 | ||
| 2354 | ||
| 2355 | 2355 | // show menu |
| 2356 | 2356 | datamap_add(properties_datamap, IDC_SHOW_MENU, DM_BOOL, WINOPTION_MENU); |
| 2357 | 2357 | |
| r11247 | r11248 | |
| 2366 | 2366 | datamap_set_callback(properties_datamap, IDC_REFRESH, DCT_POPULATE_CONTROL, ResolutionPopulateControl); |
| 2367 | 2367 | datamap_set_callback(properties_datamap, IDC_SIZES, DCT_READ_CONTROL, ResolutionReadControl); |
| 2368 | 2368 | 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); | |
| 2370 | 2370 | datamap_set_callback(properties_datamap, IDC_DEFAULT_INPUT, DCT_POPULATE_CONTROL, DefaultInputPopulateControl); |
| 2371 | 2371 | datamap_set_callback(properties_datamap, IDC_SNAPVIEW, DCT_POPULATE_CONTROL, SnapViewPopulateControl); |
| 2372 | 2372 | |
| r11247 | r11248 | |
| 2411 | 2411 | |
| 2412 | 2412 | hCtrl = GetDlgItem(hWnd, IDC_SAMPLES); |
| 2413 | 2413 | |
| 2414 | ||
| 2414 | ||
| 2415 | 2415 | if (hCtrl) |
| 2416 | { | |
| 2416 | { | |
| 2417 | 2417 | const device_config_sound_interface *sound; |
| 2418 | 2418 | if ( nIndex > -1 ) { |
| 2419 | 2419 | machine_config config(driver_list::driver(nIndex),pCurrentOpts); |
| 2420 | ||
| 2420 | ||
| 2421 | 2421 | for (bool gotone = config.m_devicelist.first(sound); gotone; gotone = sound->next(sound)) |
| 2422 | 2422 | { |
| 2423 | 2423 | if (sound->devconfig().type() == SAMPLES || |
| r11247 | r11248 | |
| 2919 | 2919 | |
| 2920 | 2920 | // Create a compatible DC |
| 2921 | 2921 | hDCMem = CreateCompatibleDC(hDC); |
| 2922 | hBmp = CreateCompatibleBitmap(hDC, | |
| 2922 | hBmp = CreateCompatibleBitmap(hDC, | |
| 2923 | 2923 | rc.right - rc.left, rc.bottom - rc.top); |
| 2924 | 2924 | hBmpOld = (HBITMAP)(SelectObject(hDCMem, hBmp)); |
| 2925 | 2925 | |
| 2926 | 2926 | // Tell the tab control to paint in our DC |
| 2927 | SendMessage(hwndTab, WM_PRINTCLIENT, (WPARAM)(hDCMem), | |
| 2927 | SendMessage(hwndTab, WM_PRINTCLIENT, (WPARAM)(hDCMem), | |
| 2928 | 2928 | (LPARAM)(PRF_ERASEBKGND | PRF_CLIENT | PRF_NONCLIENT)); |
| 2929 | 2929 | |
| 2930 | 2930 | // Create a pattern brush from the bitmap selected in our DC |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /****************************************************************************** |
| 2 | 2 | |
| 3 | 3 | tiny.lst |
| 4 | ||
| 4 | ||
| 5 | 5 | List of all enabled drivers in the system. This file is parsed by |
| 6 | 6 | makelist.exe, sorted, and output as C code describing the drivers. |
| 7 | 7 | |
| r11247 | r11248 | |
| 38 | 38 | |
| 39 | 39 | ******************************************************************************/ |
| 40 | 40 | |
| 41 | coleco | |
| 41 | coleco | |
| 42 | 42 | colecoa // ColecoVision (Thick Characters) |
| 43 | 43 | colecob // Spectravideo SVI-603 Coleco Game Adapter |
| 44 | 44 |
| r11247 | r11248 | |
|---|---|---|
| 250 | 250 | /* do we use this hash? */ |
| 251 | 251 | if (!state->selector_proc || state->selector_proc(state->hashfile, state->param, name, &hashes)) |
| 252 | 252 | { |
| 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)); | |
| 254 | 254 | if (!hi) |
| 255 | 255 | return; |
| 256 | 256 | memset(hi, 0, sizeof(*hi)); |
| r11247 | r11248 | |
| 277 | 277 | else if (!strcmp(tagname, "pcb")){ |
| 278 | 278 | } |
| 279 | 279 | else if (!strcmp(tagname, "extrainfo")) { |
| 280 | text_dest = (char **) &state->hi->extrainfo; | |
| 280 | text_dest = (char **) &state->hi->extrainfo; | |
| 281 | 281 | } |
| 282 | 282 | else |
| 283 | 283 | unknown_tag(state, tagname); |
| 284 | ||
| 284 | ||
| 285 | 285 | if (text_dest && state->hi) |
| 286 | 286 | state->text_dest = text_dest; |
| 287 | 287 | break; |
| r11247 | r11248 | |
| 526 | 526 | |
| 527 | 527 | param.hashes = hashes; |
| 528 | 528 | param.hi = NULL; |
| 529 | ||
| 529 | ||
| 530 | 530 | for (i = 0; i < hashfile->preloaded_hash_count; i++) |
| 531 | 531 | { |
| 532 | 532 | if (singular_selector_proc(hashfile, ¶m, NULL, hashfile->preloaded_hashes[i]->hashes)) |
| r11247 | r11248 | |
| 544 | 544 | { |
| 545 | 545 | hash_file *hashfile = NULL; |
| 546 | 546 | const hash_info *info = NULL; |
| 547 | ||
| 547 | ||
| 548 | 548 | /* open the hash file */ |
| 549 | 549 | hashfile = hashfile_open(image.device().machine().options(), sysname, FALSE, NULL); |
| 550 | 550 | if (!hashfile) |
| 551 | 551 | return NULL; |
| 552 | ||
| 552 | ||
| 553 | 553 | /* look up this entry in the hash file */ |
| 554 | 554 | info = hashfile_lookup(hashfile, &image.hash()); |
| 555 | ||
| 555 | ||
| 556 | 556 | if (!info || !info->extrainfo) |
| 557 | 557 | { |
| 558 | 558 | hashfile_close(hashfile); |
| 559 | 559 | return NULL; |
| 560 | 560 | } |
| 561 | ||
| 561 | ||
| 562 | 562 | extra_info = auto_strdup(image.device().machine(),info->extrainfo); |
| 563 | 563 | if (!extra_info) |
| 564 | 564 | { |
| 565 | 565 | hashfile_close(hashfile); |
| 566 | 566 | return NULL; |
| 567 | 567 | } |
| 568 | ||
| 568 | ||
| 569 | 569 | /* copy the relevant entries */ |
| 570 | 570 | hashfile_close(hashfile); |
| 571 | ||
| 571 | ||
| 572 | 572 | return extra_info; |
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | const char *hashfile_extrainfo(device_image_interface &image) |
| 576 | 576 | { |
| 577 | const char *rc; | |
| 577 | const char *rc; | |
| 578 | 578 | |
| 579 | 579 | /* now read the hash file */ |
| 580 | 580 | image.crc(); |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /* |
| 2 | 2 | psxcard.c - Sony PlayStation memory card device |
| 3 | ||
| 3 | ||
| 4 | 4 | by pSXAuthor |
| 5 | 5 | MESS conversion by R. Belmont |
| 6 | 6 | */ |
| r11247 | r11248 | |
| 68 | 68 | memset(cache, 0, 128*1024); |
| 69 | 69 | |
| 70 | 70 | // 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));*/ | |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | void psxcard_device::device_reset() |
| r11247 | r11248 | |
| 96 | 96 | case state_illegal: |
| 97 | 97 | if (to == 0x81) |
| 98 | 98 | { |
| 99 | // | |
| 99 | // printf("CARD: begin\n"); | |
| 100 | 100 | state = state_command; |
| 101 | 101 | *from = 0x00; |
| 102 | 102 | } |
| r11247 | r11248 | |
| 126 | 126 | |
| 127 | 127 | case state_addr_hi: |
| 128 | 128 | addr=(to<<8); |
| 129 | // | |
| 129 | // printf("addr_hi: %02x, addr = %x\n", to, addr); | |
| 130 | 130 | *from=0; |
| 131 | 131 | state=state_addr_lo; |
| 132 | 132 | break; |
| 133 | 133 | |
| 134 | 134 | case state_addr_lo: |
| 135 | 135 | addr|=(to&0xff); |
| 136 | // | |
| 136 | // printf("addr_lo: %02x, addr = %x, cmd = %x\n", to, addr, cmd); | |
| 137 | 137 | *from=(addr>>8); |
| 138 | 138 | |
| 139 | 139 | switch (cmd) |
| r11247 | r11248 | |
| 169 | 169 | |
| 170 | 170 | case state_read: |
| 171 | 171 | //assert(to==0); |
| 172 | // | |
| 172 | // printf("state_read: pkt_ptr = %d, pkt_sz = %d\n", pkt_ptr, pkt_sz); | |
| 173 | 173 | *from=pkt[pkt_ptr++]; |
| 174 | 174 | if (pkt_ptr==pkt_sz) |
| 175 | 175 | { |
| r11247 | r11248 | |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | #ifdef debug_card |
| 231 | // | |
| 231 | // printf("card: transfer to=%02x from=%02x ret=%c\n",to,*from,ret ? 'T' : 'F'); | |
| 232 | 232 | #endif |
| 233 | 233 | |
| 234 | 234 | return ret; |
| r11247 | r11248 | |
|---|---|---|
| 611 | 611 | { |
| 612 | 612 | /* load an optional (dual) cartidge */ |
| 613 | 613 | size = image.fread(&mem[0x4000], 0x8000); |
| 614 | } | |
| 614 | } | |
| 615 | 615 | else |
| 616 | 616 | { |
| 617 | 617 | size = image.get_software_region_length("rom"); |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /* |
| 2 | 2 | |
| 3 | ||
| 3 | TODO: | |
| 4 | 4 | |
| 5 | ||
| 5 | - CPU type? | |
| 6 | 6 | |
| 7 | 7 | */ |
| 8 | 8 | |
| r11247 | r11248 | |
| 173 | 173 | { |
| 174 | 174 | return INPUT_PORTS_NAME( comxpl80 ); |
| 175 | 175 | } |
| 176 | ||
| 177 | 176 | |
| 178 | 177 | |
| 178 | ||
| 179 | 179 | //************************************************************************** |
| 180 | 180 | // LIVE DEVICE |
| 181 | 181 | //************************************************************************** |
| r11247 | r11248 | |
| 219 | 219 | |
| 220 | 220 | |
| 221 | 221 | //------------------------------------------------- |
| 222 | // pa_w - | |
| 222 | // pa_w - | |
| 223 | 223 | //------------------------------------------------- |
| 224 | 224 | |
| 225 | 225 | WRITE8_MEMBER( comxpl80_device::pa_w ) |
| r11247 | r11248 | |
| 271 | 271 | |
| 272 | 272 | |
| 273 | 273 | //------------------------------------------------- |
| 274 | // pb_w - | |
| 274 | // pb_w - | |
| 275 | 275 | //------------------------------------------------- |
| 276 | 276 | |
| 277 | 277 | WRITE8_MEMBER( comxpl80_device::pb_w ) |
| r11247 | r11248 | |
| 298 | 298 | |
| 299 | 299 | |
| 300 | 300 | //------------------------------------------------- |
| 301 | // pc_w - | |
| 301 | // pc_w - | |
| 302 | 302 | //------------------------------------------------- |
| 303 | 303 | |
| 304 | 304 | WRITE8_MEMBER( comxpl80_device::pc_w ) |
| r11247 | r11248 | |
| 328 | 328 | |
| 329 | 329 | |
| 330 | 330 | //------------------------------------------------- |
| 331 | // pd_r - | |
| 331 | // pd_r - | |
| 332 | 332 | //------------------------------------------------- |
| 333 | 333 | |
| 334 | 334 | READ8_MEMBER( comxpl80_device::pd_r ) |
| r11247 | r11248 | |
|---|---|---|
| 1184 | 1184 | /* I/O RAM */ |
| 1185 | 1185 | state->m_modules[0].off_mask = 0x0003f; /* 32 B */ |
| 1186 | 1186 | 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"; | |
| 1188 | 1188 | state->m_modules[0].write = hp48_io_w; |
| 1189 | 1189 | state->m_modules[0].write_name = "hp48_io_w"; |
| 1190 | 1190 |
| r11247 | r11248 | |
|---|---|---|
| 55 | 55 | //************************************************************************** |
| 56 | 56 | // GLOBAL VARIABLES |
| 57 | 57 | //************************************************************************** |
| 58 | ||
| 58 | ||
| 59 | 59 | const device_type ISA8_FDC = isa8_fdc_device_config::static_alloc_device_config; |
| 60 | ||
| 60 | ||
| 61 | 61 | //************************************************************************** |
| 62 | 62 | // DEVICE CONFIGURATION |
| 63 | 63 | //************************************************************************** |
| 64 | ||
| 64 | ||
| 65 | 65 | //------------------------------------------------- |
| 66 | 66 | // isa8_fdc_device_config - constructor |
| 67 | 67 | //------------------------------------------------- |
| 68 | ||
| 68 | ||
| 69 | 69 | isa8_fdc_device_config::isa8_fdc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 70 | 70 | : device_config(mconfig, static_alloc_device_config, "ISA8_FDC", tag, owner, clock), |
| 71 | 71 | device_config_isa8_card_interface(mconfig, *this) |
| 72 | 72 | { |
| 73 | 73 | } |
| 74 | ||
| 74 | ||
| 75 | 75 | //------------------------------------------------- |
| 76 | 76 | // static_alloc_device_config - allocate a new |
| 77 | 77 | // configuration object |
| 78 | 78 | //------------------------------------------------- |
| 79 | ||
| 79 | ||
| 80 | 80 | device_config *isa8_fdc_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 81 | 81 | { |
| 82 | 82 | return global_alloc(isa8_fdc_device_config(mconfig, tag, owner, clock)); |
| 83 | 83 | } |
| 84 | ||
| 84 | ||
| 85 | 85 | //------------------------------------------------- |
| 86 | 86 | // alloc_device - allocate a new device object |
| 87 | 87 | //------------------------------------------------- |
| 88 | ||
| 88 | ||
| 89 | 89 | device_t *isa8_fdc_device_config::alloc_device(running_machine &machine) const |
| 90 | 90 | { |
| 91 | 91 | return auto_alloc(machine, isa8_fdc_device(machine, *this)); |
| 92 | 92 | } |
| 93 | ||
| 93 | ||
| 94 | 94 | //------------------------------------------------- |
| 95 | 95 | // machine_config_additions - device-specific |
| 96 | 96 | // machine configurations |
| r11247 | r11248 | |
| 104 | 104 | //************************************************************************** |
| 105 | 105 | // LIVE DEVICE |
| 106 | 106 | //************************************************************************** |
| 107 | ||
| 107 | ||
| 108 | 108 | //------------------------------------------------- |
| 109 | 109 | // isa8_fdc_device - constructor |
| 110 | 110 | //------------------------------------------------- |
| 111 | ||
| 111 | ||
| 112 | 112 | isa8_fdc_device::isa8_fdc_device(running_machine &_machine, const isa8_fdc_device_config &config) : |
| 113 | 113 | device_t(_machine, config), |
| 114 | 114 | device_isa8_card_interface( _machine, config, *this ), |
| r11247 | r11248 | |
| 117 | 117 | m_isa(*owner(),config.m_isa_tag) |
| 118 | 118 | { |
| 119 | 119 | } |
| 120 | ||
| 120 | ||
| 121 | 121 | //------------------------------------------------- |
| 122 | 122 | // device_start - device-specific startup |
| 123 | 123 | //------------------------------------------------- |
| 124 | ||
| 124 | ||
| 125 | 125 | void isa8_fdc_device::device_start() |
| 126 | { | |
| 126 | { | |
| 127 | 127 | 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) ); | |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | //------------------------------------------------- |
| 132 | 132 | // device_reset - device-specific reset |
| 133 | 133 | //------------------------------------------------- |
| 134 | ||
| 134 | ||
| 135 | 135 | void isa8_fdc_device::device_reset() |
| 136 | 136 | { |
| 137 | 137 | status_register_a = 0; |
| r11247 | r11248 | |
| 144 | 144 | tc_state = 0; |
| 145 | 145 | dma_state = 0; |
| 146 | 146 | int_state = 0; |
| 147 | ||
| 147 | ||
| 148 | 148 | upd765_reset(m_upd765,0); |
| 149 | 149 | |
| 150 | 150 | /* set FDC at reset */ |
| r11247 | r11248 | |
| 167 | 167 | static WRITE_LINE_DEVICE_HANDLER( pc_fdc_hw_interrupt ) |
| 168 | 168 | { |
| 169 | 169 | isa8_fdc_device *fdc = downcast<isa8_fdc_device *>(device->owner()); |
| 170 | ||
| 170 | ||
| 171 | 171 | fdc->int_state = state; |
| 172 | 172 | |
| 173 | 173 | /* if dma is not enabled, irq's are masked */ |
| r11247 | r11248 | |
| 313 | 313 | UINT8 data = 0xff; |
| 314 | 314 | |
| 315 | 315 | isa8_fdc_device *fdc = downcast<isa8_fdc_device *>(device); |
| 316 | ||
| 316 | ||
| 317 | 317 | switch(offset) |
| 318 | 318 | { |
| 319 | 319 | case 0: /* status register a */ |
| r11247 | r11248 | |
| 347 | 347 | static WRITE8_DEVICE_HANDLER ( pc_fdc_w ) |
| 348 | 348 | { |
| 349 | 349 | isa8_fdc_device *fdc = downcast<isa8_fdc_device *>(device); |
| 350 | ||
| 350 | ||
| 351 | 351 | if (LOG_FDC) |
| 352 | 352 | logerror("pc_fdc_w(): pc=0x%08x offset=%d data=0x%02X\n", (unsigned) cpu_get_reg(device->machine().firstcpu,STATE_GENPC), offset, data); |
| 353 | 353 | |
| r11247 | r11248 | |
| 406 | 406 | { |
| 407 | 407 | /* dma acknowledge - and send byte to fdc */ |
| 408 | 408 | upd765_dack_w(m_upd765, 0,data); |
| 409 | } | |
| 409 | } | |
| 410 | 410 | } |
| 411 | 411 | void isa8_fdc_device::eop_w(int state) |
| 412 | 412 | { |
| r11247 | r11248 | |
|---|---|---|
| 1242 | 1242 | if (floppy_get_heads_per_disk(flopimg_get_image(current_image(device)))==1) { |
| 1243 | 1243 | return 1; |
| 1244 | 1244 | } else { |
| 1245 | if (fdc->side==1) | |
| 1245 | if (fdc->side==1) | |
| 1246 | 1246 | return 1; |
| 1247 | 1247 | } |
| 1248 | 1248 | } |
| r11247 | r11248 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | **********************************************************************/ |
| 6 | 6 | #pragma once |
| 7 | ||
| 7 | ||
| 8 | 8 | #ifndef ISA_FDC_H |
| 9 | 9 | #define ISA_FDC_H |
| 10 | 10 | |
| r11247 | r11248 | |
| 14 | 14 | //************************************************************************** |
| 15 | 15 | // TYPE DEFINITIONS |
| 16 | 16 | //************************************************************************** |
| 17 | ||
| 17 | ||
| 18 | 18 | // ======================> isa8_fdc_device_config |
| 19 | ||
| 20 | class isa8_fdc_device_config : | |
| 19 | ||
| 20 | class isa8_fdc_device_config : | |
| 21 | 21 | public device_config, |
| 22 | 22 | public device_config_isa8_card_interface |
| 23 | 23 | { |
| 24 | 24 | friend class isa8_device; |
| 25 | 25 | friend class isa8_fdc_device; |
| 26 | ||
| 26 | ||
| 27 | 27 | // construction/destruction |
| 28 | 28 | isa8_fdc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 29 | ||
| 29 | ||
| 30 | 30 | public: |
| 31 | 31 | // allocators |
| 32 | 32 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 33 | 33 | virtual device_t *alloc_device(running_machine &machine) const; |
| 34 | ||
| 34 | ||
| 35 | 35 | // optional information overrides |
| 36 | 36 | virtual machine_config_constructor device_mconfig_additions() const; |
| 37 | 37 | }; |
| 38 | ||
| 39 | ||
| 38 | ||
| 39 | ||
| 40 | 40 | // ======================> isa8_fdc_device |
| 41 | ||
| 42 | class isa8_fdc_device : | |
| 41 | ||
| 42 | class isa8_fdc_device : | |
| 43 | 43 | public device_t, |
| 44 | 44 | public device_isa8_card_interface |
| 45 | 45 | { |
| 46 | 46 | friend class isa8_fdc_device_config; |
| 47 | ||
| 47 | ||
| 48 | 48 | // construction/destruction |
| 49 | 49 | isa8_fdc_device(running_machine &_machine, const isa8_fdc_device_config &config); |
| 50 | 50 | |
| r11247 | r11248 | |
| 61 | 61 | virtual void dack_w(int line,UINT8 data); |
| 62 | 62 | virtual void eop_w(int state); |
| 63 | 63 | virtual bool have_dack(int line); |
| 64 | ||
| 64 | ||
| 65 | 65 | int status_register_a; |
| 66 | 66 | int status_register_b; |
| 67 | 67 | int digital_output_register; |
| r11247 | r11248 | |
| 76 | 76 | int dma_state; |
| 77 | 77 | /* stored int state */ |
| 78 | 78 | int int_state; |
| 79 | ||
| 79 | ||
| 80 | 80 | required_device<device_t> m_upd765; |
| 81 | public: | |
| 81 | public: | |
| 82 | 82 | required_device<isa8_device> m_isa; |
| 83 | 83 | }; |
| 84 | ||
| 85 | ||
| 84 | ||
| 85 | ||
| 86 | 86 | // device type definition |
| 87 | 87 | extern const device_type ISA8_FDC; |
| 88 | 88 |
| r11247 | r11248 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | /* |
| 11 | 11 | |
| 12 | ||
| 12 | TODO: | |
| 13 | 13 | |
| 14 | ||
| 14 | - C1563 device | |
| 15 | 15 | |
| 16 | 16 | */ |
| 17 | 17 | |
| r11247 | r11248 | |
| 145 | 145 | |
| 146 | 146 | bit description |
| 147 | 147 | |
| 148 | PA0 | |
| 148 | PA0 | |
| 149 | 149 | PA1 /RDY |
| 150 | PA2 | |
| 150 | PA2 | |
| 151 | 151 | PA3 DEV# SEL (SW1) |
| 152 | 152 | PA4 DEV# SEL (SW1) |
| 153 | PA5 | |
| 154 | PA6 | |
| 153 | PA5 | |
| 154 | PA6 | |
| 155 | 155 | PA7 /DISK CHNG |
| 156 | 156 | |
| 157 | 157 | */ |
| r11247 | r11248 | |
| 178 | 178 | bit description |
| 179 | 179 | |
| 180 | 180 | PA0 SIDE0 |
| 181 | PA1 | |
| 181 | PA1 | |
| 182 | 182 | PA2 /MOTOR |
| 183 | PA3 | |
| 184 | PA4 | |
| 183 | PA3 | |
| 184 | PA4 | |
| 185 | 185 | PA5 POWER LED |
| 186 | 186 | PA6 ACT LED |
| 187 | PA7 | |
| 187 | PA7 | |
| 188 | 188 | |
| 189 | 189 | */ |
| 190 | 190 | |
| r11247 | r11248 | |
| 211 | 211 | bit description |
| 212 | 212 | |
| 213 | 213 | PB0 DATA IN |
| 214 | PB1 | |
| 214 | PB1 | |
| 215 | 215 | PB2 CLK IN |
| 216 | PB3 | |
| 217 | PB4 | |
| 218 | PB5 | |
| 216 | PB3 | |
| 217 | PB4 | |
| 218 | PB5 | |
| 219 | 219 | PB6 /WPRT |
| 220 | 220 | PB7 ATN IN |
| 221 | 221 | |
| r11247 | r11248 | |
| 245 | 245 | |
| 246 | 246 | bit description |
| 247 | 247 | |
| 248 | PB0 | |
| 248 | PB0 | |
| 249 | 249 | PB1 DATA OUT |
| 250 | PB2 | |
| 250 | PB2 | |
| 251 | 251 | PB3 CLK OUT |
| 252 | 252 | PB4 ATN ACK |
| 253 | 253 | PB5 FAST SER DIR |
| 254 | PB6 | |
| 255 | PB7 | |
| 254 | PB6 | |
| 255 | PB7 | |
| 256 | 256 | |
| 257 | 257 | */ |
| 258 | 258 | |
| r11247 | r11248 | |
| 436 | 436 | |
| 437 | 437 | |
| 438 | 438 | //------------------------------------------------- |
| 439 | // iec_atn_w - | |
| 439 | // iec_atn_w - | |
| 440 | 440 | //------------------------------------------------- |
| 441 | 441 | |
| 442 | 442 | WRITE_LINE_MEMBER( c1581_device::iec_atn_w ) |
| r11247 | r11248 | |
| 448 | 448 | |
| 449 | 449 | |
| 450 | 450 | //------------------------------------------------- |
| 451 | // iec_srq_w - | |
| 451 | // iec_srq_w - | |
| 452 | 452 | //------------------------------------------------- |
| 453 | 453 | |
| 454 | 454 | WRITE_LINE_MEMBER( c1581_device::iec_srq_w ) |
| r11247 | r11248 | |
| 461 | 461 | |
| 462 | 462 | |
| 463 | 463 | //------------------------------------------------- |
| 464 | // iec_data_w - | |
| 464 | // iec_data_w - | |
| 465 | 465 | //------------------------------------------------- |
| 466 | 466 | |
| 467 | 467 | WRITE_LINE_MEMBER( c1581_device::iec_data_w ) |
| r11247 | r11248 | |
| 474 | 474 | |
| 475 | 475 | |
| 476 | 476 | //------------------------------------------------- |
| 477 | // iec_reset_w - | |
| 477 | // iec_reset_w - | |
| 478 | 478 | //------------------------------------------------- |
| 479 | 479 | WRITE_LINE_MEMBER( c1581_device::iec_reset_w ) |
| 480 | 480 | { |
| r11247 | r11248 | |
|---|---|---|
| 72 | 72 | protected: |
| 73 | 73 | // device_config overrides |
| 74 | 74 | virtual void device_config_complete(); |
| 75 | ||
| 75 | ||
| 76 | 76 | private: |
| 77 | 77 | const char *m_bus_tag; |
| 78 | 78 | int m_address; |
| r11247 | r11248 | |
|---|---|---|
| 505 | 505 | mbee_state *state = machine.driver_data<mbee_state>(); |
| 506 | 506 | /* These values need to be fine tuned or the fdc repaired */ |
| 507 | 507 | wd17xx_set_pause_time(state->m_fdc, 45); /* default is 40 usec if not set */ |
| 508 | // | |
| 508 | // wd17xx_set_complete_command_delay(state->m_fdc, 50); /* default is 12 usec if not set */ | |
| 509 | 509 | } |
| 510 | 510 | |
| 511 | 511 | MACHINE_RESET( mbee ) |
| r11247 | r11248 | |
|---|---|---|
| 1193 | 1193 | UINT8 *p; |
| 1194 | 1194 | |
| 1195 | 1195 | p = state->m_cart.sram.mem; |
| 1196 | ||
| 1196 | ||
| 1197 | 1197 | emu_file f(machine.options().memcard_directory(), OPEN_FLAG_READ); |
| 1198 | 1198 | file_error filerr = f.open(state->m_sramfile); |
| 1199 | 1199 | if (filerr == FILERR_NONE) |
| r11247 | r11248 | |
|---|---|---|
| 660 | 660 | at29c040a_is_dirty(card->gromb)) |
| 661 | 661 | { |
| 662 | 662 | card->flashrom[0] = NVVERSION; |
| 663 | ||
| 663 | ||
| 664 | 664 | emu_file nvfile(device->machine().options().nvram_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); |
| 665 | 665 | filerr = nvfile.open(astring_c(hsname)); |
| 666 | 666 | if (filerr != FILERR_NONE) |
| r11247 | r11248 | |
|---|---|---|
| 2986 | 2986 | MACHINE_RESET( dgnalpha ) |
| 2987 | 2987 | { |
| 2988 | 2988 | 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); | |
| 2991 | 2991 | |
| 2992 | 2992 | /* state->m_dgnalpha_just_reset, is here to flag that we should ignore the first irq generated */ |
| 2993 | 2993 | /* by the WD2797, it is reset to 0 after the first inurrupt */ |
| r11247 | r11248 | |
|---|---|---|
| 203 | 203 | rate = scc->clock / brconst; |
| 204 | 204 | } |
| 205 | 205 | else |
| 206 | { | |
| 206 | { | |
| 207 | 207 | rate = 0; |
| 208 | 208 | } |
| 209 | 209 | |
| r11247 | r11248 | |
| 701 | 701 | AppleTalk check: |
| 702 | 702 | |
| 703 | 703 | SCC: port B reg 9 write 0x40 Channel Reset B |
| 704 | SCC: port B reg 4 write 0x20 SDLC mode | |
| 705 | SCC: port B reg 10 write 0xe0 CRC preset + FM0 | |
| 706 | SCC: port B reg 6 write 0x00 SDLC address | |
| 707 | SCC: port B reg 7 write 0x7e SDLC flag | |
| 708 | SCC: port B reg 12 write 0x06 baud rate low | |
| 709 | SCC: port B reg 13 write 0x00 baud rate high | |
| 710 | SCC: port B reg 14 write 0xc0 Set FM mode | |
| 711 | SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable | |
| 712 | SCC: port B reg 2 write 0x00 interrupt vector 0 | |
| 713 | SCC: port B reg 15 write 0x08 DCD interrupt enable | |
| 714 | SCC: port B reg 1 write 0x09 Rx IRQ on first char or special, ext int enable | |
| 715 | SCC: port B reg 9 write 0x0a Master IRQ enable, no-vector mode | |
| 716 | SCC: port B reg 11 write 0x70 Rx clock = DPLL output, Tx clock = BR generator | |
| 717 | SCC: port B reg 14 write 0x21 Enter search mode, BR generator enable | |
| 718 | SCC: port B reg 5 write 0x60 Tx 8 bits/char | |
| 719 | SCC: port B reg 6 write 0x2a SDLC address | |
| 704 | SCC: port B reg 4 write 0x20 SDLC mode | |
| 705 | SCC: port B reg 10 write 0xe0 CRC preset + FM0 | |
| 706 | SCC: port B reg 6 write 0x00 SDLC address | |
| 707 | SCC: port B reg 7 write 0x7e SDLC flag | |
| 708 | SCC: port B reg 12 write 0x06 baud rate low | |
| 709 | SCC: port B reg 13 write 0x00 baud rate high | |
| 710 | SCC: port B reg 14 write 0xc0 Set FM mode | |
| 711 | SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable | |
| 712 | SCC: port B reg 2 write 0x00 interrupt vector 0 | |
| 713 | SCC: port B reg 15 write 0x08 DCD interrupt enable | |
| 714 | SCC: port B reg 1 write 0x09 Rx IRQ on first char or special, ext int enable | |
| 715 | SCC: port B reg 9 write 0x0a Master IRQ enable, no-vector mode | |
| 716 | SCC: port B reg 11 write 0x70 Rx clock = DPLL output, Tx clock = BR generator | |
| 717 | SCC: port B reg 14 write 0x21 Enter search mode, BR generator enable | |
| 718 | SCC: port B reg 5 write 0x60 Tx 8 bits/char | |
| 719 | SCC: port B reg 6 write 0x2a SDLC address | |
| 720 | 720 | SCC: port B reg 0 read 0x00 |
| 721 | SCC: port B reg 15 write 0x88 | |
| 721 | SCC: port B reg 15 write 0x88 DCD interrupt enable, break/abort interrupt enable | |
| 722 | 722 | |
| 723 | 723 | (repeats) |
| 724 | 724 | SCC: port B reg 1 read 0x09 |
| 725 | 725 | SCC: port B reg 3 write 0xd0 |
| 726 | SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable | |
| 727 | SCC: port B reg 15 write 0x08 DCD interrupt enable | |
| 726 | SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable | |
| 727 | SCC: port B reg 15 write 0x08 DCD interrupt enable | |
| 728 | 728 | SCC: port B reg 0 read 0x00 |
| 729 | 729 | SCC: port B reg 15 write 0x88 |
| 730 | 730 | |
| 731 | 731 | System 7: |
| 732 | 732 | |
| 733 | SCC: port B reg 9 write 0x40 Channel Reset B | |
| 734 | SCC: port B reg 4 write 0x20 SDLC mode | |
| 735 | SCC: port B reg 10 write 0xe0 CRC preset + FM0 | |
| 736 | SCC: port B reg 6 write 0x00 SDLC address | |
| 737 | SCC: port B reg 7 write 0x7e SDLC flag | |
| 738 | SCC: port B reg 12 write 0x06 baud rate low | |
| 739 | SCC: port B reg 13 write 0x00 baud rate high | |
| 740 | SCC: port B reg 14 write 0xc0 Set FM mode | |
| 741 | SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable | |
| 742 | SCC: port B reg 2 write 0x00 interrupt vector 0 | |
| 743 | SCC: port B reg 15 write 0x08 DCD interrupt enable | |
| 744 | SCC: port B reg 1 write 0x09 Rx IRQ on first char or special, ext int enable | |
| 745 | SCC: port B reg 9 write 0x0a Master IRQ enable, no-vector mode | |
| 746 | SCC: port B reg 11 write 0x70 Rx clock = DPLL output, Tx clock = BR generator | |
| 747 | SCC: port B reg 14 write 0x21 Enter search mode, BR generator enable | |
| 748 | SCC: port B reg 5 write 0x60 Tx 8 bits/char | |
| 749 | SCC: port B reg 6 write 0x01 SDLC address | |
| 750 | SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable | |
| 733 | SCC: port B reg 9 write 0x40 Channel Reset B | |
| 734 | SCC: port B reg 4 write 0x20 SDLC mode | |
| 735 | SCC: port B reg 10 write 0xe0 CRC preset + FM0 | |
| 736 | SCC: port B reg 6 write 0x00 SDLC address | |
| 737 | SCC: port B reg 7 write 0x7e SDLC flag | |
| 738 | SCC: port B reg 12 write 0x06 baud rate low | |
| 739 | SCC: port B reg 13 write 0x00 baud rate high | |
| 740 | SCC: port B reg 14 write 0xc0 Set FM mode | |
| 741 | SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable | |
| 742 | SCC: port B reg 2 write 0x00 interrupt vector 0 | |
| 743 | SCC: port B reg 15 write 0x08 DCD interrupt enable | |
| 744 | SCC: port B reg 1 write 0x09 Rx IRQ on first char or special, ext int enable | |
| 745 | SCC: port B reg 9 write 0x0a Master IRQ enable, no-vector mode | |
| 746 | SCC: port B reg 11 write 0x70 Rx clock = DPLL output, Tx clock = BR generator | |
| 747 | SCC: port B reg 14 write 0x21 Enter search mode, BR generator enable | |
| 748 | SCC: port B reg 5 write 0x60 Tx 8 bits/char | |
| 749 | SCC: port B reg 6 write 0x01 SDLC address | |
| 750 | SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable | |
| 751 | 751 | |
| 752 | 752 | (repeats) |
| 753 | 753 | |
| 754 | 754 | SCC: port B reg 0 read 0x00 |
| 755 | SCC: port B reg 15 write 0x88 DCD interrupt enable, break/abort interrupt enable | |
| 756 | SCC: port B reg 15 write 0x08 DCD interrupt enable | |
| 757 | SCC: port B reg 1 read 0x09 Rx IRQ on first char or special, ext int enable | |
| 758 | SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable | |
| 755 | SCC: port B reg 15 write 0x88 DCD interrupt enable, break/abort interrupt enable | |
| 756 | SCC: port B reg 15 write 0x08 DCD interrupt enable | |
| 757 | SCC: port B reg 1 read 0x09 Rx IRQ on first char or special, ext int enable | |
| 758 | SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable | |
| 759 | 759 | |
| 760 | 760 | */ |
| r11247 | r11248 | |
|---|---|---|
| 1079 | 1079 | WRITE8_DEVICE_HANDLER(c128_m6510_port_write) |
| 1080 | 1080 | { |
| 1081 | 1081 | c128_state *state = device->machine().driver_data<c128_state>(); |
| 1082 | ||
| 1082 | ||
| 1083 | 1083 | UINT8 direction = offset; // HACK ALERT! |
| 1084 | 1084 | |
| 1085 | 1085 | /* if line is marked as input then keep current value */ |
| r11247 | r11248 | |
|---|---|---|
| 210 | 210 | |
| 211 | 211 | if (m_cd) |
| 212 | 212 | { |
| 213 | // | |
| 213 | // printf("psxcd: found disc!\n"); | |
| 214 | 214 | driver = open_mess_drv(); |
| 215 | 215 | driver->set_machine(machine()); |
| 216 | 216 | driver->set_cdrom_file(m_cd); |
| r11247 | r11248 | |
| 218 | 218 | else |
| 219 | 219 | { |
| 220 | 220 | driver = NULL; |
| 221 | // | |
| 221 | // printf("psxcd: Found device, but no disc\n"); | |
| 222 | 222 | } |
| 223 | 223 | } |
| 224 | 224 | else |
| 225 | 225 | { |
| 226 | 226 | driver = NULL; |
| 227 | // | |
| 227 | // printf("psxcd: Device [%s] not found!\n", m_devname); | |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | } |
| r11247 | r11248 | |
| 317 | 317 | } |
| 318 | 318 | } |
| 319 | 319 | /*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 | */ | |
| 331 | 331 | } |
| 332 | 332 | break; |
| 333 | 333 | |
| r11247 | r11248 | |
| 473 | 473 | l[0],l[1],l[2]); |
| 474 | 474 | } |
| 475 | 475 | |
| 476 | ||
| 476 | ||
| 477 | 477 | } |
| 478 | 478 | |
| 479 | 479 | void psxcd_device::cdcmd_play() |
| r11247 | r11248 | |
| 490 | 490 | (curpos[1]==0) && |
| 491 | 491 | (curpos[2]==0)) |
| 492 | 492 | { |
| 493 | | |
| 493 | | |
| 494 | 494 | } else |
| 495 | 495 | { |
| 496 | 496 | stop_read(); |
| r11247 | r11248 | |
| 676 | 676 | dst[1]=s; |
| 677 | 677 | dst[2]=f; |
| 678 | 678 | } |
| 679 | #endif | |
| 679 | #endif | |
| 680 | 680 | static void sub_loc(unsigned char *dst, const unsigned char *src1, const unsigned char *src2) |
| 681 | 681 | { |
| 682 | 682 | int f=src1[2]-src2[2], |
| r11247 | r11248 | |
| 729 | 729 | decimal_to_bcd(tloc[2]), // frame |
| 730 | 730 | decimal_to_bcd(loc[0]), // amin |
| 731 | 731 | decimal_to_bcd(loc[1]), // asec |
| 732 | decimal_to_bcd(loc[2]) | |
| 732 | decimal_to_bcd(loc[2]) | |
| 733 | 733 | }; |
| 734 | 734 | |
| 735 | 735 | //unsigned char data[8]={ 2,1,0,0xff,0xff,0xff,0xff,0xff }; |
| r11247 | r11248 | |
| 972 | 972 | // |
| 973 | 973 | |
| 974 | 974 | event *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, | |
| 977 | 977 | const unsigned int delay) |
| 978 | 978 | { |
| 979 | 979 | // Update shell open status |
| r11247 | r11248 | |
| 981 | 981 | if (! open) |
| 982 | 982 | { |
| 983 | 983 | status=status_error|status_shellopen; |
| 984 | } | |
| 984 | } | |
| 985 | 985 | else |
| 986 | 986 | { |
| 987 | 987 | if (status&status_shellopen) |
| r11247 | r11248 | |
| 1041 | 1041 | printf("cdrom: dma past end of sector (secleft=%d sz=%d)\n",secleft,size); |
| 1042 | 1042 | } |
| 1043 | 1043 | |
| 1044 | // | |
| 1044 | // printf("cdrom: start dma %d bytes, %d remaining, secptr %p\n", size, secleft, secptr); | |
| 1045 | 1045 | #ifdef debug_cdrom |
| 1046 | 1046 | if (size==12) |
| 1047 | 1047 | { |
| r11247 | r11248 | |
| 1087 | 1087 | assert(driver); |
| 1088 | 1088 | assert(secin<sector_buffer_size); |
| 1089 | 1089 | |
| 1090 | // | |
| 1090 | // printf("read_next_sector: sec %d, sechead %d, raw_sector_size %d\n", pos, sechead, raw_sector_size); | |
| 1091 | 1091 | if (driver->read_sector(pos, buf, block)) |
| 1092 | 1092 | { |
| 1093 | // | |
| 1093 | // printf("buf contents = %02x %02x | %02x %02x\n", buf[0], buf[1], buf[0x20], buf[0x21]); | |
| 1094 | 1094 | |
| 1095 | 1095 | sechead=(sechead+1)&(sector_buffer_size-1); |
| 1096 | 1096 | secin++; |
| r11247 | r11248 | |
| 1125 | 1125 | rawsec=&secbuf[raw_sector_size*sectail]; |
| 1126 | 1126 | secptr=rawsec+24; |
| 1127 | 1127 | secleft=2048; |
| 1128 | } | |
| 1128 | } | |
| 1129 | 1129 | else |
| 1130 | 1130 | { |
| 1131 | 1131 | rawsec=&secbuf[raw_sector_size*sectail]; |
| r11247 | r11248 | |
| 1250 | 1250 | |
| 1251 | 1251 | if ((streaming) && (isxa)) |
| 1252 | 1252 | { |
| 1253 | global_free(res); | |
| 1254 | res=NULL; | |
| 1253 | global_free(res); | |
| 1254 | res=NULL; | |
| 1255 | 1255 | } |
| 1256 | 1256 | |
| 1257 | 1257 | if (res) |
| r11247 | r11248 | |
| 1345 | 1345 | } |
| 1346 | 1346 | |
| 1347 | 1347 | unsigned char *cddaptr; |
| 1348 | // | |
| 1348 | // bool full=false; | |
| 1349 | 1349 | unsigned int cddasecsz; |
| 1350 | 1350 | |
| 1351 | 1351 | while (1) |
| r11247 | r11248 | |
| 1544 | 1544 | |
| 1545 | 1545 | status|=status_playing; |
| 1546 | 1546 | |
| 1547 | ||
| 1547 | ||
| 1548 | 1548 | cdda_prefetch_sector=-1; |
| 1549 | 1549 | |
| 1550 | 1550 | if (mode&mode_autopause) |
| 1551 | 1551 | { |
| 1552 | 1552 | unsigned int pos=msf_to_sector(curpos); |
| 1553 | 1553 | driver->find_track(pos+150,NULL,&autopause_sector); |
| 1554 | // | |
| 1554 | // printf("pos=%d auto=%d\n",pos,autopause_sector); | |
| 1555 | 1555 | } |
| 1556 | 1556 | |
| 1557 | 1557 | unsigned int cyc=read_sector_cycles; |
| r11247 | r11248 | |
| 1632 | 1632 | } |
| 1633 | 1633 | |
| 1634 | 1634 | first_open=false; |
| 1635 | } | |
| 1635 | } | |
| 1636 | 1636 | } else |
| 1637 | 1637 | { |
| 1638 | 1638 | driver=NULL; |
| r11247 | r11248 | |
| 1654 | 1654 | { |
| 1655 | 1655 | event *ev = m_eventfortimer[tid]; |
| 1656 | 1656 | |
| 1657 | // | |
| 1657 | // printf("timer %d fired, performing event type %d\n", tid, ev->type); | |
| 1658 | 1658 | |
| 1659 | 1659 | switch (ev->type) |
| 1660 | 1660 | { |
| r11247 | r11248 | |
| 1684 | 1684 | } |
| 1685 | 1685 | |
| 1686 | 1686 | // free the timer |
| 1687 | // | |
| 1687 | // printf("Freeing timer %d\n", tid); | |
| 1688 | 1688 | m_timers[tid]->adjust(attotime::never, 0, attotime::never); |
| 1689 | 1689 | m_timerinuse[tid] = false; |
| 1690 | 1690 | m_eventfortimer[tid] = NULL; |
| r11247 | r11248 | |
| 1717 | 1717 | |
| 1718 | 1718 | // ev->t is in maincpu clock cycles |
| 1719 | 1719 | UINT32 hz = m_sysclock / ev->t; |
| 1720 | // | |
| 1720 | // printf("add_system_event: event type %d for %d hz (using timer %d)\n", ev->type, hz, tnum); | |
| 1721 | 1721 | timer->adjust(attotime::from_hz(hz), tnum, attotime::never); |
| 1722 | 1722 | |
| 1723 | 1723 | // back-reference the timer from the event |
| r11247 | r11248 | |
|---|---|---|
| 329 | 329 | state->m_keystilldown = 0; |
| 330 | 330 | state->m_keymodreg = A2_KEYMOD_CAPSLOCK; // caps lock on |
| 331 | 331 | |
| 332 | state->m_last_key = 0xff; | |
| 332 | state->m_last_key = 0xff; | |
| 333 | 333 | state->m_last_key_unmodified = 0xff; /* necessary for special repeat key behaviour */ |
| 334 | 334 | state->m_time_until_repeat = MAGIC_KEY_REPEAT_NUMBER; |
| 335 | 335 |
| r11247 | r11248 | |
|---|---|---|
| 27 | 27 | #define MCFG_PSXCD_ADD(_devname) \ |
| 28 | 28 | MCFG_DEVICE_ADD(PSXCD_TAG, PSXCD, 0) \ |
| 29 | 29 | MCFG_PSXCD_DEVNAME(_devname) |
| 30 | ||
| 30 | ||
| 31 | 31 | #define MCFG_PSXCD_DEVNAME(_name) \ |
| 32 | 32 | psxcd_device_config::static_set_devname(device, _name); \ |
| 33 | 33 | |
| r11247 | r11248 | |
| 71 | 71 | command_result *next; |
| 72 | 72 | }; |
| 73 | 73 | |
| 74 | static const unsigned int sector_buffer_size=16, default_irq_delay=16000; //480; | |
| 74 | static const unsigned int sector_buffer_size=16, default_irq_delay=16000; //480; //8000; //2000<<2; | |
| 75 | 75 | |
| 76 | 76 | unsigned char sr,res,ir,cmdmode, |
| 77 | 77 | cmdbuf[64],*cbp, |
| r11247 | r11248 | |
|---|---|---|
| 336 | 336 | |
| 337 | 337 | |
| 338 | 338 | //------------------------------------------------- |
| 339 | // srq_w - | |
| 339 | // srq_w - | |
| 340 | 340 | //------------------------------------------------- |
| 341 | 341 | |
| 342 | 342 | WRITE_LINE_MEMBER( vic1112_device::srq_w ) |
| r11247 | r11248 | |
|---|---|---|
| 1685 | 1685 | |
| 1686 | 1686 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1687 | 1687 | 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; | |
| 1689 | 1689 | |
| 1690 | 1690 | default: DEVICE_GET_INFO_CALL(c2040); break; |
| 1691 | 1691 | } |
| r11247 | r11248 | |
| 1706 | 1706 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1707 | 1707 | case DEVINFO_STR_NAME: strcpy(info->s, "Commodore 8250"); break; |
| 1708 | 1708 | case DEVINFO_STR_SHORTNAME: strcpy(info->s, "c8250"); break; |
| 1709 | ||
| 1709 | ||
| 1710 | 1710 | default: DEVICE_GET_INFO_CALL(c2040); break; |
| 1711 | 1711 | } |
| 1712 | 1712 | } |
| r11247 | r11248 | |
|---|---|---|
| 44 | 44 | #define VIC1112_INTERFACE(name) \ |
| 45 | 45 | const vic1112_interface (name) = |
| 46 | 46 | |
| 47 | ||
| 47 | ||
| 48 | 48 | #define VIC1112_IEEE488 \ |
| 49 | 49 | VIC1112_TAG, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, \ |
| 50 | 50 | DEVCB_DEVICE_LINE_MEMBER(VIC1112_TAG, vic1112_device, srq_w), DEVCB_NULL, DEVCB_NULL |
| r11247 | r11248 | |
| 84 | 84 | protected: |
| 85 | 85 | // device_config overrides |
| 86 | 86 | virtual void device_config_complete(); |
| 87 | ||
| 87 | ||
| 88 | 88 | private: |
| 89 | 89 | const char *m_bus_tag; |
| 90 | 90 | }; |
| r11247 | r11248 | |
|---|---|---|
| 69 | 69 | |
| 70 | 70 | |
| 71 | 71 | READ8_MEMBER( ibm5160_mb_device::pc_dma_read_byte ) |
| 72 | { | |
| 72 | { | |
| 73 | 73 | address_space *spaceio = m_maincpu->space(AS_PROGRAM); |
| 74 | 74 | offs_t page_offset = (((offs_t) m_dma_offset[m_dma_channel]) << 16) & 0x0F0000; |
| 75 | 75 | return spaceio->read_byte( page_offset + offset); |
| r11247 | r11248 | |
| 142 | 142 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_out_eop), |
| 143 | 143 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma_read_byte), |
| 144 | 144 | 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), | |
| 149 | 149 | 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), | |
| 155 | 155 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dma8237_3_dack_w) }, |
| 156 | ||
| 156 | ||
| 157 | 157 | // 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), | |
| 161 | 161 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_dack3_w) } |
| 162 | 162 | }; |
| 163 | 163 | |
| r11247 | r11248 | |
| 208 | 208 | WRITE_LINE_MEMBER( ibm5160_mb_device::pc_pit8253_out2_changed ) |
| 209 | 209 | { |
| 210 | 210 | 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 ); | |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | |
| r11247 | r11248 | |
| 446 | 446 | //************************************************************************** |
| 447 | 447 | // GLOBAL VARIABLES |
| 448 | 448 | //************************************************************************** |
| 449 | ||
| 449 | ||
| 450 | 450 | const device_type IBM5160_MOTHERBOARD = ibm5160_mb_device_config::static_alloc_device_config; |
| 451 | ||
| 451 | ||
| 452 | 452 | //************************************************************************** |
| 453 | 453 | // DEVICE CONFIGURATION |
| 454 | 454 | //************************************************************************** |
| r11247 | r11248 | |
| 461 | 461 | MCFG_PIC8259_ADD( "pic8259", pc_pic8259_config ) |
| 462 | 462 | |
| 463 | 463 | MCFG_I8255A_ADD( "ppi8255", pc_ppi8255_interface ) |
| 464 | ||
| 464 | ||
| 465 | 465 | MCFG_ISA8_BUS_ADD("isa", "maincpu", isabus_intf) |
| 466 | 466 | /* sound hardware */ |
| 467 | 467 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r11247 | r11248 | |
| 469 | 469 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mb:mono", 1.00) |
| 470 | 470 | MACHINE_CONFIG_END |
| 471 | 471 | |
| 472 | ||
| 472 | ||
| 473 | 473 | //------------------------------------------------- |
| 474 | 474 | // ibm5160_mb_device_config - constructor |
| 475 | 475 | //------------------------------------------------- |
| 476 | ||
| 476 | ||
| 477 | 477 | ibm5160_mb_device_config::ibm5160_mb_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 478 | 478 | : device_config(mconfig, static_alloc_device_config, "IBM5160_MOTHERBOARD", tag, owner, clock) |
| 479 | 479 | { |
| 480 | 480 | } |
| 481 | ||
| 481 | ||
| 482 | 482 | //------------------------------------------------- |
| 483 | 483 | // static_alloc_device_config - allocate a new |
| 484 | 484 | // configuration object |
| 485 | 485 | //------------------------------------------------- |
| 486 | ||
| 486 | ||
| 487 | 487 | device_config *ibm5160_mb_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 488 | 488 | { |
| 489 | 489 | return global_alloc(ibm5160_mb_device_config(mconfig, tag, owner, clock)); |
| 490 | 490 | } |
| 491 | ||
| 491 | ||
| 492 | 492 | //------------------------------------------------- |
| 493 | 493 | // alloc_device - allocate a new device object |
| 494 | 494 | //------------------------------------------------- |
| 495 | ||
| 495 | ||
| 496 | 496 | device_t *ibm5160_mb_device_config::alloc_device(running_machine &machine) const |
| 497 | 497 | { |
| 498 | 498 | return auto_alloc(machine, ibm5160_mb_device(machine, *this)); |
| r11247 | r11248 | |
| 541 | 541 | { |
| 542 | 542 | return INPUT_PORTS_NAME( ibm5160_mb ); |
| 543 | 543 | } |
| 544 | ||
| 545 | 544 | |
| 545 | ||
| 546 | 546 | void ibm5160_mb_device_config::static_set_cputag(device_config *device, const char *tag) |
| 547 | 547 | { |
| 548 | 548 | ibm5160_mb_device_config *board = downcast<ibm5160_mb_device_config *>(device); |
| r11247 | r11248 | |
| 552 | 552 | //************************************************************************** |
| 553 | 553 | // LIVE DEVICE |
| 554 | 554 | //************************************************************************** |
| 555 | ||
| 555 | ||
| 556 | 556 | //------------------------------------------------- |
| 557 | 557 | // ibm5160_mb_device - constructor |
| 558 | 558 | //------------------------------------------------- |
| 559 | ||
| 559 | ||
| 560 | 560 | ibm5160_mb_device::ibm5160_mb_device(running_machine &_machine, const ibm5160_mb_device_config &config) : |
| 561 | 561 | device_t(_machine, config), |
| 562 | 562 | m_config(config), |
| r11247 | r11248 | |
| 569 | 569 | m_isabus(*this, "isa") |
| 570 | 570 | { |
| 571 | 571 | } |
| 572 | ||
| 572 | ||
| 573 | 573 | void 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 | { | |
| 575 | 575 | int buswidth = machine().firstcpu->memory().space_config(AS_IO)->m_databus_width; |
| 576 | 576 | switch(buswidth) |
| 577 | 577 | { |
| r11247 | r11248 | |
| 588 | 588 | } |
| 589 | 589 | |
| 590 | 590 | void 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 | { | |
| 592 | 592 | int buswidth = machine().firstcpu->memory().space_config(AS_IO)->m_databus_width; |
| 593 | 593 | switch(buswidth) |
| 594 | 594 | { |
| r11247 | r11248 | |
| 631 | 631 | //------------------------------------------------- |
| 632 | 632 | // device_start - device-specific startup |
| 633 | 633 | //------------------------------------------------- |
| 634 | ||
| 634 | ||
| 635 | 635 | void ibm5160_mb_device::device_start() |
| 636 | 636 | { |
| 637 | 637 | // resolve callbacks |
| 638 | 638 | devcb_resolve_write_line(&m_kb_set_clock_signal_func, &m_config.m_kb_set_clock_signal_func, this); |
| 639 | 639 | devcb_resolve_write_line(&m_kb_set_data_signal_func, &m_config.m_kb_set_data_signal_func, this); |
| 640 | 640 | |
| 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)); | |
| 647 | 647 | /* MESS managed RAM */ |
| 648 | 648 | 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)) ); | |
| 650 | 650 | } |
| 651 | ||
| 651 | ||
| 652 | 652 | IRQ_CALLBACK(ibm5160_mb_device::pc_irq_callback) |
| 653 | 653 | { |
| 654 | 654 | device_t *pic = device->machine().device("mb:pic8259"); |
| 655 | return pic8259_acknowledge( pic ); | |
| 655 | return pic8259_acknowledge( pic ); | |
| 656 | 656 | } |
| 657 | 657 | |
| 658 | 658 | |
| 659 | 659 | //------------------------------------------------- |
| 660 | 660 | // device_reset - device-specific reset |
| 661 | 661 | //------------------------------------------------- |
| 662 | ||
| 662 | ||
| 663 | 663 | void ibm5160_mb_device::device_reset() |
| 664 | 664 | { |
| 665 | 665 | device_set_irq_callback(m_maincpu, pc_irq_callback); |
| r11247 | r11248 | |
| 687 | 687 | //************************************************************************** |
| 688 | 688 | // GLOBAL VARIABLES |
| 689 | 689 | //************************************************************************** |
| 690 | ||
| 690 | ||
| 691 | 691 | const device_type IBM5150_MOTHERBOARD = ibm5150_mb_device_config::static_alloc_device_config; |
| 692 | ||
| 692 | ||
| 693 | 693 | //************************************************************************** |
| 694 | 694 | // DEVICE CONFIGURATION |
| 695 | 695 | //************************************************************************** |
| r11247 | r11248 | |
| 703 | 703 | |
| 704 | 704 | static MACHINE_CONFIG_FRAGMENT( ibm5150_mb_config ) |
| 705 | 705 | MCFG_FRAGMENT_ADD(ibm5160_mb_config) |
| 706 | ||
| 706 | ||
| 707 | 707 | MCFG_CASSETTE_ADD( "cassette", ibm5150_cassette_config ) |
| 708 | 708 | MACHINE_CONFIG_END |
| 709 | 709 | |
| 710 | ||
| 710 | ||
| 711 | 711 | //------------------------------------------------- |
| 712 | 712 | // ibm5150_mb_device_config - constructor |
| 713 | 713 | //------------------------------------------------- |
| 714 | ||
| 714 | ||
| 715 | 715 | ibm5150_mb_device_config::ibm5150_mb_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 716 | 716 | : ibm5160_mb_device_config(mconfig, tag, owner, clock) |
| 717 | 717 | { |
| 718 | 718 | } |
| 719 | ||
| 719 | ||
| 720 | 720 | //------------------------------------------------- |
| 721 | 721 | // static_alloc_device_config - allocate a new |
| 722 | 722 | // configuration object |
| 723 | 723 | //------------------------------------------------- |
| 724 | ||
| 724 | ||
| 725 | 725 | device_config *ibm5150_mb_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 726 | 726 | { |
| 727 | 727 | return global_alloc(ibm5150_mb_device_config(mconfig, tag, owner, clock)); |
| 728 | 728 | } |
| 729 | ||
| 729 | ||
| 730 | 730 | //------------------------------------------------- |
| 731 | 731 | // alloc_device - allocate a new device object |
| 732 | 732 | //------------------------------------------------- |
| 733 | ||
| 733 | ||
| 734 | 734 | device_t *ibm5150_mb_device_config::alloc_device(running_machine &machine) const |
| 735 | 735 | { |
| 736 | 736 | return auto_alloc(machine, ibm5150_mb_device(machine, *this)); |
| r11247 | r11248 | |
| 749 | 749 | //************************************************************************** |
| 750 | 750 | // LIVE DEVICE |
| 751 | 751 | //************************************************************************** |
| 752 | ||
| 752 | ||
| 753 | 753 | //------------------------------------------------- |
| 754 | 754 | // ibm5150_mb_device - constructor |
| 755 | 755 | //------------------------------------------------- |
| 756 | ||
| 756 | ||
| 757 | 757 | ibm5150_mb_device::ibm5150_mb_device(running_machine &_machine, const ibm5150_mb_device_config &config) : |
| 758 | 758 | ibm5160_mb_device(_machine, config), |
| 759 | 759 | m_cassette(*this, "cassette") |
| 760 | 760 | { |
| 761 | 761 | } |
| 762 | ||
| 762 | ||
| 763 | 763 | void ibm5150_mb_device::device_start() |
| 764 | 764 | { |
| 765 | 765 | ibm5160_mb_device::device_start(); |
| r11247 | r11248 | |
|---|---|---|
| 658 | 658 | *(dest + 62) = (UINT8) ((even & 0xff00)>>8); |
| 659 | 659 | *(dest + 63) = (UINT8) (even & 0xff); |
| 660 | 660 | } |
| 661 | ||
| 661 | ||
| 662 | 662 | // update MFM data with proper CLK signal |
| 663 | 663 | int lastbit= 0; |
| 664 | 664 | for(int i=0;i<MAX_TRACK_BYTES ;i++) |
| 665 | 665 | { |
| 666 | UINT8 c=fdc->fdc_status[drive].mfm[i]; | |
| 666 | UINT8 c=fdc->fdc_status[drive].mfm[i]; | |
| 667 | 667 | UINT8 dat = 0; |
| 668 | 668 | for(int j=0;j<8;j=j+2) |
| 669 | 669 | { |
| r11247 | r11248 | |
| 677 | 677 | { |
| 678 | 678 | if(lastbit==0 && (c1&0x2)) |
| 679 | 679 | { |
| 680 | dat |= (0x02<<(6-j)); | |
| 680 | dat |= (0x02<<(6-j)); | |
| 681 | 681 | } |
| 682 | 682 | else |
| 683 | 683 | { |
| r11247 | r11248 | |
|---|---|---|
| 1288 | 1288 | |
| 1289 | 1289 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1290 | 1290 | 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; | |
| 1292 | 1292 | case DEVINFO_STR_FAMILY: strcpy(info->s, "Commodore VIC-1540"); break; |
| 1293 | 1293 | case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; |
| 1294 | 1294 | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; |
| r11247 | r11248 | |
| 1310 | 1310 | |
| 1311 | 1311 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1312 | 1312 | 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 | ||
| 1315 | 1315 | default: DEVICE_GET_INFO_CALL(c1540); break; |
| 1316 | 1316 | } |
| 1317 | 1317 | } |
| r11247 | r11248 | |
| 1330 | 1330 | |
| 1331 | 1331 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1332 | 1332 | 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; | |
| 1334 | 1334 | |
| 1335 | 1335 | default: DEVICE_GET_INFO_CALL(c1540); break; |
| 1336 | 1336 | } |
| r11247 | r11248 | |
| 1350 | 1350 | |
| 1351 | 1351 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1352 | 1352 | 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; | |
| 1354 | 1354 | |
| 1355 | 1355 | default: DEVICE_GET_INFO_CALL(c1540); break; |
| 1356 | 1356 | } |
| r11247 | r11248 | |
| 1370 | 1370 | |
| 1371 | 1371 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1372 | 1372 | 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; | |
| 1374 | 1374 | |
| 1375 | 1375 | default: DEVICE_GET_INFO_CALL(c1540); break; |
| 1376 | 1376 | } |
| r11247 | r11248 | |
| 1390 | 1390 | |
| 1391 | 1391 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1392 | 1392 | 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; | |
| 1394 | 1394 | |
| 1395 | 1395 | default: DEVICE_GET_INFO_CALL(c1540); break; |
| 1396 | 1396 | } |
| r11247 | r11248 | |
| 1410 | 1410 | |
| 1411 | 1411 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1412 | 1412 | 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; | |
| 1414 | 1414 | |
| 1415 | 1415 | default: DEVICE_GET_INFO_CALL(c1540); break; |
| 1416 | 1416 | } |
| r11247 | r11248 | |
|---|---|---|
| 101 | 101 | { |
| 102 | 102 | fatalerror("Daisy chain not provided!"); |
| 103 | 103 | } |
| 104 | ||
| 104 | ||
| 105 | 105 | m_daisy = intf; |
| 106 | 106 | } |
| 107 | 107 | |
| r11247 | r11248 | |
| 129 | 129 | void abcbus_device::device_start() |
| 130 | 130 | { |
| 131 | 131 | const abcbus_config *daisy = m_config.m_daisy; |
| 132 | ||
| 132 | ||
| 133 | 133 | // create a linked list of devices |
| 134 | 134 | daisy_entry **tailptr = &m_daisy_list; |
| 135 | 135 | for ( ; daisy->devname != NULL; daisy++) |
| r11247 | r11248 | |
| 165 | 165 | |
| 166 | 166 | |
| 167 | 167 | //------------------------------------------------- |
| 168 | // cs_w - | |
| 168 | // cs_w - | |
| 169 | 169 | //------------------------------------------------- |
| 170 | 170 | |
| 171 | 171 | WRITE8_MEMBER( abcbus_device::cs_w ) |
| r11247 | r11248 | |
| 178 | 178 | |
| 179 | 179 | |
| 180 | 180 | //------------------------------------------------- |
| 181 | // rst_r - | |
| 181 | // rst_r - | |
| 182 | 182 | //------------------------------------------------- |
| 183 | 183 | |
| 184 | 184 | READ8_MEMBER( abcbus_device::rst_r ) |
| r11247 | r11248 | |
| 188 | 188 | daisy->m_interface->abcbus_rst(0); |
| 189 | 189 | daisy->m_interface->abcbus_rst(1); |
| 190 | 190 | } |
| 191 | ||
| 191 | ||
| 192 | 192 | return 0xff; |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | |
| 196 | 196 | //------------------------------------------------- |
| 197 | // inp_r - | |
| 197 | // inp_r - | |
| 198 | 198 | //------------------------------------------------- |
| 199 | 199 | |
| 200 | 200 | READ8_MEMBER( abcbus_device::inp_r ) |
| r11247 | r11248 | |
| 205 | 205 | { |
| 206 | 206 | data &= daisy->m_interface->abcbus_inp(); |
| 207 | 207 | } |
| 208 | ||
| 208 | ||
| 209 | 209 | return data; |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | |
| 213 | 213 | //------------------------------------------------- |
| 214 | // utp_w - | |
| 214 | // utp_w - | |
| 215 | 215 | //------------------------------------------------- |
| 216 | 216 | |
| 217 | 217 | WRITE8_MEMBER( abcbus_device::utp_w ) |
| r11247 | r11248 | |
| 224 | 224 | |
| 225 | 225 | |
| 226 | 226 | //------------------------------------------------- |
| 227 | // stat_r - | |
| 227 | // stat_r - | |
| 228 | 228 | //------------------------------------------------- |
| 229 | 229 | |
| 230 | 230 | READ8_MEMBER( abcbus_device::stat_r ) |
| r11247 | r11248 | |
| 235 | 235 | { |
| 236 | 236 | data &= daisy->m_interface->abcbus_stat(); |
| 237 | 237 | } |
| 238 | ||
| 238 | ||
| 239 | 239 | return data; |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | |
| 243 | 243 | //------------------------------------------------- |
| 244 | // c1_w - | |
| 244 | // c1_w - | |
| 245 | 245 | //------------------------------------------------- |
| 246 | 246 | |
| 247 | 247 | WRITE8_MEMBER( abcbus_device::c1_w ) |
| r11247 | r11248 | |
| 254 | 254 | |
| 255 | 255 | |
| 256 | 256 | //------------------------------------------------- |
| 257 | // c2_w - | |
| 257 | // c2_w - | |
| 258 | 258 | //------------------------------------------------- |
| 259 | 259 | |
| 260 | 260 | WRITE8_MEMBER( abcbus_device::c2_w ) |
| r11247 | r11248 | |
| 267 | 267 | |
| 268 | 268 | |
| 269 | 269 | //------------------------------------------------- |
| 270 | // c3_w - | |
| 270 | // c3_w - | |
| 271 | 271 | //------------------------------------------------- |
| 272 | 272 | |
| 273 | 273 | WRITE8_MEMBER( abcbus_device::c3_w ) |
| r11247 | r11248 | |
| 280 | 280 | |
| 281 | 281 | |
| 282 | 282 | //------------------------------------------------- |
| 283 | // c4_w - | |
| 283 | // c4_w - | |
| 284 | 284 | //------------------------------------------------- |
| 285 | 285 | |
| 286 | 286 | WRITE8_MEMBER( abcbus_device::c4_w ) |
| r11247 | r11248 | |
| 293 | 293 | |
| 294 | 294 | |
| 295 | 295 | //------------------------------------------------- |
| 296 | // resin_w - | |
| 296 | // resin_w - | |
| 297 | 297 | //------------------------------------------------- |
| 298 | 298 | |
| 299 | 299 | WRITE_LINE_MEMBER( abcbus_device::resin_w ) |
| r11247 | r11248 | |
| 302 | 302 | |
| 303 | 303 | |
| 304 | 304 | //------------------------------------------------- |
| 305 | // int_w - | |
| 305 | // int_w - | |
| 306 | 306 | //------------------------------------------------- |
| 307 | 307 | |
| 308 | 308 | WRITE_LINE_MEMBER( abcbus_device::int_w ) |
| r11247 | r11248 | |
| 311 | 311 | |
| 312 | 312 | |
| 313 | 313 | //------------------------------------------------- |
| 314 | // nmi_w - | |
| 314 | // nmi_w - | |
| 315 | 315 | //------------------------------------------------- |
| 316 | 316 | |
| 317 | 317 | WRITE_LINE_MEMBER( abcbus_device::nmi_w ) |
| r11247 | r11248 | |
| 320 | 320 | |
| 321 | 321 | |
| 322 | 322 | //------------------------------------------------- |
| 323 | // rdy_w - | |
| 323 | // rdy_w - | |
| 324 | 324 | //------------------------------------------------- |
| 325 | 325 | |
| 326 | 326 | WRITE_LINE_MEMBER( abcbus_device::rdy_w ) |
| r11247 | r11248 | |
|---|---|---|
| 166 | 166 | { |
| 167 | 167 | if (length <= 128) |
| 168 | 168 | return; |
| 169 | dest.compute(&data[128], length - 128, functions); | |
| 169 | dest.compute(&data[128], length - 128, functions); | |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 |
| r11247 | r11248 | |
|---|---|---|
| 7 | 7 | |
| 8 | 8 | ********************************************************************** |
| 9 | 9 | |
| 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 | |
| 43 | 43 | |
| 44 | 44 | **********************************************************************/ |
| 45 | 45 | |
| r11247 | r11248 | |
| 55 | 55 | IN 0 _INP data input |
| 56 | 56 | IN 1 _STAT status in |
| 57 | 57 | IN 7 RST reset |
| 58 | ||
| 58 | ||
| 59 | 59 | */ |
| 60 | 60 | |
| 61 | 61 | #pragma once |
| r11247 | r11248 | |
| 175 | 175 | DECLARE_WRITE8_MEMBER( c2_w ); |
| 176 | 176 | DECLARE_WRITE8_MEMBER( c3_w ); |
| 177 | 177 | DECLARE_WRITE8_MEMBER( c4_w ); |
| 178 | ||
| 178 | ||
| 179 | 179 | DECLARE_WRITE_LINE_MEMBER( resin_w ); |
| 180 | 180 | DECLARE_WRITE_LINE_MEMBER( int_w ); |
| 181 | 181 | DECLARE_WRITE_LINE_MEMBER( nmi_w ); |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | Chips & Technologies CS4031 chipset | |
| 4 | 4 | |
| 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: | |
| 7 | 7 | |
| 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 | |
| 12 | 12 | |
| 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 | |
| 18 | 18 | |
| 19 | 19 | ***************************************************************************/ |
| 20 | 20 |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | Chips & Technologies CS4031 chipset | |
| 4 | 4 | |
| 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: | |
| 7 | 7 | |
| 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 | |
| 12 | 12 | |
| 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 | |
| 18 | 18 | |
| 19 | 19 | ***************************************************************************/ |
| 20 | 20 |
| r11247 | r11248 | |
|---|---|---|
| 27 | 27 | m_cd = NULL; |
| 28 | 28 | m_machine = NULL; |
| 29 | 29 | |
| 30 | // | |
| 30 | // printf("cdrom_driver base class init, pf_buffer size is %d\n", num_pf_sectors*num_pf_buffers*raw_sector_size); | |
| 31 | 31 | |
| 32 | 32 | pf_buffer=new unsigned char [num_pf_sectors*num_pf_buffers*raw_sector_size]; |
| 33 | 33 | |
| r11247 | r11248 | |
| 72 | 72 | int numpfsec=num_pf*num_pf_sectors, |
| 73 | 73 | pfsec=sec-pf_head_sector; |
| 74 | 74 | |
| 75 | // | |
| 75 | // printf("prefetch_sector: %d\n", sec); | |
| 76 | 76 | |
| 77 | 77 | if ((pfsec<0) || (pfsec>numpfsec)) |
| 78 | 78 | { |
| r11247 | r11248 | |
| 131 | 131 | |
| 132 | 132 | if (! comp) |
| 133 | 133 | { |
| 134 | INT64 curtime=m_machine->device<cpu_device>("maincpu")->total_cycles(); | |
| 134 | INT64 curtime=m_machine->device<cpu_device>("maincpu")->total_cycles(); | |
| 135 | 135 | |
| 136 | 136 | if (last_pf_status!=pf_status) |
| 137 | 137 | { |
| r11247 | r11248 | |
| 210 | 210 | pfsec=sec-pf_head_sector; |
| 211 | 211 | if ((pfsec>=0) && (pfsec<numpfsec)) |
| 212 | 212 | { |
| 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; | |
| 215 | 215 | *sz=native_sector_size; |
| 216 | 216 | return pf_buffer+off; |
| 217 | 217 | } else |
| r11247 | r11248 | |
| 228 | 228 | { |
| 229 | 229 | bool loaded=is_prefetch_sector_loaded(sec); |
| 230 | 230 | |
| 231 | // | |
| 231 | // printf("read_sector: %d (loaded=%c)\n", sec, loaded ? 'Y' : 'N'); | |
| 232 | 232 | |
| 233 | 233 | if ((! loaded) && (block)) |
| 234 | 234 | { |
| r11247 | r11248 | |
| 242 | 242 | unsigned char *ptr=get_prefetch_sector(sec,&secsz); |
| 243 | 243 | assert(ptr); |
| 244 | 244 | |
| 245 | // | |
| 245 | // printf("got sector %d @ %p, size %d = %02x %02x | %02x %02x\n", sec, ptr, secsz, ptr[0], ptr[1], ptr[0x20], ptr[0x21]); | |
| 246 | 246 | |
| 247 | 247 | if (secsz<2352) |
| 248 | 248 | { |
| r11247 | r11248 | |
| 291 | 291 | |
| 292 | 292 | timestamp_frequency = m_machine->device<cpu_device>("maincpu")->clock(); |
| 293 | 293 | |
| 294 | // | |
| 294 | // printf("cdrom_driver::set_machine: timestamp frequency = %d\n", timestamp_frequency); | |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | /* |
| 298 | ||
| 298 | MAME/MESS driver implementation | |
| 299 | 299 | */ |
| 300 | 300 | |
| 301 | 301 | class mess_cdrom_driver : public cdrom_driver |
| r11247 | r11248 | |
| 345 | 345 | { |
| 346 | 346 | for (int i=0; i<100; i++) |
| 347 | 347 | toc[i].type=track_illegal; |
| 348 | num_tracks=0; | |
| 348 | num_tracks=0; | |
| 349 | 349 | num_sectors=0; |
| 350 | 350 | } |
| 351 | 351 | |
| r11247 | r11248 | |
| 382 | 382 | set_native_sector_size(bin_sector_size); |
| 383 | 383 | num_sectors = cdrom_get_track_start(m_cd, num_tracks) + toc->tracks[num_tracks].frames; |
| 384 | 384 | |
| 385 | // | |
| 385 | // printf("mess_cdrom_driver: %d sectors, native size %d\n",num_sectors, bin_sector_size); | |
| 386 | 386 | |
| 387 | 387 | return true; |
| 388 | 388 | } |
| r11247 | r11248 | |
| 406 | 406 | |
| 407 | 407 | if ((startsec>=0)) // && ((int)startsec<num_sectors)) |
| 408 | 408 | { |
| 409 | // | |
| 409 | // fin->seek((INT64)startsec*(INT64)bin_sector_size); | |
| 410 | 410 | |
| 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) | |
| 413 | 413 | for (int i = 0; i < numsec; i++) |
| 414 | 414 | { |
| 415 | // | |
| 415 | // printf("[%d/%d] Reading to pf_buffer %p at offset %d, size %d\n", i, numsec, &buf[secsize*i], secsize*i, secsize); | |
| 416 | 416 | cdrom_read_data(m_cd, startsec+i, &buf[secsize*i], CD_TRACK_RAW_DONTCARE); |
| 417 | 417 | } |
| 418 | 418 | |
| 419 | 419 | return NULL; |
| 420 | 420 | |
| 421 | // | |
| 421 | // return ios; | |
| 422 | 422 | } |
| 423 | 423 | else |
| 424 | 424 | { |
| r11247 | r11248 | |
| 442 | 442 | |
| 443 | 443 | unsigned int mess_cdrom_driver::get_num_tracks() const |
| 444 | 444 | { |
| 445 | // | |
| 445 | // printf("get_num_tracks = %d\n", num_tracks); | |
| 446 | 446 | return num_tracks; |
| 447 | 447 | } |
| 448 | 448 | |
| r11247 | r11248 | |
| 458 | 458 | address[1] = address[1]; |
| 459 | 459 | address[2] = address[2]; |
| 460 | 460 | |
| 461 | // | |
| 461 | // printf("get_track_address %d = %02x:%02x:%02x\n", track, address[0], address[1], address[2]); | |
| 462 | 462 | |
| 463 | 463 | return true; |
| 464 | } | |
| 464 | } | |
| 465 | 465 | else |
| 466 | 466 | { |
| 467 | 467 | address[0]=address[1]=address[2]=0; |
| r11247 | r11248 | |
| 475 | 475 | UINT32 track = cdrom_get_track(m_cd, sector); |
| 476 | 476 | int start; |
| 477 | 477 | |
| 478 | start = cdrom_get_track_start(m_cd, track); | |
| 478 | start = cdrom_get_track_start(m_cd, track); | |
| 479 | 479 | |
| 480 | 480 | if (start_sector != NULL) |
| 481 | 481 | { |
| r11247 | r11248 | |
| 498 | 498 | |
| 499 | 499 | cdromtype mess_cdrom_driver::get_type() const |
| 500 | 500 | { |
| 501 | // | |
| 501 | // printf("get_type\n"); | |
| 502 | 502 | return cdromtype_cd; |
| 503 | 503 | } |
| 504 | 504 | |
| r11247 | r11248 | |
| 510 | 510 | { |
| 511 | 511 | const cdrom_toc *toc = cdrom_get_toc(m_cd); |
| 512 | 512 | |
| 513 | // | |
| 513 | // printf("get_track_type %d = %d\n", track, toc->tracks[track].trktype); | |
| 514 | 514 | |
| 515 | 515 | switch (toc->tracks[track].trktype) |
| 516 | 516 | { |
| r11247 | r11248 | |
|---|---|---|
| 129 | 129 | - Copied multi-sector write code from r7263, for some reason this had been |
| 130 | 130 | silently removed, but is required for the rmnimbus driver. |
| 131 | 131 | |
| 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. | |
| 135 | 135 | |
| 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. | |
| 139 | 139 | |
| 140 | 140 | TODO: |
| 141 | 141 | - What happens if a track is read that doesn't have any id's on it? |
| r11247 | r11248 | |
| 399 | 399 | INLINE wd1770_state *get_safe_token(device_t *device) |
| 400 | 400 | { |
| 401 | 401 | 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 || | |
| 405 | 405 | device->type() == WD177X || device->type() == WD179X || device->type() == MB8877); |
| 406 | 406 | |
| 407 | 407 | return (wd1770_state *)downcast<legacy_device_base *>(device)->token(); |
| r11247 | r11248 | |
| 414 | 414 | |
| 415 | 415 | static int wd17xx_has_side_select(device_t *device) |
| 416 | 416 | { |
| 417 | return (device->type() == WD1795 || device->type() == WD1797 || | |
| 417 | return (device->type() == WD1795 || device->type() == WD1797 || | |
| 418 | 418 | device->type() == WD2795 || device->type() == WD2797); |
| 419 | 419 | } |
| 420 | 420 |
| r11247 | r11248 | |
|---|---|---|
| 7 | 7 | { |
| 8 | 8 | protected: |
| 9 | 9 | virtual ~io_status() {} |
| 10 | ||
| 10 | ||
| 11 | 11 | public: |
| 12 | 12 | io_status() { } |
| 13 | ||
| 13 | ||
| 14 | 14 | virtual void cancel()=0; |
| 15 | 15 | virtual void release()=0; |
| 16 | 16 | virtual bool complete() const=0; |
| r11247 | r11248 | |
| 96 | 96 | if (sec>=150) |
| 97 | 97 | { |
| 98 | 98 | return sec-150; |
| 99 | } | |
| 99 | } | |
| 100 | 100 | else |
| 101 | 101 | { |
| 102 | 102 | return 0; |
| r11247 | r11248 | |
|---|---|---|
| 44 | 44 | CN3 - 2x10 PCB header, ST-506 drive 0 data |
| 45 | 45 | CN4 - 2x10 PCB header, ST-506 drive 1 data |
| 46 | 46 | CN5 - 2x25 PCB header, SASI host interface |
| 47 | ||
| 48 | ||
| 47 | ||
| 48 | ||
| 49 | 49 | ASSY 104766 REV C02 SN 231985P |
| 50 | 50 | |
| 51 | 51 | |-------------------------------------------| |
| 52 | 52 | | | |
| 53 | | CN1 | |
| 53 | | CN1 SY2158 | | |
| 54 | 54 | | CN7 CN6 | |
| 55 | | | |
| 55 | | ROM | | |
| 56 | 56 | | CN2 | |
| 57 | | | |
| 57 | | XEBEC1 Z80 | | |
| 58 | 58 | | CN5 | |
| 59 | | CN3 XEBEC2 20MHz | |
| 59 | | CN3 XEBEC2 20MHz XEBEC3 | | |
| 60 | 60 | | | |
| 61 | | CN4 XEBEC4 | |
| 61 | | CN4 XEBEC4 XEBEC5 | | |
| 62 | 62 | | | |
| 63 | 63 | |-------------------------------------------| |
| 64 | 64 | |
| r11247 | r11248 | |
| 67 | 67 | |
| 68 | 68 | Z80 - Zilog Z8400APS Z80A CPU |
| 69 | 69 | ROM - 2732 pinout ROM "104788D" |
| 70 | ||
| 70 | SY2158 - Synertek SY2158A-3 1Kx8 RAM | |
| 71 | 71 | XEBEC1 - Xebec 3198-0046N8445 |
| 72 | 72 | XEBEC2 - Xebec 3198-0009 |
| 73 | 73 | XEBEC3 - Xebec 3198-0057 |
| r11247 | r11248 | |
| 78 | 78 | CN3 - 2x10 PCB header, ST-506 drive 0 data |
| 79 | 79 | CN4 - 2x10 PCB header, ST-506 drive 1 data |
| 80 | 80 | 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) | |
| 83 | 83 | |
| 84 | 84 | */ |
| 85 | 85 |
| r11247 | r11248 | |
|---|---|---|
| 127 | 127 | UINT8 comx35_state::read_expansion() |
| 128 | 128 | { |
| 129 | 129 | UINT8 result; |
| 130 | ||
| 130 | ||
| 131 | 131 | switch (machine().phase()) |
| 132 | 132 | { |
| 133 | 133 | case MACHINE_PHASE_RESET: |
| r11247 | r11248 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | /* |
| 11 | 11 | |
| 12 | ||
| 12 | TODO: | |
| 13 | 13 | |
| 14 | - serial IEC protocol handling | |
| 15 | - write to disk image | |
| 14 | - serial IEC protocol handling | |
| 15 | - write to disk image | |
| 16 | 16 | |
| 17 | 17 | */ |
| 18 | 18 | |
| r11247 | r11248 | |
| 79 | 79 | //************************************************************************** |
| 80 | 80 | |
| 81 | 81 | //------------------------------------------------- |
| 82 | // set_atn_line - | |
| 82 | // set_atn_line - | |
| 83 | 83 | //------------------------------------------------- |
| 84 | 84 | |
| 85 | 85 | inline void c64h156_device::set_atn_line() |
| r11247 | r11248 | |
| 91 | 91 | |
| 92 | 92 | |
| 93 | 93 | //------------------------------------------------- |
| 94 | // set_sync_line - | |
| 94 | // set_sync_line - | |
| 95 | 95 | //------------------------------------------------- |
| 96 | 96 | |
| 97 | 97 | inline void c64h156_device::set_sync_line(int state) |
| r11247 | r11248 | |
| 103 | 103 | |
| 104 | 104 | |
| 105 | 105 | //------------------------------------------------- |
| 106 | // set_byte_line - | |
| 106 | // set_byte_line - | |
| 107 | 107 | //------------------------------------------------- |
| 108 | 108 | |
| 109 | 109 | inline void c64h156_device::set_byte_line(int state) |
| r11247 | r11248 | |
| 115 | 115 | |
| 116 | 116 | |
| 117 | 117 | //------------------------------------------------- |
| 118 | // read_current_track - | |
| 118 | // read_current_track - | |
| 119 | 119 | //------------------------------------------------- |
| 120 | 120 | |
| 121 | 121 | inline void c64h156_device::read_current_track() |
| r11247 | r11248 | |
| 136 | 136 | |
| 137 | 137 | |
| 138 | 138 | //------------------------------------------------- |
| 139 | // receive_bit - | |
| 139 | // receive_bit - | |
| 140 | 140 | //------------------------------------------------- |
| 141 | 141 | |
| 142 | 142 | inline void c64h156_device::receive_bit() |
| r11247 | r11248 | |
| 262 | 262 | |
| 263 | 263 | |
| 264 | 264 | //------------------------------------------------- |
| 265 | // yb_r - | |
| 265 | // yb_r - | |
| 266 | 266 | //------------------------------------------------- |
| 267 | 267 | |
| 268 | 268 | READ8_MEMBER( c64h156_device::yb_r ) |
| r11247 | r11248 | |
| 274 | 274 | |
| 275 | 275 | |
| 276 | 276 | //------------------------------------------------- |
| 277 | // yb_w - | |
| 277 | // yb_w - | |
| 278 | 278 | //------------------------------------------------- |
| 279 | 279 | |
| 280 | 280 | WRITE8_MEMBER( c64h156_device::yb_w ) |
| r11247 | r11248 | |
| 284 | 284 | |
| 285 | 285 | |
| 286 | 286 | //------------------------------------------------- |
| 287 | // test_w - | |
| 287 | // test_w - | |
| 288 | 288 | //------------------------------------------------- |
| 289 | 289 | |
| 290 | 290 | WRITE_LINE_MEMBER( c64h156_device::test_w ) |
| r11247 | r11248 | |
| 293 | 293 | |
| 294 | 294 | |
| 295 | 295 | //------------------------------------------------- |
| 296 | // accl_w - | |
| 296 | // accl_w - | |
| 297 | 297 | //------------------------------------------------- |
| 298 | 298 | |
| 299 | 299 | WRITE_LINE_MEMBER( c64h156_device::accl_w ) |
| r11247 | r11248 | |
| 303 | 303 | |
| 304 | 304 | |
| 305 | 305 | //------------------------------------------------- |
| 306 | // sync_r - | |
| 306 | // sync_r - | |
| 307 | 307 | //------------------------------------------------- |
| 308 | 308 | |
| 309 | 309 | READ_LINE_MEMBER( c64h156_device::sync_r ) |
| r11247 | r11248 | |
| 313 | 313 | |
| 314 | 314 | |
| 315 | 315 | //------------------------------------------------- |
| 316 | // byte_r - | |
| 316 | // byte_r - | |
| 317 | 317 | //------------------------------------------------- |
| 318 | 318 | |
| 319 | 319 | READ_LINE_MEMBER( c64h156_device::byte_r ) |
| r11247 | r11248 | |
| 323 | 323 | |
| 324 | 324 | |
| 325 | 325 | //------------------------------------------------- |
| 326 | // stp_w - | |
| 326 | // stp_w - | |
| 327 | 327 | //------------------------------------------------- |
| 328 | 328 | |
| 329 | 329 | WRITE_LINE_MEMBER( c64h156_device::mtr_w ) |
| r11247 | r11248 | |
| 345 | 345 | |
| 346 | 346 | |
| 347 | 347 | //------------------------------------------------- |
| 348 | // oe_w - | |
| 348 | // oe_w - | |
| 349 | 349 | //------------------------------------------------- |
| 350 | 350 | |
| 351 | 351 | WRITE_LINE_MEMBER( c64h156_device::oe_w ) |
| r11247 | r11248 | |
| 355 | 355 | |
| 356 | 356 | |
| 357 | 357 | //------------------------------------------------- |
| 358 | // soe_w - | |
| 358 | // soe_w - | |
| 359 | 359 | //------------------------------------------------- |
| 360 | 360 | |
| 361 | 361 | WRITE_LINE_MEMBER( c64h156_device::soe_w ) |
| r11247 | r11248 | |
| 365 | 365 | |
| 366 | 366 | |
| 367 | 367 | //------------------------------------------------- |
| 368 | // atn_r - | |
| 368 | // atn_r - | |
| 369 | 369 | //------------------------------------------------- |
| 370 | 370 | |
| 371 | 371 | READ_LINE_MEMBER( c64h156_device::atn_r ) |
| r11247 | r11248 | |
| 375 | 375 | |
| 376 | 376 | |
| 377 | 377 | //------------------------------------------------- |
| 378 | // atni_w - | |
| 378 | // atni_w - | |
| 379 | 379 | //------------------------------------------------- |
| 380 | 380 | |
| 381 | 381 | WRITE_LINE_MEMBER( c64h156_device::atni_w ) |
| r11247 | r11248 | |
| 387 | 387 | |
| 388 | 388 | |
| 389 | 389 | //------------------------------------------------- |
| 390 | // atna_w - | |
| 390 | // atna_w - | |
| 391 | 391 | //------------------------------------------------- |
| 392 | 392 | |
| 393 | 393 | WRITE_LINE_MEMBER( c64h156_device::atna_w ) |
| r11247 | r11248 | |
| 399 | 399 | |
| 400 | 400 | |
| 401 | 401 | //------------------------------------------------- |
| 402 | // stp_w - | |
| 402 | // stp_w - | |
| 403 | 403 | //------------------------------------------------- |
| 404 | 404 | |
| 405 | 405 | void c64h156_device::stp_w(int data) |
| r11247 | r11248 | |
| 445 | 445 | |
| 446 | 446 | |
| 447 | 447 | //------------------------------------------------- |
| 448 | // on_disk_changed - | |
| 448 | // on_disk_changed - | |
| 449 | 449 | //------------------------------------------------- |
| 450 | 450 | |
| 451 | 451 | void c64h156_device::on_disk_changed() |
| r11247 | r11248 | |
|---|---|---|
| 110 | 110 | |
| 111 | 111 | bit description |
| 112 | 112 | |
| 113 | P0 | |
| 114 | P1 | |
| 115 | P2 | |
| 116 | P3 | |
| 113 | P0 | |
| 114 | P1 | |
| 115 | P2 | |
| 116 | P3 | |
| 117 | 117 | P4 WPS |
| 118 | P5 | |
| 119 | P6 | |
| 118 | P5 | |
| 119 | P6 | |
| 120 | 120 | P7 BYTE LTCHED |
| 121 | 121 | |
| 122 | ||
| 122 | ||
| 123 | 123 | |
| 124 | 124 | UINT8 data = 0; |
| 125 | 125 | |
| r11247 | r11248 | |
| 143 | 143 | P1 STP0B |
| 144 | 144 | P2 MTR0 |
| 145 | 145 | P3 ACT0 |
| 146 | P4 | |
| 146 | P4 | |
| 147 | 147 | P5 DS0 |
| 148 | 148 | P6 DS1 |
| 149 | P7 | |
| 149 | P7 | |
| 150 | 150 | |
| 151 | ||
| 151 | */ | |
| 152 | 152 | |
| 153 | 153 | // spindle motor |
| 154 | 154 | m_ga->mtr_w(BIT(data, 2)); |
| r11247 | r11248 | |
| 192 | 192 | PA6 TCBM PA6 |
| 193 | 193 | PA7 TCBM PA7 |
| 194 | 194 | |
| 195 | ||
| 195 | */ | |
| 196 | 196 | |
| 197 | 197 | return m_tcbm_data; |
| 198 | 198 | } |
| r11247 | r11248 | |
| 213 | 213 | PA6 TCBM PA6 |
| 214 | 214 | PA7 TCBM PA7 |
| 215 | 215 | |
| 216 | ||
| 216 | */ | |
| 217 | 217 | |
| 218 | 218 | m_tcbm_data = data; |
| 219 | 219 | } |
| r11247 | r11248 | |
| 225 | 225 | |
| 226 | 226 | bit description |
| 227 | 227 | |
| 228 | PC0 | |
| 229 | PC1 | |
| 230 | PC2 | |
| 231 | PC3 | |
| 232 | PC4 | |
| 228 | PC0 | |
| 229 | PC1 | |
| 230 | PC2 | |
| 231 | PC3 | |
| 232 | PC4 | |
| 233 | 233 | PC5 JP1 |
| 234 | 234 | PC6 _SYNC |
| 235 | 235 | PC7 TCBM DAV |
| 236 | 236 | |
| 237 | ||
| 237 | */ | |
| 238 | 238 | |
| 239 | 239 | UINT8 data = 0; |
| 240 | 240 | |
| r11247 | r11248 | |
| 262 | 262 | PC2 TCBM DEV |
| 263 | 263 | PC3 TCBM ACK |
| 264 | 264 | PC4 MODE |
| 265 | PC5 | |
| 266 | PC6 | |
| 267 | PC7 | |
| 265 | PC5 | |
| 266 | PC6 | |
| 267 | PC7 | |
| 268 | 268 | |
| 269 | ||
| 269 | */ | |
| 270 | 270 | |
| 271 | 271 | // TCBM status |
| 272 | 272 | m_status = data & 0x03; |
| r11247 | r11248 | |
| 314 | 314 | PB6 |
| 315 | 315 | PB7 |
| 316 | 316 | |
| 317 | ||
| 317 | */ | |
| 318 | 318 | |
| 319 | 319 | return m_status & 0x03; |
| 320 | 320 | } |
| r11247 | r11248 | |
| 332 | 332 | PC3 |
| 333 | 333 | PC4 |
| 334 | 334 | PC5 |
| 335 | PC6 | |
| 335 | PC6 | |
| 336 | 336 | PC7 TCBM ACK |
| 337 | 337 | |
| 338 | ||
| 338 | */ | |
| 339 | 339 | |
| 340 | 340 | UINT8 data = 0; |
| 341 | 341 | |
| r11247 | r11248 | |
| 359 | 359 | PC4 |
| 360 | 360 | PC5 |
| 361 | 361 | PC6 TCBM DAV |
| 362 | PC7 | |
| 362 | PC7 | |
| 363 | 363 | |
| 364 | ||
| 364 | */ | |
| 365 | 365 | |
| 366 | 366 | // TCBM data valid |
| 367 | 367 | m_dav = BIT(data, 6); |
| r11247 | r11248 | |
| 539 | 539 | |
| 540 | 540 | |
| 541 | 541 | //------------------------------------------------- |
| 542 | // on_disk_change - | |
| 542 | // on_disk_change - | |
| 543 | 543 | //------------------------------------------------- |
| 544 | 544 | |
| 545 | 545 | void c1551_device::on_disk_change(device_image_interface &image) |
| r11247 | r11248 | |
|---|---|---|
| 62 | 62 | protected: |
| 63 | 63 | // device_config overrides |
| 64 | 64 | virtual void device_config_complete(); |
| 65 | ||
| 65 | ||
| 66 | 66 | private: |
| 67 | 67 | const char *m_cpu_tag; |
| 68 | 68 | int m_address; |
| r11247 | r11248 | |
|---|---|---|
| 35 | 35 | |
| 36 | 36 | /* |
| 37 | 37 | |
| 38 | ||
| 38 | TODO: | |
| 39 | 39 | |
| 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 | |
| 44 | 44 | - 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 | |
| 47 | 47 | |
| 48 | 48 | */ |
| 49 | 49 | |
| r11247 | r11248 | |
| 457 | 457 | { |
| 458 | 458 | return INPUT_PORTS_NAME( abc99 ); |
| 459 | 459 | } |
| 460 | ||
| 461 | 460 | |
| 462 | 461 | |
| 462 | ||
| 463 | 463 | //************************************************************************** |
| 464 | 464 | // INLINE HELPERS |
| 465 | 465 | //************************************************************************** |
| r11247 | r11248 | |
| 482 | 482 | inline void abc99_device::serial_output() |
| 483 | 483 | { |
| 484 | 484 | int so = m_so_z2 & m_so_z5; |
| 485 | ||
| 485 | ||
| 486 | 486 | if (m_so != so) |
| 487 | 487 | { |
| 488 | 488 | m_so = so; |
| r11247 | r11248 | |
| 605 | 605 | case TIMER_SERIAL: |
| 606 | 606 | serial_clock(); |
| 607 | 607 | break; |
| 608 | ||
| 608 | ||
| 609 | 609 | case TIMER_MOUSE: |
| 610 | 610 | scan_mouse(); |
| 611 | 611 | break; |
| r11247 | r11248 | |
| 620 | 620 | WRITE8_MEMBER( abc99_device::z2_led_w ) |
| 621 | 621 | { |
| 622 | 622 | if (m_led_en) return; |
| 623 | ||
| 623 | ||
| 624 | 624 | output_set_led_value(LED_1, BIT(data, 0)); |
| 625 | 625 | output_set_led_value(LED_2, BIT(data, 1)); |
| 626 | 626 | output_set_led_value(LED_3, BIT(data, 2)); |
| r11247 | r11248 | |
| 639 | 639 | WRITE8_MEMBER( abc99_device::z2_p1_w ) |
| 640 | 640 | { |
| 641 | 641 | /* |
| 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 | */ | |
| 655 | 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 | */ | |
| 655 | ||
| 656 | 656 | // serial output |
| 657 | 657 | int so_z2 = BIT(data, 0); |
| 658 | ||
| 658 | ||
| 659 | 659 | if (m_so_z2 != so_z2) |
| 660 | 660 | { |
| 661 | 661 | m_so_z2 = so_z2; |
| r11247 | r11248 | |
| 675 | 675 | |
| 676 | 676 | // speaker output |
| 677 | 677 | speaker_level_w(m_speaker, !BIT(data, 6)); |
| 678 | ||
| 678 | ||
| 679 | 679 | // Z8 enable |
| 680 | 680 | m_led_en = BIT(data, 7); |
| 681 | 681 | } |
| r11247 | r11248 | |
| 688 | 688 | READ8_MEMBER( abc99_device::z2_p2_r ) |
| 689 | 689 | { |
| 690 | 690 | /* |
| 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 | ||
| 705 | 705 | UINT8 data = input_port_read(this, "Z14") << 5; |
| 706 | 706 | |
| 707 | 707 | return data; |
| r11247 | r11248 | |
| 735 | 735 | READ8_MEMBER( abc99_device::z5_p1_r ) |
| 736 | 736 | { |
| 737 | 737 | /* |
| 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 | ||
| 752 | 752 | UINT8 data = 0; |
| 753 | 753 | |
| 754 | 754 | // mouse buttons |
| r11247 | r11248 | |
| 768 | 768 | WRITE8_MEMBER( abc99_device::z5_p2_w ) |
| 769 | 769 | { |
| 770 | 770 | /* |
| 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 | */ | |
| 784 | 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 | */ | |
| 784 | ||
| 785 | 785 | // serial input enable |
| 786 | 786 | int si_en = BIT(data, 4); |
| 787 | ||
| 787 | ||
| 788 | 788 | if (m_si_en != si_en) |
| 789 | 789 | { |
| 790 | 790 | m_si_en = si_en; |
| r11247 | r11248 | |
| 793 | 793 | |
| 794 | 794 | // Z2 reset |
| 795 | 795 | int reset = BIT(data, 5); |
| 796 | ||
| 796 | ||
| 797 | 797 | if (m_reset != reset) |
| 798 | 798 | { |
| 799 | 799 | m_reset = reset; |
| r11247 | r11248 | |
| 802 | 802 | |
| 803 | 803 | // serial output |
| 804 | 804 | int so_z5 = BIT(data, 6); |
| 805 | ||
| 805 | ||
| 806 | 806 | if (m_so_z5 != so_z5) |
| 807 | 807 | { |
| 808 | 808 | m_so_z5 = so_z5; |
| r11247 | r11248 | |
|---|---|---|
| 80 | 80 | |
| 81 | 81 | public: |
| 82 | 82 | static INPUT_CHANGED( keyboard_reset ); |
| 83 | ||
| 83 | ||
| 84 | 84 | DECLARE_WRITE8_MEMBER( z2_led_w ); |
| 85 | 85 | DECLARE_WRITE8_MEMBER( z2_p1_w ); |
| 86 | 86 | DECLARE_READ8_MEMBER( z2_p2_r ); |
| r11247 | r11248 | |
|---|---|---|
| 46 | 46 | bit 2 - key data interurpt enabled |
| 47 | 47 | bit 1 - clear if horizontal mouse data, set if vertical |
| 48 | 48 | bit 0 - command register full |
| 49 | ||
| 49 | ||
| 50 | 50 | 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 | ||
| 60 | 60 | C02D - SLTROMSEL |
| 61 | 61 | |
| 62 | 62 | C031 - DISKREG |
| r11247 | r11248 | |
| 772 | 772 | |
| 773 | 773 | if (scb & 0x40) |
| 774 | 774 | { |
| 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 | |
| 776 | 776 | state->m_vgcint |= 0x20; |
| 777 | 777 | |
| 778 | 778 | // see if the interrupt is also enabled and trigger it if so |
| r11247 | r11248 | |
|---|---|---|
| 126 | 126 | //************************************************************************** |
| 127 | 127 | // GLOBAL VARIABLES |
| 128 | 128 | //************************************************************************** |
| 129 | ||
| 129 | ||
| 130 | 130 | const device_type ISA8_HDC = isa8_hdc_device_config::static_alloc_device_config; |
| 131 | ||
| 131 | ||
| 132 | 132 | //************************************************************************** |
| 133 | 133 | // DEVICE CONFIGURATION |
| 134 | 134 | //************************************************************************** |
| 135 | ||
| 135 | ||
| 136 | 136 | //------------------------------------------------- |
| 137 | 137 | // isa8_hdc_device_config - constructor |
| 138 | 138 | //------------------------------------------------- |
| 139 | ||
| 139 | ||
| 140 | 140 | isa8_hdc_device_config::isa8_hdc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 141 | 141 | : device_config(mconfig, static_alloc_device_config, "ISA8_HDC", tag, owner, clock), |
| 142 | 142 | device_config_isa8_card_interface(mconfig, *this) |
| 143 | 143 | { |
| 144 | 144 | m_shortname = "hdc"; |
| 145 | 145 | } |
| 146 | ||
| 146 | ||
| 147 | 147 | //------------------------------------------------- |
| 148 | 148 | // static_alloc_device_config - allocate a new |
| 149 | 149 | // configuration object |
| 150 | 150 | //------------------------------------------------- |
| 151 | ||
| 151 | ||
| 152 | 152 | device_config *isa8_hdc_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 153 | 153 | { |
| 154 | 154 | return global_alloc(isa8_hdc_device_config(mconfig, tag, owner, clock)); |
| 155 | 155 | } |
| 156 | ||
| 156 | ||
| 157 | 157 | //------------------------------------------------- |
| 158 | 158 | // alloc_device - allocate a new device object |
| 159 | 159 | //------------------------------------------------- |
| 160 | ||
| 160 | ||
| 161 | 161 | device_t *isa8_hdc_device_config::alloc_device(running_machine &machine) const |
| 162 | 162 | { |
| 163 | 163 | return auto_alloc(machine, isa8_hdc_device(machine, *this)); |
| 164 | 164 | } |
| 165 | ||
| 165 | ||
| 166 | 166 | //------------------------------------------------- |
| 167 | 167 | // machine_config_additions - device-specific |
| 168 | 168 | // machine configurations |
| r11247 | r11248 | |
| 185 | 185 | //************************************************************************** |
| 186 | 186 | // LIVE DEVICE |
| 187 | 187 | //************************************************************************** |
| 188 | ||
| 188 | ||
| 189 | 189 | //------------------------------------------------- |
| 190 | 190 | // isa8_hdc_device - constructor |
| 191 | 191 | //------------------------------------------------- |
| 192 | ||
| 192 | ||
| 193 | 193 | isa8_hdc_device::isa8_hdc_device(running_machine &_machine, const isa8_hdc_device_config &config) : |
| 194 | 194 | device_t(_machine, config), |
| 195 | 195 | device_isa8_card_interface( _machine, config, *this ), |
| r11247 | r11248 | |
| 197 | 197 | m_isa(*owner(),config.m_isa_tag) |
| 198 | 198 | { |
| 199 | 199 | } |
| 200 | ||
| 200 | ||
| 201 | 201 | //------------------------------------------------- |
| 202 | 202 | // device_start - device-specific startup |
| 203 | 203 | //------------------------------------------------- |
| 204 | ||
| 204 | ||
| 205 | 205 | void isa8_hdc_device::device_start() |
| 206 | { | |
| 206 | { | |
| 207 | 207 | m_isa->add_isa_card(this, m_config.m_isa_num); |
| 208 | 208 | 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) ); | |
| 210 | 210 | buffer = auto_alloc_array(machine(), UINT8, 17*4*512); |
| 211 | 211 | timer = machine().scheduler().timer_alloc(FUNC(pc_hdc_command), this); |
| 212 | 212 | } |
| r11247 | r11248 | |
| 214 | 214 | //------------------------------------------------- |
| 215 | 215 | // device_reset - device-specific reset |
| 216 | 216 | //------------------------------------------------- |
| 217 | ||
| 217 | ||
| 218 | 218 | void isa8_hdc_device::device_reset() |
| 219 | 219 | { |
| 220 | 220 | drv = 0; |
| 221 | 221 | data_cnt = 0; |
| 222 | 222 | buffer_ptr = NULL; |
| 223 | hdc_control = 0; | |
| 223 | hdc_control = 0; | |
| 224 | 224 | for (int i = 0; i < 2; i++) |
| 225 | 225 | { |
| 226 | 226 | cylinders[i] = 612; |
| r11247 | r11248 | |
| 255 | 255 | break; |
| 256 | 256 | case 1: |
| 257 | 257 | img = dynamic_cast<device_image_interface *>(machine().device(subtag(tempstring,"slave"))); |
| 258 | break; | |
| 258 | break; | |
| 259 | 259 | } |
| 260 | if ( img == NULL ) | |
| 260 | if ( img == NULL ) | |
| 261 | 261 | return NULL; |
| 262 | 262 | |
| 263 | 263 | if (!img->exists()) |
| r11247 | r11248 | |
| 518 | 518 | return 1; |
| 519 | 519 | } |
| 520 | 520 | |
| 521 | void isa8_hdc_device::hdc_command() | |
| 521 | void isa8_hdc_device::hdc_command() | |
| 522 | 522 | { |
| 523 | 523 | int set_error_info = 1; |
| 524 | 524 | int old_error = error; /* Previous error data is needed for CMD_SENSE */ |
| r11247 | r11248 | |
| 817 | 817 | { |
| 818 | 818 | UINT8 data = 0xff; |
| 819 | 819 | isa8_hdc_device *hdc = downcast<isa8_hdc_device *>(device); |
| 820 | ||
| 820 | ||
| 821 | 821 | switch( offset ) |
| 822 | 822 | { |
| 823 | case 0: data = hdc->pc_hdc_data_r(); | |
| 823 | case 0: data = hdc->pc_hdc_data_r(); | |
| 824 | 824 | case 1: data = hdc->pc_hdc_status_r(); break; |
| 825 | 825 | case 2: data = hdc->pc_hdc_dipswitch_r(); break; |
| 826 | 826 | case 3: break; |
| r11247 | r11248 | |
| 854 | 854 | } |
| 855 | 855 | |
| 856 | 856 | void isa8_hdc_device::dack_w(int line,UINT8 data) |
| 857 | { | |
| 858 | pc_hdc_dack_w(data); | |
| 857 | { | |
| 858 | pc_hdc_dack_w(data); | |
| 859 | 859 | } |
| 860 | 860 | bool isa8_hdc_device::have_dack(int line) |
| 861 | 861 | { |
| r11247 | r11248 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | **********************************************************************/ |
| 6 | 6 | #pragma once |
| 7 | ||
| 7 | ||
| 8 | 8 | #ifndef ISA_HDC_H |
| 9 | 9 | #define ISA_HDC_H |
| 10 | 10 | |
| r11247 | r11248 | |
| 15 | 15 | //************************************************************************** |
| 16 | 16 | // TYPE DEFINITIONS |
| 17 | 17 | //************************************************************************** |
| 18 | ||
| 18 | ||
| 19 | 19 | // ======================> isa8_hdc_device_config |
| 20 | ||
| 21 | class isa8_hdc_device_config : | |
| 20 | ||
| 21 | class isa8_hdc_device_config : | |
| 22 | 22 | public device_config, |
| 23 | 23 | public device_config_isa8_card_interface |
| 24 | 24 | { |
| 25 | 25 | friend class isa8_device; |
| 26 | 26 | friend class isa8_hdc_device; |
| 27 | ||
| 27 | ||
| 28 | 28 | // construction/destruction |
| 29 | 29 | isa8_hdc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 30 | ||
| 30 | ||
| 31 | 31 | public: |
| 32 | 32 | // allocators |
| 33 | 33 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 34 | 34 | virtual device_t *alloc_device(running_machine &machine) const; |
| 35 | ||
| 35 | ||
| 36 | 36 | // optional information overrides |
| 37 | 37 | 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; | |
| 39 | 39 | }; |
| 40 | ||
| 41 | ||
| 40 | ||
| 41 | ||
| 42 | 42 | // ======================> isa8_hdc_device |
| 43 | ||
| 44 | class isa8_hdc_device : | |
| 43 | ||
| 44 | class isa8_hdc_device : | |
| 45 | 45 | public device_t, |
| 46 | 46 | public device_isa8_card_interface |
| 47 | 47 | { |
| 48 | 48 | friend class isa8_hdc_device_config; |
| 49 | ||
| 49 | ||
| 50 | 50 | // construction/destruction |
| 51 | 51 | isa8_hdc_device(running_machine &_machine, const isa8_hdc_device_config &config); |
| 52 | 52 | |
| r11247 | r11248 | |
| 55 | 55 | virtual void device_start(); |
| 56 | 56 | virtual void device_reset(); |
| 57 | 57 | private: |
| 58 | int drv; | |
| 58 | int drv; | |
| 59 | 59 | int cylinders[2]; /* number of cylinders */ |
| 60 | 60 | int rwc[2]; /* reduced write current from cyl */ |
| 61 | 61 | int wp[2]; /* write precompensation from cyl */ |
| r11247 | r11248 | |
| 79 | 79 | UINT8 *buffer; /* data buffer */ |
| 80 | 80 | UINT8 *buffer_ptr; /* data pointer */ |
| 81 | 81 | UINT8 hdc_control; |
| 82 | ||
| 82 | ||
| 83 | 83 | UINT8 hdcdma_data[512]; |
| 84 | 84 | UINT8 *hdcdma_src; |
| 85 | 85 | UINT8 *hdcdma_dst; |
| 86 | 86 | int hdcdma_read; |
| 87 | 87 | int hdcdma_write; |
| 88 | 88 | int hdcdma_size; |
| 89 | ||
| 89 | ||
| 90 | 90 | // internal state |
| 91 | 91 | const isa8_hdc_device_config &m_config; |
| 92 | public: | |
| 92 | public: | |
| 93 | 93 | required_device<isa8_device> m_isa; |
| 94 | 94 | public: |
| 95 | 95 | virtual UINT8 dack_r(int line); |
| 96 | 96 | virtual void dack_w(int line,UINT8 data); |
| 97 | 97 | virtual bool have_dack(int line); |
| 98 | 98 | protected: |
| 99 | hard_disk_file *pc_hdc_file(int id); | |
| 99 | hard_disk_file *pc_hdc_file(int id); | |
| 100 | 100 | void pc_hdc_result(int set_error_info); |
| 101 | 101 | int no_dma(void); |
| 102 | 102 | int get_lbasector(); |
| r11247 | r11248 | |
| 107 | 107 | void get_drive(); |
| 108 | 108 | void get_chsn(); |
| 109 | 109 | int test_ready(); |
| 110 | static TIMER_CALLBACK(pc_hdc_command); | |
| 111 | public: | |
| 110 | static TIMER_CALLBACK(pc_hdc_command); | |
| 111 | public: | |
| 112 | 112 | void hdc_command(); |
| 113 | 113 | void pc_hdc_data_w(int data); |
| 114 | 114 | void pc_hdc_reset_w(int data); |
| r11247 | r11248 | |
| 118 | 118 | UINT8 pc_hdc_status_r(); |
| 119 | 119 | UINT8 pc_hdc_dipswitch_r(); |
| 120 | 120 | }; |
| 121 | ||
| 122 | ||
| 121 | ||
| 122 | ||
| 123 | 123 | // device type definition |
| 124 | 124 | extern const device_type ISA8_HDC; |
| 125 | 125 |
| r11247 | r11248 | |
|---|---|---|
| 87 | 87 | mpc105_device::mpc105_device(running_machine &_machine, const mpc105_device_config &config) |
| 88 | 88 | : device_t(_machine, config), |
| 89 | 89 | m_config(config), |
| 90 | m_maincpu(*owner(), config.m_cputag) | |
| 90 | m_maincpu(*owner(), config.m_cputag) | |
| 91 | 91 | { |
| 92 | 92 | } |
| 93 | 93 | |
| r11247 | r11248 | |
| 112 | 112 | |
| 113 | 113 | |
| 114 | 114 | //------------------------------------------------- |
| 115 | // update_memory - MMU update | |
| 115 | // update_memory - MMU update | |
| 116 | 116 | //------------------------------------------------- |
| 117 | 117 | |
| 118 | 118 | void mpc105_device::update_memory() |
| r11247 | r11248 | |
|---|---|---|
| 15 | 15 | MCFG_DEVICE_ADD(_tag, MPC105, 0) \ |
| 16 | 16 | mpc105_device_config::static_set_cputag(device, _cputag); \ |
| 17 | 17 | mpc105_device_config::static_set_bank_base(device, _bankbase); \ |
| 18 | ||
| 18 | ||
| 19 | 19 | // ======================> mpc105_device_config |
| 20 | 20 | |
| 21 | 21 | class mpc105_device_config : public device_config |
| r11247 | r11248 | |
| 33 | 33 | // inline configuration helpers |
| 34 | 34 | static void static_set_bank_base(device_config *device, int bank_base); |
| 35 | 35 | static void static_set_cputag(device_config *device, const char *tag); |
| 36 | ||
| 36 | ||
| 37 | 37 | protected: |
| 38 | 38 | // internal state goes here |
| 39 | 39 | int m_bank_base; |
| r11247 | r11248 | |
| 59 | 59 | // device-level overrides |
| 60 | 60 | virtual void device_start(); |
| 61 | 61 | virtual void device_reset(); |
| 62 | ||
| 62 | ||
| 63 | 63 | void update_memory(); |
| 64 | 64 | |
| 65 | 65 | // internal state |
| r11247 | r11248 | |
| 68 | 68 | private: |
| 69 | 69 | int m_bank_base; |
| 70 | 70 | UINT8 m_bank_enable; |
| 71 | UINT32 m_bank_registers[8]; | |
| 72 | ||
| 71 | UINT32 m_bank_registers[8]; | |
| 72 | ||
| 73 | 73 | required_device<device_t> m_maincpu; |
| 74 | 74 | }; |
| 75 | 75 |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | IBM PC AT compatibles 8042 keyboard controller | |
| 4 | 4 | |
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| r11247 | r11248 | |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | /* |
| 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) | |
| 196 | 196 | */ |
| 197 | 197 | READ8_MEMBER( at_keyboard_controller_device::p1_r ) |
| 198 | 198 | { |
| r11247 | r11248 | |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /* |
| 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) | |
| 217 | 217 | */ |
| 218 | 218 | WRITE8_MEMBER( at_keyboard_controller_device::p2_w ) |
| 219 | 219 | { |
| r11247 | r11248 | |
|---|---|---|
| 1520 | 1520 | { |
| 1521 | 1521 | if (length <= 16) |
| 1522 | 1522 | return; |
| 1523 | dest.compute(&data[16], length - 16, functions); | |
| 1523 | dest.compute(&data[16], length - 16, functions); | |
| 1524 | 1524 | } |
| 1525 | 1525 | |
| 1526 | 1526 | /************************** |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | IBM PC AT compatibles 8042 keyboard controller | |
| 4 | 4 | |
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 |
| r11247 | r11248 | |
|---|---|---|
| 209 | 209 | |
| 210 | 210 | WRITE32_HANDLER( mboard_write_board_32 ) |
| 211 | 211 | { |
| 212 | // | |
| 212 | // data |= data << 24; | |
| 213 | 213 | //printf("write board %08x %08x\n",offset,data); |
| 214 | 214 | logerror("write board 32 o: %08x d: %08x\n",offset,data); |
| 215 | 215 | if (offset) write_board(space->machine(),data); |
| r11247 | r11248 | |
| 230 | 230 | |
| 231 | 231 | WRITE32_HANDLER( mboard_write_LED_32 ) |
| 232 | 232 | { |
| 233 | // | |
| 233 | // data = data | data << 24; | |
| 234 | 234 | //printf("write LED %08x %08x\n",offset,data); |
| 235 | 235 | if (offset) write_LED(data); |
| 236 | 236 | else write_LED(data >> 24); |
| 237 | 237 | logerror("write LED 32 o: %08x d: %08x\n",offset,data); |
| 238 | // | |
| 238 | // device_spin_until_time(&space->device(), ATTOTIME_IN_USEC(20)); | |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 |
| r11247 | r11248 | |
|---|---|---|
| 142 | 142 | { |
| 143 | 143 | fatalerror("Interface not provided!"); |
| 144 | 144 | } |
| 145 | ||
| 145 | ||
| 146 | 146 | m_sw1 = intf->m_sw1; |
| 147 | 147 | m_sw2 = intf->m_sw2; |
| 148 | 148 | m_sw3 = intf->m_sw3; |
| r11247 | r11248 | |
| 458 | 458 | save_item(NAME(m_force_busy)); |
| 459 | 459 | |
| 460 | 460 | // patch out sector skew table |
| 461 | /* | |
| 461 | /* UINT8 *rom = subregion("conkort")->base(); | |
| 462 | 462 | |
| 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;*/ | |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | 467 | |
| r11247 | r11248 | |
| 486 | 486 | //************************************************************************** |
| 487 | 487 | |
| 488 | 488 | //------------------------------------------------- |
| 489 | // abcbus_cs - | |
| 489 | // abcbus_cs - | |
| 490 | 490 | //------------------------------------------------- |
| 491 | 491 | |
| 492 | 492 | void luxor_55_21046_device::abcbus_cs(UINT8 data) |
| r11247 | r11248 | |
| 496 | 496 | |
| 497 | 497 | |
| 498 | 498 | //------------------------------------------------- |
| 499 | // abcbus_rst - | |
| 499 | // abcbus_rst - | |
| 500 | 500 | //------------------------------------------------- |
| 501 | 501 | |
| 502 | 502 | void luxor_55_21046_device::abcbus_rst(int state) |
| r11247 | r11248 | |
| 509 | 509 | |
| 510 | 510 | |
| 511 | 511 | //------------------------------------------------- |
| 512 | // abcbus_stat - | |
| 512 | // abcbus_stat - | |
| 513 | 513 | //------------------------------------------------- |
| 514 | 514 | |
| 515 | 515 | UINT8 luxor_55_21046_device::abcbus_stat() |
| r11247 | r11248 | |
| 527 | 527 | |
| 528 | 528 | |
| 529 | 529 | //------------------------------------------------- |
| 530 | // abcbus_inp - | |
| 530 | // abcbus_inp - | |
| 531 | 531 | //------------------------------------------------- |
| 532 | 532 | |
| 533 | 533 | UINT8 luxor_55_21046_device::abcbus_inp() |
| r11247 | r11248 | |
| 545 | 545 | |
| 546 | 546 | |
| 547 | 547 | //------------------------------------------------- |
| 548 | // abcbus_utp - | |
| 548 | // abcbus_utp - | |
| 549 | 549 | //------------------------------------------------- |
| 550 | 550 | |
| 551 | 551 | void luxor_55_21046_device::abcbus_utp(UINT8 data) |
| r11247 | r11248 | |
| 559 | 559 | |
| 560 | 560 | |
| 561 | 561 | //------------------------------------------------- |
| 562 | // abcbus_c1 - | |
| 562 | // abcbus_c1 - | |
| 563 | 563 | //------------------------------------------------- |
| 564 | 564 | |
| 565 | 565 | void luxor_55_21046_device::abcbus_c1(UINT8 data) |
| r11247 | r11248 | |
| 573 | 573 | |
| 574 | 574 | |
| 575 | 575 | //------------------------------------------------- |
| 576 | // abcbus_c3 - | |
| 576 | // abcbus_c3 - | |
| 577 | 577 | //------------------------------------------------- |
| 578 | 578 | |
| 579 | 579 | void luxor_55_21046_device::abcbus_c3(UINT8 data) |
| r11247 | r11248 | |
| 592 | 592 | //************************************************************************** |
| 593 | 593 | |
| 594 | 594 | //------------------------------------------------- |
| 595 | // 3d_r - | |
| 595 | // 3d_r - | |
| 596 | 596 | //------------------------------------------------- |
| 597 | 597 | |
| 598 | 598 | READ8_MEMBER( luxor_55_21046_device::_3d_r ) |
| r11247 | r11248 | |
| 607 | 607 | |
| 608 | 608 | |
| 609 | 609 | //------------------------------------------------- |
| 610 | // 4d_w - | |
| 610 | // 4d_w - | |
| 611 | 611 | //------------------------------------------------- |
| 612 | 612 | |
| 613 | 613 | WRITE8_MEMBER( luxor_55_21046_device::_4d_w ) |
| r11247 | r11248 | |
| 622 | 622 | |
| 623 | 623 | |
| 624 | 624 | //------------------------------------------------- |
| 625 | // 4b_w - | |
| 625 | // 4b_w - | |
| 626 | 626 | //------------------------------------------------- |
| 627 | 627 | |
| 628 | 628 | WRITE8_MEMBER( luxor_55_21046_device::_4b_w ) |
| r11247 | r11248 | |
| 653 | 653 | |
| 654 | 654 | |
| 655 | 655 | //------------------------------------------------- |
| 656 | // 9b_w - | |
| 656 | // 9b_w - | |
| 657 | 657 | //------------------------------------------------- |
| 658 | 658 | |
| 659 | 659 | WRITE8_MEMBER( luxor_55_21046_device::_9b_w ) |
| r11247 | r11248 | |
| 691 | 691 | |
| 692 | 692 | |
| 693 | 693 | //------------------------------------------------- |
| 694 | // 8a_w - | |
| 694 | // 8a_w - | |
| 695 | 695 | //------------------------------------------------- |
| 696 | 696 | |
| 697 | 697 | WRITE8_MEMBER( luxor_55_21046_device::_8a_w ) |
| r11247 | r11248 | |
| 722 | 722 | |
| 723 | 723 | |
| 724 | 724 | //------------------------------------------------- |
| 725 | // 9a_r - | |
| 725 | // 9a_r - | |
| 726 | 726 | //------------------------------------------------- |
| 727 | 727 | |
| 728 | 728 | READ8_MEMBER( luxor_55_21046_device::_9a_r ) |
| r11247 | r11248 | |
|---|---|---|
| 78 | 78 | //************************************************************************** |
| 79 | 79 | // GLOBAL VARIABLES |
| 80 | 80 | //************************************************************************** |
| 81 | ||
| 81 | ||
| 82 | 82 | const device_type ISA8_COM = isa8_com_device_config::static_alloc_device_config; |
| 83 | ||
| 83 | ||
| 84 | 84 | //************************************************************************** |
| 85 | 85 | // DEVICE CONFIGURATION |
| 86 | 86 | //************************************************************************** |
| 87 | ||
| 87 | ||
| 88 | 88 | //------------------------------------------------- |
| 89 | 89 | // isa8_com_device_config - constructor |
| 90 | 90 | //------------------------------------------------- |
| 91 | ||
| 91 | ||
| 92 | 92 | isa8_com_device_config::isa8_com_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 93 | 93 | : device_config(mconfig, static_alloc_device_config, "ISA8_COM", tag, owner, clock), |
| 94 | 94 | device_config_isa8_card_interface(mconfig, *this) |
| 95 | 95 | { |
| 96 | 96 | } |
| 97 | ||
| 97 | ||
| 98 | 98 | //------------------------------------------------- |
| 99 | 99 | // static_alloc_device_config - allocate a new |
| 100 | 100 | // configuration object |
| 101 | 101 | //------------------------------------------------- |
| 102 | ||
| 102 | ||
| 103 | 103 | device_config *isa8_com_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 104 | 104 | { |
| 105 | 105 | return global_alloc(isa8_com_device_config(mconfig, tag, owner, clock)); |
| 106 | 106 | } |
| 107 | ||
| 107 | ||
| 108 | 108 | //------------------------------------------------- |
| 109 | 109 | // alloc_device - allocate a new device object |
| 110 | 110 | //------------------------------------------------- |
| 111 | ||
| 111 | ||
| 112 | 112 | device_t *isa8_com_device_config::alloc_device(running_machine &machine) const |
| 113 | 113 | { |
| 114 | 114 | return auto_alloc(machine, isa8_com_device(machine, *this)); |
| 115 | 115 | } |
| 116 | ||
| 116 | ||
| 117 | 117 | //------------------------------------------------- |
| 118 | 118 | // machine_config_additions - device-specific |
| 119 | 119 | // machine configurations |
| r11247 | r11248 | |
| 127 | 127 | //************************************************************************** |
| 128 | 128 | // LIVE DEVICE |
| 129 | 129 | //************************************************************************** |
| 130 | ||
| 130 | ||
| 131 | 131 | //------------------------------------------------- |
| 132 | 132 | // isa8_com_device - constructor |
| 133 | 133 | //------------------------------------------------- |
| 134 | ||
| 134 | ||
| 135 | 135 | isa8_com_device::isa8_com_device(running_machine &_machine, const isa8_com_device_config &config) : |
| 136 | 136 | device_t(_machine, config), |
| 137 | 137 | device_isa8_card_interface( _machine, config, *this ), |
| r11247 | r11248 | |
| 139 | 139 | m_isa(*owner(),config.m_isa_tag) |
| 140 | 140 | { |
| 141 | 141 | } |
| 142 | ||
| 142 | ||
| 143 | 143 | //------------------------------------------------- |
| 144 | 144 | // device_start - device-specific startup |
| 145 | 145 | //------------------------------------------------- |
| 146 | ||
| 146 | ||
| 147 | 147 | void isa8_com_device::device_start() |
| 148 | { | |
| 148 | { | |
| 149 | 149 | m_isa->add_isa_card(this, m_config.m_isa_num); |
| 150 | 150 | m_isa->install_device(subdevice("ins8250_0"), 0x03f8, 0x03ff, 0, 0, FUNC(ins8250_r), FUNC(ins8250_w) ); |
| 151 | 151 | m_isa->install_device(subdevice("ins8250_1"), 0x02f8, 0x02ff, 0, 0, FUNC(ins8250_r), FUNC(ins8250_w) ); |
| r11247 | r11248 | |
| 156 | 156 | //------------------------------------------------- |
| 157 | 157 | // device_reset - device-specific reset |
| 158 | 158 | //------------------------------------------------- |
| 159 | ||
| 159 | ||
| 160 | 160 | void isa8_com_device::device_reset() |
| 161 | 161 | { |
| 162 | 162 | } |
| r11247 | r11248 | |
|---|---|---|
| 94 | 94 | protected: |
| 95 | 95 | // device_config overrides |
| 96 | 96 | virtual void device_config_complete(); |
| 97 | ||
| 97 | ||
| 98 | 98 | private: |
| 99 | 99 | UINT8 m_sw1; // DS/DD |
| 100 | 100 | UINT8 m_sw2; // drive type |
| r11247 | r11248 | |
| 105 | 105 | // ======================> luxor_55_21046_device |
| 106 | 106 | |
| 107 | 107 | class luxor_55_21046_device : public device_t, |
| 108 | public device_abcbus_interface | |
| 108 | public device_abcbus_interface | |
| 109 | 109 | { |
| 110 | 110 | friend class luxor_55_21046_device_config; |
| 111 | 111 |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | #pragma once |
| 2 | ||
| 2 | ||
| 3 | 3 | #ifndef __ISA_COM_H__ |
| 4 | 4 | #define __ISA_COM_H__ |
| 5 | ||
| 5 | ||
| 6 | 6 | #include "emu.h" |
| 7 | 7 | #include "machine/isa.h" |
| 8 | 8 | |
| 9 | 9 | //************************************************************************** |
| 10 | 10 | // TYPE DEFINITIONS |
| 11 | 11 | //************************************************************************** |
| 12 | ||
| 12 | ||
| 13 | 13 | // ======================> isa8_com_device_config |
| 14 | ||
| 15 | class isa8_com_device_config : | |
| 14 | ||
| 15 | class isa8_com_device_config : | |
| 16 | 16 | public device_config, |
| 17 | 17 | public device_config_isa8_card_interface |
| 18 | 18 | { |
| 19 | 19 | friend class isa8_device; |
| 20 | 20 | friend class isa8_com_device; |
| 21 | ||
| 21 | ||
| 22 | 22 | // construction/destruction |
| 23 | 23 | isa8_com_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 24 | ||
| 24 | ||
| 25 | 25 | public: |
| 26 | 26 | // allocators |
| 27 | 27 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 28 | 28 | virtual device_t *alloc_device(running_machine &machine) const; |
| 29 | ||
| 29 | ||
| 30 | 30 | // optional information overrides |
| 31 | 31 | virtual machine_config_constructor device_mconfig_additions() const; |
| 32 | 32 | }; |
| 33 | ||
| 34 | ||
| 33 | ||
| 34 | ||
| 35 | 35 | // ======================> isa8_com_device |
| 36 | ||
| 37 | class isa8_com_device : | |
| 36 | ||
| 37 | class isa8_com_device : | |
| 38 | 38 | public device_t, |
| 39 | 39 | public device_isa8_card_interface |
| 40 | 40 | { |
| 41 | 41 | friend class isa8_com_device_config; |
| 42 | ||
| 42 | ||
| 43 | 43 | // construction/destruction |
| 44 | 44 | isa8_com_device(running_machine &_machine, const isa8_com_device_config &config); |
| 45 | 45 | |
| r11247 | r11248 | |
| 51 | 51 | private: |
| 52 | 52 | // internal state |
| 53 | 53 | const isa8_com_device_config &m_config; |
| 54 | public: | |
| 55 | required_device<isa8_device> m_isa; | |
| 54 | public: | |
| 55 | required_device<isa8_device> m_isa; | |
| 56 | 56 | }; |
| 57 | ||
| 58 | ||
| 57 | ||
| 58 | ||
| 59 | 59 | // device type definition |
| 60 | 60 | extern const device_type ISA8_COM; |
| 61 | 61 |
| r11247 | r11248 | |
|---|---|---|
| 1879 | 1879 | |
| 1880 | 1880 | info = hashfile_extrainfo(image); |
| 1881 | 1881 | |
| 1882 | state->m_rotate0 = 0; | |
| 1882 | state->m_rotate0 = 0; | |
| 1883 | 1883 | if (info) |
| 1884 | 1884 | { |
| 1885 | 1885 | if(strcmp(info, "ROTATE90DEGREE") == 0) |
| r11247 | r11248 | |
|---|---|---|
| 22 | 22 | pro audio spectrum 16: 1 OPL3 |
| 23 | 23 | |
| 24 | 24 | 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 | |
| 27 | 27 | |
| 28 | 28 | jumperable? normally 0x220 |
| 29 | */ | |
| 29 | */ | |
| 30 | 30 | #define ym3812_StdClock 3579545 |
| 31 | 31 | |
| 32 | 32 | static const ym3812_interface pc_ym3812_interface = |
| r11247 | r11248 | |
| 42 | 42 | MCFG_SOUND_ADD("saa1099.1", SAA1099, 4772720) |
| 43 | 43 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sblaster:mono", 0.50) |
| 44 | 44 | 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) | |
| 46 | 46 | MACHINE_CONFIG_END |
| 47 | 47 | |
| 48 | 48 | static READ8_DEVICE_HANDLER( ym3812_16_r ) |
| 49 | 49 | { |
| 50 | 50 | UINT8 retVal = 0xff; |
| 51 | switch(offset) | |
| 51 | switch(offset) | |
| 52 | 52 | { |
| 53 | 53 | case 0 : retVal = ym3812_status_port_r( device, offset ); break; |
| 54 | 54 | } |
| r11247 | r11248 | |
| 57 | 57 | |
| 58 | 58 | static WRITE8_DEVICE_HANDLER( ym3812_16_w ) |
| 59 | 59 | { |
| 60 | switch(offset) | |
| 60 | switch(offset) | |
| 61 | 61 | { |
| 62 | 62 | case 0 : ym3812_control_port_w( device, offset, data ); break; |
| 63 | 63 | case 1 : ym3812_write_port_w( device, offset, data ); break; |
| r11247 | r11248 | |
| 71 | 71 | |
| 72 | 72 | static WRITE8_DEVICE_HANDLER( saa1099_16_w ) |
| 73 | 73 | { |
| 74 | switch(offset) | |
| 74 | switch(offset) | |
| 75 | 75 | { |
| 76 | 76 | case 0 : saa1099_control_w( device, offset, data ); break; |
| 77 | 77 | case 1 : saa1099_data_w( device, offset, data ); break; |
| r11247 | r11248 | |
| 81 | 81 | //************************************************************************** |
| 82 | 82 | // GLOBAL VARIABLES |
| 83 | 83 | //************************************************************************** |
| 84 | ||
| 84 | ||
| 85 | 85 | const device_type ISA8_SOUND_BLASTER_1_0 = isa8_sblaster_device_config::static_alloc_device_config; |
| 86 | ||
| 86 | ||
| 87 | 87 | //************************************************************************** |
| 88 | 88 | // DEVICE CONFIGURATION |
| 89 | 89 | //************************************************************************** |
| 90 | ||
| 90 | ||
| 91 | 91 | //------------------------------------------------- |
| 92 | 92 | // isa8_sblaster_device_config - constructor |
| 93 | 93 | //------------------------------------------------- |
| 94 | ||
| 94 | ||
| 95 | 95 | isa8_sblaster_device_config::isa8_sblaster_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 96 | 96 | : device_config(mconfig, static_alloc_device_config, "ISA8_SOUND_BLASTER_1_0", tag, owner, clock), |
| 97 | 97 | device_config_isa8_card_interface(mconfig, *this) |
| 98 | 98 | { |
| 99 | 99 | } |
| 100 | ||
| 100 | ||
| 101 | 101 | //------------------------------------------------- |
| 102 | 102 | // static_alloc_device_config - allocate a new |
| 103 | 103 | // configuration object |
| 104 | 104 | //------------------------------------------------- |
| 105 | ||
| 105 | ||
| 106 | 106 | device_config *isa8_sblaster_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 107 | 107 | { |
| 108 | 108 | return global_alloc(isa8_sblaster_device_config(mconfig, tag, owner, clock)); |
| 109 | 109 | } |
| 110 | ||
| 110 | ||
| 111 | 111 | //------------------------------------------------- |
| 112 | 112 | // alloc_device - allocate a new device object |
| 113 | 113 | //------------------------------------------------- |
| 114 | ||
| 114 | ||
| 115 | 115 | device_t *isa8_sblaster_device_config::alloc_device(running_machine &machine) const |
| 116 | 116 | { |
| 117 | 117 | return auto_alloc(machine, isa8_sblaster_device(machine, *this)); |
| 118 | 118 | } |
| 119 | ||
| 119 | ||
| 120 | 120 | //------------------------------------------------- |
| 121 | 121 | // machine_config_additions - device-specific |
| 122 | 122 | // machine configurations |
| r11247 | r11248 | |
| 130 | 130 | //************************************************************************** |
| 131 | 131 | // LIVE DEVICE |
| 132 | 132 | //************************************************************************** |
| 133 | ||
| 133 | ||
| 134 | 134 | //------------------------------------------------- |
| 135 | 135 | // isa8_sblaster_device - constructor |
| 136 | 136 | //------------------------------------------------- |
| 137 | ||
| 137 | ||
| 138 | 138 | isa8_sblaster_device::isa8_sblaster_device(running_machine &_machine, const isa8_sblaster_device_config &config) : |
| 139 | 139 | device_t(_machine, config), |
| 140 | 140 | device_isa8_card_interface( _machine, config, *this ), |
| r11247 | r11248 | |
| 142 | 142 | m_isa(*owner(),config.m_isa_tag) |
| 143 | 143 | { |
| 144 | 144 | } |
| 145 | ||
| 145 | ||
| 146 | 146 | //------------------------------------------------- |
| 147 | 147 | // device_start - device-specific startup |
| 148 | 148 | //------------------------------------------------- |
| 149 | ||
| 149 | ||
| 150 | 150 | void isa8_sblaster_device::device_start() |
| 151 | { | |
| 151 | { | |
| 152 | 152 | m_isa->add_isa_card(this, m_config.m_isa_num); |
| 153 | 153 | m_isa->install_device(subdevice("ym3812"), 0x0388, 0x0389, 0, 0, FUNC(ym3812_16_r), FUNC(ym3812_16_w) ); |
| 154 | 154 | 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) ); | |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | //------------------------------------------------- |
| 159 | 159 | // device_reset - device-specific reset |
| 160 | 160 | //------------------------------------------------- |
| 161 | ||
| 161 | ||
| 162 | 162 | void isa8_sblaster_device::device_reset() |
| 163 | 163 | { |
| 164 | 164 | } |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | ||
| 2 | ||
| 3 | 3 | ISA bus device |
| 4 | ||
| 4 | ||
| 5 | 5 | ***************************************************************************/ |
| 6 | ||
| 6 | ||
| 7 | 7 | #include "emu.h" |
| 8 | 8 | #include "machine/isa.h" |
| 9 | ||
| 10 | ||
| 9 | ||
| 10 | ||
| 11 | 11 | //************************************************************************** |
| 12 | 12 | // GLOBAL VARIABLES |
| 13 | 13 | //************************************************************************** |
| 14 | ||
| 14 | ||
| 15 | 15 | const device_type ISA8 = isa8_device_config::static_alloc_device_config; |
| 16 | ||
| 16 | ||
| 17 | 17 | //************************************************************************** |
| 18 | 18 | // DEVICE CONFIGURATION |
| 19 | 19 | //************************************************************************** |
| 20 | ||
| 20 | ||
| 21 | 21 | //------------------------------------------------- |
| 22 | 22 | // isa8_device_config - constructor |
| 23 | 23 | //------------------------------------------------- |
| 24 | ||
| 24 | ||
| 25 | 25 | isa8_device_config::isa8_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 26 | 26 | : device_config(mconfig, static_alloc_device_config, "ISA8", tag, owner, clock) |
| 27 | 27 | { |
| 28 | 28 | } |
| 29 | ||
| 29 | ||
| 30 | 30 | //------------------------------------------------- |
| 31 | 31 | // static_alloc_device_config - allocate a new |
| 32 | 32 | // configuration object |
| 33 | 33 | //------------------------------------------------- |
| 34 | ||
| 34 | ||
| 35 | 35 | device_config *isa8_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 36 | 36 | { |
| 37 | 37 | return global_alloc(isa8_device_config(mconfig, tag, owner, clock)); |
| 38 | 38 | } |
| 39 | ||
| 39 | ||
| 40 | 40 | //------------------------------------------------- |
| 41 | 41 | // alloc_device - allocate a new device object |
| 42 | 42 | //------------------------------------------------- |
| 43 | ||
| 43 | ||
| 44 | 44 | device_t *isa8_device_config::alloc_device(running_machine &machine) const |
| 45 | 45 | { |
| 46 | 46 | return auto_alloc(machine, isa8_device(machine, *this)); |
| 47 | 47 | } |
| 48 | ||
| 48 | ||
| 49 | 49 | void isa8_device_config::static_set_cputag(device_config *device, const char *tag) |
| 50 | 50 | { |
| 51 | 51 | isa8_device_config *isa = downcast<isa8_device_config *>(device); |
| r11247 | r11248 | |
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | ||
| 85 | ||
| 86 | 86 | //************************************************************************** |
| 87 | 87 | // LIVE DEVICE |
| 88 | 88 | //************************************************************************** |
| 89 | ||
| 89 | ||
| 90 | 90 | //------------------------------------------------- |
| 91 | 91 | // isa8_device - constructor |
| 92 | 92 | //------------------------------------------------- |
| 93 | ||
| 93 | ||
| 94 | 94 | isa8_device::isa8_device(running_machine &_machine, const isa8_device_config &config) : |
| 95 | 95 | device_t(_machine, config), |
| 96 | 96 | m_config(config), |
| r11247 | r11248 | |
| 99 | 99 | for(int i = 0; i < 8; i++) |
| 100 | 100 | m_isa_device[i] = NULL; |
| 101 | 101 | } |
| 102 | ||
| 102 | ||
| 103 | 103 | //------------------------------------------------- |
| 104 | 104 | // device_start - device-specific startup |
| 105 | 105 | //------------------------------------------------- |
| 106 | ||
| 106 | ||
| 107 | 107 | void isa8_device::device_start() |
| 108 | 108 | { |
| 109 | 109 | // resolve callbacks |
| r11247 | r11248 | |
| 117 | 117 | devcb_resolve_write_line(&m_out_drq2_func, &m_config.m_out_drq2_func, this); |
| 118 | 118 | devcb_resolve_write_line(&m_out_drq3_func, &m_config.m_out_drq3_func, this); |
| 119 | 119 | } |
| 120 | ||
| 120 | ||
| 121 | 121 | //------------------------------------------------- |
| 122 | 122 | // device_reset - device-specific reset |
| 123 | 123 | //------------------------------------------------- |
| 124 | ||
| 124 | ||
| 125 | 125 | void isa8_device::device_reset() |
| 126 | 126 | { |
| 127 | 127 | } |
| r11247 | r11248 | |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | void 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 | { | |
| 136 | 136 | int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width; |
| 137 | 137 | switch(buswidth) |
| 138 | 138 | { |
| r11247 | r11248 | |
| 158 | 158 | void 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) |
| 159 | 159 | { |
| 160 | 160 | astring tempstring; |
| 161 | address_space *space = m_maincpu->memory().space(AS_PROGRAM); | |
| 161 | address_space *space = m_maincpu->memory().space(AS_PROGRAM); | |
| 162 | 162 | 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); | |
| 164 | 164 | memory_set_bankptr(machine(), tag, machine().region(dev->subtag(tempstring, region))->base()); |
| 165 | 165 | } |
| 166 | 166 | |
| r11247 | r11248 | |
| 177 | 177 | WRITE_LINE_MEMBER( isa8_device::drq2_w ) { devcb_call_write_line(&m_out_drq2_func, state); } |
| 178 | 178 | WRITE_LINE_MEMBER( isa8_device::drq3_w ) { devcb_call_write_line(&m_out_drq3_func, state); } |
| 179 | 179 | |
| 180 | UINT8 isa8_device::dack_r(int line) | |
| 180 | UINT8 isa8_device::dack_r(int line) | |
| 181 | 181 | { |
| 182 | 182 | UINT8 retVal = 0xff; |
| 183 | 183 | for(int i=0;i<8;i++) { |
| 184 | 184 | if (m_isa_device[i] != NULL && m_isa_device[i]->have_dack(line)) { |
| 185 | 185 | retVal = m_isa_device[i]->dack_r(line); |
| 186 | } | |
| 186 | } | |
| 187 | 187 | } |
| 188 | 188 | return retVal; |
| 189 | 189 | } |
| r11247 | r11248 | |
| 193 | 193 | for(int i=0;i<8;i++) { |
| 194 | 194 | if (m_isa_device[i] != NULL && m_isa_device[i]->have_dack(line)) { |
| 195 | 195 | m_isa_device[i]->dack_w(line,data); |
| 196 | } | |
| 196 | } | |
| 197 | 197 | } |
| 198 | 198 | } |
| 199 | 199 | |
| r11247 | r11248 | |
| 214 | 214 | //------------------------------------------------- |
| 215 | 215 | |
| 216 | 216 | device_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) | |
| 218 | 218 | { |
| 219 | 219 | } |
| 220 | 220 | |
| r11247 | r11248 | |
| 227 | 227 | { |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | void device_config_isa8_card_interface::static_set_isa8_tag(device_config *device, const char *tag) | |
| 230 | void device_config_isa8_card_interface::static_set_isa8_tag(device_config *device, const char *tag) | |
| 231 | 231 | { |
| 232 | 232 | device_config_isa8_card_interface *isa_card = dynamic_cast<device_config_isa8_card_interface *>(device); |
| 233 | 233 | isa_card->m_isa_tag = tag; |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | #pragma once |
| 2 | ||
| 2 | ||
| 3 | 3 | #ifndef __ISA_SOUND_BLASTER_H__ |
| 4 | 4 | #define __ISA_SOUND_BLASTER_H__ |
| 5 | ||
| 5 | ||
| 6 | 6 | #include "emu.h" |
| 7 | 7 | #include "machine/isa.h" |
| 8 | 8 | |
| 9 | 9 | //************************************************************************** |
| 10 | 10 | // TYPE DEFINITIONS |
| 11 | 11 | //************************************************************************** |
| 12 | ||
| 12 | ||
| 13 | 13 | // ======================> isa8_sblaster_device_config |
| 14 | ||
| 15 | class isa8_sblaster_device_config : | |
| 14 | ||
| 15 | class isa8_sblaster_device_config : | |
| 16 | 16 | public device_config, |
| 17 | 17 | public device_config_isa8_card_interface |
| 18 | 18 | { |
| 19 | 19 | friend class isa8_device; |
| 20 | 20 | friend class isa8_sblaster_device; |
| 21 | ||
| 21 | ||
| 22 | 22 | // construction/destruction |
| 23 | 23 | isa8_sblaster_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 24 | ||
| 24 | ||
| 25 | 25 | public: |
| 26 | 26 | // allocators |
| 27 | 27 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 28 | 28 | virtual device_t *alloc_device(running_machine &machine) const; |
| 29 | ||
| 29 | ||
| 30 | 30 | // optional information overrides |
| 31 | 31 | virtual machine_config_constructor device_mconfig_additions() const; |
| 32 | 32 | }; |
| 33 | ||
| 34 | ||
| 33 | ||
| 34 | ||
| 35 | 35 | // ======================> isa8_sblaster_device |
| 36 | ||
| 37 | class isa8_sblaster_device : | |
| 36 | ||
| 37 | class isa8_sblaster_device : | |
| 38 | 38 | public device_t, |
| 39 | 39 | public device_isa8_card_interface |
| 40 | 40 | { |
| 41 | 41 | friend class isa8_sblaster_device_config; |
| 42 | ||
| 42 | ||
| 43 | 43 | // construction/destruction |
| 44 | 44 | isa8_sblaster_device(running_machine &_machine, const isa8_sblaster_device_config &config); |
| 45 | 45 | |
| r11247 | r11248 | |
| 51 | 51 | private: |
| 52 | 52 | // internal state |
| 53 | 53 | const isa8_sblaster_device_config &m_config; |
| 54 | public: | |
| 55 | required_device<isa8_device> m_isa; | |
| 54 | public: | |
| 55 | required_device<isa8_device> m_isa; | |
| 56 | 56 | }; |
| 57 | ||
| 58 | ||
| 57 | ||
| 58 | ||
| 59 | 59 | // device type definition |
| 60 | 60 | extern const device_type ISA8_SOUND_BLASTER_1_0; |
| 61 | 61 |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /* |
| 2 | 2 | |
| 3 | ||
| 3 | Luxor ABC 830 | |
| 4 | 4 | |
| 5 | 5 | Type Size Tracks Sides Sectors/track Sectors Speed Drives |
| 6 | 6 |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | ||
| 2 | ||
| 3 | 3 | ISA bus device |
| 4 | ||
| 5 | 4 | |
| 6 | 8 bit ISA bus connector: | |
| 7 | 5 | |
| 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: | |
| 39 | 7 | |
| 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 | ||
| 40 | 40 | ***************************************************************************/ |
| 41 | ||
| 41 | ||
| 42 | 42 | #pragma once |
| 43 | ||
| 43 | ||
| 44 | 44 | #ifndef __ISA_H__ |
| 45 | 45 | #define __ISA_H__ |
| 46 | ||
| 46 | ||
| 47 | 47 | #include "emu.h" |
| 48 | ||
| 49 | ||
| 48 | ||
| 49 | ||
| 50 | 50 | //************************************************************************** |
| 51 | 51 | // INTERFACE CONFIGURATION MACROS |
| 52 | 52 | //************************************************************************** |
| 53 | ||
| 53 | ||
| 54 | 54 | #define MCFG_ISA8_BUS_ADD(_tag, _cputag, _config) \ |
| 55 | 55 | MCFG_DEVICE_ADD(_tag, ISA8, 0) \ |
| 56 | 56 | MCFG_DEVICE_CONFIG(_config) \ |
| 57 | 57 | isa8_device_config::static_set_cputag(device, _cputag); \ |
| 58 | ||
| 58 | ||
| 59 | 59 | #define MCFG_ISA8_BUS_DEVICE(_isatag, _num, _tag, _dev_type) \ |
| 60 | 60 | MCFG_DEVICE_ADD(_tag, _dev_type, 0) \ |
| 61 | 61 | device_config_isa8_card_interface::static_set_isa8_tag(device, _isatag); \ |
| 62 | 62 | device_config_isa8_card_interface::static_set_isa8_num(device, _num); \ |
| 63 | 63 | |
| 64 | ||
| 64 | ||
| 65 | 65 | //************************************************************************** |
| 66 | 66 | // TYPE DEFINITIONS |
| 67 | 67 | //************************************************************************** |
| r11247 | r11248 | |
| 84 | 84 | |
| 85 | 85 | |
| 86 | 86 | // ======================> isa8_device_config |
| 87 | ||
| 87 | ||
| 88 | 88 | class isa8_device_config : public device_config, |
| 89 | 89 | public isabus_interface |
| 90 | 90 | { |
| 91 | 91 | friend class isa8_device; |
| 92 | ||
| 92 | ||
| 93 | 93 | // construction/destruction |
| 94 | 94 | isa8_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 95 | ||
| 95 | ||
| 96 | 96 | public: |
| 97 | 97 | // allocators |
| 98 | 98 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 99 | 99 | virtual device_t *alloc_device(running_machine &machine) const; |
| 100 | ||
| 100 | ||
| 101 | 101 | // inline configuration |
| 102 | 102 | static void static_set_cputag(device_config *device, const char *tag); |
| 103 | ||
| 103 | ||
| 104 | 104 | const char *m_cputag; |
| 105 | 105 | |
| 106 | 106 | protected: |
| r11247 | r11248 | |
| 108 | 108 | virtual void device_config_complete(); |
| 109 | 109 | |
| 110 | 110 | }; |
| 111 | ||
| 112 | ||
| 111 | ||
| 112 | ||
| 113 | 113 | // ======================> isa8_device |
| 114 | 114 | class device_isa8_card_interface; |
| 115 | 115 | class isa8_device : public device_t |
| 116 | 116 | { |
| 117 | 117 | friend class isa8_device_config; |
| 118 | ||
| 118 | ||
| 119 | 119 | // construction/destruction |
| 120 | 120 | isa8_device(running_machine &_machine, const isa8_device_config &config); |
| 121 | 121 | public: |
| r11247 | r11248 | |
| 143 | 143 | // device-level overrides |
| 144 | 144 | virtual void device_start(); |
| 145 | 145 | virtual void device_reset(); |
| 146 | ||
| 146 | ||
| 147 | 147 | private: |
| 148 | 148 | // internal state |
| 149 | 149 | const isa8_device_config &m_config; |
| r11247 | r11248 | |
| 160 | 160 | devcb_resolved_write_line m_out_drq1_func; |
| 161 | 161 | devcb_resolved_write_line m_out_drq2_func; |
| 162 | 162 | devcb_resolved_write_line m_out_drq3_func; |
| 163 | ||
| 163 | ||
| 164 | 164 | device_isa8_card_interface *m_isa_device[8]; |
| 165 | 165 | }; |
| 166 | ||
| 167 | ||
| 166 | ||
| 167 | ||
| 168 | 168 | // device type definition |
| 169 | 169 | extern const device_type ISA8; |
| 170 | ||
| 171 | 170 | |
| 171 | ||
| 172 | 172 | // ======================> device_config_isa8_card_interface |
| 173 | 173 | |
| 174 | 174 | // class representing interface-specific configuration isa8 card |
| r11247 | r11248 | |
| 182 | 182 | virtual ~device_config_isa8_card_interface(); |
| 183 | 183 | // inline configuration |
| 184 | 184 | 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); | |
| 186 | 186 | |
| 187 | 187 | protected: |
| 188 | 188 | const char *m_isa_tag; |
| r11247 | r11248 | |
| 205 | 205 | |
| 206 | 206 | // configuration access |
| 207 | 207 | const device_config_isa8_card_interface &isa8_card_config() const { return m_isa8_card_config; } |
| 208 | ||
| 208 | ||
| 209 | 209 | virtual UINT8 dack_r(int line); |
| 210 | 210 | virtual void dack_w(int line,UINT8 data); |
| 211 | 211 | virtual void eop_w(int state); |
| 212 | 212 | virtual bool have_dack(int line); |
| 213 | 213 | protected: |
| 214 | 214 | // 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 | |
| 216 | 216 | |
| 217 | 217 | }; |
| 218 | ||
| 218 | ||
| 219 | 219 | #endif /* __ISA_H__ */ |
| r11247 | r11248 | |
|---|---|---|
| 192 | 192 | m_sw1 = intf->m_sw1; |
| 193 | 193 | m_drive_type = intf->m_drive_type; |
| 194 | 194 | m_s1 = intf->m_s1; |
| 195 | ||
| 195 | ||
| 196 | 196 | m_shortname = "lux10828"; |
| 197 | 197 | } |
| 198 | 198 | |
| r11247 | r11248 | |
| 526 | 526 | //************************************************************************** |
| 527 | 527 | |
| 528 | 528 | //------------------------------------------------- |
| 529 | // | |
| 529 | // abcbus_cs - | |
| 530 | 530 | //------------------------------------------------- |
| 531 | 531 | |
| 532 | 532 | void luxor_55_10828_device::abcbus_cs(UINT8 data) |
| r11247 | r11248 | |
| 538 | 538 | |
| 539 | 539 | |
| 540 | 540 | //------------------------------------------------- |
| 541 | // abcbus_rst - | |
| 541 | // abcbus_rst - | |
| 542 | 542 | //------------------------------------------------- |
| 543 | 543 | |
| 544 | 544 | void luxor_55_10828_device::abcbus_rst(int state) |
| r11247 | r11248 | |
| 551 | 551 | |
| 552 | 552 | |
| 553 | 553 | //------------------------------------------------- |
| 554 | // abcbus_stat - | |
| 554 | // abcbus_stat - | |
| 555 | 555 | //------------------------------------------------- |
| 556 | 556 | |
| 557 | 557 | UINT8 luxor_55_10828_device::abcbus_stat() |
| r11247 | r11248 | |
| 568 | 568 | |
| 569 | 569 | |
| 570 | 570 | //------------------------------------------------- |
| 571 | // abcbus_inp - | |
| 571 | // abcbus_inp - | |
| 572 | 572 | //------------------------------------------------- |
| 573 | 573 | |
| 574 | 574 | UINT8 luxor_55_10828_device::abcbus_inp() |
| r11247 | r11248 | |
| 591 | 591 | |
| 592 | 592 | |
| 593 | 593 | //------------------------------------------------- |
| 594 | // abcbus_utp - | |
| 594 | // abcbus_utp - | |
| 595 | 595 | //------------------------------------------------- |
| 596 | 596 | |
| 597 | 597 | void luxor_55_10828_device::abcbus_utp(UINT8 data) |
| r11247 | r11248 | |
| 609 | 609 | |
| 610 | 610 | |
| 611 | 611 | //------------------------------------------------- |
| 612 | // abcbus_c1 - | |
| 612 | // abcbus_c1 - | |
| 613 | 613 | //------------------------------------------------- |
| 614 | 614 | |
| 615 | 615 | void luxor_55_10828_device::abcbus_c1(UINT8 data) |
| r11247 | r11248 | |
| 623 | 623 | |
| 624 | 624 | |
| 625 | 625 | //------------------------------------------------- |
| 626 | // abcbus_c3 - | |
| 626 | // abcbus_c3 - | |
| 627 | 627 | //------------------------------------------------- |
| 628 | 628 | |
| 629 | 629 | void luxor_55_10828_device::abcbus_c3(UINT8 data) |
| r11247 | r11248 | |
| 642 | 642 | //************************************************************************** |
| 643 | 643 | |
| 644 | 644 | //------------------------------------------------- |
| 645 | // ctrl_w - | |
| 645 | // ctrl_w - | |
| 646 | 646 | //------------------------------------------------- |
| 647 | 647 | |
| 648 | 648 | WRITE8_MEMBER( luxor_55_10828_device::ctrl_w ) |
| r11247 | r11248 | |
| 688 | 688 | |
| 689 | 689 | |
| 690 | 690 | //------------------------------------------------- |
| 691 | // status_w - | |
| 691 | // status_w - | |
| 692 | 692 | //------------------------------------------------- |
| 693 | 693 | |
| 694 | 694 | WRITE8_MEMBER( luxor_55_10828_device::status_w ) |
| r11247 | r11248 | |
| 716 | 716 | |
| 717 | 717 | |
| 718 | 718 | //------------------------------------------------- |
| 719 | // fdc_r - | |
| 719 | // fdc_r - | |
| 720 | 720 | //------------------------------------------------- |
| 721 | 721 | |
| 722 | 722 | READ8_MEMBER( luxor_55_10828_device::fdc_r ) |
| r11247 | r11248 | |
| 743 | 743 | |
| 744 | 744 | |
| 745 | 745 | //------------------------------------------------- |
| 746 | // fdc_w - | |
| 746 | // fdc_w - | |
| 747 | 747 | //------------------------------------------------- |
| 748 | 748 | |
| 749 | 749 | WRITE8_MEMBER( luxor_55_10828_device::fdc_w ) |
| r11247 | r11248 | |
|---|---|---|
| 117 | 117 | devcb_resolved_read8 in_pc_func; |
| 118 | 118 | devcb_resolved_write8 out_pc_func; |
| 119 | 119 | 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 | ||
| 122 | 122 | UINT8 port_a, ddr_a, in_a; |
| 123 | 123 | UINT8 port_b, ddr_b, in_b; |
| 124 | 124 | UINT8 port_c, ddr_c, in_c; |
| r11247 | r11248 | |
|---|---|---|
| 95 | 95 | protected: |
| 96 | 96 | // device_config overrides |
| 97 | 97 | virtual void device_config_complete(); |
| 98 | ||
| 98 | ||
| 99 | 99 | private: |
| 100 | 100 | UINT8 m_sw1; // single/double sided/density |
| 101 | 101 | UINT8 m_drive_type; // drive type |
| r11247 | r11248 | |
| 106 | 106 | // ======================> luxor_55_10828_device |
| 107 | 107 | |
| 108 | 108 | class luxor_55_10828_device : public device_t, |
| 109 | public device_abcbus_interface | |
| 109 | public device_abcbus_interface | |
| 110 | 110 | { |
| 111 | 111 | friend class luxor_55_10828_device_config; |
| 112 | 112 | |
| r11247 | r11248 | |
| 131 | 131 | // device-level overrides |
| 132 | 132 | virtual void device_start(); |
| 133 | 133 | virtual void device_reset(); |
| 134 | ||
| 134 | ||
| 135 | 135 | // device_abcbus_interface overrides |
| 136 | 136 | virtual void abcbus_cs(UINT8 data); |
| 137 | 137 | virtual void abcbus_rst(int state); |
| r11247 | r11248 | |
|---|---|---|
| 1053 | 1053 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1054 | 1054 | case DEVINFO_STR_NAME: strcpy(info->s, "Commodore 1571"); break; |
| 1055 | 1055 | case DEVINFO_STR_SHORTNAME: strcpy(info->s, "c1571"); break; |
| 1056 | ||
| 1056 | ||
| 1057 | 1057 | default: DEVICE_GET_INFO_CALL(c1570); break; |
| 1058 | 1058 | } |
| 1059 | 1059 | } |
| r11247 | r11248 | |
| 1073 | 1073 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1074 | 1074 | case DEVINFO_STR_NAME: strcpy(info->s, "Commodore 1571CR"); break; |
| 1075 | 1075 | case DEVINFO_STR_SHORTNAME: strcpy(info->s, "c1571cr"); break; |
| 1076 | ||
| 1076 | ||
| 1077 | 1077 | default: DEVICE_GET_INFO_CALL(c1570); break; |
| 1078 | 1078 | } |
| 1079 | 1079 | } |
| r11247 | r11248 | |
|---|---|---|
| 307 | 307 | { |
| 308 | 308 | return INPUT_PORTS_NAME( abc77 ); |
| 309 | 309 | } |
| 310 | ||
| 311 | 310 | |
| 312 | 311 | |
| 312 | ||
| 313 | 313 | //************************************************************************** |
| 314 | 314 | // INLINE HELPERS |
| 315 | 315 | //************************************************************************** |
| r11247 | r11248 | |
| 420 | 420 | case TIMER_SERIAL: |
| 421 | 421 | serial_clock(); |
| 422 | 422 | break; |
| 423 | ||
| 423 | ||
| 424 | 424 | case TIMER_RESET: |
| 425 | 425 | device_set_input_line(m_maincpu, INPUT_LINE_RESET, CLEAR_LINE); |
| 426 | 426 | break; |
| r11247 | r11248 | |
| 435 | 435 | READ8_MEMBER( abc77_device::p1_r ) |
| 436 | 436 | { |
| 437 | 437 | /* |
| 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 | */ | |
| 451 | 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 | */ | |
| 451 | ||
| 452 | 452 | static const char *const keynames[] = { "X0", "X1", "X2", "X3", "X4", "X5", "X6", "X7", "X8", "X9", "X10", "X11" }; |
| 453 | 453 | |
| 454 | 454 | return input_port_read(this, keynames[m_keylatch]); |
| r11247 | r11248 | |
| 462 | 462 | WRITE8_MEMBER( abc77_device::p2_w ) |
| 463 | 463 | { |
| 464 | 464 | /* |
| 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 | */ | |
| 478 | 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 | */ | |
| 478 | ||
| 479 | 479 | m_keylatch = data & 0x0f; |
| 480 | 480 | |
| 481 | 481 | if (m_keylatch == 1) |
| r11247 | r11248 | |
|---|---|---|
| 26 | 26 | static READ8_DEVICE_HANDLER( ym3812_16_r ) |
| 27 | 27 | { |
| 28 | 28 | UINT8 retVal = 0xff; |
| 29 | switch(offset) | |
| 29 | switch(offset) | |
| 30 | 30 | { |
| 31 | 31 | case 0 : retVal = ym3812_status_port_r( device, offset ); break; |
| 32 | 32 | } |
| r11247 | r11248 | |
| 35 | 35 | |
| 36 | 36 | static WRITE8_DEVICE_HANDLER( ym3812_16_w ) |
| 37 | 37 | { |
| 38 | switch(offset) | |
| 38 | switch(offset) | |
| 39 | 39 | { |
| 40 | 40 | case 0 : ym3812_control_port_w( device, offset, data ); break; |
| 41 | 41 | case 1 : ym3812_write_port_w( device, offset, data ); break; |
| r11247 | r11248 | |
| 45 | 45 | //************************************************************************** |
| 46 | 46 | // GLOBAL VARIABLES |
| 47 | 47 | //************************************************************************** |
| 48 | ||
| 48 | ||
| 49 | 49 | const device_type ISA8_ADLIB = isa8_adlib_device_config::static_alloc_device_config; |
| 50 | ||
| 50 | ||
| 51 | 51 | //************************************************************************** |
| 52 | 52 | // DEVICE CONFIGURATION |
| 53 | 53 | //************************************************************************** |
| 54 | ||
| 54 | ||
| 55 | 55 | //------------------------------------------------- |
| 56 | 56 | // isa8_adlib_device_config - constructor |
| 57 | 57 | //------------------------------------------------- |
| 58 | ||
| 58 | ||
| 59 | 59 | isa8_adlib_device_config::isa8_adlib_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 60 | 60 | : device_config(mconfig, static_alloc_device_config, "ISA8_ADLIB", tag, owner, clock), |
| 61 | 61 | device_config_isa8_card_interface(mconfig, *this) |
| 62 | 62 | { |
| 63 | 63 | } |
| 64 | ||
| 64 | ||
| 65 | 65 | //------------------------------------------------- |
| 66 | 66 | // static_alloc_device_config - allocate a new |
| 67 | 67 | // configuration object |
| 68 | 68 | //------------------------------------------------- |
| 69 | ||
| 69 | ||
| 70 | 70 | device_config *isa8_adlib_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 71 | 71 | { |
| 72 | 72 | return global_alloc(isa8_adlib_device_config(mconfig, tag, owner, clock)); |
| 73 | 73 | } |
| 74 | ||
| 74 | ||
| 75 | 75 | //------------------------------------------------- |
| 76 | 76 | // alloc_device - allocate a new device object |
| 77 | 77 | //------------------------------------------------- |
| 78 | ||
| 78 | ||
| 79 | 79 | device_t *isa8_adlib_device_config::alloc_device(running_machine &machine) const |
| 80 | 80 | { |
| 81 | 81 | return auto_alloc(machine, isa8_adlib_device(machine, *this)); |
| 82 | 82 | } |
| 83 | ||
| 83 | ||
| 84 | 84 | //------------------------------------------------- |
| 85 | 85 | // machine_config_additions - device-specific |
| 86 | 86 | // machine configurations |
| r11247 | r11248 | |
| 94 | 94 | //************************************************************************** |
| 95 | 95 | // LIVE DEVICE |
| 96 | 96 | //************************************************************************** |
| 97 | ||
| 97 | ||
| 98 | 98 | //------------------------------------------------- |
| 99 | 99 | // isa8_adlib_device - constructor |
| 100 | 100 | //------------------------------------------------- |
| 101 | ||
| 101 | ||
| 102 | 102 | isa8_adlib_device::isa8_adlib_device(running_machine &_machine, const isa8_adlib_device_config &config) : |
| 103 | 103 | device_t(_machine, config), |
| 104 | 104 | device_isa8_card_interface( _machine, config, *this ), |
| r11247 | r11248 | |
| 106 | 106 | m_isa(*owner(),config.m_isa_tag) |
| 107 | 107 | { |
| 108 | 108 | } |
| 109 | ||
| 109 | ||
| 110 | 110 | //------------------------------------------------- |
| 111 | 111 | // device_start - device-specific startup |
| 112 | 112 | //------------------------------------------------- |
| 113 | ||
| 113 | ||
| 114 | 114 | void isa8_adlib_device::device_start() |
| 115 | { | |
| 115 | { | |
| 116 | 116 | 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) ); | |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | //------------------------------------------------- |
| 121 | 121 | // device_reset - device-specific reset |
| 122 | 122 | //------------------------------------------------- |
| 123 | ||
| 123 | ||
| 124 | 124 | void isa8_adlib_device::device_reset() |
| 125 | 125 | { |
| 126 | 126 | } |
| r11247 | r11248 | |
|---|---|---|
| 3 | 3 | Epson TF-20 |
| 4 | 4 | |
| 5 | 5 | Dual floppy drive with HX-20 factory option |
| 6 | ||
| 7 | 6 | |
| 7 | ||
| 8 | 8 | Status: Boots from system disk, missing ??PD7201 emulation |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | #pragma once |
| 2 | ||
| 2 | ||
| 3 | 3 | #ifndef __ISA_ADLIB_H__ |
| 4 | 4 | #define __ISA_ADLIB_H__ |
| 5 | ||
| 5 | ||
| 6 | 6 | #include "emu.h" |
| 7 | 7 | #include "machine/isa.h" |
| 8 | 8 | |
| 9 | 9 | //************************************************************************** |
| 10 | 10 | // TYPE DEFINITIONS |
| 11 | 11 | //************************************************************************** |
| 12 | ||
| 12 | ||
| 13 | 13 | // ======================> isa8_adlib_device_config |
| 14 | ||
| 15 | class isa8_adlib_device_config : | |
| 14 | ||
| 15 | class isa8_adlib_device_config : | |
| 16 | 16 | public device_config, |
| 17 | 17 | public device_config_isa8_card_interface |
| 18 | 18 | { |
| 19 | 19 | friend class isa8_device; |
| 20 | 20 | friend class isa8_adlib_device; |
| 21 | ||
| 21 | ||
| 22 | 22 | // construction/destruction |
| 23 | 23 | isa8_adlib_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 24 | ||
| 24 | ||
| 25 | 25 | public: |
| 26 | 26 | // allocators |
| 27 | 27 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 28 | 28 | virtual device_t *alloc_device(running_machine &machine) const; |
| 29 | ||
| 29 | ||
| 30 | 30 | // optional information overrides |
| 31 | 31 | virtual machine_config_constructor device_mconfig_additions() const; |
| 32 | 32 | }; |
| 33 | ||
| 34 | ||
| 33 | ||
| 34 | ||
| 35 | 35 | // ======================> isa8_adlib_device |
| 36 | ||
| 37 | class isa8_adlib_device : | |
| 36 | ||
| 37 | class isa8_adlib_device : | |
| 38 | 38 | public device_t, |
| 39 | 39 | public device_isa8_card_interface |
| 40 | 40 | { |
| 41 | 41 | friend class isa8_adlib_device_config; |
| 42 | ||
| 42 | ||
| 43 | 43 | // construction/destruction |
| 44 | 44 | isa8_adlib_device(running_machine &_machine, const isa8_adlib_device_config &config); |
| 45 | 45 | |
| r11247 | r11248 | |
| 51 | 51 | private: |
| 52 | 52 | // internal state |
| 53 | 53 | const isa8_adlib_device_config &m_config; |
| 54 | public: | |
| 55 | required_device<isa8_device> m_isa; | |
| 54 | public: | |
| 55 | required_device<isa8_device> m_isa; | |
| 56 | 56 | }; |
| 57 | ||
| 58 | ||
| 57 | ||
| 58 | ||
| 59 | 59 | // device type definition |
| 60 | 60 | extern const device_type ISA8_ADLIB; |
| 61 | 61 |
| r11247 | r11248 | |
|---|---|---|
| 140 | 140 | static emu_file *nvram_system_fopen( running_machine &machine, UINT32 openflags, const char *name) |
| 141 | 141 | { |
| 142 | 142 | 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"); | |
| 144 | 144 | 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)); | |
| 146 | 146 | astring_free( fname); |
| 147 | 147 | return (filerr == FILERR_NONE) ? file : NULL; |
| 148 | 148 | } |
| r11247 | r11248 | |
|---|---|---|
| 549 | 549 | WRITE8_DEVICE_HANDLER(c64_m6510_port_write) |
| 550 | 550 | { |
| 551 | 551 | c64_state *state = device->machine().driver_data<c64_state>(); |
| 552 | ||
| 552 | ||
| 553 | 553 | UINT8 direction = offset; // HACK ALERT! |
| 554 | 554 | |
| 555 | 555 | /* if line is marked as input then keep current value */ |
| r11247 | r11248 | |
|---|---|---|
| 22 | 22 | MCFG_SOUND_ADD("saa1099.1", SAA1099, 4772720) |
| 23 | 23 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "gblaster:mono", 0.50) |
| 24 | 24 | 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) | |
| 26 | 26 | MACHINE_CONFIG_END |
| 27 | 27 | |
| 28 | 28 | static READ8_DEVICE_HANDLER( saa1099_16_r ) |
| r11247 | r11248 | |
| 32 | 32 | |
| 33 | 33 | static WRITE8_DEVICE_HANDLER( saa1099_16_w ) |
| 34 | 34 | { |
| 35 | switch(offset) | |
| 35 | switch(offset) | |
| 36 | 36 | { |
| 37 | 37 | case 0 : saa1099_control_w( device, offset, data ); break; |
| 38 | 38 | case 1 : saa1099_data_w( device, offset, data ); break; |
| r11247 | r11248 | |
| 42 | 42 | //************************************************************************** |
| 43 | 43 | // GLOBAL VARIABLES |
| 44 | 44 | //************************************************************************** |
| 45 | ||
| 45 | ||
| 46 | 46 | const device_type ISA8_GAME_BLASTER = isa8_gblaster_device_config::static_alloc_device_config; |
| 47 | ||
| 47 | ||
| 48 | 48 | //************************************************************************** |
| 49 | 49 | // DEVICE CONFIGURATION |
| 50 | 50 | //************************************************************************** |
| 51 | ||
| 51 | ||
| 52 | 52 | //------------------------------------------------- |
| 53 | 53 | // isa8_gblaster_device_config - constructor |
| 54 | 54 | //------------------------------------------------- |
| 55 | ||
| 55 | ||
| 56 | 56 | isa8_gblaster_device_config::isa8_gblaster_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 57 | 57 | : device_config(mconfig, static_alloc_device_config, "ISA8_GAME_BLASTER", tag, owner, clock), |
| 58 | 58 | device_config_isa8_card_interface(mconfig, *this) |
| 59 | 59 | { |
| 60 | 60 | } |
| 61 | ||
| 61 | ||
| 62 | 62 | //------------------------------------------------- |
| 63 | 63 | // static_alloc_device_config - allocate a new |
| 64 | 64 | // configuration object |
| 65 | 65 | //------------------------------------------------- |
| 66 | ||
| 66 | ||
| 67 | 67 | device_config *isa8_gblaster_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 68 | 68 | { |
| 69 | 69 | return global_alloc(isa8_gblaster_device_config(mconfig, tag, owner, clock)); |
| 70 | 70 | } |
| 71 | ||
| 71 | ||
| 72 | 72 | //------------------------------------------------- |
| 73 | 73 | // alloc_device - allocate a new device object |
| 74 | 74 | //------------------------------------------------- |
| 75 | ||
| 75 | ||
| 76 | 76 | device_t *isa8_gblaster_device_config::alloc_device(running_machine &machine) const |
| 77 | 77 | { |
| 78 | 78 | return auto_alloc(machine, isa8_gblaster_device(machine, *this)); |
| 79 | 79 | } |
| 80 | ||
| 80 | ||
| 81 | 81 | //------------------------------------------------- |
| 82 | 82 | // machine_config_additions - device-specific |
| 83 | 83 | // machine configurations |
| r11247 | r11248 | |
| 91 | 91 | //************************************************************************** |
| 92 | 92 | // LIVE DEVICE |
| 93 | 93 | //************************************************************************** |
| 94 | ||
| 94 | ||
| 95 | 95 | //------------------------------------------------- |
| 96 | 96 | // isa8_gblaster_device - constructor |
| 97 | 97 | //------------------------------------------------- |
| 98 | ||
| 98 | ||
| 99 | 99 | isa8_gblaster_device::isa8_gblaster_device(running_machine &_machine, const isa8_gblaster_device_config &config) : |
| 100 | 100 | device_t(_machine, config), |
| 101 | 101 | device_isa8_card_interface( _machine, config, *this ), |
| r11247 | r11248 | |
| 103 | 103 | m_isa(*owner(),config.m_isa_tag) |
| 104 | 104 | { |
| 105 | 105 | } |
| 106 | ||
| 106 | ||
| 107 | 107 | //------------------------------------------------- |
| 108 | 108 | // device_start - device-specific startup |
| 109 | 109 | //------------------------------------------------- |
| 110 | ||
| 110 | ||
| 111 | 111 | void 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); | |
| 114 | 114 | m_isa->install_device(subdevice("saa1099.1"), 0x0220, 0x0221, 0, 0, FUNC(saa1099_16_r), FUNC(saa1099_16_w) ); |
| 115 | 115 | m_isa->install_device(subdevice("saa1099.2"), 0x0222, 0x0223, 0, 0, FUNC(saa1099_16_r), FUNC(saa1099_16_w) ); |
| 116 | 116 | } |
| r11247 | r11248 | |
| 118 | 118 | //------------------------------------------------- |
| 119 | 119 | // device_reset - device-specific reset |
| 120 | 120 | //------------------------------------------------- |
| 121 | ||
| 121 | ||
| 122 | 122 | void isa8_gblaster_device::device_reset() |
| 123 | 123 | { |
| 124 | 124 | } |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | #pragma once |
| 2 | ||
| 2 | ||
| 3 | 3 | #ifndef __ISA_GAME_BLASTER_H__ |
| 4 | 4 | #define __ISA_GAME_BLASTER_H__ |
| 5 | ||
| 5 | ||
| 6 | 6 | #include "emu.h" |
| 7 | 7 | #include "machine/isa.h" |
| 8 | 8 | |
| 9 | 9 | //************************************************************************** |
| 10 | 10 | // TYPE DEFINITIONS |
| 11 | 11 | //************************************************************************** |
| 12 | ||
| 12 | ||
| 13 | 13 | // ======================> isa8_gblaster_device_config |
| 14 | ||
| 15 | class isa8_gblaster_device_config : | |
| 14 | ||
| 15 | class isa8_gblaster_device_config : | |
| 16 | 16 | public device_config, |
| 17 | 17 | public device_config_isa8_card_interface |
| 18 | 18 | { |
| 19 | 19 | friend class isa8_device; |
| 20 | 20 | friend class isa8_gblaster_device; |
| 21 | ||
| 21 | ||
| 22 | 22 | // construction/destruction |
| 23 | 23 | isa8_gblaster_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 24 | ||
| 24 | ||
| 25 | 25 | public: |
| 26 | 26 | // allocators |
| 27 | 27 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 28 | 28 | virtual device_t *alloc_device(running_machine &machine) const; |
| 29 | ||
| 29 | ||
| 30 | 30 | // optional information overrides |
| 31 | 31 | virtual machine_config_constructor device_mconfig_additions() const; |
| 32 | 32 | }; |
| 33 | ||
| 34 | ||
| 33 | ||
| 34 | ||
| 35 | 35 | // ======================> isa8_gblaster_device |
| 36 | ||
| 37 | class isa8_gblaster_device : | |
| 36 | ||
| 37 | class isa8_gblaster_device : | |
| 38 | 38 | public device_t, |
| 39 | 39 | public device_isa8_card_interface |
| 40 | 40 | { |
| 41 | 41 | friend class isa8_gblaster_device_config; |
| 42 | ||
| 42 | ||
| 43 | 43 | // construction/destruction |
| 44 | 44 | isa8_gblaster_device(running_machine &_machine, const isa8_gblaster_device_config &config); |
| 45 | 45 | |
| r11247 | r11248 | |
| 51 | 51 | private: |
| 52 | 52 | // internal state |
| 53 | 53 | const isa8_gblaster_device_config &m_config; |
| 54 | public: | |
| 55 | required_device<isa8_device> m_isa; | |
| 54 | public: | |
| 55 | required_device<isa8_device> m_isa; | |
| 56 | 56 | }; |
| 57 | ||
| 58 | ||
| 57 | ||
| 58 | ||
| 59 | 59 | // device type definition |
| 60 | 60 | extern const device_type ISA8_GAME_BLASTER; |
| 61 | 61 |
| r11247 | r11248 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | TODO: |
| 13 | 13 | |
| 14 | ||
| 14 | - scan timer clock frequency | |
| 15 | 15 | - more accurate emulation of real chip |
| 16 | 16 | |
| 17 | 17 | */ |
| r11247 | r11248 | |
| 170 | 170 | |
| 171 | 171 | |
| 172 | 172 | //------------------------------------------------- |
| 173 | // b_r - | |
| 173 | // b_r - | |
| 174 | 174 | //------------------------------------------------- |
| 175 | 175 | |
| 176 | 176 | UINT16 ay3600_device::b_r() |
| r11247 | r11248 | |
|---|---|---|
| 16 | 16 | bool pc8401a_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) |
| 17 | 17 | { |
| 18 | 18 | m_lcdc->update_screen(&bitmap, &cliprect); |
| 19 | ||
| 19 | ||
| 20 | 20 | return 0; |
| 21 | 21 | } |
| 22 | 22 | |
| r11247 | r11248 | |
| 31 | 31 | m_lcdc->update_screen(&bitmap, &cliprect); |
| 32 | 32 | |
| 33 | 33 | /* |
| 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 | */ | |
| 43 | 43 | |
| 44 | 44 | return 0; |
| 45 | 45 | } |
| r11247 | r11248 | |
| 62 | 62 | { |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | static const mc6845_interface pc8441a_mc6845_interface = | |
| 65 | static const mc6845_interface pc8441a_mc6845_interface = | |
| 66 | 66 | { |
| 67 | 67 | CRT_SCREEN_TAG, |
| 68 | 68 | 6, |
| r11247 | r11248 | |
| 106 | 106 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 107 | 107 | MCFG_SCREEN_SIZE(480, 208) |
| 108 | 108 | MCFG_SCREEN_VISIBLE_AREA(0, 480-1, 0, 200-1) |
| 109 | ||
| 109 | ||
| 110 | 110 | MCFG_SED1330_ADD(SED1330_TAG, 0, SCREEN_TAG, pc8500_lcdc) |
| 111 | 111 | |
| 112 | 112 | /* PC-8441A CRT */ |
| r11247 | r11248 | |
| 116 | 116 | MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*8-1) |
| 117 | 117 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) |
| 118 | 118 | MCFG_SCREEN_REFRESH_RATE(50) |
| 119 | ||
| 119 | ||
| 120 | 120 | MCFG_MC6845_ADD(MC6845_TAG, MC6845, 400000, pc8441a_mc6845_interface) |
| 121 | 121 | MACHINE_CONFIG_END |
| r11247 | r11248 | |
|---|---|---|
| 1496 | 1496 | MCFG_SCREEN_UPDATE(pc_video) |
| 1497 | 1497 | MCFG_SCREEN_REFRESH_RATE(60) |
| 1498 | 1498 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 1499 | ||
| 1499 | ||
| 1500 | 1500 | MCFG_PALETTE_LENGTH(0x100) |
| 1501 | 1501 | MCFG_PALETTE_INIT(vga) |
| 1502 | 1502 |
| r11247 | r11248 | |
|---|---|---|
| 113 | 113 | MCFG_MC6845_ADD( MDA_MC6845_NAME, MC6845, MDA_CLOCK/9, mc6845_mda_intf) |
| 114 | 114 | |
| 115 | 115 | MCFG_GFXDECODE(pcmda) |
| 116 | ||
| 117 | MCFG_PC_LPT_ADD("lpt", pc_lpt_config) | |
| 116 | ||
| 117 | MCFG_PC_LPT_ADD("lpt", pc_lpt_config) | |
| 118 | 118 | MACHINE_CONFIG_END |
| 119 | 119 | |
| 120 | 120 | ROM_START( mda ) |
| r11247 | r11248 | |
| 126 | 126 | //************************************************************************** |
| 127 | 127 | // GLOBAL VARIABLES |
| 128 | 128 | //************************************************************************** |
| 129 | ||
| 129 | ||
| 130 | 130 | const device_type ISA8_MDA = isa8_mda_device_config::static_alloc_device_config; |
| 131 | ||
| 131 | ||
| 132 | 132 | //************************************************************************** |
| 133 | 133 | // DEVICE CONFIGURATION |
| 134 | 134 | //************************************************************************** |
| 135 | ||
| 135 | ||
| 136 | 136 | //------------------------------------------------- |
| 137 | 137 | // isa8_mda_device_config - constructor |
| 138 | 138 | //------------------------------------------------- |
| 139 | ||
| 139 | ||
| 140 | 140 | isa8_mda_device_config::isa8_mda_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 141 | 141 | : device_config(mconfig, static_alloc_device_config, "ISA8_MDA", tag, owner, clock), |
| 142 | 142 | device_config_isa8_card_interface(mconfig, *this) |
| 143 | 143 | { |
| 144 | 144 | m_shortname = "mda"; |
| 145 | 145 | } |
| 146 | ||
| 146 | ||
| 147 | 147 | //------------------------------------------------- |
| 148 | 148 | // static_alloc_device_config - allocate a new |
| 149 | 149 | // configuration object |
| 150 | 150 | //------------------------------------------------- |
| 151 | ||
| 151 | ||
| 152 | 152 | device_config *isa8_mda_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 153 | 153 | { |
| 154 | 154 | return global_alloc(isa8_mda_device_config(mconfig, tag, owner, clock)); |
| 155 | 155 | } |
| 156 | ||
| 156 | ||
| 157 | 157 | //------------------------------------------------- |
| 158 | 158 | // alloc_device - allocate a new device object |
| 159 | 159 | //------------------------------------------------- |
| 160 | ||
| 160 | ||
| 161 | 161 | device_t *isa8_mda_device_config::alloc_device(running_machine &machine) const |
| 162 | 162 | { |
| 163 | 163 | return auto_alloc(machine, isa8_mda_device(machine, *this)); |
| 164 | 164 | } |
| 165 | ||
| 165 | ||
| 166 | 166 | //------------------------------------------------- |
| 167 | 167 | // machine_config_additions - device-specific |
| 168 | 168 | // machine configurations |
| r11247 | r11248 | |
| 185 | 185 | //************************************************************************** |
| 186 | 186 | // LIVE DEVICE |
| 187 | 187 | //************************************************************************** |
| 188 | ||
| 188 | ||
| 189 | 189 | //------------------------------------------------- |
| 190 | 190 | // isa8_mda_device - constructor |
| 191 | 191 | //------------------------------------------------- |
| 192 | ||
| 192 | ||
| 193 | 193 | isa8_mda_device::isa8_mda_device(running_machine &_machine, const isa8_mda_device_config &config) : |
| 194 | 194 | device_t(_machine, config), |
| 195 | 195 | device_isa8_card_interface( _machine, config, *this ), |
| r11247 | r11248 | |
| 197 | 197 | m_isa(*owner(),config.m_isa_tag) |
| 198 | 198 | { |
| 199 | 199 | } |
| 200 | ||
| 200 | ||
| 201 | 201 | //------------------------------------------------- |
| 202 | 202 | // device_start - device-specific startup |
| 203 | 203 | //------------------------------------------------- |
| 204 | ||
| 204 | ||
| 205 | 205 | void isa8_mda_device::device_start() |
| 206 | { | |
| 206 | { | |
| 207 | 207 | m_isa->add_isa_card(this, m_config.m_isa_num); |
| 208 | 208 | videoram = auto_alloc_array(machine(), UINT8, 0x1000); |
| 209 | 209 | 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 | ||
| 212 | 212 | /* Initialise the mda palette */ |
| 213 | 213 | 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]); | |
| 215 | 215 | } |
| 216 | ||
| 216 | ||
| 217 | 217 | //------------------------------------------------- |
| 218 | 218 | // device_reset - device-specific reset |
| 219 | 219 | //------------------------------------------------- |
| 220 | ||
| 220 | ||
| 221 | 221 | void isa8_mda_device::device_reset() |
| 222 | 222 | { |
| 223 | 223 | update_row = NULL; |
| r11247 | r11248 | |
| 225 | 225 | mode_control = 0; |
| 226 | 226 | vsync = 0; |
| 227 | 227 | hsync = 0; |
| 228 | ||
| 228 | ||
| 229 | 229 | astring tempstring; |
| 230 | chr_gen = machine().region(subtag(tempstring, "gfx1"))->base(); | |
| 230 | chr_gen = machine().region(subtag(tempstring, "gfx1"))->base(); | |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | /*************************************************************************** |
| r11247 | r11248 | |
| 492 | 492 | break; |
| 493 | 493 | case 12: case 13: case 14: |
| 494 | 494 | pc_lpt_w(lpt, offset - 12, data); |
| 495 | break; | |
| 495 | break; | |
| 496 | 496 | } |
| 497 | 497 | } |
| 498 | 498 | |
| r11247 | r11248 | |
| 567 | 567 | |
| 568 | 568 | MCFG_GFXDECODE(pcherc) |
| 569 | 569 | |
| 570 | MCFG_PC_LPT_ADD("lpt", pc_lpt_config) | |
| 570 | MCFG_PC_LPT_ADD("lpt", pc_lpt_config) | |
| 571 | 571 | MACHINE_CONFIG_END |
| 572 | 572 | |
| 573 | 573 | ROM_START( hercules ) |
| r11247 | r11248 | |
| 578 | 578 | //************************************************************************** |
| 579 | 579 | // GLOBAL VARIABLES |
| 580 | 580 | //************************************************************************** |
| 581 | ||
| 581 | ||
| 582 | 582 | const device_type ISA8_HERCULES = isa8_hercules_device_config::static_alloc_device_config; |
| 583 | ||
| 583 | ||
| 584 | 584 | //************************************************************************** |
| 585 | 585 | // DEVICE CONFIGURATION |
| 586 | 586 | //************************************************************************** |
| 587 | ||
| 587 | ||
| 588 | 588 | //------------------------------------------------- |
| 589 | 589 | // isa8_mda_device_config - constructor |
| 590 | 590 | //------------------------------------------------- |
| 591 | ||
| 591 | ||
| 592 | 592 | isa8_hercules_device_config::isa8_hercules_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 593 | 593 | : isa8_mda_device_config(mconfig, tag, owner, clock) |
| 594 | 594 | { |
| 595 | 595 | m_shortname = "hercules"; |
| 596 | 596 | } |
| 597 | ||
| 597 | ||
| 598 | 598 | //------------------------------------------------- |
| 599 | 599 | // static_alloc_device_config - allocate a new |
| 600 | 600 | // configuration object |
| 601 | 601 | //------------------------------------------------- |
| 602 | ||
| 602 | ||
| 603 | 603 | device_config *isa8_hercules_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 604 | 604 | { |
| 605 | 605 | return global_alloc(isa8_hercules_device_config(mconfig, tag, owner, clock)); |
| 606 | 606 | } |
| 607 | ||
| 607 | ||
| 608 | 608 | //------------------------------------------------- |
| 609 | 609 | // alloc_device - allocate a new device object |
| 610 | 610 | //------------------------------------------------- |
| 611 | ||
| 611 | ||
| 612 | 612 | device_t *isa8_hercules_device_config::alloc_device(running_machine &machine) const |
| 613 | 613 | { |
| 614 | 614 | return auto_alloc(machine, isa8_hercules_device(machine, *this)); |
| 615 | 615 | } |
| 616 | ||
| 616 | ||
| 617 | 617 | //------------------------------------------------- |
| 618 | 618 | // machine_config_additions - device-specific |
| 619 | 619 | // machine configurations |
| r11247 | r11248 | |
| 636 | 636 | //************************************************************************** |
| 637 | 637 | // LIVE DEVICE |
| 638 | 638 | //************************************************************************** |
| 639 | ||
| 639 | ||
| 640 | 640 | //------------------------------------------------- |
| 641 | 641 | // isa8_hercules_device - constructor |
| 642 | 642 | //------------------------------------------------- |
| 643 | ||
| 643 | ||
| 644 | 644 | isa8_hercules_device::isa8_hercules_device(running_machine &_machine, const isa8_hercules_device_config &config) : |
| 645 | 645 | isa8_mda_device(_machine, config), |
| 646 | 646 | m_config(config) |
| 647 | 647 | { |
| 648 | 648 | } |
| 649 | ||
| 649 | ||
| 650 | 650 | //------------------------------------------------- |
| 651 | 651 | // device_start - device-specific startup |
| 652 | 652 | //------------------------------------------------- |
| 653 | ||
| 653 | ||
| 654 | 654 | void isa8_hercules_device::device_start() |
| 655 | { | |
| 655 | { | |
| 656 | 656 | videoram = auto_alloc_array(machine(), UINT8, 0x10000); |
| 657 | 657 | |
| 658 | 658 | m_isa->install_device(this, 0x3b0, 0x3bf, 0, 0, FUNC(hercules_r), FUNC(hercules_w) ); |
| r11247 | r11248 | |
| 660 | 660 | |
| 661 | 661 | /* Initialise the mda palette */ |
| 662 | 662 | 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]); | |
| 664 | 664 | } |
| 665 | ||
| 665 | ||
| 666 | 666 | //------------------------------------------------- |
| 667 | 667 | // device_reset - device-specific reset |
| 668 | 668 | //------------------------------------------------- |
| 669 | ||
| 669 | ||
| 670 | 670 | void isa8_hercules_device::device_reset() |
| 671 | 671 | { |
| 672 | 672 | isa8_mda_device::device_reset(); |
| 673 | 673 | configuration_switch = 0; |
| 674 | 674 | |
| 675 | 675 | astring tempstring; |
| 676 | chr_gen = machine().region(subtag(tempstring, "gfx1"))->base(); | |
| 676 | chr_gen = machine().region(subtag(tempstring, "gfx1"))->base(); | |
| 677 | 677 | } |
| 678 | 678 | |
| 679 | 679 | /*************************************************************************** |
| r11247 | r11248 | |
| 766 | 766 | static WRITE8_DEVICE_HANDLER ( hercules_w ) |
| 767 | 767 | { |
| 768 | 768 | device_t *devconf = device->subdevice(HERCULES_MC6845_NAME); |
| 769 | device_t *lpt = device->subdevice("lpt"); | |
| 769 | device_t *lpt = device->subdevice("lpt"); | |
| 770 | 770 | switch( offset ) |
| 771 | 771 | { |
| 772 | 772 | case 0: case 2: case 4: case 6: |
| r11247 | r11248 | |
| 780 | 780 | break; |
| 781 | 781 | case 12: case 13: case 14: |
| 782 | 782 | pc_lpt_w(lpt, offset - 12, data); |
| 783 | break; | |
| 783 | break; | |
| 784 | 784 | case 15: |
| 785 | 785 | hercules_config_w(device, offset, data); |
| 786 | 786 | break; |
| r11247 | r11248 | |
| 825 | 825 | /* 12, 13, 14 are the LPT ports */ |
| 826 | 826 | case 12: case 13: case 14: |
| 827 | 827 | data = pc_lpt_r(lpt, offset - 12); |
| 828 | break; | |
| 828 | break; | |
| 829 | 829 | } |
| 830 | 830 | return data; |
| 831 | 831 | } |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | #pragma once |
| 2 | ||
| 2 | ||
| 3 | 3 | #ifndef __ISA_MDA_H__ |
| 4 | 4 | #define __ISA_MDA_H__ |
| 5 | ||
| 5 | ||
| 6 | 6 | #include "emu.h" |
| 7 | 7 | #include "machine/isa.h" |
| 8 | 8 | #include "video/mc6845.h" |
| r11247 | r11248 | |
| 10 | 10 | //************************************************************************** |
| 11 | 11 | // TYPE DEFINITIONS |
| 12 | 12 | //************************************************************************** |
| 13 | ||
| 13 | ||
| 14 | 14 | // ======================> isa8_mda_device_config |
| 15 | ||
| 16 | class isa8_mda_device_config : | |
| 15 | ||
| 16 | class isa8_mda_device_config : | |
| 17 | 17 | public device_config, |
| 18 | 18 | public device_config_isa8_card_interface |
| 19 | 19 | { |
| 20 | 20 | friend class isa8_device; |
| 21 | 21 | friend class isa8_mda_device; |
| 22 | 22 | friend class isa8_hercules_device_config; |
| 23 | ||
| 23 | ||
| 24 | 24 | // construction/destruction |
| 25 | 25 | isa8_mda_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 26 | ||
| 26 | ||
| 27 | 27 | public: |
| 28 | 28 | // allocators |
| 29 | 29 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 30 | 30 | virtual device_t *alloc_device(running_machine &machine) const; |
| 31 | ||
| 31 | ||
| 32 | 32 | // optional information overrides |
| 33 | 33 | 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; | |
| 35 | 35 | }; |
| 36 | ||
| 37 | ||
| 36 | ||
| 37 | ||
| 38 | 38 | // ======================> isa8_mda_device |
| 39 | ||
| 40 | class isa8_mda_device : | |
| 39 | ||
| 40 | class isa8_mda_device : | |
| 41 | 41 | public device_t, |
| 42 | 42 | public device_isa8_card_interface |
| 43 | 43 | { |
| 44 | 44 | friend class isa8_mda_device_config; |
| 45 | friend class isa8_hercules_device_config; | |
| 45 | friend class isa8_hercules_device_config; | |
| 46 | 46 | friend class isa8_hercules_device; |
| 47 | ||
| 47 | ||
| 48 | 48 | // construction/destruction |
| 49 | 49 | isa8_mda_device(running_machine &_machine, const isa8_mda_device_config &config); |
| 50 | 50 | |
| r11247 | r11248 | |
| 56 | 56 | private: |
| 57 | 57 | // internal state |
| 58 | 58 | const isa8_mda_device_config &m_config; |
| 59 | public: | |
| 59 | public: | |
| 60 | 60 | required_device<isa8_device> m_isa; |
| 61 | 61 | int framecnt; |
| 62 | 62 | |
| 63 | 63 | UINT8 mode_control; |
| 64 | ||
| 64 | ||
| 65 | 65 | mc6845_update_row_func update_row; |
| 66 | 66 | UINT8 *chr_gen; |
| 67 | 67 | UINT8 vsync; |
| 68 | 68 | UINT8 hsync; |
| 69 | 69 | UINT8 *videoram; |
| 70 | 70 | }; |
| 71 | ||
| 72 | ||
| 71 | ||
| 72 | ||
| 73 | 73 | // device type definition |
| 74 | 74 | extern const device_type ISA8_MDA; |
| 75 | 75 | |
| 76 | 76 | // ======================> isa8_hercules_device_config |
| 77 | ||
| 78 | class isa8_hercules_device_config : | |
| 77 | ||
| 78 | class isa8_hercules_device_config : | |
| 79 | 79 | public isa8_mda_device_config |
| 80 | 80 | { |
| 81 | 81 | friend class isa8_hercules_device; |
| 82 | 82 | friend class isa8_mda_device; |
| 83 | ||
| 83 | ||
| 84 | 84 | // construction/destruction |
| 85 | 85 | isa8_hercules_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 86 | ||
| 86 | ||
| 87 | 87 | public: |
| 88 | 88 | // allocators |
| 89 | 89 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 90 | 90 | virtual device_t *alloc_device(running_machine &machine) const; |
| 91 | ||
| 91 | ||
| 92 | 92 | // optional information overrides |
| 93 | 93 | 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; | |
| 95 | 95 | }; |
| 96 | ||
| 97 | ||
| 96 | ||
| 97 | ||
| 98 | 98 | // ======================> isa8_hercules_device |
| 99 | ||
| 100 | class isa8_hercules_device : | |
| 99 | ||
| 100 | class isa8_hercules_device : | |
| 101 | 101 | public isa8_mda_device |
| 102 | 102 | { |
| 103 | 103 | friend class isa8_hercules_device_config; |
| 104 | 104 | friend class isa8_mda_device_config; |
| 105 | ||
| 105 | ||
| 106 | 106 | // construction/destruction |
| 107 | 107 | isa8_hercules_device(running_machine &_machine, const isa8_hercules_device_config &config); |
| 108 | 108 | |
| r11247 | r11248 | |
| 110 | 110 | // device-level overrides |
| 111 | 111 | virtual void device_start(); |
| 112 | 112 | virtual void device_reset(); |
| 113 | ||
| 113 | ||
| 114 | 114 | private: |
| 115 | 115 | // internal state |
| 116 | 116 | const isa8_hercules_device_config &m_config; |
| r11247 | r11248 | |
| 118 | 118 | public: |
| 119 | 119 | UINT8 configuration_switch; //hercules |
| 120 | 120 | }; |
| 121 | ||
| 122 | ||
| 121 | ||
| 122 | ||
| 123 | 123 | // device type definition |
| 124 | 124 | extern const device_type ISA8_HERCULES; |
| 125 | 125 |
| r11247 | r11248 | |
|---|---|---|
| 263 | 263 | |
| 264 | 264 | if (LOG_PCIACCESS) |
| 265 | 265 | logerror("cirrus5430_pci_read(): function=%d offset=0x%02X result=0x%04X\n", function, offset, result); |
| 266 | return result; | |
| 266 | return result; | |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 |
| r11247 | r11248 | |
|---|---|---|
| 13 | 13 | |
| 14 | 14 | #define MCFG_CIRRUS_ADD(_tag) \ |
| 15 | 15 | MCFG_DEVICE_ADD(_tag, CIRRUS, 0) \ |
| 16 | ||
| 16 | ||
| 17 | 17 | // ======================> cirrus_device_config |
| 18 | 18 | |
| 19 | 19 | class cirrus_device_config : public device_config |
| r11247 | r11248 | |
| 27 | 27 | // allocators |
| 28 | 28 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 29 | 29 | virtual device_t *alloc_device(running_machine &machine) const; |
| 30 | ||
| 30 | ||
| 31 | 31 | protected: |
| 32 | 32 | // internal state goes here |
| 33 | 33 | }; |
| r11247 | r11248 | |
| 55 | 55 | // internal state |
| 56 | 56 | const cirrus_device_config &m_config; |
| 57 | 57 | |
| 58 | private: | |
| 58 | private: | |
| 59 | 59 | }; |
| 60 | 60 | |
| 61 | 61 |
| r11247 | r11248 | |
|---|---|---|
| 188 | 188 | SCREEN_UPDATE( pcw_printer ) |
| 189 | 189 | { |
| 190 | 190 | pcw_state *state = screen->machine().driver_data<pcw_state>(); |
| 191 | ||
| 191 | ||
| 192 | 192 | // printer output |
| 193 | 193 | rectangle rect; |
| 194 | 194 | INT32 feed; |
| r11247 | r11248 | |
|---|---|---|
| 18 | 18 | - incomplete / unimplemented FIGD / GCHRD draw modes |
| 19 | 19 | - Arc |
| 20 | 20 | - FIGD character |
| 21 | - slanted character | |
| 22 | - GCHRD character (needs rewrite) | |
| 21 | - slanted character | |
| 22 | - GCHRD character (needs rewrite) | |
| 23 | 23 | - read-modify-write cycle |
| 24 | 24 | - read data |
| 25 | 25 | - modify data |
| 26 | 26 | - 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; | |
| 31 | 31 | |
| 32 | 32 | - honor visible area |
| 33 | 33 | - wide mode (32-bit access) |
| r11247 | r11248 | |
| 152 | 152 | // internal 128x14 control ROM |
| 153 | 153 | ROM_START( upd7220 ) |
| 154 | 154 | ROM_REGION( 0x100, "upd7220", 0 ) |
| 155 | ROM_LOAD( "upd7220.bin", 0x000, 0x100, NO_DUMP ) | |
| 155 | ROM_LOAD( "upd7220.bin", 0x000, 0x100, NO_DUMP ) | |
| 156 | 156 | ROM_END |
| 157 | 157 | |
| 158 | 158 | |
| r11247 | r11248 | |
| 246 | 246 | //************************************************************************** |
| 247 | 247 | |
| 248 | 248 | //------------------------------------------------- |
| 249 | // fifo_clear - | |
| 249 | // fifo_clear - | |
| 250 | 250 | //------------------------------------------------- |
| 251 | 251 | |
| 252 | 252 | inline void upd7220_device::fifo_clear() |
| r11247 | r11248 | |
| 266 | 266 | |
| 267 | 267 | |
| 268 | 268 | //------------------------------------------------- |
| 269 | // fifo_param_count - | |
| 269 | // fifo_param_count - | |
| 270 | 270 | //------------------------------------------------- |
| 271 | 271 | |
| 272 | 272 | inline int upd7220_device::fifo_param_count() |
| r11247 | r11248 | |
| 283 | 283 | |
| 284 | 284 | |
| 285 | 285 | //------------------------------------------------- |
| 286 | // fifo_set_direction - | |
| 286 | // fifo_set_direction - | |
| 287 | 287 | //------------------------------------------------- |
| 288 | 288 | |
| 289 | 289 | inline void upd7220_device::fifo_set_direction(int dir) |
| r11247 | r11248 | |
| 298 | 298 | |
| 299 | 299 | |
| 300 | 300 | //------------------------------------------------- |
| 301 | // queue - | |
| 301 | // queue - | |
| 302 | 302 | //------------------------------------------------- |
| 303 | 303 | |
| 304 | 304 | inline void upd7220_device::queue(UINT8 data, int flag) |
| r11247 | r11248 | |
| 326 | 326 | |
| 327 | 327 | |
| 328 | 328 | //------------------------------------------------- |
| 329 | // dequeue - | |
| 329 | // dequeue - | |
| 330 | 330 | //------------------------------------------------- |
| 331 | 331 | |
| 332 | 332 | inline void upd7220_device::dequeue(UINT8 *data, int *flag) |
| r11247 | r11248 | |
| 357 | 357 | |
| 358 | 358 | |
| 359 | 359 | //------------------------------------------------- |
| 360 | // update_vsync_timer - | |
| 360 | // update_vsync_timer - | |
| 361 | 361 | //------------------------------------------------- |
| 362 | 362 | |
| 363 | 363 | inline void upd7220_device::update_vsync_timer(int state) |
| r11247 | r11248 | |
| 371 | 371 | |
| 372 | 372 | |
| 373 | 373 | //------------------------------------------------- |
| 374 | // update_hsync_timer - | |
| 374 | // update_hsync_timer - | |
| 375 | 375 | //------------------------------------------------- |
| 376 | 376 | |
| 377 | 377 | inline void upd7220_device::update_hsync_timer(int state) |
| r11247 | r11248 | |
| 388 | 388 | |
| 389 | 389 | |
| 390 | 390 | //------------------------------------------------- |
| 391 | // update_blank_timer - | |
| 391 | // update_blank_timer - | |
| 392 | 392 | //------------------------------------------------- |
| 393 | 393 | |
| 394 | 394 | inline void upd7220_device::update_blank_timer(int state) |
| r11247 | r11248 | |
| 405 | 405 | |
| 406 | 406 | |
| 407 | 407 | //------------------------------------------------- |
| 408 | // recompute_parameters - | |
| 408 | // recompute_parameters - | |
| 409 | 409 | //------------------------------------------------- |
| 410 | 410 | |
| 411 | 411 | inline void upd7220_device::recompute_parameters() |
| r11247 | r11248 | |
| 453 | 453 | |
| 454 | 454 | |
| 455 | 455 | //------------------------------------------------- |
| 456 | // reset_figs_param - | |
| 456 | // reset_figs_param - | |
| 457 | 457 | //------------------------------------------------- |
| 458 | 458 | |
| 459 | 459 | inline void upd7220_device::reset_figs_param() |
| r11247 | r11248 | |
| 467 | 467 | |
| 468 | 468 | |
| 469 | 469 | //------------------------------------------------- |
| 470 | // advance_ead - | |
| 470 | // advance_ead - | |
| 471 | 471 | //------------------------------------------------- |
| 472 | 472 | |
| 473 | 473 | inline void upd7220_device::advance_ead() |
| r11247 | r11248 | |
| 530 | 530 | |
| 531 | 531 | |
| 532 | 532 | //------------------------------------------------- |
| 533 | // read_vram - | |
| 533 | // read_vram - | |
| 534 | 534 | //------------------------------------------------- |
| 535 | 535 | |
| 536 | 536 | inline void upd7220_device::read_vram(UINT8 type, UINT8 mod) |
| r11247 | r11248 | |
| 566 | 566 | |
| 567 | 567 | |
| 568 | 568 | //------------------------------------------------- |
| 569 | // write_vram - | |
| 569 | // write_vram - | |
| 570 | 570 | //------------------------------------------------- |
| 571 | 571 | |
| 572 | 572 | inline void upd7220_device::write_vram(UINT8 type, UINT8 mod) |
| r11247 | r11248 | |
| 641 | 641 | |
| 642 | 642 | |
| 643 | 643 | //------------------------------------------------- |
| 644 | // check_pattern - | |
| 644 | // check_pattern - | |
| 645 | 645 | //------------------------------------------------- |
| 646 | 646 | |
| 647 | 647 | inline UINT16 upd7220_device::check_pattern(UINT16 pattern) |
| r11247 | r11248 | |
| 661 | 661 | |
| 662 | 662 | |
| 663 | 663 | //------------------------------------------------- |
| 664 | // get_text_partition - | |
| 664 | // get_text_partition - | |
| 665 | 665 | //------------------------------------------------- |
| 666 | 666 | |
| 667 | 667 | inline void upd7220_device::get_text_partition(int index, UINT32 *sad, UINT16 *len, int *im, int *wd) |
| r11247 | r11248 | |
| 674 | 674 | |
| 675 | 675 | |
| 676 | 676 | //------------------------------------------------- |
| 677 | // get_graphics_partition - | |
| 677 | // get_graphics_partition - | |
| 678 | 678 | //------------------------------------------------- |
| 679 | 679 | |
| 680 | 680 | inline void upd7220_device::get_graphics_partition(int index, UINT32 *sad, UINT16 *len, int *im, int *wd) |
| r11247 | r11248 | |
| 873 | 873 | |
| 874 | 874 | |
| 875 | 875 | //------------------------------------------------- |
| 876 | // draw_pixel - | |
| 876 | // draw_pixel - | |
| 877 | 877 | //------------------------------------------------- |
| 878 | 878 | |
| 879 | 879 | void upd7220_device::draw_pixel(int x, int y, UINT16 tile_data) |
| r11247 | r11248 | |
| 895 | 895 | |
| 896 | 896 | |
| 897 | 897 | //------------------------------------------------- |
| 898 | // draw_line - | |
| 898 | // draw_line - | |
| 899 | 899 | //------------------------------------------------- |
| 900 | 900 | |
| 901 | 901 | void upd7220_device::draw_line(int x, int y) |
| r11247 | r11248 | |
| 933 | 933 | |
| 934 | 934 | |
| 935 | 935 | //------------------------------------------------- |
| 936 | // draw_rectangle - | |
| 936 | // draw_rectangle - | |
| 937 | 937 | //------------------------------------------------- |
| 938 | 938 | |
| 939 | 939 | void upd7220_device::draw_rectangle(int x, int y) |
| r11247 | r11248 | |
| 996 | 996 | |
| 997 | 997 | |
| 998 | 998 | //------------------------------------------------- |
| 999 | // draw_char - | |
| 999 | // draw_char - | |
| 1000 | 1000 | //------------------------------------------------- |
| 1001 | 1001 | |
| 1002 | 1002 | void upd7220_device::draw_char(int x, int y) |
| r11247 | r11248 | |
| 1049 | 1049 | |
| 1050 | 1050 | |
| 1051 | 1051 | //------------------------------------------------- |
| 1052 | // translate_command - | |
| 1052 | // translate_command - | |
| 1053 | 1053 | //------------------------------------------------- |
| 1054 | 1054 | |
| 1055 | 1055 | int upd7220_device::translate_command(UINT8 data) |
| r11247 | r11248 | |
| 1098 | 1098 | |
| 1099 | 1099 | |
| 1100 | 1100 | //------------------------------------------------- |
| 1101 | // process_fifo - | |
| 1101 | // process_fifo - | |
| 1102 | 1102 | //------------------------------------------------- |
| 1103 | 1103 | |
| 1104 | 1104 | void upd7220_device::process_fifo() |
| r11247 | r11248 | |
| 1353 | 1353 | m_figs.m_figure_type = (m_pr[1] & 0xf8) >> 3; |
| 1354 | 1354 | |
| 1355 | 1355 | //if(m_figs.m_dir != 2) |
| 1356 | // | |
| 1356 | // printf("DIR %02x\n",m_pr[1]); | |
| 1357 | 1357 | } |
| 1358 | 1358 | |
| 1359 | 1359 | if (m_param_ptr == 4) |
| r11247 | r11248 | |
| 1446 | 1446 | |
| 1447 | 1447 | |
| 1448 | 1448 | //------------------------------------------------- |
| 1449 | // read - | |
| 1449 | // read - | |
| 1450 | 1450 | //------------------------------------------------- |
| 1451 | 1451 | |
| 1452 | 1452 | READ8_MEMBER( upd7220_device::read ) |
| r11247 | r11248 | |
| 1475 | 1475 | |
| 1476 | 1476 | |
| 1477 | 1477 | //------------------------------------------------- |
| 1478 | // write - | |
| 1478 | // write - | |
| 1479 | 1479 | //------------------------------------------------- |
| 1480 | 1480 | |
| 1481 | 1481 | WRITE8_MEMBER( upd7220_device::write ) |
| r11247 | r11248 | |
| 1498 | 1498 | |
| 1499 | 1499 | |
| 1500 | 1500 | //------------------------------------------------- |
| 1501 | // dack_r - | |
| 1501 | // dack_r - | |
| 1502 | 1502 | //------------------------------------------------- |
| 1503 | 1503 | |
| 1504 | 1504 | READ8_MEMBER( upd7220_device::dack_r ) |
| r11247 | r11248 | |
| 1508 | 1508 | |
| 1509 | 1509 | |
| 1510 | 1510 | //------------------------------------------------- |
| 1511 | // dack_w - | |
| 1511 | // dack_w - | |
| 1512 | 1512 | //------------------------------------------------- |
| 1513 | 1513 | |
| 1514 | 1514 | WRITE8_MEMBER( upd7220_device::dack_w ) |
| r11247 | r11248 | |
| 1517 | 1517 | |
| 1518 | 1518 | |
| 1519 | 1519 | //------------------------------------------------- |
| 1520 | // ext_sync_w - | |
| 1520 | // ext_sync_w - | |
| 1521 | 1521 | //------------------------------------------------- |
| 1522 | 1522 | |
| 1523 | 1523 | WRITE_LINE_MEMBER( upd7220_device::ext_sync_w ) |
| r11247 | r11248 | |
| 1536 | 1536 | |
| 1537 | 1537 | |
| 1538 | 1538 | //------------------------------------------------- |
| 1539 | // ext_sync_w - | |
| 1539 | // ext_sync_w - | |
| 1540 | 1540 | //------------------------------------------------- |
| 1541 | 1541 | |
| 1542 | 1542 | WRITE_LINE_MEMBER( upd7220_device::lpen_w ) |
| r11247 | r11248 | |
| 1556 | 1556 | |
| 1557 | 1557 | |
| 1558 | 1558 | //------------------------------------------------- |
| 1559 | // update_text - | |
| 1559 | // update_text - | |
| 1560 | 1560 | //------------------------------------------------- |
| 1561 | 1561 | |
| 1562 | 1562 | void upd7220_device::update_text(bitmap_t *bitmap, const rectangle *cliprect) |
| r11247 | r11248 | |
| 1574 | 1574 | { |
| 1575 | 1575 | addr = sad + (y * m_pitch); |
| 1576 | 1576 | |
| 1577 | if (m_config.m_draw_text_func) | |
| 1577 | if (m_config.m_draw_text_func) | |
| 1578 | 1578 | 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); |
| 1579 | 1579 | } |
| 1580 | 1580 | |
| r11247 | r11248 | |
| 1584 | 1584 | |
| 1585 | 1585 | |
| 1586 | 1586 | //------------------------------------------------- |
| 1587 | // draw_graphics_line - | |
| 1587 | // draw_graphics_line - | |
| 1588 | 1588 | //------------------------------------------------- |
| 1589 | 1589 | |
| 1590 | 1590 | void upd7220_device::draw_graphics_line(bitmap_t *bitmap, UINT32 addr, int y, int wd) |
| r11247 | r11248 | |
| 1605 | 1605 | |
| 1606 | 1606 | |
| 1607 | 1607 | //------------------------------------------------- |
| 1608 | // update_graphics - | |
| 1608 | // update_graphics - | |
| 1609 | 1609 | //------------------------------------------------- |
| 1610 | 1610 | |
| 1611 | 1611 | void upd7220_device::update_graphics(bitmap_t *bitmap, const rectangle *cliprect, int force_bitmap) |
| r11247 | r11248 | |
| 1646 | 1646 | |
| 1647 | 1647 | |
| 1648 | 1648 | //------------------------------------------------- |
| 1649 | // update_screen - | |
| 1649 | // update_screen - | |
| 1650 | 1650 | //------------------------------------------------- |
| 1651 | 1651 | |
| 1652 | 1652 | void upd7220_device::update_screen(bitmap_t *bitmap, const rectangle *cliprect) |
| r11247 | r11248 | |
|---|---|---|
| 940 | 940 | pcjr.update_row = NULL; |
| 941 | 941 | pcjr.bank = 0; |
| 942 | 942 | pcjr.chr_size = 16; |
| 943 | ||
| 943 | ||
| 944 | 944 | buswidth = machine.firstcpu->memory().space_config(AS_PROGRAM)->m_databus_width; |
| 945 | 945 | switch(buswidth) |
| 946 | 946 | { |
| r11247 | r11248 | |
| 957 | 957 | default: |
| 958 | 958 | fatalerror("T1T: Bus width %d not supported", buswidth); |
| 959 | 959 | break; |
| 960 | } | |
| 960 | } | |
| 961 | 961 | } |
| 962 | 962 | |
| 963 | 963 | |
| r11247 | r11248 | |
| 971 | 971 | pcjr.bank = 0; |
| 972 | 972 | pcjr.mode_control = 0x08; |
| 973 | 973 | pcjr.chr_size = 8; |
| 974 | ||
| 974 | ||
| 975 | 975 | buswidth = machine.firstcpu->memory().space_config(AS_PROGRAM)->m_databus_width; |
| 976 | 976 | switch(buswidth) |
| 977 | 977 | { |
| r11247 | r11248 | |
| 982 | 982 | default: |
| 983 | 983 | fatalerror("PCJR: Bus width %d not supported", buswidth); |
| 984 | 984 | break; |
| 985 | } | |
| 985 | } | |
| 986 | 986 | } |
| r11247 | r11248 | |
|---|---|---|
| 61 | 61 | UINT8 cga_palette_lut_2bpp[4]; |
| 62 | 62 | UINT8 vsync; |
| 63 | 63 | UINT8 hsync; |
| 64 | ||
| 64 | ||
| 65 | 65 | UINT8 *videoram; |
| 66 | 66 | } aga; |
| 67 | 67 |
| r11247 | r11248 | |
|---|---|---|
| 249 | 249 | UINT8 vsync; |
| 250 | 250 | UINT8 hsync; |
| 251 | 251 | UINT8 p3df; |
| 252 | ||
| 252 | ||
| 253 | 253 | size_t videoram_size; |
| 254 | 254 | UINT8 *videoram; |
| 255 | 255 | } cga; |
| r11247 | r11248 | |
| 1770 | 1770 | internal_pc_cga_video_start(machine); |
| 1771 | 1771 | cga.videoram_size = 0x10000; |
| 1772 | 1772 | cga.videoram = auto_alloc_array(machine, UINT8, 0x10000 ); |
| 1773 | ||
| 1773 | ||
| 1774 | 1774 | address_space *space = machine.firstcpu->memory().space( AS_PROGRAM ); |
| 1775 | 1775 | address_space *io_space = machine.firstcpu->memory().space( AS_IO ); |
| 1776 | 1776 | |
| r11247 | r11248 | |
| 1780 | 1780 | |
| 1781 | 1781 | io_space->install_legacy_read_handler( 0x3d0, 0x3df, FUNC(pc1512_16le_r) ); |
| 1782 | 1782 | io_space->install_legacy_write_handler( 0x3d0, 0x3df, FUNC(pc1512_16le_w) ); |
| 1783 | ||
| 1783 | ||
| 1784 | 1784 | } |
| 1785 | 1785 | |
| 1786 | 1786 |
| r11247 | r11248 | |
|---|---|---|
| 90 | 90 | for(b = 0; b < 7; b++ ) |
| 91 | 91 | *BITMAP_ADDR16(bitmap, y*15+j, xpos+b ) = (l >> (6-b)) & 1; |
| 92 | 92 | |
| 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; | |
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | xpos += 10; |
| r11247 | r11248 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | TODO: |
| 4 | 4 | |
| 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 | |
| 8 | 8 | |
| 9 | 9 | */ |
| 10 | 10 | |
| r11247 | r11248 | |
| 103 | 103 | { |
| 104 | 104 | UINT32 addr = (offset & 0x7fffe) >> 1; |
| 105 | 105 | UINT8 data = 0; |
| 106 | ||
| 106 | ||
| 107 | 107 | if (offset & 0x01) |
| 108 | 108 | { |
| 109 | 109 | data = m_video_ram[addr] & 0xff; |
| r11247 | r11248 | |
| 140 | 140 | if (LOG) logerror("GMDI LB %02x -> %04x\n", data, m_gmdi); |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | // | |
| 143 | // m_wrm = 0xffff; | |
| 144 | 144 | write_videoram(addr, m_gmdi, m_wrm & 0x00ff); |
| 145 | 145 | |
| 146 | 146 | if (LOG) logerror("Video RAM write LB to %05x : %04x\n", addr, m_video_ram[addr]); |
| r11247 | r11248 | |
| 160 | 160 | if (LOG) logerror("GMDI HB %02x -> %04x\n", data, m_gmdi); |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | // | |
| 163 | // m_wrm = 0xffff; | |
| 164 | 164 | write_videoram(addr, m_gmdi, m_wrm & 0xff00); |
| 165 | 165 | |
| 166 | 166 | if (LOG) logerror("Video RAM write HB to %05x : %04x\n", addr, m_video_ram[addr]); |
| r11247 | r11248 | |
| 176 | 176 | { |
| 177 | 177 | /* |
| 178 | 178 | |
| 179 | ||
| 179 | bit description | |
| 180 | 180 | |
| 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 | |
| 189 | 189 | |
| 190 | ||
| 190 | */ | |
| 191 | 191 | |
| 192 | 192 | UINT8 data = 0; |
| 193 | 193 | |
| 194 | 194 | // monitor orientation (portrait/landscape) |
| 195 | // data |= 0x02; | |
| 196 | ||
| 195 | // data |= 0x02; | |
| 196 | ||
| 197 | 197 | // vertical sync |
| 198 | 198 | data |= m_vs << 6; |
| 199 | 199 | |
| r11247 | r11248 | |
| 212 | 212 | case LDSX_HB: |
| 213 | 213 | /* |
| 214 | 214 | |
| 215 | ||
| 215 | bit description | |
| 216 | 216 | |
| 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 | |
| 225 | 225 | |
| 226 | */ | |
| 227 | ||
| 226 | */ | |
| 227 | ||
| 228 | 228 | m_xsize = ((data & 0x03) << 8) | (m_xsize & 0xff); |
| 229 | 229 | m_udy = BIT(data, 2); |
| 230 | 230 | m_udx = BIT(data, 3); |
| 231 | 231 | break; |
| 232 | ||
| 232 | ||
| 233 | 233 | case LDSX_LB: |
| 234 | 234 | /* |
| 235 | 235 | |
| 236 | ||
| 236 | bit description | |
| 237 | 237 | |
| 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 | |
| 246 | 246 | |
| 247 | */ | |
| 248 | ||
| 247 | */ | |
| 248 | ||
| 249 | 249 | m_xsize = (m_xsize & 0x300) | data; |
| 250 | 250 | break; |
| 251 | ||
| 251 | ||
| 252 | 252 | case LDSY_HB: |
| 253 | 253 | /* |
| 254 | 254 | |
| 255 | ||
| 255 | bit description | |
| 256 | 256 | |
| 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 | |
| 265 | 265 | |
| 266 | */ | |
| 267 | ||
| 266 | */ | |
| 267 | ||
| 268 | 268 | m_ysize = ((data & 0x0f) << 8) | (m_ysize & 0xff); |
| 269 | 269 | break; |
| 270 | ||
| 270 | ||
| 271 | 271 | case LDSY_LB: |
| 272 | 272 | /* |
| 273 | 273 | |
| 274 | ||
| 274 | bit description | |
| 275 | 275 | |
| 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 | |
| 284 | 284 | |
| 285 | */ | |
| 286 | ||
| 285 | */ | |
| 286 | ||
| 287 | 287 | m_ysize = (m_ysize & 0xf00) | data; |
| 288 | 288 | break; |
| 289 | ||
| 289 | ||
| 290 | 290 | case LDTX_HB: |
| 291 | 291 | /* |
| 292 | 292 | |
| 293 | ||
| 293 | bit description | |
| 294 | 294 | |
| 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 | |
| 303 | 303 | |
| 304 | */ | |
| 305 | ||
| 304 | */ | |
| 305 | ||
| 306 | 306 | m_xto = ((data & 0x03) << 8) | (m_xto & 0xff); |
| 307 | 307 | m_mta = (m_mta & 0x3ffcf) | ((data & 0x03) << 4); |
| 308 | 308 | break; |
| 309 | ||
| 309 | ||
| 310 | 310 | case LDTX_LB: |
| 311 | 311 | /* |
| 312 | 312 | |
| 313 | ||
| 313 | bit description | |
| 314 | 314 | |
| 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 | |
| 323 | 323 | |
| 324 | */ | |
| 325 | ||
| 324 | */ | |
| 325 | ||
| 326 | 326 | m_xto = (m_xto & 0x300) | data; |
| 327 | 327 | m_mta = (m_mta & 0x3fff0) | (data >> 4); |
| 328 | 328 | break; |
| r11247 | r11248 | |
| 330 | 330 | case LDTY_HB: |
| 331 | 331 | /* |
| 332 | 332 | |
| 333 | ||
| 333 | bit description | |
| 334 | 334 | |
| 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 | |
| 343 | 343 | |
| 344 | */ | |
| 345 | ||
| 344 | */ | |
| 345 | ||
| 346 | 346 | m_yto = (data << 8) | (m_yto & 0xff); |
| 347 | 347 | m_mta = ((data & 0x0f) << 14) | (m_mta & 0x3fff); |
| 348 | 348 | break; |
| r11247 | r11248 | |
| 350 | 350 | case LDTY_LB: |
| 351 | 351 | /* |
| 352 | 352 | |
| 353 | ||
| 353 | bit description | |
| 354 | 354 | |
| 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 | |
| 363 | 363 | |
| 364 | */ | |
| 365 | ||
| 364 | */ | |
| 365 | ||
| 366 | 366 | m_yto = (m_yto & 0xf00) | data; |
| 367 | 367 | m_mta = (m_mta & 0x3c03f) | (data << 6); |
| 368 | 368 | break; |
| r11247 | r11248 | |
| 381 | 381 | case LDFX_HB: |
| 382 | 382 | /* |
| 383 | 383 | |
| 384 | ||
| 384 | bit description | |
| 385 | 385 | |
| 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 | |
| 394 | 394 | |
| 395 | ||
| 395 | */ | |
| 396 | 396 | |
| 397 | 397 | m_xfrom = ((data & 0x03) << 8) | (m_xfrom & 0xff); |
| 398 | 398 | m_mfa = (m_mfa & 0x3ffcf) | ((data & 0x03) << 4); |
| 399 | 399 | break; |
| 400 | ||
| 400 | ||
| 401 | 401 | case LDFX_LB: |
| 402 | 402 | /* |
| 403 | 403 | |
| 404 | ||
| 404 | bit description | |
| 405 | 405 | |
| 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 | |
| 414 | 414 | |
| 415 | ||
| 415 | */ | |
| 416 | 416 | |
| 417 | 417 | m_xfrom = (m_xfrom & 0x300) | data; |
| 418 | 418 | m_mfa = (m_mfa & 0x3fff0) | (data >> 4); |
| 419 | 419 | break; |
| 420 | ||
| 420 | ||
| 421 | 421 | case LDFY_HB: |
| 422 | 422 | /* |
| 423 | 423 | |
| 424 | ||
| 424 | bit description | |
| 425 | 425 | |
| 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 | |
| 434 | 434 | |
| 435 | ||
| 435 | */ | |
| 436 | 436 | |
| 437 | 437 | m_mfa = ((data & 0x0f) << 14) | (m_mfa & 0x3fff); |
| 438 | 438 | break; |
| 439 | ||
| 439 | ||
| 440 | 440 | case LDFY_LB: |
| 441 | 441 | /* |
| 442 | 442 | |
| 443 | ||
| 443 | bit description | |
| 444 | 444 | |
| 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 | |
| 453 | 453 | |
| 454 | ||
| 454 | */ | |
| 455 | 455 | |
| 456 | 456 | m_mfa = (m_mfa & 0x3c03f) | (data << 6); |
| 457 | ||
| 457 | ||
| 458 | 458 | mover(); |
| 459 | 459 | break; |
| 460 | ||
| 460 | ||
| 461 | 461 | case WRML: |
| 462 | 462 | /* |
| 463 | 463 | |
| 464 | ||
| 464 | bit description | |
| 465 | 465 | |
| 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 | |
| 474 | 474 | |
| 475 | ||
| 475 | */ | |
| 476 | 476 | |
| 477 | 477 | if (LOG) logerror("MS %u : %02x\n", (offset >> 4) & 0x0f, data); |
| 478 | 478 | |
| r11247 | r11248 | |
| 481 | 481 | m_ms[(offset >> 4) & 0x0f] = data; |
| 482 | 482 | } |
| 483 | 483 | break; |
| 484 | ||
| 484 | ||
| 485 | 485 | case WRDL: |
| 486 | 486 | /* |
| 487 | 487 | |
| 488 | ||
| 488 | bit description | |
| 489 | 489 | |
| 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 | |
| 498 | 498 | |
| 499 | ||
| 499 | */ | |
| 500 | 500 | |
| 501 | 501 | if (LOG) logerror("WS %u : %02x\n", (offset >> 4) & 0x0f, data); |
| 502 | 502 | |
| r11247 | r11248 | |
| 531 | 531 | if (LOG) logerror("WRM HB %04x\n", m_gmdi); |
| 532 | 532 | } |
| 533 | 533 | break; |
| 534 | ||
| 534 | ||
| 535 | 535 | case WRMASK_STROBE_LB: |
| 536 | 536 | if (REPLACE) |
| 537 | 537 | { |
| r11247 | r11248 | |
| 551 | 551 | if (LOG) logerror("ENABLE CLOCKS\n"); |
| 552 | 552 | m_clocks_disabled = 0; |
| 553 | 553 | break; |
| 554 | ||
| 554 | ||
| 555 | 555 | case FLAG_STROBE: |
| 556 | 556 | /* |
| 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 | */ | |
| 570 | 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 | */ | |
| 570 | ||
| 571 | 571 | m_flag = data; |
| 572 | 572 | if (LOG) logerror("FLAG %02x\n", m_flag); |
| 573 | 573 | break; |
| 574 | ||
| 574 | ||
| 575 | 575 | case ENDISP: |
| 576 | 576 | if (LOG) logerror("ENDISP\n"); |
| 577 | 577 | m_endisp = 1; |
| r11247 | r11248 | |
| 586 | 586 | //************************************************************************** |
| 587 | 587 | |
| 588 | 588 | //------------------------------------------------- |
| 589 | // clock_mfa_x - | |
| 589 | // clock_mfa_x - | |
| 590 | 590 | //------------------------------------------------- |
| 591 | 591 | |
| 592 | 592 | inline void abc1600_state::clock_mfa_x() |
| 593 | 593 | { |
| 594 | 594 | UINT16 mfa_y = m_mfa >> 6; |
| 595 | 595 | UINT8 mfa_x = m_mfa & 0x3f; |
| 596 | ||
| 596 | ||
| 597 | 597 | if (!HOLD_FX) |
| 598 | 598 | { |
| 599 | 599 | mfa_x += m_udx ? 1 : -1; |
| r11247 | r11248 | |
| 605 | 605 | |
| 606 | 606 | |
| 607 | 607 | //------------------------------------------------- |
| 608 | // clock_mfa_y - | |
| 608 | // clock_mfa_y - | |
| 609 | 609 | //------------------------------------------------- |
| 610 | 610 | |
| 611 | 611 | inline void abc1600_state::clock_mfa_y() |
| r11247 | r11248 | |
| 624 | 624 | |
| 625 | 625 | |
| 626 | 626 | //------------------------------------------------- |
| 627 | // clock_mta_x - | |
| 627 | // clock_mta_x - | |
| 628 | 628 | //------------------------------------------------- |
| 629 | 629 | |
| 630 | 630 | inline void abc1600_state::clock_mta_x() |
| r11247 | r11248 | |
| 640 | 640 | |
| 641 | 641 | |
| 642 | 642 | //------------------------------------------------- |
| 643 | // clock_mta_y - | |
| 643 | // clock_mta_y - | |
| 644 | 644 | //------------------------------------------------- |
| 645 | 645 | |
| 646 | 646 | inline void abc1600_state::clock_mta_y() |
| r11247 | r11248 | |
| 656 | 656 | |
| 657 | 657 | |
| 658 | 658 | //------------------------------------------------- |
| 659 | // load_mfa_x - | |
| 659 | // load_mfa_x - | |
| 660 | 660 | //------------------------------------------------- |
| 661 | 661 | |
| 662 | 662 | inline void abc1600_state::load_mfa_x() |
| r11247 | r11248 | |
| 669 | 669 | |
| 670 | 670 | |
| 671 | 671 | //------------------------------------------------- |
| 672 | // load_mta_x - | |
| 672 | // load_mta_x - | |
| 673 | 673 | //------------------------------------------------- |
| 674 | 674 | |
| 675 | 675 | inline void abc1600_state::load_mta_x() |
| r11247 | r11248 | |
| 682 | 682 | |
| 683 | 683 | |
| 684 | 684 | //------------------------------------------------- |
| 685 | // compare_mta_x - | |
| 685 | // compare_mta_x - | |
| 686 | 686 | //------------------------------------------------- |
| 687 | 687 | |
| 688 | 688 | inline void abc1600_state::compare_mta_x() |
| 689 | 689 | { |
| 690 | 690 | UINT8 mta_x_end = ((m_xto + m_xsize) >> 4) & 0x3f; |
| 691 | 691 | UINT8 mta_x = m_mta & 0x3f; |
| 692 | ||
| 692 | ||
| 693 | 693 | if (mta_x == mta_x_end) |
| 694 | 694 | { |
| 695 | 695 | m_cmc = 0; |
| r11247 | r11248 | |
| 700 | 700 | |
| 701 | 701 | |
| 702 | 702 | //------------------------------------------------- |
| 703 | // compare_mta_y - | |
| 703 | // compare_mta_y - | |
| 704 | 704 | //------------------------------------------------- |
| 705 | 705 | |
| 706 | 706 | inline void abc1600_state::compare_mta_y() |
| 707 | 707 | { |
| 708 | 708 | int mta_y_end = (m_yto + m_ysize) & 0xfff; |
| 709 | 709 | UINT16 mta_y = m_mta >> 6; |
| 710 | ||
| 710 | ||
| 711 | 711 | if (mta_y == mta_y_end) |
| 712 | 712 | { |
| 713 | 713 | m_rmc = 0; |
| r11247 | r11248 | |
| 716 | 716 | |
| 717 | 717 | |
| 718 | 718 | //------------------------------------------------- |
| 719 | // get_shinf - | |
| 719 | // get_shinf - | |
| 720 | 720 | //------------------------------------------------- |
| 721 | 721 | |
| 722 | 722 | inline void abc1600_state::get_shinf() |
| 723 | 723 | { |
| 724 | 724 | /* |
| 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 | ||
| 740 | 740 | UINT16 shinf_addr = (m_udx << 8) | ((m_xto & 0x0f) << 4) | (m_xfrom & 0x0f); |
| 741 | 741 | UINT8 shinf = m_shinf_rom[shinf_addr]; |
| 742 | 742 | |
| r11247 | r11248 | |
| 746 | 746 | |
| 747 | 747 | |
| 748 | 748 | //------------------------------------------------- |
| 749 | // get_drmsk - | |
| 749 | // get_drmsk - | |
| 750 | 750 | //------------------------------------------------- |
| 751 | 751 | |
| 752 | 752 | inline UINT16 abc1600_state::get_drmsk() |
| 753 | 753 | { |
| 754 | 754 | /* |
| 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 | ||
| 766 | 766 | UINT16 drmsk_addr = (m_udx << 4) | (m_sh & 0x0f); |
| 767 | 767 | UINT8 drmskl = m_drmsk_rom[drmsk_addr]; |
| 768 | 768 | UINT8 drmskh = m_drmsk_rom[drmsk_addr + 0x20]; |
| 769 | 769 | UINT16 drmsk = (drmskh << 8) | drmskl; |
| 770 | ||
| 770 | ||
| 771 | 771 | return drmsk; |
| 772 | 772 | } |
| 773 | 773 | |
| r11247 | r11248 | |
| 779 | 779 | inline UINT16 abc1600_state::get_wrmsk() |
| 780 | 780 | { |
| 781 | 781 | /* |
| 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 | ||
| 800 | 800 | UINT16 wrmsk_addr = (m_wrms1 << 11) | (m_wrms0 << 10) | ((!m_wrms1 & !m_wrms0) << 9) | (m_udx << 8) | ((m_xsize & 0x0f) << 4) | (m_xto & 0x0f); |
| 801 | 801 | UINT8 wrmskl = m_wrmsk_rom[wrmsk_addr]; |
| 802 | 802 | UINT8 wrmskh = m_wrmsk_rom[wrmsk_addr + 0x1000]; |
| 803 | 803 | UINT16 wrmsk = (wrmskh << 8) | wrmskl; |
| 804 | ||
| 804 | ||
| 805 | 805 | return wrmsk ^ 0xffff; |
| 806 | 806 | } |
| 807 | 807 | |
| 808 | 808 | |
| 809 | 809 | //------------------------------------------------- |
| 810 | // barrel_shift - | |
| 810 | // barrel_shift - | |
| 811 | 811 | //------------------------------------------------- |
| 812 | 812 | |
| 813 | 813 | inline UINT16 abc1600_state::barrel_shift(UINT16 gmdr) |
| r11247 | r11248 | |
| 826 | 826 | |
| 827 | 827 | |
| 828 | 828 | //------------------------------------------------- |
| 829 | // word_mixer - | |
| 829 | // word_mixer - | |
| 830 | 830 | //------------------------------------------------- |
| 831 | 831 | |
| 832 | 832 | inline UINT16 abc1600_state::word_mixer(UINT16 rot) |
| r11247 | r11248 | |
| 838 | 838 | { |
| 839 | 839 | gmdi ^= 0xffff; |
| 840 | 840 | } |
| 841 | ||
| 841 | ||
| 842 | 842 | m_mdor = rot; |
| 843 | 843 | |
| 844 | 844 | return gmdi; |
| r11247 | r11248 | |
| 846 | 846 | |
| 847 | 847 | |
| 848 | 848 | //------------------------------------------------- |
| 849 | // mover - | |
| 849 | // mover - | |
| 850 | 850 | //------------------------------------------------- |
| 851 | 851 | |
| 852 | 852 | void abc1600_state::mover() |
| r11247 | r11248 | |
| 857 | 857 | |
| 858 | 858 | m_rmc = 1; |
| 859 | 859 | get_shinf(); |
| 860 | ||
| 860 | ||
| 861 | 861 | do |
| 862 | 862 | { |
| 863 | 863 | compare_mta_y(); |
| r11247 | r11248 | |
| 873 | 873 | UINT16 gmdr = read_videoram(m_mfa); |
| 874 | 874 | UINT16 rot = barrel_shift(gmdr); |
| 875 | 875 | word_mixer(rot); |
| 876 | ||
| 876 | ||
| 877 | 877 | clock_mfa_x(); |
| 878 | 878 | } |
| 879 | ||
| 879 | ||
| 880 | 880 | do |
| 881 | 881 | { |
| 882 | 882 | compare_mta_x(); |
| 883 | ||
| 883 | ||
| 884 | 884 | UINT16 gmdr = read_videoram(m_mfa); |
| 885 | 885 | UINT16 rot = barrel_shift(gmdr); |
| 886 | 886 | UINT16 gmdi = word_mixer(rot); |
| 887 | 887 | UINT16 mask = get_wrmsk(); |
| 888 | ||
| 888 | ||
| 889 | 889 | write_videoram(m_mta, gmdi, mask); |
| 890 | ||
| 890 | ||
| 891 | 891 | clock_mfa_x(); |
| 892 | 892 | clock_mta_x(); |
| 893 | ||
| 893 | ||
| 894 | 894 | m_wrms0 = 1; |
| 895 | 895 | } |
| 896 | 896 | while (m_cmc); |
| 897 | ||
| 897 | ||
| 898 | 898 | clock_mfa_y(); |
| 899 | 899 | clock_mta_y(); |
| 900 | } | |
| 900 | } | |
| 901 | 901 | while (m_rmc); |
| 902 | 902 | |
| 903 | 903 | m_amm = 0; |
| r11247 | r11248 | |
| 916 | 916 | inline UINT16 abc1600_state::get_crtca(UINT16 ma, UINT8 ra, UINT8 column) |
| 917 | 917 | { |
| 918 | 918 | /* |
| 919 | ||
| 920 | bit description | |
| 921 | 919 | |
| 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 | |
| 938 | 921 | |
| 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 | |
| 940 | 938 | |
| 939 | */ | |
| 940 | ||
| 941 | 941 | UINT8 cc = (ma & 0xff) + column; |
| 942 | 942 | UINT8 cr = ma >> 8; |
| 943 | 943 | |
| r11247 | r11248 | |
| 951 | 951 | for (int column = 0; column < x_count; column += 2) |
| 952 | 952 | { |
| 953 | 953 | UINT16 dma = get_crtca(ma, ra, column); |
| 954 | ||
| 954 | ||
| 955 | 955 | // data is read out of video RAM in nibble mode by strobing CAS 4 times |
| 956 | 956 | for (int cas = 0; cas < 4; cas++) |
| 957 | 957 | { |
| 958 | 958 | UINT16 data = m_video_ram[dma + cas]; |
| 959 | ||
| 959 | ||
| 960 | 960 | for (int bit = 0; bit < 16; bit++) |
| 961 | 961 | { |
| 962 | 962 | int color = (BIT(data, 15) ^ PIX_POL) & !BLANK; |
| 963 | 963 | |
| 964 | 964 | *BITMAP_ADDR16(bitmap, y, x++) = color; |
| 965 | ||
| 965 | ||
| 966 | 966 | data <<= 1; |
| 967 | 967 | } |
| 968 | 968 | } |
| r11247 | r11248 | |
| 1012 | 1012 | { |
| 1013 | 1013 | // allocate video RAM |
| 1014 | 1014 | m_video_ram = auto_alloc_array(machine(), UINT16, VIDEORAM_SIZE); |
| 1015 | ||
| 1015 | ||
| 1016 | 1016 | // find memory regions |
| 1017 | 1017 | m_wrmsk_rom = machine().region("wrmsk")->base(); |
| 1018 | 1018 | m_shinf_rom = machine().region("shinf")->base(); |
| r11247 | r11248 | |
|---|---|---|
| 33 | 33 | |
| 34 | 34 | void ibm_vga_device::vga_crtc_w(int offset, UINT8 data) |
| 35 | 35 | { |
| 36 | switch(offset) | |
| 36 | switch(offset) | |
| 37 | 37 | { |
| 38 | 38 | case 4: |
| 39 | 39 | mc6845_address_w( m_crtc, offset, data ); |
| r11247 | r11248 | |
| 43 | 43 | break; |
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | ||
| 46 | ||
| 47 | 47 | READ8_MEMBER(ibm_vga_device::vga_port_03b0_r) |
| 48 | 48 | { |
| 49 | 49 | UINT8 retVal = 0xff; |
| 50 | 50 | if (CRTC_PORT_ADDR == 0x3b0) |
| 51 | retVal = vga_crtc_r(offset); | |
| 51 | retVal = vga_crtc_r(offset); | |
| 52 | 52 | //if (LOG_ACCESSES) |
| 53 | 53 | //logerror("vga_port_03b0_r(): port=0x%04x data=0x%02x\n", offset + 0x3b0, retVal); |
| 54 | 54 | return retVal; |
| r11247 | r11248 | |
| 76 | 76 | { |
| 77 | 77 | retVal = m_attr_data[m_attr_idx & 0x1f]; |
| 78 | 78 | } |
| 79 | break; | |
| 79 | break; | |
| 80 | 80 | case 0x04 : // Sequencer Index Register |
| 81 | 81 | retVal = m_seq_idx; |
| 82 | 82 | break; |
| r11247 | r11248 | |
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | break; |
| 109 | case 0x0a : // | |
| 109 | case 0x0a : // | |
| 110 | 110 | retVal = m_feature_ctrl; |
| 111 | 111 | case 0x0c : // Miscellaneous Output Register |
| 112 | 112 | retVal = m_misc_out_reg; |
| 113 | break; | |
| 113 | break; | |
| 114 | 114 | case 0x0e : // Graphics Index Register |
| 115 | 115 | retVal = m_gc_idx; |
| 116 | 116 | break; |
| r11247 | r11248 | |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | 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); | |
| 124 | 124 | return retVal; |
| 125 | 125 | } |
| 126 | 126 | |
| r11247 | r11248 | |
| 128 | 128 | { |
| 129 | 129 | if (LOG_ACCESSES) |
| 130 | 130 | logerror("vga_port_03c0_w(): port=0x%04x data=0x%02x\n", offset + 0x3c0, data); |
| 131 | ||
| 131 | ||
| 132 | 132 | switch(offset) { |
| 133 | 133 | case 0x00: // Attribute Controller |
| 134 | 134 | if (m_attr_state==0) |
| r11247 | r11248 | |
| 140 | 140 | m_attr_data[m_attr_idx & 0x1f] = data; |
| 141 | 141 | } |
| 142 | 142 | m_attr_state=!m_attr_state; |
| 143 | break; | |
| 143 | break; | |
| 144 | 144 | case 0x02 : // Miscellaneous Output Register |
| 145 | 145 | m_misc_out_reg = data; |
| 146 | 146 | break; |
| r11247 | r11248 | |
| 152 | 152 | break; |
| 153 | 153 | case 0x06 : // Video DAC Pel Mask Register |
| 154 | 154 | m_dac_mask = data; |
| 155 | break; | |
| 155 | break; | |
| 156 | 156 | case 0x07 : // Video DAC Index (CLUT Reads) |
| 157 | 157 | m_dac_read_idx = data; |
| 158 | 158 | m_dac_state = 0; |
| r11247 | r11248 | |
| 161 | 161 | case 0x08 : // Video DAC Index (CLUT Writes) |
| 162 | 162 | m_dac_write_idx = data; |
| 163 | 163 | m_dac_state = 0; |
| 164 | m_dac_read = 0; | |
| 164 | m_dac_read = 0; | |
| 165 | 165 | break; |
| 166 | 166 | case 0x09 : // Video DAC Data Register |
| 167 | 167 | if (!m_dac_read) |
| 168 | 168 | { |
| 169 | 169 | m_dac_color[m_dac_state++][m_dac_write_idx] = data; |
| 170 | 170 | if (m_dac_state==3) { |
| 171 | m_dac_state=0; | |
| 171 | m_dac_state=0; | |
| 172 | 172 | m_dac_write_idx++; |
| 173 | 173 | } |
| 174 | } | |
| 174 | } | |
| 175 | 175 | break; |
| 176 | 176 | case 0x0e : // Graphics Index Register |
| 177 | 177 | m_gc_idx = data; |
| 178 | 178 | break; |
| 179 | 179 | case 0x0f : // Graphics Data Register |
| 180 | 180 | m_gc_data[m_gc_idx & 0x1f] = data; |
| 181 | break; | |
| 181 | break; | |
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | |
| r11247 | r11248 | |
| 186 | 186 | { |
| 187 | 187 | UINT8 retVal = 0xff; |
| 188 | 188 | if (CRTC_PORT_ADDR == 0x3d0) |
| 189 | retVal = vga_crtc_r(offset); | |
| 189 | retVal = vga_crtc_r(offset); | |
| 190 | 190 | //if (LOG_ACCESSES) |
| 191 | // | |
| 191 | // logerror("vga_port_03d0_r(): port=0x%04x data=0x%02x\n", offset + 0x3d0, retVal); | |
| 192 | 192 | return retVal; |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | WRITE8_MEMBER( ibm_vga_device::vga_port_03d0_w ) |
| 196 | 196 | { |
| 197 | // | |
| 197 | // if (LOG_ACCESSES) | |
| 198 | 198 | //logerror("vga_port_03d0_w(): port=0x%04x data=0x%02x\n", offset + 0x3d0, data); |
| 199 | 199 | if (CRTC_PORT_ADDR == 0x3d0) |
| 200 | 200 | vga_crtc_w(offset, data); |
| r11247 | r11248 | |
| 346 | 346 | |
| 347 | 347 | case 64: |
| 348 | 348 | break; |
| 349 | ||
| 349 | ||
| 350 | 350 | default: |
| 351 | 351 | fatalerror("VGA: Bus width %d not supported", buswidth); |
| 352 | 352 | break; |
| r11247 | r11248 | |
| 362 | 362 | |
| 363 | 363 | void ibm_vga_device::device_reset() |
| 364 | 364 | { |
| 365 | m_misc_out_reg = 0; | |
| 365 | m_misc_out_reg = 0; | |
| 366 | 366 | m_feature_ctrl = 0; |
| 367 | ||
| 367 | ||
| 368 | 368 | m_seq_idx = 0; |
| 369 | 369 | memset(m_seq_data,0xff,0x1f); |
| 370 | ||
| 370 | ||
| 371 | 371 | m_attr_idx = 0; |
| 372 | 372 | memset(m_attr_data,0xff,0x1f); |
| 373 | 373 | m_attr_state = 0; |
| 374 | ||
| 374 | ||
| 375 | 375 | m_gc_idx = 0; |
| 376 | 376 | memset(m_gc_data,0xff,0x1f); |
| 377 | ||
| 377 | ||
| 378 | 378 | m_dac_mask = 0; |
| 379 | 379 | m_dac_write_idx = 0; |
| 380 | 380 | m_dac_read_idx = 0; |
| r11247 | r11248 | |
| 382 | 382 | m_dac_state = 0; |
| 383 | 383 | memset(m_dac_color,0,sizeof(m_dac_color)); |
| 384 | 384 | |
| 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); | |
| 387 | 387 | } |
| r11247 | r11248 | |
|---|---|---|
| 70 | 70 | private: |
| 71 | 71 | // internal state |
| 72 | 72 | const ibm_vga_device_config &m_config; |
| 73 | ||
| 73 | ||
| 74 | 74 | UINT8 m_misc_out_reg; |
| 75 | ||
| 75 | ||
| 76 | 76 | UINT8 m_feature_ctrl; |
| 77 | ||
| 78 | UINT8 m_seq_idx; | |
| 77 | ||
| 78 | UINT8 m_seq_idx; | |
| 79 | 79 | UINT8 m_seq_data[0x1f]; |
| 80 | ||
| 80 | ||
| 81 | 81 | UINT8 m_attr_idx; |
| 82 | 82 | UINT8 m_attr_data[0x1f]; |
| 83 | 83 | UINT8 m_attr_state; |
| 84 | ||
| 84 | ||
| 85 | 85 | UINT8 m_gc_idx; |
| 86 | 86 | UINT8 m_gc_data[0x1f]; |
| 87 | ||
| 87 | ||
| 88 | 88 | UINT8 m_dac_mask; |
| 89 | 89 | UINT8 m_dac_write_idx; |
| 90 | 90 | UINT8 m_dac_read_idx; |
| r11247 | r11248 | |
|---|---|---|
| 117 | 117 | |
| 118 | 118 | if ((depth == 4) && (state->m_DISPCNT & DISPCNT_FRAMESEL)) |
| 119 | 119 | src16 += 0xa000/2; |
| 120 | ||
| 120 | ||
| 121 | 121 | // sign extend roz parameters |
| 122 | 122 | if (X & 0x08000000) X |= 0xf0000000; |
| 123 | 123 | if (Y & 0x08000000) Y |= 0xf0000000; |
| r11247 | r11248 | |
|---|---|---|
| 126 | 126 | compis_state(running_machine &machine, const driver_device_config_base &config) |
| 127 | 127 | : driver_device(machine, config), |
| 128 | 128 | m_hgdc(*this, "upd7220") |
| 129 | ||
| 129 | ||
| 130 | 130 | |
| 131 | 131 | required_device<upd7220_device> m_hgdc; |
| 132 | 132 |
| r11247 | r11248 | |
|---|---|---|
| 55 | 55 | required_device<device_t> m_centronics; |
| 56 | 56 | required_device<device_t> m_floppy; |
| 57 | 57 | required_device<device_t> m_ram; |
| 58 | ||
| 58 | ||
| 59 | 59 | virtual void machine_start(); |
| 60 | 60 | virtual void machine_reset(); |
| 61 | 61 | |
| r11247 | r11248 | |
| 78 | 78 | DECLARE_WRITE8_MEMBER( pio_pa_w ); |
| 79 | 79 | DECLARE_WRITE_LINE_MEMBER( strobe_w ); |
| 80 | 80 | DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); |
| 81 | ||
| 81 | ||
| 82 | 82 | void scan_keyboard(); |
| 83 | 83 | void bankswitch(); |
| 84 | ||
| 84 | ||
| 85 | 85 | /* memory state */ |
| 86 | 86 | int m_boot_rom; |
| 87 | 87 | int m_bank; |
| r11247 | r11248 | |
|---|---|---|
| 66 | 66 | DECLARE_WRITE8_MEMBER( port71_w ); |
| 67 | 67 | DECLARE_READ8_MEMBER( ppi_pc_r ); |
| 68 | 68 | DECLARE_WRITE8_MEMBER( ppi_pc_w ); |
| 69 | ||
| 69 | ||
| 70 | 70 | void scan_keyboard(); |
| 71 | 71 | void bankswitch(UINT8 data); |
| 72 | 72 |
| r11247 | r11248 | |
|---|---|---|
| 57 | 57 | DECLARE_READ8_MEMBER( videoram_r ); |
| 58 | 58 | DECLARE_WRITE8_MEMBER( keylatch_w ); |
| 59 | 59 | DECLARE_READ8_MEMBER( keydata_r ); |
| 60 | ||
| 60 | ||
| 61 | 61 | void bankswitch(); |
| 62 | ||
| 62 | ||
| 63 | 63 | /* cpu state */ |
| 64 | 64 | int m_ne555_int; |
| 65 | 65 |
| r11247 | r11248 | |
|---|---|---|
| 20 | 20 | m_terminal(*this, TERMINAL_TAG), |
| 21 | 21 | m_speech(*this, "tms5220") |
| 22 | 22 | { } |
| 23 | ||
| 23 | ||
| 24 | 24 | required_device<cpu_device> m_maincpu; |
| 25 | 25 | required_device<device_t> m_terminal; |
| 26 | 26 | required_device<device_t> m_speech; |
| r11247 | r11248 | |
|---|---|---|
| 44 | 44 | int m_mz800_ram_monitor; /* 1 if monitor rom banked in */ |
| 45 | 45 | |
| 46 | 46 | int m_hires_mode; /* 1 if in 640x200 mode */ |
| 47 | int m_screen; | |
| 47 | int m_screen; | |
| 48 | 48 | UINT8 *m_colorram; |
| 49 | 49 | UINT8 *m_videoram; |
| 50 | 50 | UINT8 m_speaker_level; |
| r11247 | r11248 | |
|---|---|---|
| 40 | 40 | required_device<device_t> m_ctc; |
| 41 | 41 | required_device<device_t> m_speaker; |
| 42 | 42 | required_device<device_t> m_cassette; |
| 43 | ||
| 43 | ||
| 44 | 44 | virtual void machine_start(); |
| 45 | 45 | virtual void machine_reset(); |
| 46 | 46 |
| r11247 | r11248 | |
|---|---|---|
| 63 | 63 | DECLARE_WRITE8_MEMBER( dma_mem_w ); |
| 64 | 64 | DECLARE_READ8_MEMBER( dma_io_r ); |
| 65 | 65 | DECLARE_WRITE8_MEMBER( dma_io_w ); |
| 66 | ||
| 66 | ||
| 67 | 67 | /* video state */ |
| 68 | 68 | UINT8 *m_char_rom; |
| 69 | 69 | int m_width80; |
| r11247 | r11248 | |
|---|---|---|
| 29 | 29 | |
| 30 | 30 | required_device<cpu_device> m_maincpu; |
| 31 | 31 | required_device<device_t> m_speaker; |
| 32 | ||
| 32 | ||
| 33 | 33 | virtual void machine_start(); |
| 34 | 34 | |
| 35 | 35 | DECLARE_READ8_MEMBER( riot_pa_r ); |
| r11247 | r11248 | |
|---|---|---|
| 56 | 56 | DECLARE_WRITE8_MEMBER( dma_w ); |
| 57 | 57 | DECLARE_READ8_MEMBER( pia_pa_r ); |
| 58 | 58 | DECLARE_WRITE8_MEMBER( pia_pa_w ); |
| 59 | ||
| 59 | ||
| 60 | 60 | /* keyboard state */ |
| 61 | 61 | UINT8 m_keylatch; |
| 62 | 62 |
| r11247 | r11248 | |
|---|---|---|
| 44 | 44 | virtual void machine_reset(); |
| 45 | 45 | |
| 46 | 46 | virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect); |
| 47 | ||
| 47 | ||
| 48 | 48 | READ8_MEMBER( gah40m_r ); |
| 49 | 49 | WRITE8_MEMBER( gah40m_w ); |
| 50 | 50 | READ8_MEMBER( gah40s_r ); |
| r11247 | r11248 | |
| 53 | 53 | READ8_MEMBER( krtn_0_3_r ); |
| 54 | 54 | READ8_MEMBER( krtn_4_7_r ); |
| 55 | 55 | WRITE8_MEMBER( ksc_w ); |
| 56 | ||
| 56 | ||
| 57 | 57 | void bankswitch(); |
| 58 | 58 | UINT8 krtn_read(); |
| 59 | ||
| 59 | ||
| 60 | 60 | /* GAH40M state */ |
| 61 | 61 | UINT16 m_icr; /* input capture register */ |
| 62 | 62 | UINT16 m_frc; /* free running counter */ |
| r11247 | r11248 | |
|---|---|---|
| 40 | 40 | DECLARE_WRITE8_MEMBER( pio1_pa_w ); |
| 41 | 41 | DECLARE_READ8_MEMBER( pio1_pb_r ); |
| 42 | 42 | DECLARE_WRITE8_MEMBER( pio1_pb_w ); |
| 43 | ||
| 43 | ||
| 44 | 44 | void update_display(); |
| 45 | ||
| 45 | ||
| 46 | 46 | /* display state */ |
| 47 | 47 | UINT8 m_digit; |
| 48 | 48 | UINT8 m_segment; |
| r11247 | r11248 | |
|---|---|---|
| 24 | 24 | devcb_write_line m_kb_set_clock_signal_func; |
| 25 | 25 | devcb_write_line m_kb_set_data_signal_func; |
| 26 | 26 | }; |
| 27 | ||
| 27 | ||
| 28 | 28 | // ======================> ibm5160_mb_device_config |
| 29 | ||
| 29 | ||
| 30 | 30 | class ibm5160_mb_device_config : public device_config, |
| 31 | 31 | public motherboard_interface |
| 32 | 32 | { |
| 33 | 33 | friend class ibm5160_mb_device; |
| 34 | 34 | |
| 35 | protected: | |
| 35 | protected: | |
| 36 | 36 | // construction/destruction |
| 37 | 37 | ibm5160_mb_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 38 | ||
| 38 | ||
| 39 | 39 | public: |
| 40 | 40 | // allocators |
| 41 | 41 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 42 | 42 | virtual device_t *alloc_device(running_machine &machine) const; |
| 43 | ||
| 43 | ||
| 44 | 44 | // inline configuration |
| 45 | 45 | static void static_set_cputag(device_config *device, const char *tag); |
| 46 | ||
| 46 | ||
| 47 | 47 | // optional information overrides |
| 48 | 48 | virtual machine_config_constructor device_mconfig_additions() const; |
| 49 | 49 | virtual const input_port_token *device_input_ports() const; |
| 50 | ||
| 50 | ||
| 51 | 51 | const char *m_cputag; |
| 52 | 52 | |
| 53 | 53 | protected: |
| 54 | 54 | // device_config overrides |
| 55 | virtual void device_config_complete(); | |
| 55 | virtual void device_config_complete(); | |
| 56 | 56 | }; |
| 57 | ||
| 58 | ||
| 57 | ||
| 58 | ||
| 59 | 59 | // ======================> ibm5160_mb_device |
| 60 | 60 | class ibm5160_mb_device : public device_t |
| 61 | 61 | { |
| 62 | 62 | friend class ibm5160_mb_device_config; |
| 63 | ||
| 63 | ||
| 64 | 64 | protected: |
| 65 | 65 | // construction/destruction |
| 66 | 66 | ibm5160_mb_device(running_machine &_machine, const ibm5160_mb_device_config &config); |
| r11247 | r11248 | |
| 81 | 81 | required_device<device_t> m_ppi8255; |
| 82 | 82 | required_device<device_t> m_speaker; |
| 83 | 83 | required_device<isa8_device> m_isabus; |
| 84 | ||
| 84 | ||
| 85 | 85 | devcb_resolved_write_line m_kb_set_clock_signal_func; |
| 86 | 86 | devcb_resolved_write_line m_kb_set_data_signal_func; |
| 87 | ||
| 87 | ||
| 88 | 88 | /* U73 is an LS74 - dual flip flop */ |
| 89 | 89 | /* Q2 is set by OUT1 from the 8253 and goes to DRQ1 on the 8237 */ |
| 90 | 90 | UINT8 m_u73_q2; |
| r11247 | r11248 | |
| 93 | 93 | UINT8 m_dma_offset[4]; |
| 94 | 94 | UINT8 m_pc_spkrdata; |
| 95 | 95 | UINT8 m_pc_input; |
| 96 | ||
| 96 | ||
| 97 | 97 | UINT8 m_nmi_enabled; |
| 98 | 98 | |
| 99 | 99 | int m_ppi_portc_switch_high; |
| r11247 | r11248 | |
| 105 | 105 | UINT8 m_ppi_data_signal; |
| 106 | 106 | UINT8 m_ppi_shift_register; |
| 107 | 107 | UINT8 m_ppi_shift_enable; |
| 108 | ||
| 108 | ||
| 109 | 109 | static IRQ_CALLBACK(pc_irq_callback); |
| 110 | ||
| 110 | ||
| 111 | 111 | // interface to the keyboard |
| 112 | 112 | DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); |
| 113 | 113 | DECLARE_WRITE_LINE_MEMBER( keyboard_data_w ); |
| r11247 | r11248 | |
| 118 | 118 | |
| 119 | 119 | DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out1_changed ); |
| 120 | 120 | DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out2_changed ); |
| 121 | ||
| 121 | ||
| 122 | 122 | DECLARE_WRITE_LINE_MEMBER( pc_dma_hrq_changed ); |
| 123 | 123 | DECLARE_WRITE_LINE_MEMBER( pc_dma8237_out_eop ); |
| 124 | 124 | DECLARE_READ8_MEMBER( pc_dma_read_byte ); |
| r11247 | r11248 | |
| 137 | 137 | |
| 138 | 138 | DECLARE_WRITE_LINE_MEMBER( pc_cpu_line ); |
| 139 | 139 | DECLARE_WRITE_LINE_MEMBER( pc_speaker_set_spkrdata ); |
| 140 | ||
| 140 | ||
| 141 | 141 | }; |
| 142 | ||
| 143 | ||
| 142 | ||
| 143 | ||
| 144 | 144 | // device type definition |
| 145 | 145 | extern const device_type IBM5160_MOTHERBOARD; |
| 146 | 146 | |
| r11247 | r11248 | |
| 151 | 151 | ibm5150_mb_device_config::static_set_cputag(device, _cputag); \ |
| 152 | 152 | |
| 153 | 153 | // ======================> ibm5150_mb_device_config |
| 154 | ||
| 154 | ||
| 155 | 155 | class ibm5150_mb_device_config : public ibm5160_mb_device_config |
| 156 | 156 | { |
| 157 | 157 | friend class ibm5150_mb_device; |
| 158 | 158 | friend class ibm5160_mb_device_config; |
| 159 | ||
| 159 | ||
| 160 | 160 | // construction/destruction |
| 161 | 161 | ibm5150_mb_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 162 | ||
| 162 | ||
| 163 | 163 | public: |
| 164 | 164 | // allocators |
| 165 | 165 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 166 | 166 | virtual device_t *alloc_device(running_machine &machine) const; |
| 167 | ||
| 167 | ||
| 168 | 168 | // optional information overrides |
| 169 | 169 | virtual machine_config_constructor device_mconfig_additions() const; |
| 170 | 170 | }; |
| 171 | ||
| 172 | ||
| 171 | ||
| 172 | ||
| 173 | 173 | // ======================> ibm5150_mb_device |
| 174 | 174 | class ibm5150_mb_device : public ibm5160_mb_device |
| 175 | 175 | { |
| 176 | 176 | friend class ibm5160_mb_device; |
| 177 | 177 | friend class ibm5150_mb_device_config; |
| 178 | ||
| 178 | ||
| 179 | 179 | // construction/destruction |
| 180 | 180 | ibm5150_mb_device(running_machine &_machine, const ibm5150_mb_device_config &config); |
| 181 | 181 | |
| r11247 | r11248 | |
| 183 | 183 | // device-level overrides |
| 184 | 184 | virtual void device_start(); |
| 185 | 185 | virtual void device_reset(); |
| 186 | ||
| 186 | ||
| 187 | 187 | required_device<device_t> m_cassette; |
| 188 | 188 | public: |
| 189 | 189 | virtual DECLARE_READ8_MEMBER ( pc_ppi_porta_r ); |
| 190 | 190 | 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 ); | |
| 192 | 192 | }; |
| 193 | ||
| 194 | ||
| 193 | ||
| 194 | ||
| 195 | 195 | // device type definition |
| 196 | 196 | extern const device_type IBM5150_MOTHERBOARD; |
| 197 | 197 |
| r11247 | r11248 | |
|---|---|---|
| 31 | 31 | m_speaker(*this, SPEAKER_TAG), |
| 32 | 32 | m_ram(*this, RAM_TAG) |
| 33 | 33 | { } |
| 34 | ||
| 34 | ||
| 35 | 35 | required_device<cpu_device> m_maincpu; |
| 36 | 36 | required_device<z80pio_device> m_pio2; |
| 37 | 37 | required_device<device_t> m_cassette; |
| 38 | 38 | required_device<device_t> m_speaker; |
| 39 | 39 | required_device<device_t> m_ram; |
| 40 | ||
| 40 | ||
| 41 | 41 | virtual void machine_start(); |
| 42 | 42 | |
| 43 | 43 | DECLARE_WRITE_LINE_MEMBER( ctc_z0_w ); |
| r11247 | r11248 | |
| 49 | 49 | DECLARE_READ8_MEMBER( pio2_pb_r ); |
| 50 | 50 | |
| 51 | 51 | void update_display(); |
| 52 | ||
| 52 | ||
| 53 | 53 | // display state |
| 54 | 54 | UINT8 m_digit; |
| 55 | 55 | UINT8 m_segment; |
| r11247 | r11248 | |
|---|---|---|
| 94 | 94 | |
| 95 | 95 | virtual void machine_start(); |
| 96 | 96 | virtual void machine_reset(); |
| 97 | ||
| 97 | ||
| 98 | 98 | virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect); |
| 99 | 99 | |
| 100 | 100 | DECLARE_WRITE8_MEMBER( ipc_w ); |
| r11247 | r11248 | |
| 114 | 114 | DECLARE_READ_LINE_MEMBER( zx8302_raw1_r ); |
| 115 | 115 | DECLARE_WRITE_LINE_MEMBER( zx8302_raw2_w ); |
| 116 | 116 | DECLARE_READ_LINE_MEMBER( zx8302_raw2_r ); |
| 117 | ||
| 117 | ||
| 118 | 118 | /* IPC state */ |
| 119 | 119 | UINT8 m_keylatch; |
| 120 | 120 | int m_ipl; |
| r11247 | r11248 | |
| 126 | 126 | DECLARE_WRITE8_MEMBER( disk_io_w ); |
| 127 | 127 | DECLARE_READ8_MEMBER( trump_card_rom_r ); |
| 128 | 128 | DECLARE_READ8_MEMBER( cart_rom_r ); |
| 129 | ||
| 129 | ||
| 130 | 130 | void trump_card_set_control(UINT8 data); |
| 131 | 131 | void sandy_set_control(UINT8 data); |
| 132 | ||
| 132 | ||
| 133 | 133 | int m_disk_type; |
| 134 | 134 | int m_disk_io_base; |
| 135 | 135 | UINT8 m_disk_io_byte; |
| r11247 | r11248 | |
|---|---|---|
| 50 | 50 | DECLARE_WRITE16_MEMBER( z_mode_w ); |
| 51 | 51 | DECLARE_WRITE16_MEMBER( color_status_w ); |
| 52 | 52 | DECLARE_READ16_MEMBER( sync_r ); |
| 53 | ||
| 53 | ||
| 54 | 54 | void update_clut(); |
| 55 | 55 | void draw_bitmap(screen_device *screen, bitmap_t *bitmap); |
| 56 | 56 | void draw_overlay(screen_device *screen, bitmap_t *bitmap); |
| 57 | ||
| 57 | ||
| 58 | 58 | /* interrupt state */ |
| 59 | 59 | UINT16 m_int_mask; |
| 60 | 60 |
| r11247 | r11248 | |
|---|---|---|
| 36 | 36 | DECLARE_WRITE8_MEMBER( pio1_pa_w ); |
| 37 | 37 | DECLARE_WRITE8_MEMBER( pio1_pb_w ); |
| 38 | 38 | DECLARE_WRITE_LINE_MEMBER( pio1_brdy_w ); |
| 39 | ||
| 39 | ||
| 40 | 40 | /* keyboard state */ |
| 41 | 41 | int m_keylatch; |
| 42 | 42 |
| r11247 | r11248 | |
|---|---|---|
| 40 | 40 | virtual void machine_reset(); |
| 41 | 41 | |
| 42 | 42 | virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect); |
| 43 | ||
| 43 | ||
| 44 | 44 | DECLARE_READ8_MEMBER( vismac_r ); |
| 45 | 45 | DECLARE_WRITE8_MEMBER( vismac_w ); |
| 46 | 46 | DECLARE_READ8_MEMBER( floppy_r ); |
| r11247 | r11248 | |
|---|---|---|
| 36 | 36 | required_device<cpu_device> m_maincpu; |
| 37 | 37 | required_device<cdp1861_device> m_vdc; |
| 38 | 38 | required_device<device_t> m_cassette; |
| 39 | ||
| 39 | ||
| 40 | 40 | virtual void machine_start(); |
| 41 | 41 | virtual void machine_reset(); |
| 42 | 42 | |
| r11247 | r11248 | |
| 101 | 101 | virtual void machine_reset(); |
| 102 | 102 | |
| 103 | 103 | virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect); |
| 104 | ||
| 104 | ||
| 105 | 105 | DECLARE_WRITE8_MEMBER( keylatch_w ); |
| 106 | 106 | DECLARE_WRITE8_MEMBER( bankswitch_w ); |
| 107 | 107 | DECLARE_READ_LINE_MEMBER( clear_r ); |
| r11247 | r11248 | |
| 112 | 112 | DECLARE_READ_LINE_MEMBER( rdata_r ); |
| 113 | 113 | DECLARE_READ_LINE_MEMBER( bdata_r ); |
| 114 | 114 | DECLARE_READ_LINE_MEMBER( gdata_r ); |
| 115 | ||
| 115 | ||
| 116 | 116 | void bankswitch(); |
| 117 | ||
| 117 | ||
| 118 | 118 | // memory |
| 119 | 119 | int m_rac; |
| 120 | 120 | int m_roc; |
| 121 | ||
| 121 | ||
| 122 | 122 | /* video state */ |
| 123 | 123 | UINT8 *m_colorram; /* color memory */ |
| 124 | 124 | UINT8 m_color; |
| r11247 | r11248 | |
|---|---|---|
| 78 | 78 | |
| 79 | 79 | virtual void video_start(); |
| 80 | 80 | virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect); |
| 81 | ||
| 81 | ||
| 82 | 82 | DECLARE_WRITE8_MEMBER( enrg1_w ); |
| 83 | 83 | DECLARE_WRITE8_MEMBER( a_enrg1_w ); |
| 84 | 84 | DECLARE_READ8_MEMBER( ust_r ); |
| r11247 | r11248 | |
| 103 | 103 | DECLARE_WRITE8_MEMBER( tvctl_w ); |
| 104 | 104 | DECLARE_READ8_MEMBER( cop_r ); |
| 105 | 105 | DECLARE_WRITE8_MEMBER( cop_w ); |
| 106 | ||
| 106 | ||
| 107 | 107 | void check_interrupt(); |
| 108 | 108 | void bankswitch(); |
| 109 | 109 | void tvram_w(UINT8 data, int a6); |
| 110 | 110 | inline int get_reset_t(); |
| 111 | 111 | inline int get_pwrup_t(); |
| 112 | 112 | void screen_update(bitmap_t *bitmap, const rectangle *cliprect); |
| 113 | ||
| 113 | ||
| 114 | 114 | // processor state |
| 115 | 115 | int m_pwrup; // power up |
| 116 | 116 | int m_userint; // user interrupt |
| r11247 | r11248 | |
| 204 | 204 | DECLARE_WRITE_LINE_MEMBER( ctc_z1_w ); |
| 205 | 205 | DECLARE_WRITE_LINE_MEMBER( ctc_z2_w ); |
| 206 | 206 | DECLARE_WRITE_LINE_MEMBER( adc_eoc_w ); |
| 207 | ||
| 207 | ||
| 208 | 208 | void bankswitch(); |
| 209 | 209 | |
| 210 | 210 | // paging state |
| r11247 | r11248 | |
|---|---|---|
| 22 | 22 | m_uart(*this, "i8251a_u15"), |
| 23 | 23 | m_pic(*this, "pic8259") |
| 24 | 24 | { } |
| 25 | ||
| 25 | ||
| 26 | 26 | required_device<cpu_device> m_maincpu; |
| 27 | 27 | required_device<cpu_device> m_dsp; |
| 28 | 28 | required_device<device_t> m_terminal; |
| r11247 | r11248 | |
|---|---|---|
| 31 | 31 | m_speaker(*this, SPEAKER_TAG), |
| 32 | 32 | m_centronics(*this, CENTRONICS_TAG) |
| 33 | 33 | { } |
| 34 | ||
| 34 | ||
| 35 | 35 | required_device<cpu_device> m_maincpu; |
| 36 | 36 | required_device<device_t> m_cassette; |
| 37 | 37 | required_device<device_t> m_speaker; |
| r11247 | r11248 | |
| 41 | 41 | |
| 42 | 42 | virtual void video_start(); |
| 43 | 43 | virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect); |
| 44 | ||
| 44 | ||
| 45 | 45 | DECLARE_WRITE8_MEMBER( p2_w ); |
| 46 | 46 | DECLARE_READ8_MEMBER( p3_r ); |
| 47 | 47 | DECLARE_WRITE8_MEMBER( p3_w ); |
| 48 | ||
| 48 | ||
| 49 | 49 | UINT8 *m_video_ram; |
| 50 | 50 | }; |
| 51 | 51 | |
| r11247 | r11248 | |
| 81 | 81 | DECLARE_READ8_MEMBER( videoram_r ); |
| 82 | 82 | DECLARE_WRITE8_MEMBER( videoram_w ); |
| 83 | 83 | DECLARE_WRITE8_MEMBER( banksel_w ); |
| 84 | ||
| 84 | ||
| 85 | 85 | UINT8 m_video_bank; |
| 86 | 86 | UINT8 *m_color_ram_r; |
| 87 | 87 | UINT8 *m_color_ram_g; |
| r11247 | r11248 | |
|---|---|---|
| 40 | 40 | |
| 41 | 41 | virtual void machine_start(); |
| 42 | 42 | virtual void machine_reset(); |
| 43 | ||
| 43 | ||
| 44 | 44 | void update_interrupts(); |
| 45 | 45 | void network_irq_enable(int enabled); |
| 46 | 46 | void hdc_irq_enable(int enabled); |
| r11247 | r11248 | |
| 59 | 59 | DECLARE_WRITE_LINE_MEMBER( adlc_irq_w ); |
| 60 | 60 | DECLARE_WRITE_LINE_MEMBER( via_irq_w ); |
| 61 | 61 | DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); |
| 62 | ||
| 62 | ||
| 63 | 63 | /* interrupt state */ |
| 64 | 64 | int m_adlc_ie; |
| 65 | 65 | int m_hdc_ie; |
| r11247 | r11248 | |
|---|---|---|
| 87 | 87 | |
| 88 | 88 | virtual void video_start(); |
| 89 | 89 | virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect); |
| 90 | ||
| 90 | ||
| 91 | 91 | DECLARE_READ8_MEMBER( mac_r ); |
| 92 | 92 | DECLARE_WRITE8_MEMBER( mac_w ); |
| 93 | 93 | DECLARE_READ8_MEMBER( cause_r ); |
| r11247 | r11248 | |
| 168 | 168 | inline void write_videoram(UINT32 offset, UINT16 data, UINT16 mask); |
| 169 | 169 | inline UINT16 get_crtca(UINT16 ma, UINT8 ra, UINT8 column); |
| 170 | 170 | 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 | ||
| 172 | 172 | // memory access controller |
| 173 | 173 | UINT8 m_task; |
| 174 | 174 | UINT8 m_segment_ram[0x400]; |
| 175 | 175 | UINT16 m_page_ram[0x400]; |
| 176 | ||
| 176 | ||
| 177 | 177 | // DMA |
| 178 | 178 | UINT8 m_dmamap[8]; |
| 179 | 179 | int m_dmadis; |
| r11247 | r11248 | |
| 209 | 209 | UINT16 m_yto; // Y to |
| 210 | 210 | UINT32 m_mfa; // mover from address |
| 211 | 211 | 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; // | |
| 217 | 217 | int m_rmc; // row match count |
| 218 | 218 | int m_cmc; // column match count |
| 219 | 219 | int m_amm; // active mover mask |
| r11247 | r11248 | |
|---|---|---|
| 84 | 84 | DECLARE_READ_LINE_MEMBER( ef4_r ); |
| 85 | 85 | DECLARE_WRITE_LINE_MEMBER( q_w ); |
| 86 | 86 | DECLARE_READ8_MEMBER( dma_r ); |
| 87 | ||
| 87 | ||
| 88 | 88 | void set_cdp1802_mode(int mode); |
| 89 | 89 | void clear_input_data(); |
| 90 | 90 | void set_ram_mode(); |
| 91 | ||
| 92 | ||
| 91 | ||
| 92 | ||
| 93 | 93 | /* CPU state */ |
| 94 | 94 | int m_wait; |
| 95 | 95 | int m_clear; |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /****************************************************************************** |
| 2 | 2 | |
| 3 | 3 | mess.lst |
| 4 | ||
| 4 | ||
| 5 | 5 | List of all enabled drivers in the system. This file is parsed by |
| 6 | 6 | makelist.exe, sorted, and output as C code describing the drivers. |
| 7 | 7 | |
| r11247 | r11248 | |
| 39 | 39 | ******************************************************************************/ |
| 40 | 40 | |
| 41 | 41 | // 3DO |
| 42 | 3do // 3DO consoles | |
| 42 | 3do // 3DO consoles | |
| 43 | 43 | 3do_pal |
| 44 | 44 | |
| 45 | 45 | // Atari |
| 46 | a2600 // Atari 2600 | |
| 47 | a2600p // Atari 2600 PAL | |
| 48 | a5200 // Atari 5200 | |
| 49 | a7800 // Atari 7800 NTSC | |
| 50 | a7800p // Atari 7800 PAL | |
| 51 | lynx // Atari Lynx Handheld | |
| 52 | // lynx2 // Atari Lynx II Handheld redesigned, no additions | |
| 53 | jaguar // Atari Jaguar | |
| 54 | jaguarcd // Atari Jaguar CD | |
| 46 | a2600 // Atari 2600 | |
| 47 | a2600p // Atari 2600 PAL | |
| 48 | a5200 // Atari 5200 | |
| 49 | a7800 // Atari 7800 NTSC | |
| 50 | a7800p // Atari 7800 PAL | |
| 51 | lynx // Atari Lynx Handheld | |
| 52 | // lynx2 // Atari Lynx II Handheld redesigned, no additions | |
| 53 | jaguar // Atari Jaguar | |
| 54 | jaguarcd // Atari Jaguar CD | |
| 55 | 55 | |
| 56 | 56 | // Nintendo |
| 57 | 57 | nes // Nintendo Entertainment System |
| r11247 | r11248 | |
| 77 | 77 | snesst10 // Nintendo Super Nintendo NTSC w/ST-010 CPU |
| 78 | 78 | snesst11 // Nintendo Super Nintendo NTSC w/ST-011 CPU |
| 79 | 79 | snesst // Nintendo Super Nintendo NTSC w/Sufami Turbo base cart |
| 80 | snesbsx // Nintendo Super Nintendo NTSC w/BS-X compatible cart | |
| 81 | n64 // Nintendo N64 | |
| 80 | snesbsx // Nintendo Super Nintendo NTSC w/BS-X compatible cart | |
| 81 | n64 // Nintendo N64 | |
| 82 | 82 | pokemini // Nintendo Pokemon Mini |
| 83 | 83 | |
| 84 | megaduck // Megaduck | |
| 84 | megaduck // Megaduck | |
| 85 | 85 | |
| 86 | 86 | // SEGA |
| 87 | sg1000 // Sega SG-1000 (Japan) | |
| 88 | sg1000m2 // Sega SG-1000 Mark II (Japan) | |
| 89 | sc3000 // Sega SC-3000 (Japan) | |
| 90 | sc3000h // Sega SC-3000H (Japan) | |
| 91 | sf7000 // Sega SC-3000 w/ SF-7000 (Japan) | |
| 92 | omv1000 // Tsukuda Original Othello Multivision FG-1000 | |
| 93 | omv2000 // Tsukuda Original Othello Multivision FG-2000 | |
| 87 | sg1000 // Sega SG-1000 (Japan) | |
| 88 | sg1000m2 // Sega SG-1000 Mark II (Japan) | |
| 89 | sc3000 // Sega SC-3000 (Japan) | |
| 90 | sc3000h // Sega SC-3000H (Japan) | |
| 91 | sf7000 // Sega SC-3000 w/ SF-7000 (Japan) | |
| 92 | omv1000 // Tsukuda Original Othello Multivision FG-1000 | |
| 93 | omv2000 // Tsukuda Original Othello Multivision FG-2000 | |
| 94 | 94 | |
| 95 | gamegear // Sega GameGear | |
| 96 | gamegeaj // Sega GameGear (Japan) | |
| 97 | sms // Sega Master System II (NTSC) | |
| 98 | sms1 // Sega Master System I (NTSC) | |
| 99 | sms1pal // Sega Master System I (PAL) | |
| 100 | smspal // Sega Master System II (PAL) | |
| 101 | smsj // Sega Master System (Japan) with FM Chip | |
| 102 | sg1000m3 // Sega SG-1000 Mark III (Japan) | |
| 103 | sms2kr // Samsung Gam*Boy II (Korea) | |
| 104 | smssdisp // Sega Master System Store Display Unit | |
| 95 | gamegear // Sega GameGear | |
| 96 | gamegeaj // Sega GameGear (Japan) | |
| 97 | sms // Sega Master System II (NTSC) | |
| 98 | sms1 // Sega Master System I (NTSC) | |
| 99 | sms1pal // Sega Master System I (PAL) | |
| 100 | smspal // Sega Master System II (PAL) | |
| 101 | smsj // Sega Master System (Japan) with FM Chip | |
| 102 | sg1000m3 // Sega SG-1000 Mark III (Japan) | |
| 103 | sms2kr // Samsung Gam*Boy II (Korea) | |
| 104 | smssdisp // Sega Master System Store Display Unit | |
| 105 | 105 | |
| 106 | megadrij // 1988 Sega Mega Drive (Japan) | |
| 107 | genesis // 1989 Sega Genesis (USA) | |
| 108 | gensvp // 1993 Sega Genesis (USA w/SVP chip) | |
| 109 | megadriv // 1990 Sega Mega Drive (Europe) | |
| 110 | pico // 1994 Sega Pico (Europe) | |
| 111 | picou // 1994 Sega Pico (USA) | |
| 112 | picoj // 1993 Sega Pico (Japan) | |
| 113 | segacd // 1992 Sega Sega CD (USA) | |
| 114 | megacd // 1993 Sega Mega-CD (Europe) | |
| 115 | megacda // 1993 Sega Mega-CD (Asia) | |
| 116 | megacdj // 1991 Sega Mega-CD (Japan) | |
| 117 | segacd2 // 1993 Sega Sega CD 2 (USA) | |
| 118 | megacd2 // 1993 Sega Mega-CD 2 (Europe) | |
| 119 | megacd2j // 1993 Sega Mega-CD 2 (Japan) | |
| 120 | laseract // 1993 Pioneer LaserActive (USA) | |
| 121 | laseractj // 1993 Pioneer LaserActive (Japan) | |
| 122 | xeye // 1993 JVC X'eye (USA) | |
| 123 | wmega // 1992 Sega Wondermega (Japan) | |
| 124 | wmegam2 // 1993 Victor Wondermega M2 (Japan) | |
| 125 | cdx // 1994 Sega CDX (USA) | |
| 126 | multmega // 1994 Sega Multi-Mega (Europe) | |
| 127 | 32x // 1994 Sega 32X (USA) | |
| 128 | 32x_scd // 1994 Sega Sega CD (USA w/32X addon) | |
| 106 | megadrij // 1988 Sega Mega Drive (Japan) | |
| 107 | genesis // 1989 Sega Genesis (USA) | |
| 108 | gensvp // 1993 Sega Genesis (USA w/SVP chip) | |
| 109 | megadriv // 1990 Sega Mega Drive (Europe) | |
| 110 | pico // 1994 Sega Pico (Europe) | |
| 111 | picou // 1994 Sega Pico (USA) | |
| 112 | picoj // 1993 Sega Pico (Japan) | |
| 113 | segacd // 1992 Sega Sega CD (USA) | |
| 114 | megacd // 1993 Sega Mega-CD (Europe) | |
| 115 | megacda // 1993 Sega Mega-CD (Asia) | |
| 116 | megacdj // 1991 Sega Mega-CD (Japan) | |
| 117 | segacd2 // 1993 Sega Sega CD 2 (USA) | |
| 118 | megacd2 // 1993 Sega Mega-CD 2 (Europe) | |
| 119 | megacd2j // 1993 Sega Mega-CD 2 (Japan) | |
| 120 | laseract // 1993 Pioneer LaserActive (USA) | |
| 121 | laseractj // 1993 Pioneer LaserActive (Japan) | |
| 122 | xeye // 1993 JVC X'eye (USA) | |
| 123 | wmega // 1992 Sega Wondermega (Japan) | |
| 124 | wmegam2 // 1993 Victor Wondermega M2 (Japan) | |
| 125 | cdx // 1994 Sega CDX (USA) | |
| 126 | multmega // 1994 Sega Multi-Mega (Europe) | |
| 127 | 32x // 1994 Sega 32X (USA) | |
| 128 | 32x_scd // 1994 Sega Sega CD (USA w/32X addon) | |
| 129 | 129 | |
| 130 | saturnjp // 1994 Sega Saturn (Japan) | |
| 131 | saturn // 1995 Sega Saturn (USA) | |
| 132 | saturneu // 1995 Sega Saturn (Europe) | |
| 133 | vsaturn // JVC V-Saturn | |
| 134 | hisaturn // Hitachi HiSaturn | |
| 130 | saturnjp // 1994 Sega Saturn (Japan) | |
| 131 | saturn // 1995 Sega Saturn (USA) | |
| 132 | saturneu // 1995 Sega Saturn (Europe) | |
| 133 | vsaturn // JVC V-Saturn | |
| 134 | hisaturn // Hitachi HiSaturn | |
| 135 | 135 | |
| 136 | 136 | dcjp // 1998 Sega Dreamcast (Japan) |
| 137 | 137 | dc // 1999 Sega Dreamcast (USA) |
| r11247 | r11248 | |
| 140 | 140 | |
| 141 | 141 | // Sony |
| 142 | 142 | psj // 1994 Sony PlayStation (Japan) |
| 143 | psu // 1995 Sony PlayStation (USA) | |
| 144 | pse // 1995 Sony PlayStation (Europe) | |
| 145 | psa // 1995 Sony PlayStation (Asia-Pacific) | |
| 146 | pockstat // 1999 Sony PocketStation | |
| 143 | psu // 1995 Sony PlayStation (USA) | |
| 144 | pse // 1995 Sony PlayStation (Europe) | |
| 145 | psa // 1995 Sony PlayStation (Asia-Pacific) | |
| 146 | pockstat // 1999 Sony PocketStation | |
| 147 | 147 | |
| 148 | 148 | // Bally |
| 149 | astrocde // Bally Professional Arcade / Astrocade | |
| 150 | astrocdl // Bally Home Library Computer | |
| 151 | astrocdw // Bally Computer System (white case) | |
| 149 | astrocde // Bally Professional Arcade / Astrocade | |
| 150 | astrocdl // Bally Home Library Computer | |
| 151 | astrocdw // Bally Computer System (white case) | |
| 152 | 152 | |
| 153 | 153 | // RCA |
| 154 | vip // 1977 Cosmac VIP VP-711 | |
| 155 | vp111 // 1977 Cosmac VIP VP-111 | |
| 156 | studio2 // 1977 Studio II | |
| 154 | vip // 1977 Cosmac VIP VP-711 | |
| 155 | vp111 // 1977 Cosmac VIP VP-111 | |
| 156 | studio2 // 1977 Studio II | |
| 157 | 157 | visicom |
| 158 | 158 | mpt02 |
| 159 | 159 | eti660 |
| 160 | 160 | mpt02h |
| 161 | mtc9016 // 1978 Mustang 9016 Telespiel Computer | |
| 161 | mtc9016 // 1978 Mustang 9016 Telespiel Computer | |
| 162 | 162 | shmc1200 |
| 163 | 163 | cm1200 |
| 164 | 164 | apollo80 |
| r11247 | r11248 | |
| 169 | 169 | esq1 // 1986 ESQ-1 Digital Wave Synthesizer |
| 170 | 170 | |
| 171 | 171 | // Fairchild |
| 172 | channelf // Fairchild Channel F VES - 1976 | |
| 173 | sabavdpl // SABA Videoplay - 1977 (PAL) | |
| 174 | luxorves // Luxor Video Entertainment System (PAL) | |
| 175 | channlf2 // Fairchild Channel F II - 1978 | |
| 176 | sabavpl2 // SABA Videoplay 2 (PAL) | |
| 177 | luxorvec // Luxor Video Entertainment Computer (PAL) | |
| 178 | itttelma // ITT Tele-Match Processor (PAL) | |
| 179 | ingtelma // Ingelen Tele-Match Processor (PAL) | |
| 172 | channelf // Fairchild Channel F VES - 1976 | |
| 173 | sabavdpl // SABA Videoplay - 1977 (PAL) | |
| 174 | luxorves // Luxor Video Entertainment System (PAL) | |
| 175 | channlf2 // Fairchild Channel F II - 1978 | |
| 176 | sabavpl2 // SABA Videoplay 2 (PAL) | |
| 177 | luxorvec // Luxor Video Entertainment Computer (PAL) | |
| 178 | itttelma // ITT Tele-Match Processor (PAL) | |
| 179 | ingtelma // Ingelen Tele-Match Processor (PAL) | |
| 180 | 180 | |
| 181 | 181 | // Casio |
| 182 | 182 | pv1000 // Casio PV-1000 |
| r11247 | r11248 | |
| 187 | 187 | cfx9850 // Casio CFX-9850 |
| 188 | 188 | |
| 189 | 189 | // Coleco |
| 190 | coleco // ColecoVision (Original BIOS) | |
| 191 | colecoa // ColecoVision (Thick Characters) | |
| 192 | colecob // Spectravideo SVI-603 Coleco Game Adapter | |
| 193 | czz50 // Bit Corporation Chuang Zao Zhe 50 | |
| 194 | dina // Telegames Dina | |
| 195 | prsarcde // Telegames Personal Arcade | |
| 196 | adam // Coleco Adam | |
| 190 | coleco // ColecoVision (Original BIOS) | |
| 191 | colecoa // ColecoVision (Thick Characters) | |
| 192 | colecob // Spectravideo SVI-603 Coleco Game Adapter | |
| 193 | czz50 // Bit Corporation Chuang Zao Zhe 50 | |
| 194 | dina // Telegames Dina | |
| 195 | prsarcde // Telegames Personal Arcade | |
| 196 | adam // Coleco Adam | |
| 197 | 197 | |
| 198 | 198 | // NEC |
| 199 | pce // PC/Engine NEC 1987-1993 | |
| 200 | tg16 // Turbo Grafix-16 NEC 1989-1993 | |
| 201 | sgx // SuperGrafX NEC 1989 | |
| 202 | pcfx // PC-FX NEC 1994 | |
| 199 | pce // PC/Engine NEC 1987-1993 | |
| 200 | tg16 // Turbo Grafix-16 NEC 1989-1993 | |
| 201 | sgx // SuperGrafX NEC 1989 | |
| 202 | pcfx // PC-FX NEC 1994 | |
| 203 | 203 | pcfxga // PC-FX NEC 199? (PC-FX on a PC ISA Card) |
| 204 | 204 | |
| 205 | 205 | // Arcadia 2001 family |
| 206 | advsnha // Advision Home Arcade | |
| 207 | bndarc // Bandai Arcadia | |
| 208 | arcadia // Emerson Arcadia 2001 | |
| 209 | tccosmos // Tele-Computer Cosmos | |
| 210 | dynavisn // Dynavision | |
| 211 | ekusera // Ekusera | |
| 212 | hanihac // Hanimex Home Arcade Centre | |
| 213 | hmg2650 // Hanimex HMG-2650 | |
| 214 | intmpt03 // Intelligent Game MPT-03 | |
| 215 | ixl2000 // Intercord XL 2000 System | |
| 216 | intervsn // Intervision 2001 | |
| 217 | itmcmtp3 // ITMC MPT-03 | |
| 218 | lvision // Leisure-Vision | |
| 219 | leonardo // Leonardo | |
| 220 | mratlus // Mr. Altus Tele Brain | |
| 221 | ormatu // Ormatu 2001 | |
| 222 | plldium // Palladium Video-Computer-Game | |
| 223 | polyvcg // Polybrain Video Computer Game | |
| 206 | advsnha // Advision Home Arcade | |
| 207 | bndarc // Bandai Arcadia | |
| 208 | arcadia // Emerson Arcadia 2001 | |
| 209 | tccosmos // Tele-Computer Cosmos | |
| 210 | dynavisn // Dynavision | |
| 211 | ekusera // Ekusera | |
| 212 | hanihac // Hanimex Home Arcade Centre | |
| 213 | hmg2650 // Hanimex HMG-2650 | |
| 214 | intmpt03 // Intelligent Game MPT-03 | |
| 215 | ixl2000 // Intercord XL 2000 System | |
| 216 | intervsn // Intervision 2001 | |
| 217 | itmcmtp3 // ITMC MPT-03 | |
| 218 | lvision // Leisure-Vision | |
| 219 | leonardo // Leonardo | |
| 220 | mratlus // Mr. Altus Tele Brain | |
| 221 | ormatu // Ormatu 2001 | |
| 222 | plldium // Palladium Video-Computer-Game | |
| 223 | polyvcg // Polybrain Video Computer Game | |
| 224 | 224 | poppympt // Poppy MPT-03 Tele Computer Spiel |
| 225 | prestmpt // Prestige Video Computer Game MPT-03 | |
| 225 | prestmpt // Prestige Video Computer Game MPT-03 | |
| 226 | 226 | rowtrn2k // Rowtron 2000 |
| 227 | tvg2000 // Schmid TVG 2000 | |
| 228 | sheenhvc // Sheen Home Video Centre 2001 | |
| 229 | soundic // Soundic MPT-03 | |
| 230 | telefevr // Tchibo Tele-Fever | |
| 231 | tempestm // Tempest MPT-03 | |
| 232 | tbbympt3 // Tobby MPT-03 | |
| 233 | trakcvg // Trakton Computer Video Game | |
| 234 | tunixha // Tunix Home Arcade | |
| 235 | tryomvgc // Tryom Video Game Center | |
| 236 | orbituvi // UVI Compu-Game | |
| 237 | vdmaster // Video Master | |
| 227 | tvg2000 // Schmid TVG 2000 | |
| 228 | sheenhvc // Sheen Home Video Centre 2001 | |
| 229 | soundic // Soundic MPT-03 | |
| 230 | telefevr // Tchibo Tele-Fever | |
| 231 | tempestm // Tempest MPT-03 | |
| 232 | tbbympt3 // Tobby MPT-03 | |
| 233 | trakcvg // Trakton Computer Video Game | |
| 234 | tunixha // Tunix Home Arcade | |
| 235 | tryomvgc // Tryom Video Game Center | |
| 236 | orbituvi // UVI Compu-Game | |
| 237 | vdmaster // Video Master | |
| 238 | 238 | |
| 239 | 239 | // Radofin 1292 Advanced Programmable Video System family |
| 240 | 240 | vc4000 // Interton vc4000 |
| r11247 | r11248 | |
| 267 | 267 | gp2x // GP2X 2005 |
| 268 | 268 | |
| 269 | 269 | // GCE |
| 270 | vectrex // General Consumer Electric Vectrex - 1982-1984 | |
| 271 | // (aka Milton-Bradley Vectrex) | |
| 272 | raaspec // RA+A Spectrum - Modified Vectrex | |
| 270 | vectrex // General Consumer Electric Vectrex - 1982-1984 | |
| 271 | // (aka Milton-Bradley Vectrex) | |
| 272 | raaspec // RA+A Spectrum - Modified Vectrex | |
| 273 | 273 | |
| 274 | 274 | // Mattel |
| 275 | intv // Mattel Intellivision - 1979 AKA INTV | |
| 276 | intvsrs // Intellivision (Sears License) - 19?? | |
| 275 | intv // Mattel Intellivision - 1979 AKA INTV | |
| 276 | intvsrs // Intellivision (Sears License) - 19?? | |
| 277 | 277 | |
| 278 | 278 | // Entex |
| 279 | advision // Adventurevision | |
| 279 | advision // Adventurevision | |
| 280 | 280 | |
| 281 | 281 | // Capcom |
| 282 | sfach // CPS Changer (Street Fighter Alpha) | |
| 283 | sfzbch // CPS Changer (Street Fighter ZERO Brazil) | |
| 284 | sfzch // CPS Changer (Street Fighter ZERO) | |
| 285 | wofch // CPS Changer (Tenchi Wo Kurau II) | |
| 282 | sfach // CPS Changer (Street Fighter Alpha) | |
| 283 | sfzbch // CPS Changer (Street Fighter ZERO Brazil) | |
| 284 | sfzch // CPS Changer (Street Fighter ZERO) | |
| 285 | wofch // CPS Changer (Tenchi Wo Kurau II) | |
| 286 | 286 | |
| 287 | 287 | // Magnavox |
| 288 | odyssey2 // Magnavox Odyssey 2 - 1978-1983 | |
| 288 | odyssey2 // Magnavox Odyssey 2 - 1978-1983 | |
| 289 | 289 | |
| 290 | 290 | // Hartung, Watara, ... |
| 291 | gmaster // Hartung Gamemaster | |
| 291 | gmaster // Hartung Gamemaster | |
| 292 | 292 | |
| 293 | 293 | // Watara |
| 294 | svision // Supervision Handheld | |
| 294 | svision // Supervision Handheld | |
| 295 | 295 | svisions |
| 296 | 296 | svisionp |
| 297 | 297 | svisionn |
| 298 | 298 | tvlinkp |
| 299 | 299 | |
| 300 | 300 | // BANDAI |
| 301 | wswan // Bandai WonderSwan Handheld | |
| 302 | wscolor // Bandai WonderSwan Color Handheld | |
| 301 | wswan // Bandai WonderSwan Handheld | |
| 302 | wscolor // Bandai WonderSwan Color Handheld | |
| 303 | 303 | |
| 304 | 304 | // EPOCH |
| 305 | gamepock // Epoch Game Pocket Computer | |
| 305 | gamepock // Epoch Game Pocket Computer | |
| 306 | 306 | |
| 307 | 307 | // KOEI |
| 308 | pasogo // KOEI PasoGo | |
| 308 | pasogo // KOEI PasoGo | |
| 309 | 309 | |
| 310 | 310 | // SNK |
| 311 | 311 | ngp // NeoGeo Pocket |
| 312 | ngpc // NeoGeo Pocket Color | |
| 313 | aes // NeoGeo AES | |
| 314 | neocd // NeoGeo CD | |
| 315 | neocdz // NeoGeo CDZ | |
| 312 | ngpc // NeoGeo Pocket Color | |
| 313 | aes // NeoGeo AES | |
| 314 | neocd // NeoGeo CD | |
| 315 | neocdz // NeoGeo CDZ | |
| 316 | 316 | |
| 317 | 317 | // Philips |
| 318 | cdimono1 // Philips CD-i (Mono-I board) | |
| 318 | cdimono1 // Philips CD-i (Mono-I board) | |
| 319 | 319 | |
| 320 | 320 | //***************COMPUTERS************************************************** |
| 321 | 321 | |
| 322 | 322 | // Acorn |
| 323 | acrnsys1 // 1979 Acorn System 1 (Microcomputer Kit) | |
| 324 | atom // 1979 Acorn Atom | |
| 325 | atomeb // 1979 Acorn Atom | |
| 326 | bbca // 1981 BBC Micro Model A | |
| 327 | bbcb // 1981 BBC Micro Model B | |
| 328 | bbcbp // 198? BBC Micro Model B+ 64K | |
| 329 | bbcbp128 // 198? BBC Micro Model B+ 128K | |
| 330 | bbcm // 198? BBC Master | |
| 331 | bbcbc // 1985 BBC Bridge Companion | |
| 332 | electron // 1983 Acorn Electron | |
| 333 | a310 // 1988 Acorn Archimedes 310 | |
| 334 | a7000 // 1995 Acorn Archimedes 7000 | |
| 335 | a7000p // 1997 Acorn Archimedes 7000+ | |
| 323 | acrnsys1 // 1979 Acorn System 1 (Microcomputer Kit) | |
| 324 | atom // 1979 Acorn Atom | |
| 325 | atomeb // 1979 Acorn Atom | |
| 326 | bbca // 1981 BBC Micro Model A | |
| 327 | bbcb // 1981 BBC Micro Model B | |
| 328 | bbcbp // 198? BBC Micro Model B+ 64K | |
| 329 | bbcbp128 // 198? BBC Micro Model B+ 128K | |
| 330 | bbcm // 198? BBC Master | |
| 331 | bbcbc // 1985 BBC Bridge Companion | |
| 332 | electron // 1983 Acorn Electron | |
| 333 | a310 // 1988 Acorn Archimedes 310 | |
| 334 | a7000 // 1995 Acorn Archimedes 7000 | |
| 335 | a7000p // 1997 Acorn Archimedes 7000+ | |
| 336 | 336 | a6809 |
| 337 | 337 | |
| 338 | 338 | // ACT |
| r11247 | r11248 | |
| 343 | 343 | aprifp |
| 344 | 344 | |
| 345 | 345 | // Cambridge Computers |
| 346 | z88 // | |
| 346 | z88 // | |
| 347 | 347 | |
| 348 | 348 | // Amstrad / Schneider |
| 349 | cpc464 // Amstrad (Schneider in Germany) 1984 | |
| 350 | cpc664 // Amstrad (Schneider in Germany) 1985 | |
| 351 | cpc6128 // Amstrad (Schneider in Germany) 1985 | |
| 352 | cpc6128s // Amstrad (Schneider in Germany) 1985 | |
| 353 | cpc6128f // Amstrad (Schneider in Germany) 1985 (AZERTY) | |
| 354 | cpc464p // Amstrad CPC464 Plus - 1990 | |
| 355 | cpc6128p // Amstrad CPC6128 Plus - 1990 | |
| 356 | gx4000 // Amstrad GX4000 - 1990 | |
| 357 | kccomp // VEB KC compact | |
| 358 | al520ex // Patisonic Aleste 520EX (1993) | |
| 359 | pcw8256 // 198? PCW8256 | |
| 360 | pcw8512 // 198? PCW8512 | |
| 361 | pcw9256 // 198? PCW9256 | |
| 362 | pcw9512 // 198? PCW9512 (+) | |
| 363 | pcw10 // 198? PCW10 | |
| 364 | pcw16 // 1995 PCW16 | |
| 365 | nc100 // 1992 NC100 | |
| 366 | nc150 // 1992 NC150 | |
| 367 | nc200 // 1993 NC200 | |
| 349 | cpc464 // Amstrad (Schneider in Germany) 1984 | |
| 350 | cpc664 // Amstrad (Schneider in Germany) 1985 | |
| 351 | cpc6128 // Amstrad (Schneider in Germany) 1985 | |
| 352 | cpc6128s // Amstrad (Schneider in Germany) 1985 | |
| 353 | cpc6128f // Amstrad (Schneider in Germany) 1985 (AZERTY) | |
| 354 | cpc464p // Amstrad CPC464 Plus - 1990 | |
| 355 | cpc6128p // Amstrad CPC6128 Plus - 1990 | |
| 356 | gx4000 // Amstrad GX4000 - 1990 | |
| 357 | kccomp // VEB KC compact | |
| 358 | al520ex // Patisonic Aleste 520EX (1993) | |
| 359 | pcw8256 // 198? PCW8256 | |
| 360 | pcw8512 // 198? PCW8512 | |
| 361 | pcw9256 // 198? PCW9256 | |
| 362 | pcw9512 // 198? PCW9512 (+) | |
| 363 | pcw10 // 198? PCW10 | |
| 364 | pcw16 // 1995 PCW16 | |
| 365 | nc100 // 1992 NC100 | |
| 366 | nc150 // 1992 NC150 | |
| 367 | nc200 // 1993 NC200 | |
| 368 | 368 | |
| 369 | 369 | // Apple |
| 370 | apple1 // Jul 1976 Apple 1 | |
| 371 | apple2 // Apr 1977 Apple ][ | |
| 372 | apple2p // Jun 1979 Apple ][+ | |
| 373 | prav82 // Pravetz 82 | |
| 374 | prav8m // Pravetz 8M | |
| 375 | apple2jp // ??? ???? Apple ][j+ | |
| 376 | apple2e // Jan 1983 Apple //e | |
| 377 | mprof3 // Microprofessor III | |
| 378 | apple2ee // Mar 1985 Apple //e Enhanced | |
| 379 | apple2ep // Jan 1987 Apple //e Platinum | |
| 380 | apple2c // Apr 1984 Apple //c | |
| 381 | prav8c // Pravetz 8C | |
| 382 | apple2c0 // ??? 1985 Apple //c (3.5 ROM) | |
| 383 | apple2c3 // Sep 1986 Apple //c (Original Mem. Exp.) | |
| 384 | apple2c4 // ??? 198? Apple //c (rev 4) | |
| 385 | apple2cp // Sep 1988 Apple //c+ | |
| 386 | apple2gsr0 // Sep 1986 Apple IIgs ROM00 | |
| 387 | apple2gsr1 // Sep 1987 Apple IIgs ROM01 | |
| 388 | apple2gs // Aug 1989 Apple IIgs ROM03 | |
| 389 | apple2gsr3p // ??? 198? Apple IIgs ROM03 prototype | |
| 390 | apple2gsr3lp // ??? 1989 Apple IIgs ROM03 late? prototype | |
| 391 | apple3 // May 1980 Apple /// | |
| 392 | // Dec 1983 Apple ///+ | |
| 393 | ace100 // ??? 1982 Franklin Ace 100 | |
| 394 | laser128 // ??? 1987 Laser 128 | |
| 395 | las128ex // ??? 1987 Laser 128 EX | |
| 396 | las3000 // ??? 1983 Laser 3000 | |
| 397 | ivelultr // Ivasim Ivel Ultra | |
| 398 | agat7 // Agat-7 | |
| 399 | agat9 // Agat-9 | |
| 370 | apple1 // Jul 1976 Apple 1 | |
| 371 | apple2 // Apr 1977 Apple ][ | |
| 372 | apple2p // Jun 1979 Apple ][+ | |
| 373 | prav82 // Pravetz 82 | |
| 374 | prav8m // Pravetz 8M | |
| 375 | apple2jp // ??? ???? Apple ][j+ | |
| 376 | apple2e // Jan 1983 Apple //e | |
| 377 | mprof3 // Microprofessor III | |
| 378 | apple2ee // Mar 1985 Apple //e Enhanced | |
| 379 | apple2ep // Jan 1987 Apple //e Platinum | |
| 380 | apple2c // Apr 1984 Apple //c | |
| 381 | prav8c // Pravetz 8C | |
| 382 | apple2c0 // ??? 1985 Apple //c (3.5 ROM) | |
| 383 | apple2c3 // Sep 1986 Apple //c (Original Mem. Exp.) | |
| 384 | apple2c4 // ??? 198? Apple //c (rev 4) | |
| 385 | apple2cp // Sep 1988 Apple //c+ | |
| 386 | apple2gsr0 // Sep 1986 Apple IIgs ROM00 | |
| 387 | apple2gsr1 // Sep 1987 Apple IIgs ROM01 | |
| 388 | apple2gs // Aug 1989 Apple IIgs ROM03 | |
| 389 | apple2gsr3p // ??? 198? Apple IIgs ROM03 prototype | |
| 390 | apple2gsr3lp // ??? 1989 Apple IIgs ROM03 late? prototype | |
| 391 | apple3 // May 1980 Apple /// | |
| 392 | // Dec 1983 Apple ///+ | |
| 393 | ace100 // ??? 1982 Franklin Ace 100 | |
| 394 | laser128 // ??? 1987 Laser 128 | |
| 395 | las128ex // ??? 1987 Laser 128 EX | |
| 396 | las3000 // ??? 1983 Laser 3000 | |
| 397 | ivelultr // Ivasim Ivel Ultra | |
| 398 | agat7 // Agat-7 | |
| 399 | agat9 // Agat-9 | |
| 400 | 400 | |
| 401 | 401 | // Lisa January 1983 |
| 402 | 402 | // Lisa 2 January 1984 |
| 403 | 403 | //Macintosh XL January 1985 |
| 404 | 404 | |
| 405 | lisa // 1983 Apple Lisa | |
| 406 | lisa2 // 1984 Apple Lisa 2 | |
| 407 | lisa210 // 1984 Apple Lisa 2/10 | |
| 408 | macxl // 1985 Apple Macintosh XL | |
| 405 | lisa // 1983 Apple Lisa | |
| 406 | lisa2 // 1984 Apple Lisa 2 | |
| 407 | lisa210 // 1984 Apple Lisa 2/10 | |
| 408 | macxl // 1985 Apple Macintosh XL | |
| 409 | 409 | |
| 410 | 410 | // Macintosh January 1984 |
| 411 | 411 | // Macintosh 512k July? 1984 |
| r11247 | r11248 | |
| 414 | 414 | // Macintosh SE March 1987 |
| 415 | 415 | // Macintosh II March 1987 |
| 416 | 416 | |
| 417 | mac128k // 1984 Apple Macintosh | |
| 418 | mac512k // 1985 Apple Macintosh 512k | |
| 419 | mac512ke // 1986 Apple Macintosh 512ke | |
| 420 | macplus // 1986 Apple Macintosh Plus | |
| 421 | macse // 1987 Apple Macintosh SE | |
| 417 | mac128k // 1984 Apple Macintosh | |
| 418 | mac512k // 1985 Apple Macintosh 512k | |
| 419 | mac512ke // 1986 Apple Macintosh 512ke | |
| 420 | macplus // 1986 Apple Macintosh Plus | |
| 421 | macse // 1987 Apple Macintosh SE | |
| 422 | 422 | macii // 1987 Apple Macintosh II |
| 423 | 423 | macsefd // 1988 Apple Macintosh SE (FDHD) |
| 424 | 424 | mac2fdhd // 1988 Apple Macintosh II (FDHD) |
| r11247 | r11248 | |
| 427 | 427 | macse30 // 1989 Apple Macintosh SE/30 |
| 428 | 428 | maciicx // 1989 Apple Macintosh IIcx |
| 429 | 429 | maciici // 1989 Apple Macintosh IIci |
| 430 | macclasc // 1990 Apple Macintosh Classic | |
| 430 | macclasc // 1990 Apple Macintosh Classic | |
| 431 | 431 | maclc // 1990 Apple Macintosh LC |
| 432 | 432 | maciisi // 1990 Apple Macintosh IIsi |
| 433 | 433 | macpb100 // 1991 Apple Macintosh PowerBook 100 |
| r11247 | r11248 | |
| 437 | 437 | pmac6100 // 1994 Apple Power Macintosh 6100 |
| 438 | 438 | |
| 439 | 439 | // Atari |
| 440 | a400 // 1979 Atari 400 | |
| 441 | a400pal // 1979 Atari 400 PAL | |
| 442 | a800 // 1979 Atari 800 | |
| 443 | a800pal // 1979 Atari 800 PAL | |
| 444 | a1200xl // 1982 Atari 1200 XL | |
| 445 | a600xl // 1983 Atari 600 XL | |
| 446 | a800xl // 1983 Atari 800 XL | |
| 447 | a800xlp // 1983 Atari 800 XL (PAL) | |
| 448 | a65xe // 1986 Atari 65 XE (XL Extended) | |
| 449 | a65xea // 1986? Atari 65 XE Arabic | |
| 450 | a130xe // 1986 Atari 130 XE | |
| 451 | a800xe // 1986 Atari 800 XE | |
| 452 | xegs // 1987 Atari XE Game System | |
| 453 | st // Atari ST | |
| 440 | a400 // 1979 Atari 400 | |
| 441 | a400pal // 1979 Atari 400 PAL | |
| 442 | a800 // 1979 Atari 800 | |
| 443 | a800pal // 1979 Atari 800 PAL | |
| 444 | a1200xl // 1982 Atari 1200 XL | |
| 445 | a600xl // 1983 Atari 600 XL | |
| 446 | a800xl // 1983 Atari 800 XL | |
| 447 | a800xlp // 1983 Atari 800 XL (PAL) | |
| 448 | a65xe // 1986 Atari 65 XE (XL Extended) | |
| 449 | a65xea // 1986? Atari 65 XE Arabic | |
| 450 | a130xe // 1986 Atari 130 XE | |
| 451 | a800xe // 1986 Atari 800 XE | |
| 452 | xegs // 1987 Atari XE Game System | |
| 453 | st // Atari ST | |
| 454 | 454 | st_uk |
| 455 | 455 | st_de |
| 456 | 456 | st_es |
| r11247 | r11248 | |
| 458 | 458 | st_fr |
| 459 | 459 | st_se |
| 460 | 460 | st_sg |
| 461 | megast // Atari Mega ST | |
| 461 | megast // Atari Mega ST | |
| 462 | 462 | megast_uk |
| 463 | 463 | megast_de |
| 464 | 464 | megast_fr |
| 465 | 465 | megast_se |
| 466 | 466 | megast_sg |
| 467 | // stacy // Atari STacy | |
| 468 | ste // Atari STe | |
| 467 | // stacy // Atari STacy | |
| 468 | ste // Atari STe | |
| 469 | 469 | ste_uk |
| 470 | 470 | ste_de |
| 471 | 471 | ste_es |
| r11247 | r11248 | |
| 473 | 473 | ste_it |
| 474 | 474 | ste_se |
| 475 | 475 | ste_sg |
| 476 | stbook // Atari STBook | |
| 477 | megaste // Atari Mega STe | |
| 476 | stbook // Atari STBook | |
| 477 | megaste // Atari Mega STe | |
| 478 | 478 | megaste_uk |
| 479 | 479 | megaste_de |
| 480 | 480 | megaste_es |
| 481 | 481 | megaste_fr |
| 482 | 482 | megaste_it |
| 483 | 483 | megaste_se |
| 484 | // stpad // Atari STPad (prototype) | |
| 485 | tt030 // Atari TT030 | |
| 484 | // stpad // Atari STPad (prototype) | |
| 485 | tt030 // Atari TT030 | |
| 486 | 486 | tt030_uk |
| 487 | 487 | tt030_de |
| 488 | 488 | tt030_fr |
| 489 | 489 | tt030_pl |
| 490 | // fx1 // Atari FX-1 (prototype) | |
| 491 | falcon30 // Atari Falcon030 | |
| 492 | falcon40 // Atari Falcon040 (prototype) | |
| 490 | // fx1 // Atari FX-1 (prototype) | |
| 491 | falcon30 // Atari Falcon030 | |
| 492 | falcon40 // Atari Falcon040 (prototype) | |
| 493 | 493 | |
| 494 | 494 | // AT&T |
| 495 | 495 | 3b1 // 3B1 "Unix PC" |
| 496 | 496 | |
| 497 | 497 | // Commodore |
| 498 | kim1 // Commodore (MOS) KIM-1 1975 | |
| 499 | sym1 // Synertek SYM-1 | |
| 500 | aim65 // Rockwell AIM65 | |
| 501 | aim65_40 // Rockwell AIM65/40 | |
| 498 | kim1 // Commodore (MOS) KIM-1 1975 | |
| 499 | sym1 // Synertek SYM-1 | |
| 500 | aim65 // Rockwell AIM65 | |
| 501 | aim65_40 // Rockwell AIM65/40 | |
| 502 | 502 | |
| 503 | pet2001 // PET 2001 | |
| 504 | pet2001n // PET 2001-N | |
| 505 | pet2001b // PET 2001-B | |
| 506 | cbm30 // CBM 30xx | |
| 507 | cbm30b // CBM 30xx (Business keyboard) | |
| 508 | cbm30nor // CBM 30xx (Norway, Business keyboard) | |
| 509 | pet40on // PET 40xx (Basic 4, no CRTC, Normal keyboard) | |
| 510 | pet40ob // PET 40xx (Basic 4, no CRTC, Business keyboard) | |
| 511 | pet40n // PET 40xx (Basic 4, CRTC 60Hz, 40 columns) | |
| 512 | pet40b // PET 40xx (Basic 4, CRTC 60Hz, 80 columns) | |
| 513 | cbm40o // CBM 40xx (Basic 4, no CRTC, Normal keyboard) | |
| 514 | cbm40ob // CBM 40xx (Basic 4, no CRTC, Business keyboard) | |
| 515 | cbm40n // CBM 40xx (Basic 4, CRTC 50Hz, 40 columns) | |
| 516 | cbm40b // CBM 40xx (Basic 4, CRTC 50Hz, 80 columns) | |
| 517 | pet80 // PET 80xx (Basic 4, CRTC 60Hz, 80 columns) | |
| 518 | cbm80 // CBM 80xx (Basic 4, CRTC 50Hz, 80 columns) | |
| 519 | cbm80ger // CBM 80xx (Germany, Basic 4, CRTC 50Hz, 80 cols) | |
| 520 | cbm80hun // CBM 80xx (Hungary, Basic 4, CRTC 50Hz, 80 cols) | |
| 521 | cbm80swe // CBM 80xx (Sweden, Basic 4, CRTC 50Hz, 80 cols) | |
| 522 | cbm8296 // CBM 8296 (Basic 4, CRTC 50Hz, 80 columns) | |
| 523 | cbm8296d // CBM 8296D | |
| 524 | superpet // SuperPET | |
| 525 | sp9000 // CBM SP9000 / MiniMainFrame 9000 | |
| 526 | mmf9000s // MiniMainFrame 9000 (Sweden) | |
| 503 | pet2001 // PET 2001 | |
| 504 | pet2001n // PET 2001-N | |
| 505 | pet2001b // PET 2001-B | |
| 506 | cbm30 // CBM 30xx | |
| 507 | cbm30b // CBM 30xx (Business keyboard) | |
| 508 | cbm30nor // CBM 30xx (Norway, Business keyboard) | |
| 509 | pet40on // PET 40xx (Basic 4, no CRTC, Normal keyboard) | |
| 510 | pet40ob // PET 40xx (Basic 4, no CRTC, Business keyboard) | |
| 511 | pet40n // PET 40xx (Basic 4, CRTC 60Hz, 40 columns) | |
| 512 | pet40b // PET 40xx (Basic 4, CRTC 60Hz, 80 columns) | |
| 513 | cbm40o // CBM 40xx (Basic 4, no CRTC, Normal keyboard) | |
| 514 | cbm40ob // CBM 40xx (Basic 4, no CRTC, Business keyboard) | |
| 515 | cbm40n // CBM 40xx (Basic 4, CRTC 50Hz, 40 columns) | |
| 516 | cbm40b // CBM 40xx (Basic 4, CRTC 50Hz, 80 columns) | |
| 517 | pet80 // PET 80xx (Basic 4, CRTC 60Hz, 80 columns) | |
| 518 | cbm80 // CBM 80xx (Basic 4, CRTC 50Hz, 80 columns) | |
| 519 | cbm80ger // CBM 80xx (Germany, Basic 4, CRTC 50Hz, 80 cols) | |
| 520 | cbm80hun // CBM 80xx (Hungary, Basic 4, CRTC 50Hz, 80 cols) | |
| 521 | cbm80swe // CBM 80xx (Sweden, Basic 4, CRTC 50Hz, 80 cols) | |
| 522 | cbm8296 // CBM 8296 (Basic 4, CRTC 50Hz, 80 columns) | |
| 523 | cbm8296d // CBM 8296D | |
| 524 | superpet // SuperPET | |
| 525 | sp9000 // CBM SP9000 / MiniMainFrame 9000 | |
| 526 | mmf9000s // MiniMainFrame 9000 (Sweden) | |
| 527 | 527 | |
| 528 | vic1001 // Commodore VIC-1001 (Japan) | |
| 529 | vic20 // Commodore VIC 20 (NTSC) | |
| 530 | vic20p // Commodore VIC 20 (PAL) | |
| 531 | vic20s // Commodore VIC 20 (Swedish Expanson Kit) | |
| 528 | vic1001 // Commodore VIC-1001 (Japan) | |
| 529 | vic20 // Commodore VIC 20 (NTSC) | |
| 530 | vic20p // Commodore VIC 20 (PAL) | |
| 531 | vic20s // Commodore VIC 20 (Swedish Expanson Kit) | |
| 532 | 532 | |
| 533 | 533 | max // Commodore Max Machine (Japan) |
| 534 | c64 // Commodore 64 (NTSC) | |
| 535 | c64pal // Commodore 64 (PAL) | |
| 536 | c64jpn // Commodore 64 (Japan) | |
| 537 | c64swe // Commodore 64 (Sweden) | |
| 538 | vic64s // Commodore VIC 64S (Sweden) | |
| 539 | pet64 // Commodore PET 64 | |
| 540 | cbm4064 // Commodore CBM 4064 | |
| 541 | edu64 // Commodore Educator 64 | |
| 534 | c64 // Commodore 64 (NTSC) | |
| 535 | c64pal // Commodore 64 (PAL) | |
| 536 | c64jpn // Commodore 64 (Japan) | |
| 537 | c64swe // Commodore 64 (Sweden) | |
| 538 | vic64s // Commodore VIC 64S (Sweden) | |
| 539 | pet64 // Commodore PET 64 | |
| 540 | cbm4064 // Commodore CBM 4064 | |
| 541 | edu64 // Commodore Educator 64 | |
| 542 | 542 | // clipper // C64 in a briefcase with 3" floppy, electroluminescent flat screen, thermal printer |
| 543 | 543 | // tesa6240 // modified SX64 with label printer |
| 544 | sx64 // Commodore SX-64 Executive Machine (PAL) | |
| 545 | vip64 // Commodore VIP64 (SX64, PAL, Swedish) | |
| 546 | // dx64 // Commodore DX-64 - Prototype | |
| 547 | c64c // Commodore 64C (NTSC) | |
| 548 | c64cpal // Commodore 64C (PAL) | |
| 544 | sx64 // Commodore SX-64 Executive Machine (PAL) | |
| 545 | vip64 // Commodore VIP64 (SX64, PAL, Swedish) | |
| 546 | // dx64 // Commodore DX-64 - Prototype | |
| 547 | c64c // Commodore 64C (NTSC) | |
| 548 | c64cpal // Commodore 64C (PAL) | |
| 549 | 549 | c64csfi |
| 550 | c64g // Commodore 64G (PAL) | |
| 551 | c64gs // Commodore 64 Games System | |
| 552 | c64dtv // Commodore 64 Direct-to-TV | |
| 553 | clcd // Commodore LCD | |
| 550 | c64g // Commodore 64G (PAL) | |
| 551 | c64gs // Commodore 64 Games System | |
| 552 | c64dtv // Commodore 64 Direct-to-TV | |
| 553 | clcd // Commodore LCD | |
| 554 | 554 | |
| 555 | b500 // Commodore B500 | |
| 556 | b128 // Commodore B128 | |
| 557 | b256 // Commodore B256 | |
| 558 | cbm610 // Commodore CBM 610 | |
| 559 | cbm620 // Commodore CBM 620 | |
| 560 | cbm620hu // Commodore CBM 620 (Hungary) | |
| 561 | b128hp // Commodore B128HP | |
| 562 | b256hp // Commodore B256HP | |
| 563 | bx256hp // Commodore BX256HP | |
| 564 | cbm710 // Commodore CBM 710 | |
| 565 | cbm720 // Commodore CBM 720 | |
| 566 | cbm720se // Commodore CBM 720 (Sweden / Finland) | |
| 567 | p500 // Commodore P500 (proto, a.k.a. C128-40, PET-II) | |
| 555 | b500 // Commodore B500 | |
| 556 | b128 // Commodore B128 | |
| 557 | b256 // Commodore B256 | |
| 558 | cbm610 // Commodore CBM 610 | |
| 559 | cbm620 // Commodore CBM 620 | |
| 560 | cbm620hu // Commodore CBM 620 (Hungary) | |
| 561 | b128hp // Commodore B128HP | |
| 562 | b256hp // Commodore B256HP | |
| 563 | bx256hp // Commodore BX256HP | |
| 564 | cbm710 // Commodore CBM 710 | |
| 565 | cbm720 // Commodore CBM 720 | |
| 566 | cbm720se // Commodore CBM 720 (Sweden / Finland) | |
| 567 | p500 // Commodore P500 (proto, a.k.a. C128-40, PET-II) | |
| 568 | 568 | |
| 569 | c16 // Commodore 16 | |
| 570 | c16c // Commodore 16 c1551 | |
| 571 | c16v // Commodore 16 vc1541 | |
| 569 | c16 // Commodore 16 | |
| 570 | c16c // Commodore 16 c1551 | |
| 571 | c16v // Commodore 16 vc1541 | |
| 572 | 572 | c16hun // Commodore 16 Novotrade (Hungarian Character Set) |
| 573 | c116 // Commodore 116 | |
| 574 | c116c // Commodore 116 c1551 | |
| 575 | c116v // Commodore 116 vc1541 | |
| 576 | plus4 // Commodore +4 | |
| 577 | plus4c // Commodore +4 c1551 | |
| 578 | plus4v // Commodore +4 vc1541 | |
| 579 | c232 // Commodore 232 - Prototype | |
| 580 | c264 // Commodore 264 - Prototype | |
| 581 | c364 // Commodore V364 - Prototype | |
| 582 | c16sid // Commodore 16 sid card | |
| 583 | plus4sid // Commodore +4 sid card | |
| 573 | c116 // Commodore 116 | |
| 574 | c116c // Commodore 116 c1551 | |
| 575 | c116v // Commodore 116 vc1541 | |
| 576 | plus4 // Commodore +4 | |
| 577 | plus4c // Commodore +4 c1551 | |
| 578 | plus4v // Commodore +4 vc1541 | |
| 579 | c232 // Commodore 232 - Prototype | |
| 580 | c264 // Commodore 264 - Prototype | |
| 581 | c364 // Commodore V364 - Prototype | |
| 582 | c16sid // Commodore 16 sid card | |
| 583 | plus4sid // Commodore +4 sid card | |
| 584 | 584 | |
| 585 | c128 // Commodore 128 - NTSC | |
| 586 | c128cr // Commodore 128CR - NTSC (proto?) | |
| 587 | c128sfi // Commodore 128 - PAL (Swedish / Finnish) | |
| 588 | c128fra // Commodore 128 - PAL (French) | |
| 589 | c128ger // Commodore 128 - PAL (German) | |
| 590 | c128nor // Commodore 128 - PAL (Norwegian) | |
| 591 | c128d // Commodore 128D - PAL | |
| 592 | c128dpr // Commodore 128D - NTSC (proto) | |
| 593 | c128dcr // Commodore 128DCR - NTSC | |
| 594 | c128drde // Commodore 128DCR - PAL (German) | |
| 595 | c128drit // Commodore 128DCR - PAL (Italian) | |
| 596 | c128drsw // Commodore 128DCR - PAL (Swedish) | |
| 597 | c128d81 // Commodore 128D/81 | |
| 585 | c128 // Commodore 128 - NTSC | |
| 586 | c128cr // Commodore 128CR - NTSC (proto?) | |
| 587 | c128sfi // Commodore 128 - PAL (Swedish / Finnish) | |
| 588 | c128fra // Commodore 128 - PAL (French) | |
| 589 | c128ger // Commodore 128 - PAL (German) | |
| 590 | c128nor // Commodore 128 - PAL (Norwegian) | |
| 591 | c128d // Commodore 128D - PAL | |
| 592 | c128dpr // Commodore 128D - NTSC (proto) | |
| 593 | c128dcr // Commodore 128DCR - NTSC | |
| 594 | c128drde // Commodore 128DCR - PAL (German) | |
| 595 | c128drit // Commodore 128DCR - PAL (Italian) | |
| 596 | c128drsw // Commodore 128DCR - PAL (Swedish) | |
| 597 | c128d81 // Commodore 128D/81 | |
| 598 | 598 | |
| 599 | a500n // Commodore Amiga 500 - NTSC | |
| 600 | a500p // Commodore Amiga 500 - PAL | |
| 601 | a1000n // Commodore Amiga 1000 - NTSC | |
| 602 | a1000p // Commodore Amiga 1000 - PAL | |
| 603 | cdtv // Commodore CDTV | |
| 604 | a3000 // Commodore Amiga 3000 | |
| 605 | a1200n // Commodore Amiga 1200 - NTSC | |
| 606 | a1200p // Commodore Amiga 1200 - PAL | |
| 607 | cd32 // Commodore Amiga CD32 | |
| 599 | a500n // Commodore Amiga 500 - NTSC | |
| 600 | a500p // Commodore Amiga 500 - PAL | |
| 601 | a1000n // Commodore Amiga 1000 - NTSC | |
| 602 | a1000p // Commodore Amiga 1000 - PAL | |
| 603 | cdtv // Commodore CDTV | |
| 604 | a3000 // Commodore Amiga 3000 | |
| 605 | a1200n // Commodore Amiga 1200 - NTSC | |
| 606 | a1200p // Commodore Amiga 1200 - PAL | |
| 607 | cd32 // Commodore Amiga CD32 | |
| 608 | 608 | |
| 609 | c65 // 1991 C65 / C64DX (Prototype, NTSC) | |
| 610 | c64dx // 1991 C65 / C64DX (Prototype, German PAL) | |
| 609 | c65 // 1991 C65 / C64DX (Prototype, NTSC) | |
| 610 | c64dx // 1991 C65 / C64DX (Prototype, German PAL) | |
| 611 | 611 | |
| 612 | 612 | // Epson |
| 613 | px4 // 1985 Epson PX-4 | |
| 614 | px4p // 1985 Epson PX-4+ | |
| 613 | px4 // 1985 Epson PX-4 | |
| 614 | px4p // 1985 Epson PX-4+ | |
| 615 | 615 | px8 |
| 616 | 616 | qx10 |
| 617 | 617 | qc10 |
| 618 | 618 | ehx20 |
| 619 | 619 | |
| 620 | 620 | // IBM PC & Clones |
| 621 | ibm5150 // 1981 IBM 5150 | |
| 622 | ibm5155 // 1982 IBM 5155 | |
| 623 | ibm5140 // 1985 IBM 5140 | |
| 621 | ibm5150 // 1981 IBM 5150 | |
| 622 | ibm5155 // 1982 IBM 5155 | |
| 623 | ibm5140 // 1985 IBM 5140 | |
| 624 | 624 | dgone // 1984 Data General/One |
| 625 | pcmda // 1987 PC with MDA | |
| 626 | pcherc // 1987 PC with Hercules (for testing hercules) | |
| 627 | pc // 1987 PC with CGA | |
| 628 | bw230 // 1985 Bondwell (CGA) | |
| 629 | europc // 1988 Schneider Euro PC (CGA or Hercules) | |
| 625 | pcmda // 1987 PC with MDA | |
| 626 | pcherc // 1987 PC with Hercules (for testing hercules) | |
| 627 | pc // 1987 PC with CGA | |
| 628 | bw230 // 1985 Bondwell (CGA) | |
| 629 | europc // 1988 Schneider Euro PC (CGA or Hercules) | |
| 630 | 630 | |
| 631 | 631 | // PC Junior |
| 632 | ibmpcjr // 1984 IBM PC Jr | |
| 633 | ibmpcjx // 1985 IBM PC JX | |
| 634 | t1000hx // 1987 Tandy 1000 HX (similiar to PCJr) | |
| 635 | t1000sx // 1987 Tandy 1000 SX (similiar to PCJr) | |
| 632 | ibmpcjr // 1984 IBM PC Jr | |
| 633 | ibmpcjx // 1985 IBM PC JX | |
| 634 | t1000hx // 1987 Tandy 1000 HX (similiar to PCJr) | |
| 635 | t1000sx // 1987 Tandy 1000 SX (similiar to PCJr) | |
| 636 | 636 | t1000tx // 1987 Tandy 1000 TX |
| 637 | 637 | t1000rl // 1989 Tandy 1000 RL |
| 638 | 638 | |
| 639 | 639 | // XT |
| 640 | ibm5160 // 1982 IBM XT 5160 | |
| 641 | ibm5162 // 1986 IBM XT 5162 (XT w/80286) | |
| 642 | pc200 // 1988 Sinclair PC200 | |
| 643 | pc20 // 1988 Amstrad PC20 | |
| 644 | ppc512 // 1987 Amstrad PPC512 | |
| 645 | ppc640 // 1987 Amstrad PPC640 | |
| 646 | pc1512 // 1986 Amstrad PC1512 v1 (CGA compatible) | |
| 647 | pc1512v2 // 1986 Amstrad PC1512 v2 (CGA compatible) | |
| 648 | pc1640 // 1987 Amstrad PC1640 (EGA compatible) | |
| 640 | ibm5160 // 1982 IBM XT 5160 | |
| 641 | ibm5162 // 1986 IBM XT 5162 (XT w/80286) | |
| 642 | pc200 // 1988 Sinclair PC200 | |
| 643 | pc20 // 1988 Amstrad PC20 | |
| 644 | ppc512 // 1987 Amstrad PPC512 | |
| 645 | ppc640 // 1987 Amstrad PPC640 | |
| 646 | pc1512 // 1986 Amstrad PC1512 v1 (CGA compatible) | |
| 647 | pc1512v2 // 1986 Amstrad PC1512 v2 (CGA compatible) | |
| 648 | pc1640 // 1987 Amstrad PC1640 (EGA compatible) | |
| 649 | 649 | |
| 650 | xtvga // 198? PC-XT (VGA, MF2 Keyboard) | |
| 650 | xtvga // 198? PC-XT (VGA, MF2 Keyboard) | |
| 651 | 651 | iskr1031 |
| 652 | 652 | iskr1030m |
| 653 | 653 | ec1840 |
| r11247 | r11248 | |
| 663 | 663 | m240 |
| 664 | 664 | |
| 665 | 665 | // AT |
| 666 | ibm5170 // 1984 IBM PC/AT 5170, original 6 MHz model | |
| 667 | ibm5170a // 1985 IBM PC/AT 5170, enhanced 8 MHz model | |
| 668 | i8530286 // 1988 IBM PS/2 Model 30-286 (VGA) | |
| 669 | i8555081 // 1988 IBM PS/2 Model 55SX (VGA) | |
| 670 | at // 1987 AMI Bios and Diagnostics | |
| 671 | atvga // 19?? AT VGA | |
| 672 | neat // 1989 New Enhanced AT chipset, AMI BIOS | |
| 673 | at386 // 19?? IBM AT 386 | |
| 674 | at486 // 19?? IBM AT 486 | |
| 666 | ibm5170 // 1984 IBM PC/AT 5170, original 6 MHz model | |
| 667 | ibm5170a // 1985 IBM PC/AT 5170, enhanced 8 MHz model | |
| 668 | i8530286 // 1988 IBM PS/2 Model 30-286 (VGA) | |
| 669 | i8555081 // 1988 IBM PS/2 Model 55SX (VGA) | |
| 670 | at // 1987 AMI Bios and Diagnostics | |
| 671 | atvga // 19?? AT VGA | |
| 672 | neat // 1989 New Enhanced AT chipset, AMI BIOS | |
| 673 | at386 // 19?? IBM AT 386 | |
| 674 | at486 // 19?? IBM AT 486 | |
| 675 | 675 | ct486 // 1993? 486 with CS4031 |
| 676 | 676 | ficpio2 // 1995 FIC 486-PIO-2 |
| 677 | at586 // 19?? AT 586 | |
| 677 | at586 // 19?? AT 586 | |
| 678 | 678 | c386sx16 // 1990 Commodore 386SX-16 |
| 679 | ficvt503 // 1997 FIC VT-503 | |
| 679 | ficvt503 // 1997 FIC VT-503 | |
| 680 | 680 | megapc |
| 681 | 681 | megapcpl |
| 682 | 682 | ec1849 |
| r11247 | r11248 | |
| 703 | 703 | |
| 704 | 704 | |
| 705 | 705 | // Osborne |
| 706 | osborne1 // 1981 Osborne-1 | |
| 706 | osborne1 // 1981 Osborne-1 | |
| 707 | 707 | osbexec // 1982 Osborne Executive |
| 708 | 708 | |
| 709 | 709 | // Research Machines |
| r11247 | r11248 | |
| 713 | 713 | mbc55x // Sanyo MBC-550, MBC-555 |
| 714 | 714 | |
| 715 | 715 | // Sinclair Research |
| 716 | zx80 // 1980 Sinclair ZX-80 | |
| 717 | zx81 // 1981 Sinclair ZX-81 | |
| 718 | ts1000 // 1982 Timex Sinclair 1000 | |
| 719 | ts1500 // Timex Sinclair 1500 | |
| 720 | ringo470 // Ringo 470 | |
| 721 | pc8300 // Your Computer - PC8300 | |
| 722 | pow3000 // Creon Enterprises - Power 3000 | |
| 723 | lambda // Lambda 8300 | |
| 724 | tk85 // Microdigital TK85 | |
| 716 | zx80 // 1980 Sinclair ZX-80 | |
| 717 | zx81 // 1981 Sinclair ZX-81 | |
| 718 | ts1000 // 1982 Timex Sinclair 1000 | |
| 719 | ts1500 // Timex Sinclair 1500 | |
| 720 | ringo470 // Ringo 470 | |
| 721 | pc8300 // Your Computer - PC8300 | |
| 722 | pow3000 // Creon Enterprises - Power 3000 | |
| 723 | lambda // Lambda 8300 | |
| 724 | tk85 // Microdigital TK85 | |
| 725 | 725 | |
| 726 | spectrum // 1982 ZX Spectrum | |
| 727 | spec80k // 1987 ZX Spectrum 80k | |
| 728 | specide // 1995 ZX Spectrum IDE | |
| 729 | inves // 1986 Inves Spectrum 48K+ | |
| 730 | tk90x // 1985 TK90x Color Computer | |
| 731 | tk95 // 1986 TK95 Color Computer | |
| 732 | tc2048 // 198? TC2048 | |
| 733 | ts2068 // 1983 TS2068 | |
| 734 | uk2086 // 1986 UK2086 | |
| 726 | spectrum // 1982 ZX Spectrum | |
| 727 | spec80k // 1987 ZX Spectrum 80k | |
| 728 | specide // 1995 ZX Spectrum IDE | |
| 729 | inves // 1986 Inves Spectrum 48K+ | |
| 730 | tk90x // 1985 TK90x Color Computer | |
| 731 | tk95 // 1986 TK95 Color Computer | |
| 732 | tc2048 // 198? TC2048 | |
| 733 | ts2068 // 1983 TS2068 | |
| 734 | uk2086 // 1986 UK2086 | |
| 735 | 735 | |
| 736 | spec128 // 1986 ZX Spectrum 128 | |
| 737 | specpls2 // 1986 ZX Spectrum +2 | |
| 738 | specpl2a // 1987 ZX Spectrum +2a | |
| 739 | specpls3 // 1987 ZX Spectrum +3 | |
| 740 | specpl3e // 2000 ZX Spectrum +3e | |
| 741 | sp3e8bit // 2002 ZX Spectrum +3e 8bit IDE | |
| 742 | sp3ezcf // 2002 ZX Spectrum +3e ZXCF | |
| 743 | sp3eata // 2002 ZX Spectrum +3e ZXATASP | |
| 736 | spec128 // 1986 ZX Spectrum 128 | |
| 737 | specpls2 // 1986 ZX Spectrum +2 | |
| 738 | specpl2a // 1987 ZX Spectrum +2a | |
| 739 | specpls3 // 1987 ZX Spectrum +3 | |
| 740 | specpl3e // 2000 ZX Spectrum +3e | |
| 741 | sp3e8bit // 2002 ZX Spectrum +3e 8bit IDE | |
| 742 | sp3ezcf // 2002 ZX Spectrum +3e ZXCF | |
| 743 | sp3eata // 2002 ZX Spectrum +3e ZXATASP | |
| 744 | 744 | scorpio |
| 745 | 745 | profi |
| 746 | 746 | kay1024 |
| r11247 | r11248 | |
| 751 | 751 | atmtb2 |
| 752 | 752 | bestzx |
| 753 | 753 | |
| 754 | ql // 1984 Sinclair QL (UK) | |
| 755 | ql_us // 1984 Sinclair QL (USA) | |
| 756 | ql_es // 1984 Sinclair QL (Spain) | |
| 757 | ql_fr // 1984 Sinclair QL (France) | |
| 758 | ql_de // 1984 Sinclair QL (Germany) | |
| 759 | ql_it // 1984 Sinclair QL (Italy) | |
| 760 | ql_se // 1984 Sinclair QL (Sweden) | |
| 761 | ql_dk // 1984 Sinclair QL (Denmark) | |
| 762 | ql_gr // 1984 Sinclair QL (Greece) | |
| 754 | ql // 1984 Sinclair QL (UK) | |
| 755 | ql_us // 1984 Sinclair QL (USA) | |
| 756 | ql_es // 1984 Sinclair QL (Spain) | |
| 757 | ql_fr // 1984 Sinclair QL (France) | |
| 758 | ql_de // 1984 Sinclair QL (Germany) | |
| 759 | ql_it // 1984 Sinclair QL (Italy) | |
| 760 | ql_se // 1984 Sinclair QL (Sweden) | |
| 761 | ql_dk // 1984 Sinclair QL (Denmark) | |
| 762 | ql_gr // 1984 Sinclair QL (Greece) | |
| 763 | 763 | // tonto |
| 764 | 764 | // megaopd |
| 765 | 765 | |
| 766 | 766 | // Sharp |
| 767 | pc1245 // Pocket Computer 1245 | |
| 768 | pc1250 // Pocket Computer 1250 | |
| 769 | pc1251 // Pocket Computer 1251 | |
| 770 | pc1255 // Pocket Computer 1255 | |
| 771 | trs80pc3 // Tandy TRS80 PC-3 | |
| 772 | pc1260 // Pocket Computer 1260 | |
| 773 | pc1261 // Pocket Computer 1261 | |
| 774 | pc1401 // Pocket Computer 1401 | |
| 775 | pc1402 // Pocket Computer 1402 | |
| 776 | pc1350 // Pocket Computer 1350 | |
| 777 | pc1360 // Pocket Computer 1360 | |
| 778 | pc1403 // Pocket Computer 1403 | |
| 779 | pc1403h // Pocket Computer 1403H | |
| 780 | pc1450 // Pocket Computer 1450 | |
| 781 | pc1500 // Pocket Computer 1500 | |
| 767 | pc1245 // Pocket Computer 1245 | |
| 768 | pc1250 // Pocket Computer 1250 | |
| 769 | pc1251 // Pocket Computer 1251 | |
| 770 | pc1255 // Pocket Computer 1255 | |
| 771 | trs80pc3 // Tandy TRS80 PC-3 | |
| 772 | pc1260 // Pocket Computer 1260 | |
| 773 | pc1261 // Pocket Computer 1261 | |
| 774 | pc1401 // Pocket Computer 1401 | |
| 775 | pc1402 // Pocket Computer 1402 | |
| 776 | pc1350 // Pocket Computer 1350 | |
| 777 | pc1360 // Pocket Computer 1360 | |
| 778 | pc1403 // Pocket Computer 1403 | |
| 779 | pc1403h // Pocket Computer 1403H | |
| 780 | pc1450 // Pocket Computer 1450 | |
| 781 | pc1500 // Pocket Computer 1500 | |
| 782 | 782 | |
| 783 | mz700 // 1982 Sharp MZ700 | |
| 784 | mz700j // 1982 Sharp MZ700 Japan | |
| 785 | mz800 // 1984 Sharp MZ800 | |
| 786 | mz1500 // 1984 Sharp MZ1500 | |
| 787 | mz2500 // 1985 Sharp MZ2500 | |
| 788 | mz2520 // 1985 Sharp MZ2520 | |
| 783 | mz700 // 1982 Sharp MZ700 | |
| 784 | mz700j // 1982 Sharp MZ700 Japan | |
| 785 | mz800 // 1984 Sharp MZ800 | |
| 786 | mz1500 // 1984 Sharp MZ1500 | |
| 787 | mz2500 // 1985 Sharp MZ2500 | |
| 788 | mz2520 // 1985 Sharp MZ2520 | |
| 789 | 789 | |
| 790 | mz80kj // 1979 Sharp MZ80K | |
| 791 | mz80k // 1979 Sharp MZ80K | |
| 792 | mz80a // 1982 Sharp MZ80A | |
| 793 | mz80b // 1981 Sharp MZ80B | |
| 794 | mz2000 // 1981 Sharp MZ2000 | |
| 795 | mz2200 // 1981 Sharp MZ2200 | |
| 790 | mz80kj // 1979 Sharp MZ80K | |
| 791 | mz80k // 1979 Sharp MZ80K | |
| 792 | mz80a // 1982 Sharp MZ80A | |
| 793 | mz80b // 1981 Sharp MZ80B | |
| 794 | mz2000 // 1981 Sharp MZ2000 | |
| 795 | mz2200 // 1981 Sharp MZ2200 | |
| 796 | 796 | |
| 797 | x1 // 1982 Sharp X1 | |
| 798 | x1twin // 1986 Sharp X1 Twin | |
| 799 | x1turbo // 1984 Sharp X1 Turbo (Model 10) | |
| 800 | x1turbo40 // 1985 Sharp X1 Turbo (Model 40) | |
| 801 | // x1turboz // 1986 Sharp X1 TurboZ | |
| 797 | x1 // 1982 Sharp X1 | |
| 798 | x1twin // 1986 Sharp X1 Twin | |
| 799 | x1turbo // 1984 Sharp X1 Turbo (Model 10) | |
| 800 | x1turbo40 // 1985 Sharp X1 Turbo (Model 40) | |
| 801 | // x1turboz // 1986 Sharp X1 TurboZ | |
| 802 | 802 | |
| 803 | x68000 // Sharp X68000 (1987) | |
| 804 | x68kxvi // Sharp X68000 XVI (1991) | |
| 805 | x68030 // Sharp X68030 (1993) | |
| 803 | x68000 // Sharp X68000 (1987) | |
| 804 | x68kxvi // Sharp X68000 XVI (1991) | |
| 805 | x68030 // Sharp X68030 (1993) | |
| 806 | 806 | |
| 807 | 807 | // Silicon Graphics |
| 808 | sgi_ip2 // IP2: IRIS 2x00, 68020, 16MHz | |
| 809 | sgi_ip6 // IP6: 4D/PI, R2000, 20MHz | |
| 810 | ip204415 // IP20: Indigo 1, R4400, 150MHz | |
| 811 | ip225015 // IP22: Indy, R5000, 150MHz | |
| 812 | ip224613 // IP22: Indy, R4600, 133MHz | |
| 813 | ip244415 // IP24: Indigo 2, R4400, 150MHz | |
| 808 | sgi_ip2 // IP2: IRIS 2x00, 68020, 16MHz | |
| 809 | sgi_ip6 // IP6: 4D/PI, R2000, 20MHz | |
| 810 | ip204415 // IP20: Indigo 1, R4400, 150MHz | |
| 811 | ip225015 // IP22: Indy, R5000, 150MHz | |
| 812 | ip224613 // IP22: Indy, R4600, 133MHz | |
| 813 | ip244415 // IP24: Indigo 2, R4400, 150MHz | |
| 814 | 814 | |
| 815 | 815 | // Texas Instruments |
| 816 | ti990_10 // 1975 TI 990/10 | |
| 817 | ti990_4 // 1976 TI 990/4 | |
| 818 | 990189 // 1978 TM 990/189 | |
| 819 | 990189v // 1980 TM 990/189 with Color Video Board | |
| 816 | ti990_10 // 1975 TI 990/10 | |
| 817 | ti990_4 // 1976 TI 990/4 | |
| 818 | 990189 // 1978 TM 990/189 | |
| 819 | 990189v // 1980 TM 990/189 with Color Video Board | |
| 820 | 820 | |
| 821 | ti99_224 // 1983 TI 99/2 (24kb ROMs) | |
| 822 | ti99_232 // 1983 TI 99/2 (32kb ROMs) | |
| 823 | ti99_4 // 1979 TI-99/4 | |
| 824 | ti99_4e // 1980 TI-99/4 with 50Hz video | |
| 825 | ti99_4a // 1981 TI-99/4A | |
| 826 | ti99_4ae // 1981 TI-99/4A with 50Hz video | |
| 827 | ti99_4ev // 1994 TI-99/4A with EVPC video card | |
| 828 | ti99_8 // 1983 TI-99/8 | |
| 829 | ti99_8e // 1983 TI-99/8 with 50Hz video | |
| 821 | ti99_224 // 1983 TI 99/2 (24kb ROMs) | |
| 822 | ti99_232 // 1983 TI 99/2 (32kb ROMs) | |
| 823 | ti99_4 // 1979 TI-99/4 | |
| 824 | ti99_4e // 1980 TI-99/4 with 50Hz video | |
| 825 | ti99_4a // 1981 TI-99/4A | |
| 826 | ti99_4ae // 1981 TI-99/4A with 50Hz video | |
| 827 | ti99_4ev // 1994 TI-99/4A with EVPC video card | |
| 828 | ti99_8 // 1983 TI-99/8 | |
| 829 | ti99_8e // 1983 TI-99/8 with 50Hz video | |
| 830 | 830 | |
| 831 | 831 | // TI 99 clones |
| 832 | tutor // 1983? Tomy Tutor | |
| 833 | pyuuta // 1982 Tomy Pyuuta | |
| 834 | geneve // 1987? Myarc Geneve 9640 | |
| 835 | ti99_4p // 1996 SNUG 99/4P (a.k.a. SGCPU) | |
| 832 | tutor // 1983? Tomy Tutor | |
| 833 | pyuuta // 1982 Tomy Pyuuta | |
| 834 | geneve // 1987? Myarc Geneve 9640 | |
| 835 | ti99_4p // 1996 SNUG 99/4P (a.k.a. SGCPU) | |
| 836 | 836 | |
| 837 | avigo // | |
| 837 | avigo // | |
| 838 | 838 | |
| 839 | 839 | // Texas Instruments Calculators |
| 840 | ti73 // 1990 TI-73 | |
| 841 | ti81 // 1990 TI-81 (Z80 2 MHz) | |
| 842 | ti81v2 // 1990 TI-81 (Z80 2 MHz) | |
| 843 | ti85 // 1992 TI-85 (Z80 6 MHz) | |
| 844 | ti82 // 1993 TI-82 (Z80 6 MHz) | |
| 845 | ti83 // 1996 TI-83 (Z80 6 MHz) | |
| 846 | ti86 // 1997 TI-86 (Z80 6 MHz) | |
| 847 | ti83p // 1999 TI-83 Plus (Z80 6 MHz) | |
| 848 | ti83pse // 2001 TI-83 Plus Silver Edition | |
| 849 | // ti84p // 2004 TI-84 Plus | |
| 850 | ti84pse // 2004 TI-84 Plus Silver Edition | |
| 851 | ti89 // 1998 TI-89 | |
| 852 | ti92 // 1995 TI-92 | |
| 853 | ti92p // 1999 TI-92 Plus | |
| 854 | v200 // 2002 Voyage 200 PLT | |
| 855 | ti89t // 2004 TI-89 Titanium | |
| 840 | ti73 // 1990 TI-73 | |
| 841 | ti81 // 1990 TI-81 (Z80 2 MHz) | |
| 842 | ti81v2 // 1990 TI-81 (Z80 2 MHz) | |
| 843 | ti85 // 1992 TI-85 (Z80 6 MHz) | |
| 844 | ti82 // 1993 TI-82 (Z80 6 MHz) | |
| 845 | ti83 // 1996 TI-83 (Z80 6 MHz) | |
| 846 | ti86 // 1997 TI-86 (Z80 6 MHz) | |
| 847 | ti83p // 1999 TI-83 Plus (Z80 6 MHz) | |
| 848 | ti83pse // 2001 TI-83 Plus Silver Edition | |
| 849 | // ti84p // 2004 TI-84 Plus | |
| 850 | ti84pse // 2004 TI-84 Plus Silver Edition | |
| 851 | ti89 // 1998 TI-89 | |
| 852 | ti92 // 1995 TI-92 | |
| 853 | ti92p // 1999 TI-92 Plus | |
| 854 | v200 // 2002 Voyage 200 PLT | |
| 855 | ti89t // 2004 TI-89 Titanium | |
| 856 | 856 | |
| 857 | 857 | // NEC |
| 858 | 858 | pc6001 |
| r11247 | r11248 | |
| 884 | 884 | pc9821a |
| 885 | 885 | |
| 886 | 886 | // Cantab |
| 887 | ace // Jupiter Ace | |
| 887 | ace // Jupiter Ace | |
| 888 | 888 | |
| 889 | 889 | // Sord |
| 890 | 890 | m5 |
| r11247 | r11248 | |
| 900 | 900 | einst256 |
| 901 | 901 | |
| 902 | 902 | // Intelligent Software |
| 903 | ep64 // Enterprise 64 | |
| 904 | ep128 // Enterprise 128 | |
| 905 | phc64 // Hegener & Glaser Mephisto PHC 64 | |
| 903 | ep64 // Enterprise 64 | |
| 904 | ep128 // Enterprise 128 | |
| 905 | phc64 // Hegener & Glaser Mephisto PHC 64 | |
| 906 | 906 | |
| 907 | 907 | // Non-Linear Systems |
| 908 | 908 | kaypro2x // Kaypro 2 - 2/84 |
| r11247 | r11248 | |
| 915 | 915 | |
| 916 | 916 | // VEB Mikroelektronik |
| 917 | 917 | // KC compact is partial CPC compatible |
| 918 | kc85_2 // VEB KC 85/2 | |
| 919 | kc85_3 // VEB KC 85/3 | |
| 920 | kc85_4 // VEB KC 85/4 | |
| 921 | kc85_4d // VEB KC 85/4 with disk interface | |
| 922 | kc85_5 // VEB KC 85/5 | |
| 923 | mc8020 // MC 80.2x | |
| 924 | mc8030 // MC 80.3x | |
| 918 | kc85_2 // VEB KC 85/2 | |
| 919 | kc85_3 // VEB KC 85/3 | |
| 920 | kc85_4 // VEB KC 85/4 | |
| 921 | kc85_4d // VEB KC 85/4 with disk interface | |
| 922 | kc85_5 // VEB KC 85/5 | |
| 923 | mc8020 // MC 80.2x | |
| 924 | mc8030 // MC 80.3x | |
| 925 | 925 | lc80 |
| 926 | 926 | lc80_2 |
| 927 | 927 | sc80 |
| 928 | 928 | |
| 929 | 929 | // Microbee Systems |
| 930 | mbee // Microbee 16 Standard or Plus | |
| 931 | mbeeic // Microbee 32 IC | |
| 932 | mbeepc // Microbee 32 PC | |
| 933 | mbeepc85 // Microbee 32 PC85 | |
| 930 | mbee // Microbee 16 Standard or Plus | |
| 931 | mbeeic // Microbee 32 IC | |
| 932 | mbeepc // Microbee 32 PC | |
| 933 | mbeepc85 // Microbee 32 PC85 | |
| 934 | 934 | mbeepc85b // Microbee 32 PC85 (Business version) |
| 935 | 935 | mbeepc85s // Microbee 32 PC85 (Swedish) |
| 936 | mbeeppc // Microbee 32 PPC85 | |
| 936 | mbeeppc // Microbee 32 PPC85 | |
| 937 | 937 | mbeett // Microbee Teleterm |
| 938 | mbee56 // Microbee 56K (CP/M) | |
| 939 | mbee64 // Microbee 64K (CP/M) | |
| 940 | mbee128 // Microbee 128K (CP/M) | |
| 941 | mbee256 // Microbee 256TC (CP/M) | |
| 938 | mbee56 // Microbee 56K (CP/M) | |
| 939 | mbee64 // Microbee 64K (CP/M) | |
| 940 | mbee128 // Microbee 128K (CP/M) | |
| 941 | mbee256 // Microbee 256TC (CP/M) | |
| 942 | 942 | |
| 943 | 943 | // Tandy / Radio Shack |
| 944 | trs80 // TRS-80 Model I - Level I BASIC | |
| 945 | trs80l2 // TRS-80 Model I - Level II BASIC | |
| 946 | sys80 // EACA System 80 | |
| 947 | lnw80 // LNW Research LNW-80 | |
| 944 | trs80 // TRS-80 Model I - Level I BASIC | |
| 945 | trs80l2 // TRS-80 Model I - Level II BASIC | |
| 946 | sys80 // EACA System 80 | |
| 947 | lnw80 // LNW Research LNW-80 | |
| 948 | 948 | trs80m2 |
| 949 | 949 | trs80m16 |
| 950 | trs80m3 // TRS-80 Model III - Radio Shack/Tandy | |
| 950 | trs80m3 // TRS-80 Model III - Radio Shack/Tandy | |
| 951 | 951 | trs80m4 |
| 952 | 952 | trs80m4p |
| 953 | 953 | ht1080z // Hradstechnika Szvetkezet HT-1080Z |
| r11247 | r11248 | |
| 957 | 957 | tandy2k |
| 958 | 958 | tandy2khd |
| 959 | 959 | |
| 960 | coco // Color Computer | |
| 961 | cocoe // Color Computer (Extended BASIC 1.0) | |
| 962 | coco2 // Color Computer 2 | |
| 963 | coco2b // Color Computer 2B (uses M6847T1 video chip) | |
| 964 | coco3 // Color Computer 3 (NTSC) | |
| 965 | coco3p // Color Computer 3 (PAL) | |
| 966 | coco3h // Hacked Color Computer 3 (6309) | |
| 967 | dragon32 // Dragon 32 | |
| 968 | dragon64 // Dragon 64 | |
| 969 | d64plus // Dragon 64 + Compusense Plus addon | |
| 970 | dgnalpha // Dragon Alpha | |
| 971 | dgnbeta // Dragon Beta | |
| 972 | tanodr64 // Tano Dragon 64 (NTSC) | |
| 973 | cp400 // Prologica CP400 | |
| 974 | mc10 // MC-10 | |
| 975 | alice // Matra & Hachette Ordinateur Alice | |
| 976 | alice32 // Matra & Hachette Alice 32 | |
| 977 | alice90 // Matra & Hachette Alice 90 | |
| 960 | coco // Color Computer | |
| 961 | cocoe // Color Computer (Extended BASIC 1.0) | |
| 962 | coco2 // Color Computer 2 | |
| 963 | coco2b // Color Computer 2B (uses M6847T1 video chip) | |
| 964 | coco3 // Color Computer 3 (NTSC) | |
| 965 | coco3p // Color Computer 3 (PAL) | |
| 966 | coco3h // Hacked Color Computer 3 (6309) | |
| 967 | dragon32 // Dragon 32 | |
| 968 | dragon64 // Dragon 64 | |
| 969 | d64plus // Dragon 64 + Compusense Plus addon | |
| 970 | dgnalpha // Dragon Alpha | |
| 971 | dgnbeta // Dragon Beta | |
| 972 | tanodr64 // Tano Dragon 64 (NTSC) | |
| 973 | cp400 // Prologica CP400 | |
| 974 | mc10 // MC-10 | |
| 975 | alice // Matra & Hachette Ordinateur Alice | |
| 976 | alice32 // Matra & Hachette Alice 32 | |
| 977 | alice90 // Matra & Hachette Alice 90 | |
| 978 | 978 | |
| 979 | 979 | // EACA |
| 980 | cgenie // Colour Genie EG2000 | |
| 981 | cgenienz // Colour Genie EG2000 (New Zealand) | |
| 980 | cgenie // Colour Genie EG2000 | |
| 981 | cgenienz // Colour Genie EG2000 (New Zealand) | |
| 982 | 982 | // system 80 trs80 compatible |
| 983 | 983 | |
| 984 | // Video Technology | |
| 985 | crvision // 1981 creatiVision | |
| 986 | fnvision // 1983 FunVision | |
| 984 | // Video Technology | |
| 985 | crvision // 1981 creatiVision | |
| 986 | fnvision // 1983 FunVision | |
| 987 | 987 | crvisioj |
| 988 | 988 | wizzard |
| 989 | 989 | rameses |
| 990 | 990 | vz2000 |
| 991 | 991 | crvisio2 |
| 992 | 992 | manager |
| 993 | laser110 // 1983 Laser 110 | |
| 994 | las110de // 1983 Sanyo Laser 110 (Germany) | |
| 995 | laser200 // 1983 Laser 200 (color version of 110) | |
| 996 | // vz200de // 1983 VZ-200 (Germany) | |
| 997 | fellow // 1983 Salora Fellow (Finland) | |
| 998 | tx8000 // 1983 Texet TX-8000 (U.K.) | |
| 999 | laser210 // 1984 Laser 210 (200 with more memory) | |
| 1000 | las210de // 1984 Sanyo Laser 210 (Germany) | |
| 1001 | vz200 // 1984 Dick Smith Electronics VZ-200 | |
| 993 | laser110 // 1983 Laser 110 | |
| 994 | las110de // 1983 Sanyo Laser 110 (Germany) | |
| 995 | laser200 // 1983 Laser 200 (color version of 110) | |
| 996 | // vz200de // 1983 VZ-200 (Germany) | |
| 997 | fellow // 1983 Salora Fellow (Finland) | |
| 998 | tx8000 // 1983 Texet TX-8000 (U.K.) | |
| 999 | laser210 // 1984 Laser 210 (200 with more memory) | |
| 1000 | las210de // 1984 Sanyo Laser 210 (Germany) | |
| 1001 | vz200 // 1984 Dick Smith Electronics VZ-200 | |
| 1002 | 1002 | laser310 // 1984 Laser 310 (210 with diff. keyboard and RAM) |
| 1003 | laser310h // 1984 Laser 310 with SHRG mod | |
| 1004 | vz300 // 1984 Dick Smith Electronics VZ-300 | |
| 1005 | laser350 // 1984? Laser 350 | |
| 1006 | laser500 // 1984? Laser 500 | |
| 1007 | laser700 // 1984? Laser 700 | |
| 1003 | laser310h // 1984 Laser 310 with SHRG mod | |
| 1004 | vz300 // 1984 Dick Smith Electronics VZ-300 | |
| 1005 | laser350 // 1984? Laser 350 | |
| 1006 | laser500 // 1984? Laser 500 | |
| 1007 | laser700 // 1984? Laser 700 | |
| 1008 | 1008 | socrates // 1988 Socrates Educational Video System |
| 1009 | 1009 | socratfc // 1988 Socrates SAITOUT |
| 1010 | 1010 | |
| 1011 | 1011 | // Tangerine |
| 1012 | microtan // 1979 Microtan 65 | |
| 1012 | microtan // 1979 Microtan 65 | |
| 1013 | 1013 | |
| 1014 | oric1 // 1983 Oric 1 | |
| 1015 | orica // 1984 Oric Atmos | |
| 1016 | prav8d // 1985 Pravetz 8D | |
| 1017 | prav8dd // 1989 Pravetz 8D (Disk ROM) | |
| 1018 | telstrat // ??? Oric Telestrat/Stratos | |
| 1014 | oric1 // 1983 Oric 1 | |
| 1015 | orica // 1984 Oric Atmos | |
| 1016 | prav8d // 1985 Pravetz 8D | |
| 1017 | prav8dd // 1989 Pravetz 8D (Disk ROM) | |
| 1018 | telstrat // ??? Oric Telestrat/Stratos | |
| 1019 | 1019 | |
| 1020 | 1020 | // Philips |
| 1021 | p2000t // 1980 P2000T | |
| 1022 | p2000m // 1980 P2000M | |
| 1023 | videopac // 1979 Videopac G7000/C52 | |
| 1024 | g7400 // 1983 Videopac Plus G7400 | |
| 1025 | vg5k // 1984 VG-5000 | |
| 1021 | p2000t // 1980 P2000T | |
| 1022 | p2000m // 1980 P2000M | |
| 1023 | videopac // 1979 Videopac G7000/C52 | |
| 1024 | g7400 // 1983 Videopac Plus G7400 | |
| 1025 | vg5k // 1984 VG-5000 | |
| 1026 | 1026 | |
| 1027 | 1027 | // Brandt |
| 1028 | jopac // 19?? Jopac JO7400 | |
| 1028 | jopac // 19?? Jopac JO7400 | |
| 1029 | 1029 | |
| 1030 | 1030 | // Compukit |
| 1031 | 1031 | uk101 |
| r11247 | r11248 | |
| 1036 | 1036 | c1pmf |
| 1037 | 1037 | |
| 1038 | 1038 | // ASCII & Microsoft |
| 1039 | msx // 1983 MSX | |
| 1039 | msx // 1983 MSX | |
| 1040 | 1040 | ax170 |
| 1041 | 1041 | canonv10 |
| 1042 | 1042 | canonv20 |
| 1043 | dpc100 // 1984 MSX Korea | |
| 1044 | dpc180 // 1984 MSX Korea | |
| 1045 | dpc200 // 1984 MSX Korea | |
| 1043 | dpc100 // 1984 MSX Korea | |
| 1044 | dpc180 // 1984 MSX Korea | |
| 1045 | dpc200 // 1984 MSX Korea | |
| 1046 | 1046 | gsfc200 |
| 1047 | expert10 // 1983 MSX Brazil | |
| 1048 | expert11 // 1984 MSX Brazil | |
| 1049 | expert13 // 1984 MSX Brazil | |
| 1050 | expertdp // 1985 MSX Brazil | |
| 1051 | expertpl // 1984 MSX Brazil | |
| 1047 | expert10 // 1983 MSX Brazil | |
| 1048 | expert11 // 1984 MSX Brazil | |
| 1049 | expert13 // 1984 MSX Brazil | |
| 1050 | expertdp // 1985 MSX Brazil | |
| 1051 | expertpl // 1984 MSX Brazil | |
| 1052 | 1052 | jvchc7gb |
| 1053 | 1053 | mlf80 |
| 1054 | 1054 | mlfx1 |
| 1055 | cf1200 // 1984 MSX Japan | |
| 1056 | cf2000 // 1983 MSX Japan | |
| 1057 | cf2700 // 1984 MSX Japan | |
| 1058 | cf3000 // 1984 MSX Japan | |
| 1059 | cf3300 // 1985 MSX Japan | |
| 1060 | fs1300 // 1985 MSX Japan | |
| 1061 | fs4000 // 1985 MSX Japan | |
| 1055 | cf1200 // 1984 MSX Japan | |
| 1056 | cf2000 // 1983 MSX Japan | |
| 1057 | cf2700 // 1984 MSX Japan | |
| 1058 | cf3000 // 1984 MSX Japan | |
| 1059 | cf3300 // 1985 MSX Japan | |
| 1060 | fs1300 // 1985 MSX Japan | |
| 1061 | fs4000 // 1985 MSX Japan | |
| 1062 | 1062 | nms801 |
| 1063 | 1063 | vg8000 |
| 1064 | 1064 | vg8010 |
| 1065 | 1065 | vg8010f |
| 1066 | 1066 | vg802000 |
| 1067 | vg802020 // 1985 MSX | |
| 1067 | vg802020 // 1985 MSX | |
| 1068 | 1068 | piopx7 |
| 1069 | 1069 | mpc100 |
| 1070 | hotbit11 // 1985 MSX Brazil | |
| 1071 | hotbit12 // 1985 MSX Brazil | |
| 1072 | hotbi13b // 1985 MSX Brazil | |
| 1073 | hotbi13p // 1985 MSX Brazil | |
| 1074 | hotbit20 // 1986 MSX2 Brazil | |
| 1070 | hotbit11 // 1985 MSX Brazil | |
| 1071 | hotbit12 // 1985 MSX Brazil | |
| 1072 | hotbi13b // 1985 MSX Brazil | |
| 1073 | hotbi13p // 1985 MSX Brazil | |
| 1074 | hotbit20 // 1986 MSX2 Brazil | |
| 1075 | 1075 | hb10p |
| 1076 | 1076 | hb20p |
| 1077 | hb201 // 1985 MSX Japan | |
| 1078 | hb201p // 1985 MSX | |
| 1079 | hb501p // 1984 MSX | |
| 1080 | hb55d // 1983 MSX Germany | |
| 1081 | hb55p // 1983 MSX | |
| 1082 | hb75d // 1983 MSX Germany | |
| 1083 | hb75p // 1983 MSX | |
| 1084 | svi728 // 1985 MSX | |
| 1085 | svi738 // 1985 MSX | |
| 1086 | svi738sw // 1985 MSX | |
| 1077 | hb201 // 1985 MSX Japan | |
| 1078 | hb201p // 1985 MSX | |
| 1079 | hb501p // 1984 MSX | |
| 1080 | hb55d // 1983 MSX Germany | |
| 1081 | hb55p // 1983 MSX | |
| 1082 | hb75d // 1983 MSX Germany | |
| 1083 | hb75p // 1983 MSX | |
| 1084 | svi728 // 1985 MSX | |
| 1085 | svi738 // 1985 MSX | |
| 1086 | svi738sw // 1985 MSX | |
| 1087 | 1087 | tadpc200 |
| 1088 | 1088 | tadpc20a |
| 1089 | hx10 // 1984 MSX | |
| 1090 | hx10s // 1984 MSX | |
| 1091 | hx20 // 1984 MSX | |
| 1089 | hx10 // 1984 MSX | |
| 1090 | hx10s // 1984 MSX | |
| 1091 | hx20 // 1984 MSX | |
| 1092 | 1092 | cx5m |
| 1093 | 1093 | cx5m128 |
| 1094 | 1094 | cx5m2 |
| r11247 | r11248 | |
| 1102 | 1102 | bruc100 |
| 1103 | 1103 | |
| 1104 | 1104 | |
| 1105 | msx2 // 1985 MSX2 | |
| 1105 | msx2 // 1985 MSX2 | |
| 1106 | 1106 | ax350 |
| 1107 | 1107 | ax370 |
| 1108 | hbf9p // 1985 MSX2 | |
| 1109 | hbf9s // 1985 MSX2 | |
| 1110 | hbf500p // 1985 MSX2 | |
| 1111 | hbf700d // 1985 MSX2 Germany | |
| 1112 | hbf700f // 1985 MSX2 | |
| 1113 | hbf700p // 1985 MSX2 | |
| 1114 | hbf700s // 1985 MSX2 Spain | |
| 1115 | hbg900ap // 1986 MSX2 | |
| 1116 | hbg900p // 1986 MSX2 | |
| 1117 | nms8220 // 1986 MSX2 | |
| 1118 | nms8220a // 1986 MSX2 | |
| 1119 | vg8230 // 1986 MSX2 | |
| 1120 | vg8235 // 1986 MSX2 | |
| 1121 | vg8235f // 1986 MSX2 | |
| 1122 | vg8240 // 1986 MSX2 | |
| 1123 | nms8245 // 1986 MSX2 | |
| 1124 | nms8245f // 1986 MSX2 | |
| 1125 | nms8250 // 1986 MSX2 | |
| 1126 | nms8255 // 1986 MSX2 | |
| 1127 | nms8280 // 1986 MSX2 | |
| 1128 | nms8280g // 1986 MSX2 | |
| 1129 | tpc310 // 1986 MSX2 | |
| 1108 | hbf9p // 1985 MSX2 | |
| 1109 | hbf9s // 1985 MSX2 | |
| 1110 | hbf500p // 1985 MSX2 | |
| 1111 | hbf700d // 1985 MSX2 Germany | |
| 1112 | hbf700f // 1985 MSX2 | |
| 1113 | hbf700p // 1985 MSX2 | |
| 1114 | hbf700s // 1985 MSX2 Spain | |
| 1115 | hbg900ap // 1986 MSX2 | |
| 1116 | hbg900p // 1986 MSX2 | |
| 1117 | nms8220 // 1986 MSX2 | |
| 1118 | nms8220a // 1986 MSX2 | |
| 1119 | vg8230 // 1986 MSX2 | |
| 1120 | vg8235 // 1986 MSX2 | |
| 1121 | vg8235f // 1986 MSX2 | |
| 1122 | vg8240 // 1986 MSX2 | |
| 1123 | nms8245 // 1986 MSX2 | |
| 1124 | nms8245f // 1986 MSX2 | |
| 1125 | nms8250 // 1986 MSX2 | |
| 1126 | nms8255 // 1986 MSX2 | |
| 1127 | nms8280 // 1986 MSX2 | |
| 1128 | nms8280g // 1986 MSX2 | |
| 1129 | tpc310 // 1986 MSX2 | |
| 1130 | 1130 | hx23 // 1986 MSX2 |
| 1131 | hx23f // 1986 MSX2 | |
| 1131 | hx23f // 1986 MSX2 | |
| 1132 | 1132 | cx7m // 1986 MSX2 |
| 1133 | cx7m128 // 1986 MSX2 | |
| 1134 | fs5500 // 1985 MSX2 Japan | |
| 1135 | fs4500 // 1986 MSX2 Japan | |
| 1136 | fs4700 // 1986 MSX2 Japan | |
| 1137 | fs5000 // 1986 MSX2 Japan | |
| 1138 | fs4600 // 1986 MSX2 Japan | |
| 1139 | fsa1 // 1986 MSX2 Japan | |
| 1140 | fsa1a // 1986 MSX2 Japan | |
| 1141 | fsa1mk2 // 1987 MSX2 Japan | |
| 1142 | fsa1f // 1987 MSX2 Japan | |
| 1143 | fsa1fm // 1988 MSX2 Japan | |
| 1144 | hbf500 // 1986 MSX2 Japan | |
| 1145 | hbf900 // 1986 MSX2 Japan | |
| 1146 | hbf900a // 1986 MSX2 Japan | |
| 1147 | hbf1 // 1986 MSX2 Japan | |
| 1148 | hbf12 // 1987 MSX2 Japan | |
| 1149 | hbf1xd // 1987 MSX2 Japan | |
| 1150 | hbf1xdm2 // 1988 MSX2 Japan | |
| 1151 | phc23 // 1986 MSX2 Japan | |
| 1152 | cpc300 // 1986 MSX2 Korea | |
| 1153 | cpc300e // 1986 MSX2 Korea | |
| 1154 | cpc400 // 1986 MSX2 Korea | |
| 1155 | cpc400s // 1986 MSX2 Korea | |
| 1156 | expert20 // 1986 MSX2 Korea | |
| 1133 | cx7m128 // 1986 MSX2 | |
| 1134 | fs5500 // 1985 MSX2 Japan | |
| 1135 | fs4500 // 1986 MSX2 Japan | |
| 1136 | fs4700 // 1986 MSX2 Japan | |
| 1137 | fs5000 // 1986 MSX2 Japan | |
| 1138 | fs4600 // 1986 MSX2 Japan | |
| 1139 | fsa1 // 1986 MSX2 Japan | |
| 1140 | fsa1a // 1986 MSX2 Japan | |
| 1141 | fsa1mk2 // 1987 MSX2 Japan | |
| 1142 | fsa1f // 1987 MSX2 Japan | |
| 1143 | fsa1fm // 1988 MSX2 Japan | |
| 1144 | hbf500 // 1986 MSX2 Japan | |
| 1145 | hbf900 // 1986 MSX2 Japan | |
| 1146 | hbf900a // 1986 MSX2 Japan | |
| 1147 | hbf1 // 1986 MSX2 Japan | |
| 1148 | hbf12 // 1987 MSX2 Japan | |
| 1149 | hbf1xd // 1987 MSX2 Japan | |
| 1150 | hbf1xdm2 // 1988 MSX2 Japan | |
| 1151 | phc23 // 1986 MSX2 Japan | |
| 1152 | cpc300 // 1986 MSX2 Korea | |
| 1153 | cpc300e // 1986 MSX2 Korea | |
| 1154 | cpc400 // 1986 MSX2 Korea | |
| 1155 | cpc400s // 1986 MSX2 Korea | |
| 1156 | expert20 // 1986 MSX2 Korea | |
| 1157 | 1157 | |
| 1158 | msx2p // 1988 MSX2+ Japan | |
| 1159 | fsa1fx // 1988 MSX2+ Japan | |
| 1160 | fsa1wx // 1988 MSX2+ Japan | |
| 1161 | fsa1wxa // 1988 MSX2+ Japan | |
| 1162 | fsa1wsx // 1989 MSX2+ Japan | |
| 1163 | hbf1xdj // 1988 MSX2+ Japan | |
| 1164 | hbf1xv // 1989 MSX2+ Japan | |
| 1165 | phc70fd // 1988 MSX2+ Japan | |
| 1166 | phc70fd2 // 1988 MSX2+ Japan | |
| 1167 | phc35j // 1989 MSX2+ Japan | |
| 1158 | msx2p // 1988 MSX2+ Japan | |
| 1159 | fsa1fx // 1988 MSX2+ Japan | |
| 1160 | fsa1wx // 1988 MSX2+ Japan | |
| 1161 | fsa1wxa // 1988 MSX2+ Japan | |
| 1162 | fsa1wsx // 1989 MSX2+ Japan | |
| 1163 | hbf1xdj // 1988 MSX2+ Japan | |
| 1164 | hbf1xv // 1989 MSX2+ Japan | |
| 1165 | phc70fd // 1988 MSX2+ Japan | |
| 1166 | phc70fd2 // 1988 MSX2+ Japan | |
| 1167 | phc35j // 1989 MSX2+ Japan | |
| 1168 | 1168 | |
| 1169 | 1169 | |
| 1170 | 1170 | // NASCOM Microcomputers |
| 1171 | nascom1 // 1978 Nascom 1 | |
| 1172 | nascom2 // 1979 Nascom 2 | |
| 1171 | nascom1 // 1978 Nascom 1 | |
| 1172 | nascom2 // 1979 Nascom 2 | |
| 1173 | 1173 | |
| 1174 | 1174 | // Miles Gordon Technology |
| 1175 | samcoupe // 1989 Sam Coupe | |
| 1175 | samcoupe // 1989 Sam Coupe | |
| 1176 | 1176 | |
| 1177 | 1177 | // Motorola |
| 1178 | mekd2 // 1977 Motorola Evaluation Kit | |
| 1178 | mekd2 // 1977 Motorola Evaluation Kit | |
| 1179 | 1179 | |
| 1180 | 1180 | // DEC |
| 1181 | pdp1 // 1961 DEC PDP1 | |
| 1181 | pdp1 // 1961 DEC PDP1 | |
| 1182 | 1182 | vt100 // 1978 Digital Equipment Corporation |
| 1183 | 1183 | //vt100wp // 1978 Digital Equipment Corporation |
| 1184 | 1184 | //vt100stp // 1978 Digital Equipment Corporation |
| r11247 | r11248 | |
| 1199 | 1199 | mc7105 // Elektronika MC7105 |
| 1200 | 1200 | |
| 1201 | 1201 | // Memotech |
| 1202 | mtx512 // 1983 Memotech MTX 512 | |
| 1203 | mtx500 // 1983 Memotech MTX 500 | |
| 1204 | rs128 // 1984 Memotech RS 128 | |
| 1202 | mtx512 // 1983 Memotech MTX 512 | |
| 1203 | mtx500 // 1983 Memotech MTX 500 | |
| 1204 | rs128 // 1984 Memotech RS 128 | |
| 1205 | 1205 | |
| 1206 | 1206 | // Mattel |
| 1207 | intvkbd // 1981 - Mattel Intellivision Keyboard Component | |
| 1208 | // (Test marketed, later recalled) | |
| 1209 | aquarius // 1983 Aquarius | |
| 1210 | aquarius_qd // 1983 Aquarius w/ Quick Disk | |
| 1211 | // aquariu2 // 1984 Aquarius II | |
| 1207 | intvkbd // 1981 - Mattel Intellivision Keyboard Component | |
| 1208 | // (Test marketed, later recalled) | |
| 1209 | aquarius // 1983 Aquarius | |
| 1210 | aquarius_qd // 1983 Aquarius w/ Quick Disk | |
| 1211 | // aquariu2 // 1984 Aquarius II | |
| 1212 | 1212 | |
| 1213 | 1213 | // Exidy, Inc. |
| 1214 | sorcerer // Sorcerer | |
| 1214 | sorcerer // Sorcerer | |
| 1215 | 1215 | |
| 1216 | 1216 | // Galaksija |
| 1217 | 1217 | galaxy |
| 1218 | 1218 | galaxyp |
| 1219 | 1219 | |
| 1220 | 1220 | // Lviv/L'vov |
| 1221 | lviv // Lviv/L'vov | |
| 1221 | lviv // Lviv/L'vov | |
| 1222 | 1222 | |
| 1223 | 1223 | // Tesla |
| 1224 | pmd851 // PMD-85.1 | |
| 1225 | pmd852 // PMD-85.2 | |
| 1226 | pmd852a // PMD-85.2A | |
| 1227 | pmd852b // PMD-85.2B | |
| 1228 | pmd853 // PMD-85.3 | |
| 1224 | pmd851 // PMD-85.1 | |
| 1225 | pmd852 // PMD-85.2 | |
| 1226 | pmd852a // PMD-85.2A | |
| 1227 | pmd852b // PMD-85.2B | |
| 1228 | pmd853 // PMD-85.3 | |
| 1229 | 1229 | |
| 1230 | 1230 | // Didaktik |
| 1231 | alfa // Alfa (PMD-85.1 clone) | |
| 1231 | alfa // Alfa (PMD-85.1 clone) | |
| 1232 | 1232 | |
| 1233 | 1233 | // Statny |
| 1234 | mato // Mato (PMD-85.2 clone) | |
| 1234 | mato // Mato (PMD-85.2 clone) | |
| 1235 | 1235 | |
| 1236 | 1236 | // Zbrojovka Brno |
| 1237 | c2717 // Consul 2717 (PMD-85.2 clone) | |
| 1238 | c2717pmd // Consul 2717 with PMD-32 | |
| 1237 | c2717 // Consul 2717 (PMD-85.2 clone) | |
| 1238 | c2717pmd // Consul 2717 with PMD-32 | |
| 1239 | 1239 | |
| 1240 | 1240 | // Microkey |
| 1241 | primoa32 // Primo A-32 | |
| 1242 | primoa48 // Primo A-48 | |
| 1243 | primoa64 // Primo A-64 | |
| 1244 | primob32 // Primo B-32 | |
| 1245 | primob48 // Primo B-48 | |
| 1246 | primob64 // Primo B-64 | |
| 1247 | primoc64 // Primo C-64 | |
| 1241 | primoa32 // Primo A-32 | |
| 1242 | primoa48 // Primo A-48 | |
| 1243 | primoa64 // Primo A-64 | |
| 1244 | primob32 // Primo B-32 | |
| 1245 | primob48 // Primo B-48 | |
| 1246 | primob64 // Primo B-64 | |
| 1247 | primoc64 // Primo C-64 | |
| 1248 | 1248 | |
| 1249 | 1249 | // Team Concepts |
| 1250 | 1250 | // CPU not known, else should be easy, look into drivers/comquest.c |
| 1251 | comquest // Comquest Plus German | |
| 1251 | comquest // Comquest Plus German | |
| 1252 | 1252 | |
| 1253 | 1253 | // Hewlett Packard |
| 1254 | 1254 | hp38g |
| r11247 | r11248 | |
| 1264 | 1264 | hp9816 |
| 1265 | 1265 | |
| 1266 | 1266 | // SpectraVideo |
| 1267 | svi318 // SVI-318 (PAL) | |
| 1268 | svi318n // SVI-318 (NTSC) | |
| 1269 | svi328 // SVI-328 (PAL) | |
| 1270 | svi328n // SVI-328 (NTSC) | |
| 1271 | sv328p80 // SVI-328 (PAL) + SVI-806 80 column card | |
| 1272 | sv328n80 // SVI-328 (NTSC) + SVI-806 80 column card | |
| 1267 | svi318 // SVI-318 (PAL) | |
| 1268 | svi318n // SVI-318 (NTSC) | |
| 1269 | svi328 // SVI-328 (PAL) | |
| 1270 | svi328n // SVI-328 (NTSC) | |
| 1271 | sv328p80 // SVI-328 (PAL) + SVI-806 80 column card | |
| 1272 | sv328n80 // SVI-328 (NTSC) + SVI-806 80 column card | |
| 1273 | 1273 | |
| 1274 | 1274 | // Andrew Donald Booth (this is the name of the designer, not a company) |
| 1275 | 1275 | // apexc53 // 1951(?) APEXC: All-Purpose Electronic X-ray Computer |
| 1276 | 1276 | apexc // 1955(?) APEXC: All-Purpose Electronic X-ray Computer |
| 1277 | 1277 | |
| 1278 | 1278 | // Corvus |
| 1279 | concept // 1982 Corvus Concept | |
| 1279 | concept // 1982 Corvus Concept | |
| 1280 | 1280 | |
| 1281 | 1281 | // DAI |
| 1282 | dai // DAI | |
| 1282 | dai // DAI | |
| 1283 | 1283 | |
| 1284 | 1284 | // Telenova |
| 1285 | compis // 1985 Telenova Compis | |
| 1286 | compis2 // 1985 Telenova Compis | |
| 1285 | compis // 1985 Telenova Compis | |
| 1286 | compis2 // 1985 Telenova Compis | |
| 1287 | 1287 | |
| 1288 | 1288 | // Multitech |
| 1289 | mpf1 // 1979 Multitech Micro Professor 1 | |
| 1289 | mpf1 // 1979 Multitech Micro Professor 1 | |
| 1290 | 1290 | mpf1b // 1979 Multitech Micro Professor 1B |
| 1291 | 1291 | |
| 1292 | 1292 | // Telercas Oy |
| r11247 | r11248 | |
| 1301 | 1301 | nano |
| 1302 | 1302 | |
| 1303 | 1303 | // MIT |
| 1304 | tx0_64kw // April 1956 MIT TX-0 (64kw RAM) | |
| 1305 | tx0_8kw // 1962 MIT TX-0 (8kw RAM) | |
| 1304 | tx0_64kw // April 1956 MIT TX-0 (64kw RAM) | |
| 1305 | tx0_8kw // 1962 MIT TX-0 (8kw RAM) | |
| 1306 | 1306 | |
| 1307 | 1307 | // Luxor Datorer AB |
| 1308 | 1308 | abc80 |
| r11247 | r11248 | |
| 1313 | 1313 | abc1600 |
| 1314 | 1314 | |
| 1315 | 1315 | // Be Incorporated |
| 1316 | bebox // BeBox Dual603-66 | |
| 1317 | bebox2 // BeBox Dual603-133 | |
| 1316 | bebox // BeBox Dual603-66 | |
| 1317 | bebox2 // BeBox Dual603-133 | |
| 1318 | 1318 | |
| 1319 | 1319 | // Tiger Electronics |
| 1320 | gamecom // Tiger Game.com | |
| 1320 | gamecom // Tiger Game.com | |
| 1321 | 1321 | |
| 1322 | 1322 | // Tiger Telematics |
| 1323 | 1323 | gizmondo |
| 1324 | 1324 | |
| 1325 | 1325 | // Thomson |
| 1326 | t9000 // 1980 Thomson T9000 (TO7 prototype) | |
| 1327 | to7 // 1982 Thomson TO7 | |
| 1328 | to770 // 1984 Thomson TO7/70 | |
| 1329 | to770a // 198? Thomson TO7/70 arabic version | |
| 1330 | mo5 // 1984 Thomson MO5 | |
| 1331 | mo5e // 1986 Thomson MO5E (export version) | |
| 1332 | to9 // 1985 Thomson T09 | |
| 1333 | to8 // 1986 Thomson T08 | |
| 1334 | to8d // 1987 Thomson T08D | |
| 1335 | to9p // 1986 Thomson T09+ | |
| 1336 | mo6 // 1986 Thomson MO6 | |
| 1337 | mo5nr // 1986 Thomson MO5 NR | |
| 1338 | pro128 // 1986 Olivetti Prodest PC 128 | |
| 1326 | t9000 // 1980 Thomson T9000 (TO7 prototype) | |
| 1327 | to7 // 1982 Thomson TO7 | |
| 1328 | to770 // 1984 Thomson TO7/70 | |
| 1329 | to770a // 198? Thomson TO7/70 arabic version | |
| 1330 | mo5 // 1984 Thomson MO5 | |
| 1331 | mo5e // 1986 Thomson MO5E (export version) | |
| 1332 | to9 // 1985 Thomson T09 | |
| 1333 | to8 // 1986 Thomson T08 | |
| 1334 | to8d // 1987 Thomson T08D | |
| 1335 | to9p // 1986 Thomson T09+ | |
| 1336 | mo6 // 1986 Thomson MO6 | |
| 1337 | mo5nr // 1986 Thomson MO5 NR | |
| 1338 | pro128 // 1986 Olivetti Prodest PC 128 | |
| 1339 | 1339 | |
| 1340 | 1340 | // Cybiko, Inc. |
| 1341 | 1341 | cybikov1 // Cybiko Wireless Intertainment System - Classic V1 |
| 1342 | 1342 | cybikov2 // Cybiko Wireless Intertainment System - Classic V2 |
| 1343 | cybikoxt // Cybiko Wireless Intertainment System - Xtreme | |
| 1343 | cybikoxt // Cybiko Wireless Intertainment System - Xtreme | |
| 1344 | 1344 | |
| 1345 | 1345 | // Dick Smith |
| 1346 | 1346 | super80 |
| r11247 | r11248 | |
| 1457 | 1457 | // Spectrum clones |
| 1458 | 1458 | |
| 1459 | 1459 | // ICE-Felix |
| 1460 | hc85 // 1985 HC-85 | |
| 1461 | hc88 // 1988 HC-88 | |
| 1462 | hc90 // 1990 HC-90 | |
| 1463 | hc91 // 1991 HC-91 | |
| 1464 | hc128 // 1991 HC-128 | |
| 1465 | hc2000 // 1992 HC-2000 | |
| 1460 | hc85 // 1985 HC-85 | |
| 1461 | hc88 // 1988 HC-88 | |
| 1462 | hc90 // 1990 HC-90 | |
| 1463 | hc91 // 1991 HC-91 | |
| 1464 | hc128 // 1991 HC-128 | |
| 1465 | hc2000 // 1992 HC-2000 | |
| 1466 | 1466 | |
| 1467 | 1467 | cobrasp |
| 1468 | 1468 | cobra80 |
| 1469 | 1469 | |
| 1470 | cip01 // 1987 CIP-01 | |
| 1471 | cip03 // 1988 CIP-03 | |
| 1472 | jet // 1990 JET | |
| 1470 | cip01 // 1987 CIP-01 | |
| 1471 | cip03 // 1988 CIP-03 | |
| 1472 | jet // 1990 JET | |
| 1473 | 1473 | |
| 1474 | 1474 | // Didaktik Skalica |
| 1475 | dgama87 // 1987 Didaktik Gama 87 | |
| 1476 | dgama88 // 1988 Didaktik Gama 88 | |
| 1477 | dgama89 // 1989 Didaktik Gama 89 | |
| 1478 | didakt90 // 1990 Didaktik Skalica 90 | |
| 1479 | didakm91 // 1991 Didaktik M 91 | |
| 1480 | didaktk // 1992 Didaktik Kompakt | |
| 1481 | didakm93 // 1993 Didaktik M 93 | |
| 1475 | dgama87 // 1987 Didaktik Gama 87 | |
| 1476 | dgama88 // 1988 Didaktik Gama 88 | |
| 1477 | dgama89 // 1989 Didaktik Gama 89 | |
| 1478 | didakt90 // 1990 Didaktik Skalica 90 | |
| 1479 | didakm91 // 1991 Didaktik M 91 | |
| 1480 | didaktk // 1992 Didaktik Kompakt | |
| 1481 | didakm93 // 1993 Didaktik M 93 | |
| 1482 | 1482 | |
| 1483 | mistrum // 1988 Mistrum | |
| 1483 | mistrum // 1988 Mistrum | |
| 1484 | 1484 | |
| 1485 | 1485 | // Russian clones |
| 1486 | blitzs // 1990 Blic | |
| 1487 | byte // 1990 Byte | |
| 1488 | orizon // 199? Orizon-Micro | |
| 1489 | quorum48 // 1993 Kvorum 48K | |
| 1490 | magic6 // 1993 Magic 6 | |
| 1491 | compani1 // 1990 Kompanion 1 | |
| 1486 | blitzs // 1990 Blic | |
| 1487 | byte // 1990 Byte | |
| 1488 | orizon // 199? Orizon-Micro | |
| 1489 | quorum48 // 1993 Kvorum 48K | |
| 1490 | magic6 // 1993 Magic 6 | |
| 1491 | compani1 // 1990 Kompanion 1 | |
| 1492 | 1492 | spektrbk // 1990 Spektr BK-001 |
| 1493 | 1493 | zvezda // 1990 Zvezda |
| 1494 | 1494 | |
| 1495 | 1495 | // Kramer |
| 1496 | kramermc // 1987 Kramer MC | |
| 1496 | kramermc // 1987 Kramer MC | |
| 1497 | 1497 | |
| 1498 | 1498 | // AC1 |
| 1499 | ac1 // 1984 Amateurcomputer AC1 | |
| 1500 | ac1_32 // 1984 Amateurcomputer AC1 (32 lines) | |
| 1501 | ac1scch // 1984 Amateurcomputer AC1 SCCH | |
| 1499 | ac1 // 1984 Amateurcomputer AC1 | |
| 1500 | ac1_32 // 1984 Amateurcomputer AC1 (32 lines) | |
| 1501 | ac1scch // 1984 Amateurcomputer AC1 SCCH | |
| 1502 | 1502 | |
| 1503 | pcm // PC/M Mugler | |
| 1503 | pcm // PC/M Mugler | |
| 1504 | 1504 | |
| 1505 | 1505 | // Ei Nis |
| 1506 | 1506 | pecom64 |
| r11247 | r11248 | |
| 1558 | 1558 | |
| 1559 | 1559 | // Nakajima manufactured eletronic typewriters |
| 1560 | 1560 | es210_es |
| 1561 | drwrt200 // 199? NTS DreamWriter T200 | |
| 1562 | drwrt400 // 1996 NTS DreamWriter T400 | |
| 1563 | wales210 // 199? Walther ES-210 (German) | |
| 1564 | dator3k // 199? Dator 3000 (Spanish) | |
| 1561 | drwrt200 // 199? NTS DreamWriter T200 | |
| 1562 | drwrt400 // 1996 NTS DreamWriter T400 | |
| 1563 | wales210 // 199? Walther ES-210 (German) | |
| 1564 | dator3k // 199? Dator 3000 (Spanish) | |
| 1565 | 1565 | |
| 1566 | 1566 | // Fujitsu |
| 1567 | 1567 | fm7 |
| r11247 | r11248 | |
| 1597 | 1597 | |
| 1598 | 1598 | //***************Games****************************************************** |
| 1599 | 1599 | // Computer Electronic |
| 1600 | mk1 // Chess Champion MK I | |
| 1600 | mk1 // Chess Champion MK I | |
| 1601 | 1601 | // Quelle International |
| 1602 | mk2 // Chess Champion MK II | |
| 1602 | mk2 // Chess Champion MK II | |
| 1603 | 1603 | |
| 1604 | 1604 | // Novag |
| 1605 | ssystem3 // Chess Champion Super System III / MK III | |
| 1605 | ssystem3 // Chess Champion Super System III / MK III | |
| 1606 | 1606 | supercon |
| 1607 | 1607 | |
| 1608 | 1608 | // Hegener & Glaser Munich |
| 1609 | // mephisto // Mephisto | |
| 1609 | // mephisto // Mephisto | |
| 1610 | 1610 | mm2 // Mephisto 2 |
| 1611 | mm4 // Mephisto 4 | |
| 1612 | // mm4tk // Mephisto 4 Turbo Kit | |
| 1613 | mm5 // Mephisto 5.1 ROM | |
| 1614 | mm5tk // Mephisto 5.1 ROM Turbo Kit Speed | |
| 1615 | mm50 // Mephisto 5.0 ROM | |
| 1616 | rebel5 // Mephisto 5 | |
| 1617 | glasgow // Glasgow | |
| 1611 | mm4 // Mephisto 4 | |
| 1612 | // mm4tk // Mephisto 4 Turbo Kit | |
| 1613 | mm5 // Mephisto 5.1 ROM | |
| 1614 | mm5tk // Mephisto 5.1 ROM Turbo Kit Speed | |
| 1615 | mm50 // Mephisto 5.0 ROM | |
| 1616 | rebel5 // Mephisto 5 | |
| 1617 | glasgow // Glasgow | |
| 1618 | 1618 | amsterd // Amsterdam |
| 1619 | dallas // Dallas | |
| 1620 | dallas16 // Dallas | |
| 1621 | dallas32 // Dallas | |
| 1622 | roma // Roma | |
| 1623 | roma32 // Roma | |
| 1624 | polgar // Polgar | |
| 1625 | milano // Milano | |
| 1619 | dallas // Dallas | |
| 1620 | dallas16 // Dallas | |
| 1621 | dallas32 // Dallas | |
| 1622 | roma // Roma | |
| 1623 | roma32 // Roma | |
| 1624 | polgar // Polgar | |
| 1625 | milano // Milano | |
| 1626 | 1626 | |
| 1627 | 1627 | |
| 1628 | 1628 | // JAKKS Pacific, Inc. / HotGen, Ltd. |
| r11247 | r11248 | |
|---|---|---|
| 278 | 278 | floppy_image_read(floppy,header,0,D88_HEADER_LEN); |
| 279 | 279 | |
| 280 | 280 | #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 | |
| 282 | 282 | // this allows to spot duplicates, making easier to debug softlists. |
| 283 | 283 | UINT32 temp_size = floppy_image_size(floppy); |
| 284 | 284 | UINT8 tmp_copy[temp_size - D88_HEADER_LEN]; |
| r11247 | r11248 | |
|---|---|---|
| 55 | 55 | 761 pad byte where head is turned off (0xFF here) |
| 56 | 56 | |
| 57 | 57 | 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) | |
| 82 | 82 | |
| 83 | 83 | Note : "Self synch refers to a technique whereby two zeroes are inserted |
| 84 | 84 | between each synch byte written to the disk.", i.e. "0xFF, 0xFF, 0xFF, |
| r11247 | r11248 | |
| 476 | 476 | static floperr_t apple35_read_sector(floppy_image *floppy, int head, int track, int sector, void *buffer, size_t buflen) |
| 477 | 477 | { |
| 478 | 478 | UINT32 data_offset; |
| 479 | // | |
| 479 | // printf("Read sector: T %d S %d H %d\n", track, sector, head); | |
| 480 | 480 | data_offset = apple35_get_offset(floppy, head, track, sector, NULL); |
| 481 | 481 | if (data_offset == ~0) |
| 482 | 482 | return FLOPPY_ERROR_SEEKERROR; |
| r11247 | r11248 | |
| 506 | 506 | |
| 507 | 507 | assert(buflen == 524); |
| 508 | 508 | |
| 509 | // | |
| 509 | // printf("Read sector TD: T %d S %d H %d\n", track, sector, head); | |
| 510 | 510 | |
| 511 | 511 | /* first read the sector */ |
| 512 | 512 | err = apple35_read_sector(floppy, head, track, sector, ((UINT8 *) buffer) + 12, 512); |
| r11247 | r11248 | |
|---|---|---|
| 114 | 114 | DEVICE_IMAGE_UNLOAD( timex_cart ) |
| 115 | 115 | { |
| 116 | 116 | if (timex_cart.data) |
| 117 | ||
| 117 | ||
| 118 | 118 | free (timex_cart.data); |
| 119 | 119 | timex_cart.data = NULL; |
| 120 | 120 | } |
| r11247 | r11248 | |
|---|---|---|
| 1440 | 1440 | $(MESS_DRIVERS)/psx.o \ |
| 1441 | 1441 | $(MESS_MACHINE)/psxcd.o \ |
| 1442 | 1442 | $(MESS_MACHINE)/psxcddrv.o \ |
| 1443 | $(MESS_MACHINE)/psxcard.o | |
| 1443 | $(MESS_MACHINE)/psxcard.o | |
| 1444 | 1444 | $(MESS_DRIVERS)/pockstat.o \ |
| 1445 | 1445 | $(MESS_DRIVERS)/smc777.o \ |
| 1446 | 1446 |
| r11247 | r11248 | |
|---|---|---|
| 334 | 334 | MCFG_SCREEN_VISIBLE_AREA(0, 699, 0, 549) |
| 335 | 335 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 336 | 336 | MCFG_SCREEN_UPDATE( dgnbeta ) |
| 337 | ||
| 337 | ||
| 338 | 338 | MCFG_GFXDECODE(dgnbeta) |
| 339 | 339 | MCFG_PALETTE_LENGTH(ARRAY_LENGTH(dgnbeta_palette) / 3) |
| 340 | 340 | MCFG_PALETTE_INIT( dgnbeta ) |
| r11247 | r11248 | |
|---|---|---|
| 228 | 228 | |
| 229 | 229 | /* Driver */ |
| 230 | 230 | |
| 231 | /* YEAR NAME | |
| 231 | /* YEAR NAME PARENT COMPAT MACHINE | |
| 232 | 232 | COMP( 1982, homelab2, 0 , 0, homelab, homelab, homelab, "Jozsef and Endre Lukacs", "Homelab 2 / Aircomp 16", GAME_NOT_WORKING | GAME_NO_SOUND) |
| 233 | 233 | COMP( 1983, homelab3, homelab2,0, homelab3, homelab, homelab, "Jozsef and Endre Lukacs", "Homelab 3", GAME_NOT_WORKING | GAME_NO_SOUND) |
| 234 | 234 | COMP( 1984, homelab4, homelab2,0, homelab3, homelab, homelab, "Jozsef and Endre Lukacs", "Homelab 4", GAME_NOT_WORKING | GAME_NO_SOUND) |
| r11247 | r11248 | |
|---|---|---|
| 18 | 18 | - 8255 ports |
| 19 | 19 | - MC6845 palette |
| 20 | 20 | - MC6845 chargen ROM |
| 21 | ||
| 21 | - MC6845 screen update | |
| 22 | 22 | |
| 23 | 23 | - peripherals |
| 24 | 24 | * PC-8431A Dual Floppy Drive |
| r11247 | r11248 | |
| 64 | 64 | static TIMER_DEVICE_CALLBACK( pc8401a_keyboard_tick ) |
| 65 | 65 | { |
| 66 | 66 | pc8401a_state *state = timer.machine().driver_data<pc8401a_state>(); |
| 67 | ||
| 67 | ||
| 68 | 68 | state->scan_keyboard(); |
| 69 | 69 | } |
| 70 | 70 | |
| r11247 | r11248 | |
| 644 | 644 | |
| 645 | 645 | /* video hardware */ |
| 646 | 646 | MCFG_FRAGMENT_ADD(pc8500_video) |
| 647 | ||
| 647 | ||
| 648 | 648 | /* option ROM cartridge */ |
| 649 | 649 | MCFG_CARTSLOT_ADD("cart") |
| 650 | 650 | MCFG_CARTSLOT_EXTENSION_LIST("rom,bin") |
| r11247 | r11248 | |
|---|---|---|
| 13 | 13 | - floppy disk hook-up; |
| 14 | 14 | - POR mechanism isn't fully understood; |
| 15 | 15 | - extra features; |
| 16 | ||
| 16 | - clean-up duplicating code; | |
| 17 | 17 | |
| 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 | |
| 22 | 22 | |
| 23 | 23 | ======================================================================================== |
| 24 | 24 | |
| r11247 | r11248 | |
| 283 | 283 | |
| 284 | 284 | /* PC9801RS specific */ |
| 285 | 285 | UINT8 m_gate_a20; //A20 line |
| 286 | UINT8 m_por; | |
| 286 | UINT8 m_por; | |
| 287 | 287 | UINT8 m_rom_bank; |
| 288 | 288 | UINT8 m_fdc_ctrl; |
| 289 | 289 | UINT32 m_ram_size; |
| r11247 | r11248 | |
| 1228 | 1228 | else if(offset >= 0x000a8000 && offset <= 0x000bffff) { pc9801_gvram_w(space,offset-0xa8000,data); } |
| 1229 | 1229 | else if(offset >= 0x00100000 && offset <= 0x00100000+state->m_ram_size-1) { pc9801rs_ex_wram_w(space,offset-0x00100000,data); } |
| 1230 | 1230 | //else |
| 1231 | // | |
| 1231 | // printf("%08x %08x\n",offset,data); | |
| 1232 | 1232 | |
| 1233 | 1233 | } |
| 1234 | 1234 | |
| r11247 | r11248 | |
| 1242 | 1242 | static WRITE8_HANDLER( pc9810rs_fdc_ctrl_w ) |
| 1243 | 1243 | { |
| 1244 | 1244 | /* |
| 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 | */ | |
| 1249 | 1249 | pc9801_state *state = space->machine().driver_data<pc9801_state>(); |
| 1250 | 1250 | |
| 1251 | 1251 | state->m_fdc_ctrl = data; |
| r11247 | r11248 | |
| 1286 | 1286 | |
| 1287 | 1287 | static READ8_HANDLER( pc9801rs_2dd_r ) |
| 1288 | 1288 | { |
| 1289 | // | |
| 1289 | // pc9801_state *state = space->machine().driver_data<pc9801_state>(); | |
| 1290 | 1290 | |
| 1291 | // if(state->m_fdc_ctrl & 1) | |
| 1292 | // return 0xff; | |
| 1291 | // if(state->m_fdc_ctrl & 1) | |
| 1292 | // return 0xff; | |
| 1293 | 1293 | |
| 1294 | 1294 | if((offset & 1) == 0) |
| 1295 | 1295 | { |
| r11247 | r11248 | |
| 1308 | 1308 | |
| 1309 | 1309 | static WRITE8_HANDLER( pc9801rs_2dd_w ) |
| 1310 | 1310 | { |
| 1311 | // | |
| 1311 | // pc9801_state *state = space->machine().driver_data<pc9801_state>(); | |
| 1312 | 1312 | |
| 1313 | // if(state->m_fdc_ctrl & 1) | |
| 1314 | // return; | |
| 1313 | // if(state->m_fdc_ctrl & 1) | |
| 1314 | // return; | |
| 1315 | 1315 | |
| 1316 | 1316 | if((offset & 1) == 0) |
| 1317 | 1317 | { |
| r11247 | r11248 | |
| 1481 | 1481 | AM_RANGE(0x0064, 0x0067) AM_WRITE8( pc9801_vrtc_mask_w, 0xffffffff) |
| 1482 | 1482 | AM_RANGE(0x0068, 0x006b) AM_WRITE8( pc9821_video_ff_w, 0xffffffff) //mode FF / <undefined> |
| 1483 | 1483 | AM_RANGE(0x0070, 0x007b) AM_READWRITE8(pc9801_70_r, pc9801_70_w, 0xffffffff) //display registers "GRCG" / i8253 pit |
| 1484 | // | |
| 1484 | // AM_RANGE(0x0080, 0x0083) SASI interface / <undefined> | |
| 1485 | 1485 | AM_RANGE(0x0090, 0x0097) AM_READWRITE8(pc9801rs_2hd_r, pc9801rs_2hd_w, 0xffffffff) |
| 1486 | 1486 | 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 | |
| 1490 | 1490 | AM_RANGE(0x00bc, 0x00bf) AM_READWRITE8(pc9810rs_fdc_ctrl_r,pc9810rs_fdc_ctrl_w,0xffffffff) |
| 1491 | 1491 | AM_RANGE(0x00c8, 0x00cf) AM_READWRITE8(pc9801rs_2dd_r, pc9801rs_2dd_w, 0xffffffff) |
| 1492 | // | |
| 1492 | // AM_RANGE(0x00d8, 0x00df) AMD98 (sound?) board | |
| 1493 | 1493 | 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) | |
| 1500 | 1500 | 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> | |
| 1536 | 1536 | ADDRESS_MAP_END |
| 1537 | 1537 | |
| 1538 | 1538 | static ADDRESS_MAP_START( upd7220_1_map, AS_0, 8 ) |
| r11247 | r11248 | |
| 1901 | 1901 | static READ8_DEVICE_HANDLER( get_slave_ack ) |
| 1902 | 1902 | { |
| 1903 | 1903 | if (offset==7) { // IRQ = 7 |
| 1904 | return | |
| 1904 | return | |
| 1905 | 1905 | } |
| 1906 | 1906 | return 0x00; |
| 1907 | 1907 | } |
| r11247 | r11248 | |
| 2209 | 2209 | static const UINT8 default_memsw_data[0x10] = |
| 2210 | 2210 | { |
| 2211 | 2211 | 0xe1, 0x48, 0xe1, 0x05, 0xe1, 0x04, 0xe1, 0x00, 0xe1, 0x01, 0xe1, 0x00, 0xe1, 0x00, 0xe1, 0x00 |
| 2212 | // | |
| 2212 | // 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff | |
| 2213 | 2213 | }; |
| 2214 | 2214 | |
| 2215 | 2215 | for(i=0;i<0x10;i++) |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | Sharp MZ-2000 | |
| 4 | 4 | |
| 5 | driver by Angelo Salese | |
| 6 | font conversion by Tomasz Slanina | |
| 5 | driver by Angelo Salese | |
| 6 | font conversion by Tomasz Slanina | |
| 7 | 7 | |
| 8 | ||
| 8 | Basically a simpler version of Sharp MZ-2500 | |
| 9 | 9 | |
| 10 | TODO: | |
| 11 | - cassette interface; | |
| 12 | - implement remaining video capabilities | |
| 10 | TODO: | |
| 11 | - cassette interface; | |
| 12 | - implement remaining video capabilities | |
| 13 | 13 | |
| 14 | 14 | ****************************************************************************/ |
| 15 | 15 | |
| r11247 | r11248 | |
| 341 | 341 | AM_RANGE(0xe4, 0xe7) AM_DEVREADWRITE("pit", pit8253_r, pit8253_w) |
| 342 | 342 | AM_RANGE(0xe8, 0xeb) AM_DEVREADWRITE("z80pio_1", z80pio_ba_cd_r, z80pio_ba_cd_w) |
| 343 | 343 | AM_RANGE(0xf0, 0xf3) AM_WRITE(timer_w) |
| 344 | // | |
| 344 | // AM_RANGE(0xf4, 0xf7) CRTC | |
| 345 | 345 | AM_RANGE(0xf5, 0xf5) AM_WRITE(mz2000_tvram_attr_w) |
| 346 | 346 | AM_RANGE(0xf6, 0xf6) AM_WRITE(mz2000_gvram_mask_w) |
| 347 | 347 | AM_RANGE(0xf7, 0xf7) AM_WRITE(mz2000_gvram_bank_w) |
| r11247 | r11248 | |
| 557 | 557 | static READ8_DEVICE_HANDLER( mz2000_portb_r ) |
| 558 | 558 | { |
| 559 | 559 | /* |
| 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 | */ | |
| 567 | 567 | UINT8 res = 0xff ^ 0xe0; |
| 568 | 568 | |
| 569 | 569 | res |= (cassette_input(device->machine().device("cassette")) > 0.00) ? 0x40 : 0x00; |
| r11247 | r11248 | |
| 583 | 583 | static WRITE8_DEVICE_HANDLER( mz2000_porta_w ) |
| 584 | 584 | { |
| 585 | 585 | /* |
| 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 | */ | |
| 595 | 595 | //printf("A W %02x\n",data); |
| 596 | 596 | |
| 597 | 597 | // ... |
| r11247 | r11248 | |
| 608 | 608 | { |
| 609 | 609 | mz2000_state *state = device->machine().driver_data<mz2000_state>(); |
| 610 | 610 | /* |
| 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 | |
| 618 | 618 | */ |
| 619 | 619 | printf("C W %02x\n",data); |
| 620 | 620 | |
| r11247 | r11248 | |
| 799 | 799 | ROM_REGION( 0x10000, "gvram", ROMREGION_ERASE00 ) |
| 800 | 800 | |
| 801 | 801 | ROM_REGION( 0x1800, "chargen", 0 ) |
| 802 | // | |
| 802 | // ROM_LOAD( "mzfont.rom", 0x0000, 0x0800, BAD_DUMP CRC(0631efc3) SHA1(99b206af5c9845995733d877e9e93e9681b982a8) ) //original has JP characters | |
| 803 | 803 | /* these are hand-crafted roms, converted from bmps floating around the net */ |
| 804 | 804 | ROM_LOAD( "font.bin", 0x0000, 0x0800, BAD_DUMP CRC(6ae6ce8e) SHA1(6adcdab9e4647429dd8deb73146264746b5eccda) ) |
| 805 | 805 | ROM_LOAD( "font400.bin", 0x0800, 0x1000, BAD_DUMP CRC(56c5d2bc) SHA1(fea655ff5eedacf8978fa3c185485db44376e24d) ) |
| r11247 | r11248 | |
| 820 | 820 | ROM_REGION( 0x10000, "gvram", ROMREGION_ERASE00 ) |
| 821 | 821 | |
| 822 | 822 | ROM_REGION( 0x1800, "chargen", 0 ) |
| 823 | // | |
| 823 | // ROM_LOAD( "mzfont.rom", 0x0000, 0x0800, BAD_DUMP CRC(0631efc3) SHA1(99b206af5c9845995733d877e9e93e9681b982a8) ) //original has JP characters | |
| 824 | 824 | /* these are hand-crafted roms, converted from bmps floating around the net */ |
| 825 | 825 | ROM_LOAD( "font.bin", 0x0000, 0x0800, BAD_DUMP CRC(6ae6ce8e) SHA1(6adcdab9e4647429dd8deb73146264746b5eccda) ) |
| 826 | 826 | ROM_LOAD( "font400.bin", 0x0800, 0x1000, BAD_DUMP CRC(56c5d2bc) SHA1(fea655ff5eedacf8978fa3c185485db44376e24d) ) |
| r11247 | r11248 | |
|---|---|---|
| 337 | 337 | |
| 338 | 338 | /* setup memory banking */ |
| 339 | 339 | UINT8 *rom = machine().region(Z80_TAG)->base(); |
| 340 | ||
| 340 | ||
| 341 | 341 | program->install_readwrite_bank(0x0000, 0x1fff, "bank1"); |
| 342 | 342 | memory_configure_bank(machine(), "bank1", 0, 1, rom, 0); |
| 343 | 343 | memory_configure_bank(machine(), "bank1", 1, 1, rom + 0xc000, 0); |
| r11247 | r11248 | |
| 475 | 475 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 476 | 476 | MCFG_SCREEN_SIZE(320, 25+192+26) |
| 477 | 477 | MCFG_SCREEN_VISIBLE_AREA(0, 319, 1, 239) |
| 478 | ||
| 478 | ||
| 479 | 479 | MCFG_PALETTE_LENGTH(16) |
| 480 | 480 | |
| 481 | 481 | MCFG_MC6847_ADD(MC6847_TAG, mc1000_mc6847_intf) |
| r11247 | r11248 | |
|---|---|---|
| 2 | 2 | commodore b series computer |
| 3 | 3 | |
| 4 | 4 | PeT mess@utanet.at |
| 5 | ||
| 5 | ||
| 6 | 6 | documentation |
| 7 | 7 | vice emulator |
| 8 | 8 | www.funet.fi |
| r11247 | r11248 | |
|---|---|---|
| 1480 | 1480 | }; |
| 1481 | 1481 | |
| 1482 | 1482 | static IRQ_CALLBACK(pc88va_irq_callback) |
| 1483 | { | |
| 1483 | { | |
| 1484 | 1484 | return pic8259_acknowledge( device->machine().device( "pic8259_master" ) ); |
| 1485 | 1485 | } |
| 1486 | 1486 |
| r11247 | r11248 | |
|---|---|---|
| 2326 | 2326 | static MACHINE_CONFIG_DERIVED( pc6001m2, pc6001 ) |
| 2327 | 2327 | |
| 2328 | 2328 | MCFG_MACHINE_RESET(pc6001m2) |
| 2329 | ||
| 2329 | ||
| 2330 | 2330 | MCFG_SCREEN_MODIFY("screen") |
| 2331 | 2331 | MCFG_SCREEN_UPDATE(pc6001m2) |
| 2332 | 2332 | MCFG_PALETTE_LENGTH(16+16) |
| r11247 | r11248 | |
|---|---|---|
| 452 | 452 | mycom_state *state = device->machine().driver_data<mycom_state>(); |
| 453 | 453 | |
| 454 | 454 | state->m_rtc->address_w(data & 0x0f); |
| 455 | ||
| 455 | ||
| 456 | 456 | state->m_rtc->hold_w(BIT(data, 4)); |
| 457 | 457 | state->m_rtc->read_w(BIT(data, 5)); |
| 458 | 458 | state->m_rtc->write_w(BIT(data, 6)); |
| r11247 | r11248 | |
|---|---|---|
| 104 | 104 | UINT8 data; |
| 105 | 105 | data = state->m_infifo[state->m_infifo_tail_ptr]; |
| 106 | 106 | // 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++; | |
| 108 | 108 | state->m_infifo_tail_ptr&=0x1F; |
| 109 | 109 | #ifdef DEBUG_SERIAL_CB |
| 110 | 110 | fprintf(stderr,"callback: input to i8031/pes from pc/terminal: %02X\n",data); |
| r11247 | r11248 | |
| 141 | 141 | logerror("port1 write: tms5220 data written: %02X\n", data); |
| 142 | 142 | #endif |
| 143 | 143 | tms5220_data_w(state->m_speech, 0, data); |
| 144 | ||
| 144 | ||
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | READ8_MEMBER( pes_state::port1_r ) |
| r11247 | r11248 | |
| 227 | 227 | ******************************************************************************/ |
| 228 | 228 | /*static TIMER_CALLBACK( serial_read_cb ) |
| 229 | 229 | { |
| 230 | ||
| 230 | machine.scheduler().timer_set(attotime::from_hz(10000), FUNC(outfifo_read_cb)); | |
| 231 | 231 | }*/ |
| 232 | 232 | |
| 233 | 233 | DRIVER_INIT( pes ) |
| r11247 | r11248 | |
| 267 | 267 | MCFG_CPU_ADD("maincpu", I80C31, CPU_CLOCK) |
| 268 | 268 | MCFG_CPU_PROGRAM_MAP(i80c31_mem) |
| 269 | 269 | MCFG_CPU_IO_MAP(i80c31_io) |
| 270 | ||
| 270 | ||
| 271 | 271 | /* sound hardware */ |
| 272 | 272 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 273 | 273 | MCFG_SOUND_ADD("tms5220", TMS5220C, 720000) /* 720Khz clock, 10khz output */ |
| r11247 | r11248 | |
| 293 | 293 | Drivers |
| 294 | 294 | ******************************************************************************/ |
| 295 | 295 | |
| 296 | /* YEAR NAME | |
| 296 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 297 | 297 | COMP( 1987, pes, 0, 0, pes, pes, pes, "Pacific Educational Systems", "VPU-01 Speech box", GAME_NOT_WORKING ) |
| r11247 | r11248 | |
|---|---|---|
| 9 | 9 | - Rewrite keyboard input hook-up and decap/dump the keyboard MCU if possible; |
| 10 | 10 | - Fix the 0xe80/0xe83 kanji ROM readback; |
| 11 | 11 | - Fixe the 0xb00 RAM banking; |
| 12 | | |
| 12 | - x1turbo keyboard inputs are currently broken, use x1turbo40 for now; | |
| 13 | 13 | - Hook-up remaining .tap image formats; |
| 14 | 14 | - Implement APSS tape commands; |
| 15 | 15 | - Sort out / redump the BIOS gfx roms; |
| 16 | 16 | - X1Turbo: Implement SIO. |
| 17 | 17 | - X1Twin: Hook-up the PC Engine part (actually needs his own driver?); |
| 18 | 18 | - Implement SASI HDD interface; |
| 19 | | |
| 19 | - clean-ups! | |
| 20 | 20 | - There are various unclear video things, these are: |
| 21 | 21 | - Implement the remaining scrn regs; |
| 22 | 22 | - Implement the new features of the x1turboz, namely the 4096 color feature amongst other things |
| 23 | 23 | - (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? | |
| 29 | 29 | |
| 30 | 30 | 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; | |
| 33 | 33 | - Dragon Buster: it crashed to me once with a obj flag hang; |
| 34 | 34 | - 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; | |
| 38 | 38 | - 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? | |
| 46 | 46 | - Turbo Alpha: has z80dma / fdc bugs, doesn't show the presentation properly and then hangs; |
| 47 | 47 | - Will 2: doesn't load, fdc issue presumably (note: it's a x1turbo game ONLY); |
| 48 | ||
| 48 | - X1F Demo ("New X1 Demo"): needs partial updates to work properly (note that INDEXED16 doesn't cope at all with partial updates); | |
| 49 | 49 | - Ys 2: crashes after the disclaimer screen; |
| 50 | 50 | - Ys 3: missing user disk, to hack it (and play with x1turboz features): bp 81ca,pc += 2 |
| 51 | 51 | - Ys 3: never uploads a valid 4096 palette, probably related to the fact that we don't have an user disk |
| r11247 | r11248 | |
| 65 | 65 | cartridge slot and it doesn't exceed 64k (0x10000) of size. |
| 66 | 66 | - Gruppe: shows a random bitmap graphic then returns "program load error" ... it wants that the floppy has write protection enabled (btanb) |
| 67 | 67 | - 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" | |
| 74 | 74 | |
| 75 | 75 | ================================================================================================= |
| 76 | 76 | |
| r11247 | r11248 | |
| 246 | 246 | |
| 247 | 247 | static VIDEO_START( x1 ) |
| 248 | 248 | { |
| 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); | |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | static void x1_draw_pixel(running_machine &machine, bitmap_t *bitmap,int y,int x,UINT16 pen,UINT8 width,UINT8 height) |
| r11247 | r11248 | |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | #define mc6845_h_char_total (state->m_crtc_vreg[0]) |
| 284 | #define mc6845_h_display | |
| 284 | #define mc6845_h_display | |
| 285 | 285 | #define mc6845_h_sync_pos (state->m_crtc_vreg[2]) |
| 286 | 286 | #define mc6845_sync_width (state->m_crtc_vreg[3]) |
| 287 | 287 | #define mc6845_v_char_total (state->m_crtc_vreg[4]) |
| 288 | #define mc6845_v_total_adj | |
| 288 | #define mc6845_v_total_adj | |
| 289 | 289 | #define mc6845_v_display (state->m_crtc_vreg[6]) |
| 290 | 290 | #define mc6845_v_sync_pos (state->m_crtc_vreg[7]) |
| 291 | 291 | #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]) | |
| 294 | 294 | #define mc6845_cursor_y_end (state->m_crtc_vreg[0x0b]) |
| 295 | #define mc6845_start_addr | |
| 295 | #define mc6845_start_addr | |
| 296 | 296 | #define mc6845_cursor_addr (((state->m_crtc_vreg[0x0e]<<8) & 0x3f00) | (state->m_crtc_vreg[0x0f] & 0xff)) |
| 297 | #define mc6845_light_pen_addr | |
| 297 | #define mc6845_light_pen_addr | |
| 298 | 298 | #define mc6845_update_addr (((state->m_crtc_vreg[0x12]<<8) & 0x3f00) | (state->m_crtc_vreg[0x13] & 0xff)) |
| 299 | 299 | |
| 300 | 300 | /* adjust tile index when we are under double height condition */ |
| r11247 | r11248 | |
| 327 | 327 | static void draw_fgtilemap(running_machine &machine, bitmap_t *bitmap) |
| 328 | 328 | { |
| 329 | 329 | /* |
| 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 | |
| 337 | 337 | |
| 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 | */ | |
| 344 | 344 | |
| 345 | 345 | x1_state *state = machine.driver_data<x1_state>(); |
| 346 | 346 | int y,x,res_x,res_y; |
| r11247 | r11248 | |
| 773 | 773 | // E9 06 - APSS Rewind |
| 774 | 774 | // E9 0A - Record |
| 775 | 775 | /* |
| 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 | */ | |
| 779 | 779 | state->m_cmt_current_cmd = cmd; |
| 780 | 780 | |
| 781 | 781 | if(cassette_get_image(machine.device("cass")) == NULL) //avoid a crash if a disk game tries to access this |
| r11247 | r11248 | |
| 1394 | 1394 | static WRITE8_HANDLER( x1_blackclip_w ) |
| 1395 | 1395 | { |
| 1396 | 1396 | /* |
| 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 | */ | |
| 1403 | 1403 | x1_state *state = space->machine().driver_data<x1_state>(); |
| 1404 | 1404 | state->m_scrn_reg.blackclip = data; |
| 1405 | 1405 | if(data & 0x40) |
| r11247 | r11248 | |
| 1513 | 1513 | case 0: state->m_kanji_addr_latch = (data & 0xff)|(state->m_kanji_addr_latch&0xff00); break; |
| 1514 | 1514 | case 1: state->m_kanji_addr_latch = (data<<8)|(state->m_kanji_addr_latch&0x00ff); |
| 1515 | 1515 | //if(state->m_kanji_addr_latch != 0x720 && state->m_kanji_addr_latch != 0x730) |
| 1516 | // | |
| 1516 | // printf("%08x\n",state->m_kanji_addr_latch); | |
| 1517 | 1517 | break; |
| 1518 | 1518 | case 2: |
| 1519 | 1519 | { |
| r11247 | r11248 | |
| 1584 | 1584 | } |
| 1585 | 1585 | |
| 1586 | 1586 | /* |
| 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 | |
| 1589 | 1589 | */ |
| 1590 | 1590 | static READ8_HANDLER( x1turbo_bank_r ) |
| 1591 | 1591 | { |
| 1592 | 1592 | x1_state *state = space->machine().driver_data<x1_state>(); |
| 1593 | 1593 | |
| 1594 | // | |
| 1594 | // printf("BANK access read\n"); | |
| 1595 | 1595 | return state->m_ex_bank & 0x3f; |
| 1596 | 1596 | } |
| 1597 | 1597 | |
| r11247 | r11248 | |
| 1600 | 1600 | x1_state *state = space->machine().driver_data<x1_state>(); |
| 1601 | 1601 | //UINT8 *RAM = space->machine().region("maincpu")->base(); |
| 1602 | 1602 | /* |
| 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 | */ | |
| 1607 | 1607 | |
| 1608 | 1608 | state->m_ex_bank = data & 0x3f; |
| 1609 | // | |
| 1609 | // printf("BANK access write %02x\n",data); | |
| 1610 | 1610 | } |
| 1611 | 1611 | |
| 1612 | 1612 | /* TODO: waitstate penalties */ |
| r11247 | r11248 | |
| 1701 | 1701 | { |
| 1702 | 1702 | x1_state *state = space->machine().driver_data<x1_state>(); |
| 1703 | 1703 | |
| 1704 | if(state->m_io_bank_mode == 1) | |
| 1704 | if(state->m_io_bank_mode == 1) | |
| 1705 | 1705 | // TODO: user could install ym2151 on plain X1 too |
| 1706 | 1706 | //0x700, 0x701 |
| 1707 | 1707 | // else if(offset >= 0x0704 && offset <= 0x0707) { z80ctc_w(space->machine().device("ctc"), offset-0x0704,data); } |
| r11247 | r11248 | |
| 1900 | 1900 | state->m_vdisp = (device->machine().primary_screen->vpos() < vblank_line) ? 0x80 : 0x00; |
| 1901 | 1901 | state->m_vsync = (device->machine().primary_screen->vpos() < vsync_line) ? 0x00 : 0x04; |
| 1902 | 1902 | |
| 1903 | // popmessage("%d",vsync_line); | |
| 1904 | // popmessage("%d",vblank_line); | |
| 1903 | // popmessage("%d",vsync_line); | |
| 1904 | // popmessage("%d",vblank_line); | |
| 1905 | 1905 | |
| 1906 | 1906 | res = state->m_ram_bank | state->m_sub_obf | state->m_vsync | state->m_vdisp; |
| 1907 | 1907 | |
| r11247 | r11248 | |
| 2485 | 2485 | if(state->m_key_irq_vector) |
| 2486 | 2486 | { |
| 2487 | 2487 | //if(key1 == 0 && key2 == 0 && key3 == 0 && key4 == 0 && f_key == 0) |
| 2488 | // | |
| 2488 | // return; | |
| 2489 | 2489 | |
| 2490 | 2490 | 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)) |
| 2491 | 2491 | { |
| r11247 | r11248 | |
| 2510 | 2510 | |
| 2511 | 2511 | state->m_rtc.sec++; |
| 2512 | 2512 | |
| 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; } | |
| 2517 | 2517 | if((state->m_rtc.hour & 0x0f) >= 0x0a) { state->m_rtc.hour+=0x10; state->m_rtc.hour&=0xf0; } |
| 2518 | 2518 | if((state->m_rtc.hour & 0xff) >= 0x24) { state->m_rtc.day++; state->m_rtc.wday++; state->m_rtc.hour = 0; } |
| 2519 | 2519 | if((state->m_rtc.wday & 0x0f) >= 0x07) { state->m_rtc.wday = 0; } |
| r11247 | r11248 | |
| 2708 | 2708 | |
| 2709 | 2709 | MCFG_MACHINE_RESET(x1turbo) |
| 2710 | 2710 | |
| 2711 | // | |
| 2711 | // MCFG_Z80SIO_ADD( "sio", MAIN_CLOCK/4 , sio_intf ) | |
| 2712 | 2712 | MCFG_Z80SIO0_ADD("sio", MAIN_CLOCK/4 , sio_intf ) |
| 2713 | 2713 | MCFG_Z80DMA_ADD( "dma", MAIN_CLOCK/4 , x1_dma ) |
| 2714 | 2714 | |
| r11247 | r11248 | |
| 2747 | 2747 | |
| 2748 | 2748 | ROM_REGION(0x1800, "cgrom", 0) |
| 2749 | 2749 | ROM_LOAD("fnt0808.x1", 0x00000, 0x00800, CRC(e3995a57) SHA1(1c1a0d8c9f4c446ccd7470516b215ddca5052fb2) ) |
| 2750 | ROM_COPY("font", | |
| 2750 | ROM_COPY("font", | |
| 2751 | 2751 | |
| 2752 | 2752 | ROM_REGION(0x20000, "kanji", ROMREGION_ERASEFF) |
| 2753 | 2753 | |
| r11247 | r11248 | |
| 2777 | 2777 | |
| 2778 | 2778 | ROM_REGION(0x1800, "cgrom", 0) |
| 2779 | 2779 | ROM_LOAD("ank8.rom", 0x00000, 0x00800, CRC(e3995a57) SHA1(1c1a0d8c9f4c446ccd7470516b215ddca5052fb2) ) |
| 2780 | ROM_COPY("font", | |
| 2780 | ROM_COPY("font", | |
| 2781 | 2781 | |
| 2782 | 2782 | ROM_REGION(0x20000, "kanji", ROMREGION_ERASEFF) |
| 2783 | 2783 | |
| r11247 | r11248 | |
| 2813 | 2813 | |
| 2814 | 2814 | ROM_REGION(0x4800, "cgrom", 0) |
| 2815 | 2815 | ROM_LOAD("fnt0808_turbo.x1", 0x00000, 0x00800, CRC(84a47530) SHA1(06c0995adc7a6609d4272417fe3570ca43bd0454) ) |
| 2816 | ROM_COPY("font", | |
| 2816 | ROM_COPY("font", | |
| 2817 | 2817 | |
| 2818 | 2818 | ROM_REGION(0x20000, "kanji", ROMREGION_ERASEFF) |
| 2819 | 2819 | |
| r11247 | r11248 | |
| 2847 | 2847 | |
| 2848 | 2848 | ROM_REGION(0x4800, "cgrom", 0) |
| 2849 | 2849 | ROM_LOAD("fnt0808_turbo.x1",0x00000, 0x0800, CRC(84a47530) SHA1(06c0995adc7a6609d4272417fe3570ca43bd0454) ) |
| 2850 | ROM_COPY("font", | |
| 2850 | ROM_COPY("font", | |
| 2851 | 2851 | |
| 2852 | 2852 | ROM_REGION(0x20000, "kanji", ROMREGION_ERASEFF) |
| 2853 | 2853 |
| r11247 | r11248 | |
|---|---|---|
| 779 | 779 | MCFG_SCREEN_MODIFY("screen") |
| 780 | 780 | MCFG_SCREEN_SIZE(608, 300) |
| 781 | 781 | MCFG_SCREEN_VISIBLE_AREA(0, 608-1, 0, 300-1) |
| 782 | MCFG_SCREEN_UPDATE( pc1251 ) | |
| 782 | MCFG_SCREEN_UPDATE( pc1251 ) | |
| 783 | 783 | MCFG_GFXDECODE( pc1251 ) |
| 784 | 784 | MACHINE_CONFIG_END |
| 785 | 785 |
| r11247 | r11248 | |
|---|---|---|
| 575 | 575 | MCFG_SCREEN_SIZE( 458, 154 ) |
| 576 | 576 | MCFG_SCREEN_VISIBLE_AREA(0*8, 20*8-1, 0*8, 18*8-1) |
| 577 | 577 | MCFG_SCREEN_UPDATE( generic_bitmapped ) |
| 578 | ||
| 578 | ||
| 579 | 579 | MCFG_GFXDECODE(gb) |
| 580 | 580 | MCFG_PALETTE_LENGTH(4) |
| 581 | 581 | MCFG_PALETTE_INIT(gb) |
| r11247 | r11248 | |
|---|---|---|
| 132 | 132 | static WRITE16_HANDLER( write_lcd_flag ) |
| 133 | 133 | { |
| 134 | 134 | glasgow_state *state = space->machine().driver_data<glasgow_state>(); |
| 135 | // | |
| 135 | // UINT8 lcd_flag; | |
| 136 | 136 | mboard_lcd_invert = 0; |
| 137 | // | |
| 137 | // lcd_flag=data >> 8; | |
| 138 | 138 | //beep_set_state(0, (data >> 8) & 1 ? 1 : 0); |
| 139 | 139 | if ((data >> 8) == 0) { |
| 140 | 140 | mboard_key_selector = 1; |
| r11247 | r11248 | |
| 145 | 145 | |
| 146 | 146 | // The key function in the rom expects after writing to |
| 147 | 147 | // 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; | |
| 152 | 152 | // |
| 153 | 153 | logerror("LCD Flag 16 = %x \n", data); |
| 154 | 154 | } |
| r11247 | r11248 | |
| 207 | 207 | static WRITE32_HANDLER( write_lcd_flag32 ) |
| 208 | 208 | { |
| 209 | 209 | glasgow_state *state = space->machine().driver_data<glasgow_state>(); |
| 210 | // | |
| 210 | // UINT8 lcd_flag = data >> 24; | |
| 211 | 211 | |
| 212 | 212 | mboard_lcd_invert = 0; |
| 213 | 213 | |
| r11247 | r11248 | |
| 221 | 221 | //logerror("LCD Flag 32 = %x \n", data >> 24); |
| 222 | 222 | //beep_set_state(0, (data >> 24) & 1 ? 1 : 0); |
| 223 | 223 | |
| 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; | |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | static READ32_HANDLER( read_newkeys32 ) // Dallas 32, Roma 32 |
| r11247 | r11248 | |
|---|---|---|
| 80 | 80 | "screen", |
| 81 | 81 | 0, /* starting gfxnum */ |
| 82 | 82 | 40, 25, 40, /* x, y, size */ |
| 83 | 0 | |
| 83 | 0 | |
| 84 | 84 | }; |
| 85 | 85 | |
| 86 | 86 | static const via6522_interface via_intf = |
| r11247 | r11248 | |
|---|---|---|
| 102 | 102 | /* Driver */ |
| 103 | 103 | |
| 104 | 104 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 105 | COMP( 1984, lcmate2, 0, 0, lcmate2, | |
| 105 | COMP( 1984, lcmate2, 0, 0, lcmate2, | |
| 106 | 106 |
| r11247 | r11248 | |
|---|---|---|
| 7 | 7 | TODO: |
| 8 | 8 | - no real documentation, the entire driver is just a bunch of educated |
| 9 | 9 | 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; | |
| 17 | 17 | |
| 18 | 18 | **************************************************************************************/ |
| 19 | 19 | |
| r11247 | r11248 | |
| 126 | 126 | for(x=0;x<x_width;x++) |
| 127 | 127 | { |
| 128 | 128 | /* |
| 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 | */ | |
| 133 | 133 | int tile = vram[count]; |
| 134 | 134 | int color = attr[count] & 7; |
| 135 | 135 | int bk_color = (attr[count] & 0x18) >> 3; |
| r11247 | r11248 | |
| 396 | 396 | { |
| 397 | 397 | smc777_state *state = space->machine().driver_data<smc777_state>(); |
| 398 | 398 | /* |
| 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 | */ | |
| 403 | 403 | |
| 404 | 404 | switch(state->m_keyb_cmd) |
| 405 | 405 | { |
| r11247 | r11248 | |
| 414 | 414 | default: |
| 415 | 415 | { |
| 416 | 416 | //if(offset == 1) |
| 417 | // | |
| 417 | // printf("Unknown keyboard command %02x read-back\n",state->m_keyb_cmd); | |
| 418 | 418 | |
| 419 | 419 | return (offset == 0) ? 0x00 : (space->machine().rand() & 0x5); |
| 420 | 420 | } |
| r11247 | r11248 | |
| 467 | 467 | { |
| 468 | 468 | smc777_state *state = space->machine().driver_data<smc777_state>(); |
| 469 | 469 | /* |
| 470 | ||
| 470 | ---x 0000 ram inibit signal | |
| 471 | 471 | ---x 1001 beep |
| 472 | 472 | all the rest is unknown at current time |
| 473 | 473 | */ |
| r11247 | r11248 | |
| 615 | 615 | |
| 616 | 616 | low_offs = offset & 0xff; |
| 617 | 617 | |
| 618 | if(low_offs <= 0x07) | |
| 618 | if(low_offs <= 0x07) | |
| 619 | 619 | else if(low_offs >= 0x08 && low_offs <= 0x0f) { return smc777_attr_r(space,offset & 0xff07); } |
| 620 | 620 | else if(low_offs >= 0x10 && low_offs <= 0x17) { return smc777_pcg_r(space,offset & 0xff07); } |
| 621 | 621 | else if(low_offs >= 0x18 && low_offs <= 0x19) { logerror("6845 read %02x",low_offs & 1); } |
| r11247 | r11248 | |
| 641 | 641 | else if(low_offs == 0x74) { logerror("IEEE-488 ROM read\n"); } |
| 642 | 642 | else if(low_offs == 0x75) { logerror("VTR Controller ROM read\n"); } |
| 643 | 643 | else if(low_offs == 0x7e || low_offs == 0x7f) { logerror("Kanji ROM read %02x\n",low_offs & 1); } |
| 644 | else if(low_offs >= 0x80) | |
| 644 | else if(low_offs >= 0x80) | |
| 645 | 645 | |
| 646 | 646 | logerror("Undefined read at %04x offset = %02x\n",cpu_get_pc(&space->device()),low_offs); |
| 647 | 647 | return 0xff; |
| r11247 | r11248 | |
| 653 | 653 | |
| 654 | 654 | low_offs = offset & 0xff; |
| 655 | 655 | |
| 656 | if(low_offs <= 0x07) | |
| 656 | if(low_offs <= 0x07) | |
| 657 | 657 | else if(low_offs >= 0x08 && low_offs <= 0x0f) { smc777_attr_w(space,offset & 0xff07,data); } |
| 658 | 658 | else if(low_offs >= 0x10 && low_offs <= 0x17) { smc777_pcg_w(space,offset & 0xff07,data); } |
| 659 | 659 | else if(low_offs >= 0x18 && low_offs <= 0x19) { smc777_6845_w(space,low_offs & 1,data); } |
| r11247 | r11248 | |
| 684 | 684 | else if(low_offs == 0x74) { logerror("IEEE-488 ROM write %02x\n",data); } |
| 685 | 685 | else if(low_offs == 0x75) { logerror("VTR Controller ROM write %02x\n",data); } |
| 686 | 686 | 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); } | |
| 689 | 689 | } |
| 690 | 690 | |
| 691 | 691 | static ADDRESS_MAP_START( smc777_io , AS_IO, 8) |
| r11247 | r11248 | |
| 829 | 829 | INPUT_PORTS_END |
| 830 | 830 | |
| 831 | 831 | /* |
| 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 | |
| 881 | 881 | */ |
| 882 | 882 | |
| 883 | 883 | static const UINT8 smc777_keytable[2][0xa0] = |
| r11247 | r11248 | |
|---|---|---|
| 234 | 234 | spectrum_state *state = machine.driver_data<spectrum_state>(); |
| 235 | 235 | device_t *beta = machine.device(BETA_DISK_TAG); |
| 236 | 236 | UINT16 pc = cpu_get_reg(machine.device("maincpu"), STATE_GENPCBASE); |
| 237 | ||
| 237 | ||
| 238 | 238 | state->m_ram_disabled_by_beta = 0; |
| 239 | 239 | if (betadisk_is_active(beta)) |
| 240 | 240 | { |
| r11247 | r11248 | |
|---|---|---|
| 13 | 13 | 0xfc903 checks for the string TEST at 0x3f4-0x3f6, does an int 0xfe if so, unknown purpose |
| 14 | 14 | |
| 15 | 15 | Error codes: |
| 16 | Triangle Test CPU registers and instructions | |
| 17 | Triangle Test system RAM | |
| 18 | 4 vertical lines Test CPU call and trap instructions | |
| 19 | Diamond Initialize screen and printer drivers | |
| 20 | EC0 8255 parallel interface IC test failed | |
| 21 | EC1 6845 CRT controller IC test failed | |
| 22 | EC2 1797 floppy disk controller chip failed | |
| 23 | EC3 8253 timer IC failed | |
| 24 | EC4 8251 keyboard interface failed | |
| 25 | EC5 8251 keyboard test failed | |
| 26 | EC6 8259 PIC IC test failed | |
| 27 | EK0 Keyboard did not respond | |
| 28 | Ek1 Keyboard responds, but self test failed | |
| 29 | ED1 Disk drive 1 test failed | |
| 30 | ED0 Disk drive 0 test failed | |
| 31 | E10 Non-vectored interrupt error | |
| 32 | E11 Vectored interrupt error | |
| 16 | Triangle Test CPU registers and instructions | |
| 17 | Triangle Test system RAM | |
| 18 | 4 vertical lines Test CPU call and trap instructions | |
| 19 | Diamond Initialize screen and printer drivers | |
| 20 | EC0 8255 parallel interface IC test failed | |
| 21 | EC1 6845 CRT controller IC test failed | |
| 22 | EC2 1797 floppy disk controller chip failed | |
| 23 | EC3 8253 timer IC failed | |
| 24 | EC4 8251 keyboard interface failed | |
| 25 | EC5 8251 keyboard test failed | |
| 26 | EC6 8259 PIC IC test failed | |
| 27 | EK0 Keyboard did not respond | |
| 28 | Ek1 Keyboard responds, but self test failed | |
| 29 | ED1 Disk drive 1 test failed | |
| 30 | ED0 Disk drive 0 test failed | |
| 31 | E10 Non-vectored interrupt error | |
| 32 | E11 Vectored interrupt error | |
| 33 | 33 | |
| 34 | 34 | */ |
| 35 | 35 |
| r11247 | r11248 | |
|---|---|---|
| 2485 | 2485 | MCFG_SCREEN_RAW_PARAMS(Y2/4, ATARIST_HTOT_PAL, ATARIST_HBEND_PAL, ATARIST_HBSTART_PAL, ATARIST_VTOT_PAL, ATARIST_VBEND_PAL, ATARIST_VBSTART_PAL) |
| 2486 | 2486 | |
| 2487 | 2487 | MCFG_PALETTE_LENGTH(512) |
| 2488 | ||
| 2488 | ||
| 2489 | 2489 | // sound hardware |
| 2490 | 2490 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 2491 | 2491 |
| r11247 | r11248 | |
|---|---|---|
| 1594 | 1594 | |
| 1595 | 1595 | /* basic machine hardware */ |
| 1596 | 1596 | /* TX0 CPU @ approx. 167 kHz (no master clock, but the memory cycle time is |
| 1597 | ||
| 1597 | approximately 6usec) */ | |
| 1598 | 1598 | MCFG_CPU_MODIFY("maincpu") |
| 1599 | 1599 | MCFG_CPU_CONFIG(tx0_reset_param) |
| 1600 | 1600 | MCFG_CPU_PROGRAM_MAP(tx0_8kw_map) |
| r11247 | r11248 | |
|---|---|---|
| 812 | 812 | MCFG_DEVICE_REMOVE("c1571") |
| 813 | 813 | |
| 814 | 814 | MCFG_CBM_IEC_ADD("iec", c128d81_iec_bus) |
| 815 | // | |
| 815 | // MCFG_C1563_ADD("c1563", "iec", 8) | |
| 816 | 816 | MCFG_C1581_ADD("c1581", "iec", 8) |
| 817 | 817 | MACHINE_CONFIG_END |
| 818 | 818 |
| r11247 | r11248 | |
|---|---|---|
| 3 | 3 | TODO: |
| 4 | 4 | |
| 5 | 5 | - does not boot! |
| 6 | ||
| 6 | - reset key | |
| 7 | 7 | - allocate color ram |
| 8 | 8 | - quickload |
| 9 | 9 | - color on |
| r11247 | r11248 | |
|---|---|---|
| 518 | 518 | AM_RANGE(0x00, 0x07) AM_READWRITE(gah40m_r, gah40m_w) |
| 519 | 519 | AM_RANGE(0x0c, 0x0c) AM_DEVREADWRITE_LEGACY(I8251_TAG, msm8251_data_r, msm8251_data_w) |
| 520 | 520 | 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) | |
| 523 | 523 | ADDRESS_MAP_END |
| 524 | 524 | |
| 525 | 525 | /*------------------------------------------------- |
| r11247 | r11248 | |
|---|---|---|
| 677 | 677 | MCFG_SCREEN_SIZE(320, 200) |
| 678 | 678 | MCFG_SCREEN_VISIBLE_AREA(0, 320 - 1, 0, 200 - 1) |
| 679 | 679 | MCFG_SCREEN_UPDATE( pet ) |
| 680 | ||
| 680 | ||
| 681 | 681 | MCFG_GFXDECODE( pet ) |
| 682 | 682 | MCFG_PALETTE_LENGTH(ARRAY_LENGTH(pet_palette) / 3) |
| 683 | 683 | MCFG_PALETTE_INIT( pet ) |
| r11247 | r11248 | |
|---|---|---|
| 549 | 549 | MCFG_DEVICE_REMOVE("ted7360") |
| 550 | 550 | MCFG_TED7360_ADD("ted7360", plus4_ted7360_intf) |
| 551 | 551 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 552 | ||
| 552 | ||
| 553 | 553 | /* internal ram */ |
| 554 | 554 | MCFG_RAM_MODIFY(RAM_TAG) |
| 555 | 555 | MCFG_RAM_DEFAULT_SIZE("64K") |
| r11247 | r11248 | |
|---|---|---|
| 1385 | 1385 | MCFG_SCREEN_SIZE( PCW_PRINTER_WIDTH, PCW_PRINTER_HEIGHT ) |
| 1386 | 1386 | MCFG_SCREEN_VISIBLE_AREA(0, PCW_PRINTER_WIDTH-1, 0, PCW_PRINTER_HEIGHT-1) |
| 1387 | 1387 | MCFG_SCREEN_UPDATE( pcw_printer ) |
| 1388 | ||
| 1388 | ||
| 1389 | 1389 | MCFG_DEFAULT_LAYOUT( layout_pcw ) |
| 1390 | 1390 | |
| 1391 | 1391 | MACHINE_CONFIG_END |
| r11247 | r11248 | |
| 1397 | 1397 | MCFG_SCREEN_SIZE( PCW_PRINTER_WIDTH, PCW_PRINTER_HEIGHT ) |
| 1398 | 1398 | MCFG_SCREEN_VISIBLE_AREA(0, PCW_PRINTER_WIDTH-1, 0, PCW_PRINTER_HEIGHT-1) |
| 1399 | 1399 | MCFG_SCREEN_UPDATE( pcw_printer ) |
| 1400 | ||
| 1400 | ||
| 1401 | 1401 | MCFG_DEFAULT_LAYOUT( layout_pcw ) |
| 1402 | 1402 | |
| 1403 | 1403 | /* internal ram */ |
| r11247 | r11248 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | drivers/genpc.c |
| 4 | 4 | |
| 5 | ||
| 5 | Driver file for geenric PC machines | |
| 6 | 6 | |
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| r11247 | r11248 | |
| 76 | 76 | PORT_INCLUDE( kb_keytronic_pc ) |
| 77 | 77 | PORT_INCLUDE( pcvideo_cga ) |
| 78 | 78 | INPUT_PORTS_END |
| 79 | ||
| 79 | ||
| 80 | 80 | static const unsigned i86_address_mask = 0x000fffff; |
| 81 | 81 | |
| 82 | 82 | static const kb_keytronic_interface pc_keytronic_intf = |
| 83 | 83 | { |
| 84 | DEVCB_DEVICE_LINE_MEMBER("mb", ibm5160_mb_device, keyboard_clock_w), | |
| 84 | DEVCB_DEVICE_LINE_MEMBER("mb", ibm5160_mb_device, keyboard_clock_w), | |
| 85 | 85 | DEVCB_DEVICE_LINE_MEMBER("mb", ibm5160_mb_device, keyboard_data_w) |
| 86 | 86 | }; |
| 87 | 87 | |
| r11247 | r11248 | |
| 91 | 91 | DEVCB_DEVICE_LINE("keyboard", kb_keytronic_data_w) |
| 92 | 92 | }; |
| 93 | 93 | |
| 94 | static DEVICE_INPUT_DEFAULTS_START(cga) | |
| 94 | static DEVICE_INPUT_DEFAULTS_START(cga) | |
| 95 | 95 | DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x20) |
| 96 | 96 | DEVICE_INPUT_DEFAULTS_END |
| 97 | 97 | |
| 98 | static DEVICE_INPUT_DEFAULTS_START(vga) | |
| 98 | static DEVICE_INPUT_DEFAULTS_START(vga) | |
| 99 | 99 | DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x00) |
| 100 | 100 | DEVICE_INPUT_DEFAULTS_END |
| 101 | 101 | |
| r11247 | r11248 | |
| 106 | 106 | MCFG_CPU_IO_MAP(pc8_io) |
| 107 | 107 | |
| 108 | 108 | MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu",pc_keytronic_keyboard_intf) |
| 109 | ||
| 109 | ||
| 110 | 110 | /* video hardware */ |
| 111 | 111 | MCFG_PALETTE_LENGTH( 256 ) |
| 112 | 112 | |
| r11247 | r11248 | |
| 115 | 115 | MCFG_ISA8_BUS_DEVICE("mb:isa", 2, "fdc", ISA8_FDC) |
| 116 | 116 | MCFG_ISA8_BUS_DEVICE("mb:isa", 3, "hdc", ISA8_HDC) |
| 117 | 117 | MCFG_ISA8_BUS_DEVICE("mb:isa", 4, "adlib", ISA8_ADLIB) |
| 118 | ||
| 118 | ||
| 119 | 119 | /* keyboard */ |
| 120 | 120 | MCFG_KB_KEYTRONIC_ADD("keyboard", pc_keytronic_intf) |
| 121 | 121 | |
| r11247 | r11248 | |
| 130 | 130 | MCFG_CPU_ADD("maincpu", V20, 4772720) |
| 131 | 131 | MCFG_CPU_PROGRAM_MAP(pc8_map) |
| 132 | 132 | MCFG_CPU_IO_MAP(pc8_io) |
| 133 | ||
| 133 | ||
| 134 | 134 | MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu",pc_keytronic_keyboard_intf) |
| 135 | ||
| 135 | ||
| 136 | 136 | MCFG_ISA8_BUS_DEVICE("mb:isa", 0, "hercules", ISA8_HERCULES) |
| 137 | 137 | MCFG_ISA8_BUS_DEVICE("mb:isa", 1, "com", ISA8_COM) |
| 138 | 138 | MCFG_ISA8_BUS_DEVICE("mb:isa", 2, "fdc", ISA8_FDC) |
| r11247 | r11248 | |
| 141 | 141 | |
| 142 | 142 | /* video hardware */ |
| 143 | 143 | MCFG_PALETTE_LENGTH( 256 ) |
| 144 | ||
| 144 | ||
| 145 | 145 | /* keyboard */ |
| 146 | 146 | MCFG_KB_KEYTRONIC_ADD("keyboard", pc_keytronic_intf) |
| 147 | 147 | /* internal ram */ |
| r11247 | r11248 | |
| 152 | 152 | |
| 153 | 153 | static MACHINE_CONFIG_START( pccga, genpc_state ) |
| 154 | 154 | /* 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) | |
| 158 | 158 | MCFG_CPU_CONFIG(i86_address_mask) |
| 159 | ||
| 159 | ||
| 160 | 160 | MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu",pc_keytronic_keyboard_intf) |
| 161 | 161 | MCFG_DEVICE_INPUT_DEFAULTS(cga) |
| 162 | ||
| 162 | ||
| 163 | 163 | /* video hardware */ |
| 164 | 164 | MCFG_FRAGMENT_ADD( pcvideo_cga ) |
| 165 | 165 | MCFG_PALETTE_LENGTH( 256 ) |
| r11247 | r11248 | |
| 180 | 180 | |
| 181 | 181 | static MACHINE_CONFIG_START( xtvga, genpc_state ) |
| 182 | 182 | /* 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) | |
| 186 | 186 | MCFG_CPU_CONFIG(i86_address_mask) |
| 187 | ||
| 187 | ||
| 188 | 188 | MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu",pc_keytronic_keyboard_intf) |
| 189 | 189 | MCFG_DEVICE_INPUT_DEFAULTS(vga) |
| 190 | ||
| 190 | ||
| 191 | 191 | MCFG_ISA8_BUS_DEVICE("mb:isa", 1, "com", ISA8_COM) |
| 192 | 192 | MCFG_ISA8_BUS_DEVICE("mb:isa", 2, "fdc", ISA8_FDC) |
| 193 | 193 | MCFG_ISA8_BUS_DEVICE("mb:isa", 3, "hdc", ISA8_HDC) |
| 194 | 194 | MCFG_ISA8_BUS_DEVICE("mb:isa", 4, "sblaster", ISA8_SOUND_BLASTER_1_0) |
| 195 | ||
| 195 | ||
| 196 | 196 | /* video hardware */ |
| 197 | 197 | MCFG_IBM_VGA_ADD( "vga" ) |
| 198 | 198 | MCFG_PALETTE_LENGTH( 256 ) |
| r11247 | r11248 | |
| 240 | 240 | ***************************************************************************/ |
| 241 | 241 | |
| 242 | 242 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ |
| 243 | COMP( 1987, pc, ibm5150, 0, pccga, pccga, 0, "<generic>", "PC (CGA)" , GAME_NO_SOUND) | |
| 244 | COMP ( 1987, pcmda, ibm5150, 0, pcmda, pcgen, 0, "<generic>", "PC (MDA)" , GAME_NO_SOUND) | |
| 245 | COMP ( 1987, pcherc, ibm5150, 0, pcherc, pcgen, 0, "<generic>", "PC (Hercules)" , GAME_NO_SOUND) | |
| 243 | COMP( 1987, pc, ibm5150, 0, pccga, pccga, 0, "<generic>", "PC (CGA)" , GAME_NO_SOUND) | |
| 244 | COMP ( 1987, pcmda, ibm5150, 0, pcmda, pcgen, 0, "<generic>", "PC (MDA)" , GAME_NO_SOUND) | |
| 245 | COMP ( 1987, pcherc, ibm5150, 0, pcherc, pcgen, 0, "<generic>", "PC (Hercules)" , GAME_NO_SOUND) | |
| 246 | 246 | COMP ( 1987, xtvga, ibm5150, 0, xtvga, pcgen, 0, "<generic>", "PC (VGA)" , GAME_NOT_WORKING | GAME_NO_SOUND) |
| r11247 | r11248 | |
|---|---|---|
| 49 | 49 | class mirage_state : public driver_device |
| 50 | 50 | { |
| 51 | 51 | public: |
| 52 | mirage_state(running_machine &machine, const driver_device_config_base &config) | |
| 52 | mirage_state(running_machine &machine, const driver_device_config_base &config) | |
| 53 | 53 | : driver_device(machine, config) { } |
| 54 | 54 | |
| 55 | 55 | virtual void machine_reset(); |
| r11247 | r11248 | |
| 101 | 101 | AM_RANGE(0xe801, 0xe801) AM_DEVREADWRITE_LEGACY("wd177x", wd17xx_track_r,wd17xx_track_w) |
| 102 | 102 | AM_RANGE(0xe802, 0xe802) AM_DEVREADWRITE_LEGACY("wd177x", wd17xx_sector_r,wd17xx_sector_w) |
| 103 | 103 | AM_RANGE(0xe803, 0xe803) AM_DEVREADWRITE_LEGACY("wd177x", wd17xx_data_r,wd17xx_data_w) |
| 104 | // | |
| 104 | // AM_RANGE(0xec00, 0xecef) AM_DEVREADWRITE_LEGACY("es5503", es5503_r, es5503_w) | |
| 105 | 105 | AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION("osrom", 0) |
| 106 | 106 | ADDRESS_MAP_END |
| 107 | 107 | |
| 108 | 108 | // port A: front panel |
| 109 | 109 | static WRITE8_DEVICE_HANDLER( mirage_via_write_porta ) |
| 110 | 110 | { |
| 111 | // | |
| 111 | // printf("PORT A: %02x\n", data); | |
| 112 | 112 | } |
| 113 | 113 | |
| 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) | |
| 121 | 121 | |
| 122 | 122 | static WRITE8_DEVICE_HANDLER( mirage_via_write_portb ) |
| 123 | 123 | { |
| r11247 | r11248 | |
| 140 | 140 | return 0; |
| 141 | 141 | } |
| 142 | 142 | |
| 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 (?) | |
| 146 | 146 | static READ8_DEVICE_HANDLER( mirage_via_read_portb ) |
| 147 | 147 | { |
| 148 | 148 | return 0x60; |
| r11247 | r11248 | |
|---|---|---|
| 798 | 798 | MCFG_PC_LPT_ADD("lpt_1", at_lpt_config) |
| 799 | 799 | MCFG_PC_LPT_ADD("lpt_2", at_lpt_config) |
| 800 | 800 | |
| 801 | /* harddisk */ | |
| 801 | /* harddisk */ | |
| 802 | 802 | MCFG_HARDDISK_ADD("harddisk") |
| 803 | 803 | MCFG_IDE_CONTROLLER_ADD("ide", ide_interrupt) |
| 804 | 804 |
| r11247 | r11248 | |
|---|---|---|
| 915 | 915 | PC1 |
| 916 | 916 | PC2 |
| 917 | 917 | PC3 clock busy |
| 918 | PC4 | |
| 919 | PC5 | |
| 920 | PC6 | |
| 921 | PC7 | |
| 918 | PC4 | |
| 919 | PC5 | |
| 920 | PC6 | |
| 921 | PC7 | |
| 922 | 922 | |
| 923 | 923 | */ |
| 924 | 924 | |
| r11247 | r11248 | |
| 934 | 934 | PC0 |
| 935 | 935 | PC1 |
| 936 | 936 | PC2 |
| 937 | PC3 | |
| 937 | PC3 | |
| 938 | 938 | PC4 clock address write |
| 939 | 939 | PC5 clock data write |
| 940 | 940 | PC6 clock data read |
| r11247 | r11248 | |
|---|---|---|
| 38 | 38 | - CST Thor XVI W40FF (40MB Winchester, 2 Floppies) |
| 39 | 39 | |
| 40 | 40 | |
| 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 | ||
| 72 | 72 | */ |
| 73 | 73 | |
| 74 | 74 | #define ADDRESS_MAP_MODERN |
| r11247 | r11248 | |
| 266 | 266 | |
| 267 | 267 | if(LOG_DISK_READ) |
| 268 | 268 | logerror("%s DiskIO:Read of %08X\n",machine().describe_context(),m_disk_io_base+offset); |
| 269 | ||
| 269 | ||
| 270 | 270 | switch (offset) |
| 271 | 271 | { |
| 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; | |
| 274 | 274 | case 0x0002 : result=wd17xx_r(m_fdc, offset); break; |
| 275 | 275 | 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; | |
| 277 | 277 | } |
| 278 | ||
| 278 | ||
| 279 | 279 | return result; |
| 280 | 280 | } |
| 281 | 281 | |
| r11247 | r11248 | |
| 286 | 286 | |
| 287 | 287 | switch (offset) |
| 288 | 288 | { |
| 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; | |
| 291 | 291 | case 0x0002 : wd17xx_w(m_fdc, offset, data); break; |
| 292 | 292 | case 0x0003 : wd17xx_w(m_fdc, offset, data); break; |
| 293 | 293 | case 0x0004 : if(m_disk_type==DISK_TYPE_SANDY) |
| r11247 | r11248 | |
| 296 | 296 | m_printer_char=data; |
| 297 | 297 | case 0x2000 : if(m_disk_type==DISK_TYPE_TRUMP) |
| 298 | 298 | 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; | |
| 300 | 300 | } |
| 301 | 301 | } |
| 302 | 302 | |
| r11247 | r11248 | |
| 305 | 305 | // If we have more than 640K them map extra ram into top 256K |
| 306 | 306 | // else just map to unmap. |
| 307 | 307 | if (ram_get_size(m_ram)>(640*1024)) |
| 308 | space.install_ram(0x0c0000, 0x0fffff, NULL); | |
| 308 | space.install_ram(0x0c0000, 0x0fffff, NULL); | |
| 309 | 309 | else |
| 310 | 310 | space.unmap_readwrite(0x0c0000, 0x0fffff); |
| 311 | ||
| 311 | ||
| 312 | 312 | // Setup trumcard rom mapped to rom so unlink us |
| 313 | 313 | space.install_rom(0x010000, 0x018000, &machine().region(M68008_TAG)->base()[TRUMP_ROM_BASE]); |
| 314 | 314 | |
| 315 | return machine().region(M68008_TAG)->base()[TRUMP_ROM_BASE+offset]; | |
| 315 | return machine().region(M68008_TAG)->base()[TRUMP_ROM_BASE+offset]; | |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | READ8_MEMBER( ql_state::cart_rom_r ) |
| 319 | 319 | { |
| 320 | // Setup trumcard rom mapped in at $c0000 | |
| 320 | // Setup trumcard rom mapped in at $c0000 | |
| 321 | 321 | space.install_rom(0x0c0000, 0x0c8000, &machine().region(M68008_TAG)->base()[TRUMP_ROM_BASE]); |
| 322 | 322 | |
| 323 | 323 | // Setup cart rom to rom handler, so unlink us |
| r11247 | r11248 | |
| 330 | 330 | { |
| 331 | 331 | if(data & TRUMP_DRIVE0_MASK) |
| 332 | 332 | wd17xx_set_drive(m_fdc,0); |
| 333 | ||
| 333 | ||
| 334 | 334 | if(data & TRUMP_DRIVE1_MASK) |
| 335 | wd17xx_set_drive(m_fdc,1); | |
| 335 | wd17xx_set_drive(m_fdc,1); | |
| 336 | 336 | |
| 337 | 337 | wd17xx_set_side(m_fdc,(data & TRUMP_SIDE_MASK) >> TRUMP_SIDE_SHIFT); |
| 338 | 338 | } |
| r11247 | r11248 | |
| 345 | 345 | |
| 346 | 346 | if(data & SANDY_DRIVE0_MASK) |
| 347 | 347 | wd17xx_set_drive(m_fdc,0); |
| 348 | ||
| 348 | ||
| 349 | 349 | if(data & SANDY_DRIVE1_MASK) |
| 350 | wd17xx_set_drive(m_fdc,1); | |
| 350 | wd17xx_set_drive(m_fdc,1); | |
| 351 | 351 | |
| 352 | 352 | wd17xx_set_side(m_fdc,(data & SANDY_SIDE_MASK) >> SANDY_SIDE_SHIFT); |
| 353 | 353 | if (data & SANDY_SIDE_MASK) |
| r11247 | r11248 | |
| 359 | 359 | { |
| 360 | 360 | if(data & SANDY_PRINTER_STROBE) |
| 361 | 361 | printer_output(m_printer,m_printer_char); |
| 362 | ||
| 363 | if(data & SANDY_PRINTER_INTMASK) | |
| 362 | ||
| 363 | if(data & SANDY_PRINTER_INTMASK) | |
| 364 | 364 | m_zx8302->extint_w(ASSERT_LINE); |
| 365 | 365 | } |
| 366 | } | |
| 366 | } | |
| 367 | 367 | |
| 368 | 368 | static READ_LINE_DEVICE_HANDLER( disk_io_dden_r ) |
| 369 | 369 | { |
| 370 | 370 | ql_state *state = device->machine().driver_data<ql_state>(); |
| 371 | ||
| 371 | ||
| 372 | 372 | if(state->m_disk_type==DISK_TYPE_SANDY) |
| 373 | 373 | return ((state->m_disk_io_byte & SANDY_DDEN_MASK) >> SANDY_DDEN_SHIFT); |
| 374 | 374 | else |
| r11247 | r11248 | |
| 397 | 397 | static ADDRESS_MAP_START( ql_mem, AS_PROGRAM, 8, ql_state ) |
| 398 | 398 | AM_RANGE(0x000000, 0x00bfff) AM_ROM // 48K System ROM |
| 399 | 399 | AM_RANGE(0x00c000, 0x00ffff) AM_ROM AM_WRITENOP // 16K Cartridge ROM |
| 400 | AM_RANGE(0x010000, 0x017fff) AM_UNMAP | |
| 400 | AM_RANGE(0x010000, 0x017fff) AM_UNMAP | |
| 401 | 401 | AM_RANGE(0x018000, 0x018003) AM_DEVREAD(ZX8302_TAG, zx8302_device, rtc_r) |
| 402 | 402 | AM_RANGE(0x018000, 0x018001) AM_DEVWRITE(ZX8302_TAG, zx8302_device, rtc_w) |
| 403 | 403 | AM_RANGE(0x018002, 0x018002) AM_DEVWRITE(ZX8302_TAG, zx8302_device, control_w) |
| r11247 | r11248 | |
| 407 | 407 | AM_RANGE(0x018022, 0x018022) AM_DEVREADWRITE(ZX8302_TAG, zx8302_device, mdv_track_r, data_w) |
| 408 | 408 | AM_RANGE(0x018023, 0x018023) AM_DEVREAD(ZX8302_TAG, zx8302_device, mdv_track_r) AM_WRITENOP |
| 409 | 409 | AM_RANGE(0x018063, 0x018063) AM_DEVWRITE(ZX8301_TAG, zx8301_device, control_w) |
| 410 | AM_RANGE(0x01c000, 0x01ffff) AM_UNMAP | |
| 410 | AM_RANGE(0x01c000, 0x01ffff) AM_UNMAP | |
| 411 | 411 | AM_RANGE(0x020000, 0x03ffff) AM_DEVREADWRITE(ZX8301_TAG, zx8301_device, data_r, data_w) |
| 412 | 412 | AM_RANGE(0x040000, 0x0fffff) AM_RAM |
| 413 | 413 | ADDRESS_MAP_END |
| r11247 | r11248 | |
| 878 | 878 | NULL |
| 879 | 879 | }; |
| 880 | 880 | |
| 881 | wd17xx_interface ql_wd17xx_interface = | |
| 881 | wd17xx_interface ql_wd17xx_interface = | |
| 882 | 882 | { |
| 883 | 883 | DEVCB_LINE(disk_io_dden_r), |
| 884 | 884 | DEVCB_LINE(disk_io_intrq_w), |
| r11247 | r11248 | |
| 916 | 916 | // MACHINE_START( ql ) |
| 917 | 917 | //------------------------------------------------- |
| 918 | 918 | |
| 919 | // | |
| 919 | // | |
| 920 | 920 | // 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 | |
| 922 | 922 | // 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 | |
| 924 | 924 | // onboard). |
| 925 | 925 | // |
| 926 | 926 | |
| r11247 | r11248 | |
| 937 | 937 | |
| 938 | 938 | void ql_state::machine_reset() |
| 939 | 939 | { |
| 940 | address_space | |
| 940 | address_space | |
| 941 | 941 | |
| 942 | 942 | m_disk_type=input_port_read(machine(),QL_CONFIG_PORT) & DISK_TYPE_MASK; |
| 943 | 943 | logerror("disktype=%d\n",m_disk_type); |
| r11247 | r11248 | |
| 968 | 968 | case 640*1024: |
| 969 | 969 | program->unmap_readwrite(0x0c0000, 0x0fffff); |
| 970 | 970 | break; |
| 971 | } | |
| 971 | } | |
| 972 | 972 | |
| 973 | 973 | switch (m_disk_type) |
| 974 | 974 | { |
| r11247 | r11248 | |
| 1045 | 1045 | MCFG_RAM_ADD(RAM_TAG) |
| 1046 | 1046 | MCFG_RAM_DEFAULT_SIZE("128K") |
| 1047 | 1047 | MCFG_RAM_EXTRA_OPTIONS("192K,256K,384K,640K,896K") |
| 1048 | ||
| 1048 | ||
| 1049 | 1049 | // Parallel printer port on Sandy disk interface |
| 1050 | 1050 | MCFG_PRINTER_ADD(PRINTER_TAG) |
| 1051 | 1051 | MACHINE_CONFIG_END |
| r11247 | r11248 | |
|---|---|---|
| 254 | 254 | /* Driver */ |
| 255 | 255 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 256 | 256 | COMP( 1987, mikrosha, radio86,0, mikrosha, mikrosha, radio86, "Lianozovo Electromechanical Factory", "Mikrosha", 0) |
| 257 | COMP( 1987, m86rk, | |
| 257 | COMP( 1987, m86rk, |
| r11247 | r11248 | |
|---|---|---|
| 17 | 17 | banking: |
| 18 | 18 | - 0x1c = 0 |
| 19 | 19 | AM_RANGE(0x0000,0x1fff) ROM |
| 20 | ||
| 20 | AM_RANGE(0x2000,0xdfff) NOP | |
| 21 | 21 | AM_RANGE(0xe000,0xffff) RAM |
| 22 | 22 | - 0x1c = 1 0x20 = 1 |
| 23 | 23 | AM_RANGE(0x0000,0x7fff) RAM (0x18 selects bank) |
| r11247 | r11248 | |
| 624 | 624 | if(data != 1 && data != 2 && data != 4) |
| 625 | 625 | printf("%02x\n",data); |
| 626 | 626 | |
| 627 | if(data & 1) | |
| 627 | if(data & 1) | |
| 628 | 628 | else if(data & 2) { state->m_hgdc->bank_w(*space, 0, 2); } // G |
| 629 | 629 | else if(data & 4) { state->m_hgdc->bank_w(*space, 0, 4); } // R |
| 630 | 630 | } |
| r11247 | r11248 | |
| 655 | 655 | AM_RANGE(0x34, 0x34) AM_DEVREAD("upd765", upd765_status_r) |
| 656 | 656 | AM_RANGE(0x35, 0x35) AM_DEVREADWRITE("upd765", upd765_data_r, upd765_data_w) |
| 657 | 657 | 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 | |
| 660 | 660 | AM_RANGE(0x3c, 0x3c) AM_READWRITE(mc146818_data_r, mc146818_data_w) |
| 661 | 661 | AM_RANGE(0x3d, 0x3d) AM_WRITE(mc146818_offset_w) |
| 662 | 662 | AM_RANGE(0x40, 0x4f) AM_DEVREADWRITE("8237dma_1", i8237_r, i8237_w) |
| 663 | 663 | AM_RANGE(0x50, 0x5f) AM_DEVREADWRITE("8237dma_2", i8237_r, i8237_w) |
| 664 | // | |
| 664 | // AM_RANGE(0xfc, 0xfd) Multi-Font comms | |
| 665 | 665 | ADDRESS_MAP_END |
| 666 | 666 | |
| 667 | 667 | /* Input ports */ |
| r11247 | r11248 | |
| 1034 | 1034 | ROM_LOAD( "m12020a.3e", 0x0000, 0x0800, CRC(fa27f333) SHA1(73d27084ca7b002d5f370220d8da6623a6e82132)) |
| 1035 | 1035 | |
| 1036 | 1036 | ROM_REGION( 0x1000, "chargen", 0 ) |
| 1037 | // | |
| 1037 | // ROM_LOAD( "qge.2e", 0x0000, 0x0800, BAD_DUMP CRC(ed93cb81) SHA1(579e68bde3f4184ded7d89b72c6936824f48d10b)) //this one contains special characters only | |
| 1038 | 1038 | ROM_LOAD( "qge.2e", 0x0000, 0x1000, BAD_DUMP CRC(eb31a2d5) SHA1(6dc581bf2854a07ae93b23b6dfc9c7abd3c0569e)) |
| 1039 | 1039 | ROM_END |
| 1040 | 1040 | |
| r11247 | r11248 | |
| 1049 | 1049 | ROM_LOAD( "m12020a.3e", 0x0000, 0x0800, CRC(fa27f333) SHA1(73d27084ca7b002d5f370220d8da6623a6e82132)) //mfont.rom |
| 1050 | 1050 | |
| 1051 | 1051 | ROM_REGION( 0x1000, "chargen", 0 ) |
| 1052 | // | |
| 1052 | // ROM_LOAD( "font.rom", 0x0000, 0x0800, BAD_DUMP CRC(04a6da6d) SHA1(ef9743476f6fb30ca9209cf700e985a7f85066bb)) //this one contains normal characters | |
| 1053 | 1053 | ROM_LOAD( "qge.2e", 0x0000, 0x1000, BAD_DUMP CRC(eb31a2d5) SHA1(6dc581bf2854a07ae93b23b6dfc9c7abd3c0569e)) |
| 1054 | 1054 | ROM_END |
| 1055 | 1055 |
| r11247 | r11248 | |
|---|---|---|
| 170 | 170 | address_space *program = m_maincpu->memory().space(AS_PROGRAM); |
| 171 | 171 | UINT8 *ram = ram_get_ptr(m_ram); |
| 172 | 172 | UINT8 *rom = machine().region(CDP1802_TAG)->base(); |
| 173 | ||
| 173 | ||
| 174 | 174 | if (m_roc) |
| 175 | 175 | { |
| 176 | 176 | // monitor ROM |
| r11247 | r11248 | |
| 356 | 356 | |
| 357 | 357 | PORT_START("RUN") |
| 358 | 358 | 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 | ||
| 360 | 360 | PORT_START("IN2") |
| 361 | 361 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G') |
| 362 | 362 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H') |
| r11247 | r11248 | |
|---|---|---|
| 2334 | 2334 | m_towns_rtc_timer->adjust(attotime::zero,0,attotime::from_hz(1)); |
| 2335 | 2335 | m_towns_kb_timer->adjust(attotime::zero,0,attotime::from_msec(10)); |
| 2336 | 2336 | /* Why does enabling this timer break the driver? */ |
| 2337 | // | |
| 2337 | // m_towns_freerun_counter->adjust(attotime::zero,0,attotime::from_usec(1)); | |
| 2338 | 2338 | } |
| 2339 | 2339 | |
| 2340 | 2340 | static const struct pit8253_config towns_pit8253_config = |
| r11247 | r11248 | |
| 2480 | 2480 | MCFG_CPU_PROGRAM_MAP(towns_mem) |
| 2481 | 2481 | MCFG_CPU_IO_MAP(towns_io) |
| 2482 | 2482 | MCFG_CPU_VBLANK_INT("screen", towns_vsync_irq) |
| 2483 | ||
| 2483 | ||
| 2484 | 2484 | // MCFG_MACHINE_RESET(towns) |
| 2485 | 2485 | |
| 2486 | 2486 | /* video hardware */ |
| r11247 | r11248 | |
| 2490 | 2490 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 2491 | 2491 | MCFG_SCREEN_SIZE(768,512) |
| 2492 | 2492 | MCFG_SCREEN_VISIBLE_AREA(0, 768-1, 0, 512-1) |
| 2493 | // | |
| 2493 | // MCFG_SCREEN_UPDATE(towns) | |
| 2494 | 2494 | |
| 2495 | 2495 | MCFG_GFXDECODE(towns) |
| 2496 | 2496 | |
| r11247 | r11248 | |
| 2628 | 2628 | ROM_REGION32_LE( 0x280000, "user", 0) |
| 2629 | 2629 | ROM_LOAD("fmt_dos.rom", 0x000000, 0x080000, CRC(112872ee) SHA1(57fd146478226f7f215caf63154c763a6d52165e) ) |
| 2630 | 2630 | // F20 ROM space appears to be all 0xFF on an HR, so it is assumed to be not present |
| 2631 | // | |
| 2631 | // ROM_LOAD("fmt_f20.rom", 0x080000, 0x080000, CRC(9f55a20c) SHA1(1920711cb66340bb741a760de187de2f76040b8c) ) | |
| 2632 | 2632 | ROM_LOAD("fmt_dic.rom", 0x100000, 0x080000, CRC(82d1daa2) SHA1(7564020dba71deee27184824b84dbbbb7c72aa4e) ) |
| 2633 | 2633 | ROM_LOAD("fmt_fnt.rom", 0x180000, 0x040000, CRC(dd6fd544) SHA1(a216482ea3162f348fcf77fea78e0b2e4288091a) ) |
| 2634 | 2634 | ROM_LOAD("fmthr_sys.rom",0x200000, 0x040000, CRC(8aeff982) SHA1(a4ebf2e247a8e15a5f1ff003b657bbe3a67203d8) ) |
| r11247 | r11248 | |
|---|---|---|
| 287 | 287 | MCFG_CARTSLOT_NOT_MANDATORY |
| 288 | 288 | MCFG_CARTSLOT_START(a7800_cart) |
| 289 | 289 | MCFG_CARTSLOT_LOAD(a7800_cart) |
| 290 | MCFG_CARTSLOT_PARTIALHASH(a7800_partialhash) | |
| 290 | MCFG_CARTSLOT_PARTIALHASH(a7800_partialhash) | |
| 291 | 291 | MCFG_CARTSLOT_INTERFACE("a7800_cart") |
| 292 | 292 | |
| 293 | 293 | /* software lists */ |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | ||
| 2 | ||
| 3 | 3 | Terak 8510A |
| 4 | 4 | |
| 5 | 5 | 23/02/2009 Skeleton driver. |
| r11247 | r11248 | |
| 36 | 36 | terak_state *state = space->machine().driver_data<terak_state>(); |
| 37 | 37 | state->m_unit = (data >> 8) & 0x03; |
| 38 | 38 | 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); | |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | static READ16_HANDLER(terak_fdc_data_r) |
| r11247 | r11248 | |
| 53 | 53 | static ADDRESS_MAP_START(terak_mem, AS_PROGRAM, 16) |
| 54 | 54 | ADDRESS_MAP_UNMAP_HIGH |
| 55 | 55 | AM_RANGE( 0x0000, 0xf5ff ) AM_RAM // RAM |
| 56 | ||
| 56 | ||
| 57 | 57 | AM_RANGE( 0173000, 0173177 ) AM_ROM // ROM |
| 58 | 58 | AM_RANGE( 0177000, 0177001 ) AM_READWRITE(terak_fdc_status_r,terak_fdc_command_w) |
| 59 | 59 | AM_RANGE( 0177002, 0177003 ) AM_READWRITE(terak_fdc_data_r,terak_fdc_data_w) |
| r11247 | r11248 | |
| 64 | 64 | INPUT_PORTS_END |
| 65 | 65 | |
| 66 | 66 | |
| 67 | static MACHINE_RESET(terak) | |
| 68 | { | |
| 67 | static MACHINE_RESET(terak) | |
| 68 | { | |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | static VIDEO_START( terak ) |
| r11247 | r11248 | |
| 89 | 89 | MCFG_CPU_PROGRAM_MAP(terak_mem) |
| 90 | 90 | |
| 91 | 91 | MCFG_MACHINE_RESET(terak) |
| 92 | ||
| 92 | ||
| 93 | 93 | /* video hardware */ |
| 94 | 94 | MCFG_SCREEN_ADD("screen", RASTER) |
| 95 | 95 | MCFG_SCREEN_REFRESH_RATE(50) |
| r11247 | r11248 | |
| 114 | 114 | /* Driver */ |
| 115 | 115 | |
| 116 | 116 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 117 | COMP( ????, terak, 0, 0, terak, | |
| 117 | COMP( ????, terak, 0, 0, terak, | |
| 118 | 118 |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | ||
| 2 | ||
| 3 | 3 | SacState 8008 |
| 4 | 4 | |
| 5 | 5 | 23/02/2009 Skeleton driver. |
| r11247 | r11248 | |
| 22 | 22 | UINT8 val = 0x00; |
| 23 | 23 | static READ8_HANDLER(status_r) |
| 24 | 24 | { |
| 25 | UINT8 old_val = val; | |
| 25 | UINT8 old_val = val; | |
| 26 | 26 | sacstate_state *state = space->machine().driver_data<sacstate_state>(); |
| 27 | 27 | if (state->m_term_data!=0) old_val |= 0x04; // data in |
| 28 | 28 | val = val ^ 0x40; |
| r11247 | r11248 | |
| 52 | 52 | static ADDRESS_MAP_START(sacstate_mem, AS_PROGRAM, 8) |
| 53 | 53 | ADDRESS_MAP_UNMAP_HIGH |
| 54 | 54 | AM_RANGE(0x000,0x7ff) AM_ROM |
| 55 | AM_RANGE(0x800,0xfff) AM_RAM | |
| 55 | AM_RANGE(0x800,0xfff) AM_RAM | |
| 56 | 56 | ADDRESS_MAP_END |
| 57 | 57 | |
| 58 | 58 | static ADDRESS_MAP_START( sacstate_io , AS_IO, 8) |
| r11247 | r11248 | |
| 79 | 79 | DEVCB_HANDLER(sacstate_kbd_put) |
| 80 | 80 | }; |
| 81 | 81 | |
| 82 | static MACHINE_RESET(sacstate) | |
| 83 | { | |
| 82 | static MACHINE_RESET(sacstate) | |
| 83 | { | |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | static MACHINE_CONFIG_START( sacstate, sacstate_state ) |
| 87 | 87 | /* basic machine hardware */ |
| 88 | 88 | MCFG_CPU_ADD("maincpu",I8008, 800000) |
| 89 | 89 | MCFG_CPU_PROGRAM_MAP(sacstate_mem) |
| 90 | MCFG_CPU_IO_MAP(sacstate_io) | |
| 90 | MCFG_CPU_IO_MAP(sacstate_io) | |
| 91 | 91 | |
| 92 | 92 | MCFG_MACHINE_RESET(sacstate) |
| 93 | ||
| 93 | ||
| 94 | 94 | /* video hardware */ |
| 95 | 95 | MCFG_FRAGMENT_ADD( generic_terminal ) |
| 96 | 96 | MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG,sacstate_terminal_intf) |
| r11247 | r11248 | |
| 112 | 112 | /* Driver */ |
| 113 | 113 | |
| 114 | 114 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 115 | COMP( ????, sacstate, 0, 0, | |
| 115 | COMP( ????, sacstate, 0, 0, | |
| 116 | 116 |
| r11247 | r11248 | |
|---|---|---|
| 44 | 44 | Kevin Thacker [MESS driver] |
| 45 | 45 | |
| 46 | 46 | |
| 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. | |
| 54 | 52 | |
| 53 | Also added defines to stop the log being flooded with keyboard messages :) | |
| 54 | ||
| 55 | 55 | ******************************************************************************/ |
| 56 | 56 | |
| 57 | 57 | #include "emu.h" |
| r11247 | r11248 | |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /* 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. | |
| 104 | 104 | */ |
| 105 | 105 | static MC6845_UPDATE_ROW( einstein_6845_update_row ) |
| 106 | 106 | { |
| r11247 | r11248 | |
| 433 | 433 | TMS9928A_reset(); |
| 434 | 434 | |
| 435 | 435 | /* a reset causes the fire int, adc int, keyboard int mask |
| 436 | ||
| 436 | to be set to 1, which causes all these to be DISABLED */ | |
| 437 | 437 | einstein->m_interrupt = 0; |
| 438 | 438 | einstein->m_interrupt_mask = 0; |
| 439 | 439 | |
| r11247 | r11248 | |
| 785 | 785 | MCFG_MACHINE_RESET(einstein) |
| 786 | 786 | |
| 787 | 787 | /* this is actually clocked at the system clock 4 MHz, but this would be too fast for our |
| 788 | ||
| 788 | driver. So we update at 50Hz and hope this is good enough. */ | |
| 789 | 789 | MCFG_TIMER_ADD_PERIODIC("keyboard", einstein_keyboard_timer_callback, attotime::from_hz(50)) |
| 790 | 790 | |
| 791 | 791 | MCFG_Z80PIO_ADD(IC_I063, XTAL_X002 / 2, einstein_pio_intf) |
| r11247 | r11248 | |
|---|---|---|
| 40 | 40 | }; |
| 41 | 41 | |
| 42 | 42 | #define mc6845_h_char_total (state->m_crtc_vreg[0]) |
| 43 | #define mc6845_h_display | |
| 43 | #define mc6845_h_display | |
| 44 | 44 | #define mc6845_h_sync_pos (state->m_crtc_vreg[2]) |
| 45 | 45 | #define mc6845_sync_width (state->m_crtc_vreg[3]) |
| 46 | 46 | #define mc6845_v_char_total (state->m_crtc_vreg[4]) |
| 47 | #define mc6845_v_total_adj | |
| 47 | #define mc6845_v_total_adj | |
| 48 | 48 | #define mc6845_v_display (state->m_crtc_vreg[6]) |
| 49 | 49 | #define mc6845_v_sync_pos (state->m_crtc_vreg[7]) |
| 50 | 50 | #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]) | |
| 53 | 53 | #define mc6845_cursor_y_end (state->m_crtc_vreg[0x0b]) |
| 54 | #define mc6845_start_addr | |
| 54 | #define mc6845_start_addr | |
| 55 | 55 | #define mc6845_cursor_addr (((state->m_crtc_vreg[0x0e]<<8) & 0x3f00) | (state->m_crtc_vreg[0x0f] & 0xff)) |
| 56 | #define mc6845_light_pen_addr | |
| 56 | #define mc6845_light_pen_addr | |
| 57 | 57 | #define mc6845_update_addr (((state->m_crtc_vreg[0x12]<<8) & 0x3f00) | (state->m_crtc_vreg[0x13] & 0xff)) |
| 58 | 58 | |
| 59 | 59 | static VIDEO_START( multi8 ) |
| r11247 | r11248 | |
| 535 | 535 | { |
| 536 | 536 | int vsync = (input_port_read(device->machine(), "VBLANK") & 0x1) << 5; |
| 537 | 537 | /* |
| 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 | */ | |
| 542 | 542 | |
| 543 | 543 | return 0x9f | vsync | 0x00; |
| 544 | 544 | } |
| r11247 | r11248 | |
|---|---|---|
| 561 | 561 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 562 | 562 | 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) |
| 563 | 563 | MCFG_SCREEN_UPDATE(sms1) |
| 564 | ||
| 564 | ||
| 565 | 565 | MCFG_PALETTE_LENGTH(64+16) |
| 566 | MCFG_PALETTE_INIT(sms) | |
| 566 | MCFG_PALETTE_INIT(sms) | |
| 567 | 567 | |
| 568 | 568 | MCFG_DEFAULT_LAYOUT(layout_sms1) |
| 569 | 569 |
| r11247 | r11248 | |
|---|---|---|
| 769 | 769 | ps_intc_set_interrupt_line(field->port->machine(), PS_INT_BTN_RIGHT, (buttons & 2) ? 1 : 0); |
| 770 | 770 | ps_intc_set_interrupt_line(field->port->machine(), PS_INT_BTN_LEFT, (buttons & 4) ? 1 : 0); |
| 771 | 771 | 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, | |
| 772 | ps_intc_set_interrupt_line(field->port->machine(), PS_INT_BTN_UP, | |
| 773 | 773 | } |
| 774 | 774 | |
| 775 | 775 | static READ32_HANDLER(ps_rombank_r) |
| r11247 | r11248 | |
|---|---|---|
| 267 | 267 | |
| 268 | 268 | static INTERRUPT_GEN( homez80_interrupt ) |
| 269 | 269 | { |
| 270 | homez80_state *state = device->machine().driver_data<homez80_state>(); | |
| 270 | homez80_state *state = device->machine().driver_data<homez80_state>(); | |
| 271 | 271 | device_set_input_line(device, 0, (state->m_irq) ? HOLD_LINE : CLEAR_LINE); |
| 272 | 272 | state->m_irq ^= 1; |
| 273 | 273 | } |
| r11247 | r11248 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | TODO: |
| 12 | 12 | |
| 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 | |
| 19 | 19 | - CIO (interrupt controller) |
| 20 | - RTC | |
| 21 | - NVRAM | |
| 20 | - RTC | |
| 21 | - NVRAM | |
| 22 | 22 | - hard disk (Xebec S1410) |
| 23 | 23 | |
| 24 | 24 | */ |
| r11247 | r11248 | |
| 183 | 183 | { |
| 184 | 184 | address_space *program = m_maincpu->memory().space(AS_PROGRAM); |
| 185 | 185 | UINT8 data = 0; |
| 186 | ||
| 186 | ||
| 187 | 187 | if (X12) |
| 188 | 188 | { |
| 189 | 189 | if (X11) |
| r11247 | r11248 | |
| 193 | 193 | case IORD0: |
| 194 | 194 | data = iord0_r(*program, offset); |
| 195 | 195 | break; |
| 196 | ||
| 196 | ||
| 197 | 197 | default: |
| 198 | 198 | logerror("Unmapped read from virtual I/O %06x\n", offset); |
| 199 | 199 | } |
| r11247 | r11248 | |
| 207 | 207 | break; |
| 208 | 208 | |
| 209 | 209 | case CRT: |
| 210 | if (A0) | |
| 210 | if (A0) | |
| 211 | 211 | data = mc6845_register_r(m_crtc, 0); |
| 212 | 212 | else |
| 213 | 213 | data = mc6845_status_r(m_crtc, 0); |
| r11247 | r11248 | |
| 526 | 526 | READ8_MEMBER( abc1600_state::cause_r ) |
| 527 | 527 | { |
| 528 | 528 | /* |
| 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 | ||
| 543 | 543 | UINT8 data = 0x02; |
| 544 | ||
| 544 | ||
| 545 | 545 | // DMA status |
| 546 | 546 | data |= m_cause; |
| 547 | ||
| 547 | ||
| 548 | 548 | watchdog_reset(machine()); |
| 549 | 549 | |
| 550 | 550 | return data; |
| r11247 | r11248 | |
| 558 | 558 | WRITE8_MEMBER( abc1600_state::task_w ) |
| 559 | 559 | { |
| 560 | 560 | /* |
| 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 | */ | |
| 574 | 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 | */ | |
| 574 | ||
| 575 | 575 | m_task = data; |
| 576 | 576 | |
| 577 | 577 | if (LOG) logerror("Task %u BOOTE %u READ_MAGIC %u\n", m_task & 0x0f, BOOTE, READ_MAGIC); |
| r11247 | r11248 | |
| 585 | 585 | READ8_MEMBER( abc1600_state::segment_r ) |
| 586 | 586 | { |
| 587 | 587 | /* |
| 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 | */ | |
| 601 | 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 | */ | |
| 601 | ||
| 602 | 602 | int segment = (A8 << 4) | ((offset >> 15) & 0x0f); |
| 603 | 603 | UINT8 data = SEGMENT_DATA(segment); |
| 604 | 604 | |
| r11247 | r11248 | |
| 613 | 613 | WRITE8_MEMBER( abc1600_state::segment_w ) |
| 614 | 614 | { |
| 615 | 615 | /* |
| 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 | */ | |
| 629 | 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 | */ | |
| 629 | ||
| 630 | 630 | int segment = (A8 << 4) | ((offset >> 15) & 0x0f); |
| 631 | 631 | SEGMENT_DATA(segment) = data & 0x7f; |
| 632 | ||
| 632 | ||
| 633 | 633 | if (LOG) logerror("Task %u Segment %u : %02x\n", m_task & 0x0f, segment, data); |
| 634 | 634 | } |
| 635 | 635 | |
| r11247 | r11248 | |
| 641 | 641 | READ8_MEMBER( abc1600_state::page_r ) |
| 642 | 642 | { |
| 643 | 643 | /* |
| 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 | |
| 655 | 644 | |
| 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 | |
| 666 | 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 | |
| 655 | ||
| 656 | 8 X19 | |
| 657 | 9 X20 | |
| 658 | 10 | |
| 659 | 11 | |
| 660 | 12 | |
| 661 | 13 | |
| 662 | 14 _WP | |
| 663 | 15 NONX | |
| 664 | ||
| 665 | */ | |
| 666 | ||
| 667 | 667 | int segment = (A8 << 4) | ((offset >> 15) & 0x0f); |
| 668 | 668 | int page = (offset >> 11) & 0x0f; |
| 669 | 669 | UINT16 data = PAGE_DATA(segment, page); |
| r11247 | r11248 | |
| 679 | 679 | WRITE8_MEMBER( abc1600_state::page_w ) |
| 680 | 680 | { |
| 681 | 681 | /* |
| 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 | |
| 693 | 682 | |
| 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 | |
| 704 | 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 | |
| 693 | ||
| 694 | 8 X19 | |
| 695 | 9 X20 | |
| 696 | 10 | |
| 697 | 11 | |
| 698 | 12 | |
| 699 | 13 | |
| 700 | 14 _WP | |
| 701 | 15 NONX | |
| 702 | ||
| 703 | */ | |
| 704 | ||
| 705 | 705 | int segment = (A8 << 4) | ((offset >> 15) & 0x0f); |
| 706 | 706 | int page = (offset >> 11) & 0x0f; |
| 707 | 707 | |
| r11247 | r11248 | |
| 724 | 724 | //************************************************************************** |
| 725 | 725 | |
| 726 | 726 | //------------------------------------------------- |
| 727 | // update_drdy0 - | |
| 727 | // update_drdy0 - | |
| 728 | 728 | //------------------------------------------------- |
| 729 | 729 | |
| 730 | 730 | inline void abc1600_state::update_drdy0() |
| r11247 | r11248 | |
| 743 | 743 | |
| 744 | 744 | |
| 745 | 745 | //------------------------------------------------- |
| 746 | // update_drdy1 - | |
| 746 | // update_drdy1 - | |
| 747 | 747 | //------------------------------------------------- |
| 748 | 748 | |
| 749 | 749 | inline void abc1600_state::update_drdy1() |
| r11247 | r11248 | |
| 762 | 762 | |
| 763 | 763 | |
| 764 | 764 | //------------------------------------------------- |
| 765 | // update_drdy2 - | |
| 765 | // update_drdy2 - | |
| 766 | 766 | //------------------------------------------------- |
| 767 | 767 | |
| 768 | 768 | inline void abc1600_state::update_drdy2() |
| r11247 | r11248 | |
| 771 | 771 | m_dma2->rdy_w(1); |
| 772 | 772 | } |
| 773 | 773 | |
| 774 | ||
| 774 | ||
| 775 | 775 | //------------------------------------------------- |
| 776 | // get_dma_address - | |
| 776 | // get_dma_address - | |
| 777 | 777 | //------------------------------------------------- |
| 778 | 778 | |
| 779 | 779 | inline offs_t abc1600_state::get_dma_address(int index, UINT16 offset) |
| r11247 | r11248 | |
| 781 | 781 | // A0 = DMA15, A1 = BA1, A2 = BA2 |
| 782 | 782 | UINT8 dmamap_addr = index | BIT(offset, 15); |
| 783 | 783 | UINT8 dmamap = m_dmamap[dmamap_addr]; |
| 784 | ||
| 784 | ||
| 785 | 785 | m_cause = (dmamap & 0x1f) << 3; |
| 786 | 786 | |
| 787 | 787 | return ((dmamap & 0x1f) << 16) | offset; |
| r11247 | r11248 | |
| 843 | 843 | WRITE8_MEMBER( abc1600_state::dmamap_w ) |
| 844 | 844 | { |
| 845 | 845 | /* |
| 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 | ||
| 860 | 860 | m_dmamap[offset & 7] = data; |
| 861 | 861 | } |
| 862 | 862 | |
| r11247 | r11248 | |
| 873 | 873 | WRITE8_MEMBER( abc1600_state::fw0_w ) |
| 874 | 874 | { |
| 875 | 875 | /* |
| 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 | */ | |
| 889 | 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 | */ | |
| 889 | ||
| 890 | 890 | logerror("FW0 %02x\n", data); |
| 891 | 891 | |
| 892 | 892 | // drive select |
| 893 | 893 | if (BIT(data, 0)) wd17xx_set_drive(m_fdc, 0); |
| 894 | 894 | if (BIT(data, 1)) wd17xx_set_drive(m_fdc, 1); |
| 895 | 895 | if (BIT(data, 2)) wd17xx_set_drive(m_fdc, 2); |
| 896 | ||
| 896 | ||
| 897 | 897 | // floppy motor |
| 898 | 898 | floppy_mon_w(m_floppy, !BIT(data, 3)); |
| 899 | 899 | } |
| r11247 | r11248 | |
| 906 | 906 | WRITE8_MEMBER( abc1600_state::fw1_w ) |
| 907 | 907 | { |
| 908 | 908 | /* |
| 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 | ||
| 923 | 923 | logerror("FW1 %02x\n", data); |
| 924 | 924 | |
| 925 | 925 | // FDC master reset |
| 926 | 926 | wd17xx_mr_w(m_fdc, BIT(data, 0)); |
| 927 | ||
| 927 | ||
| 928 | 928 | // density select |
| 929 | 929 | wd17xx_dden_w(m_fdc, BIT(data, 1)); |
| 930 | 930 | } |
| r11247 | r11248 | |
| 937 | 937 | WRITE8_MEMBER( abc1600_state::spec_contr_reg_w ) |
| 938 | 938 | { |
| 939 | 939 | int state = !BIT(data, 3); |
| 940 | ||
| 940 | ||
| 941 | 941 | switch (data & 0x07) |
| 942 | 942 | { |
| 943 | 943 | case 0: // CS7 |
| 944 | 944 | m_cs7 = state; |
| 945 | 945 | break; |
| 946 | ||
| 946 | ||
| 947 | 947 | case 1: |
| 948 | 948 | break; |
| 949 | ||
| 949 | ||
| 950 | 950 | case 2: // _BTCE |
| 951 | 951 | m_btce = state; |
| 952 | 952 | break; |
| 953 | ||
| 953 | ||
| 954 | 954 | case 3: // _ATCE |
| 955 | 955 | m_atce = state; |
| 956 | 956 | break; |
| 957 | ||
| 957 | ||
| 958 | 958 | case 4: // PARTST |
| 959 | 959 | m_partst = state; |
| 960 | 960 | break; |
| 961 | ||
| 961 | ||
| 962 | 962 | case 5: // _DMADIS |
| 963 | 963 | m_dmadis = state; |
| 964 | 964 | break; |
| 965 | ||
| 965 | ||
| 966 | 966 | case 6: // SYSSCC |
| 967 | 967 | m_sysscc = state; |
| 968 | 968 | update_drdy1(); |
| 969 | 969 | break; |
| 970 | ||
| 970 | ||
| 971 | 971 | case 7: // SYSFS |
| 972 | 972 | m_sysfs = state; |
| 973 | 973 | update_drdy0(); |
| r11247 | r11248 | |
| 991 | 991 | |
| 992 | 992 | /* |
| 993 | 993 | |
| 994 | ||
| 994 | Supervisor Data map | |
| 995 | 995 | |
| 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) | |
| 1001 | 1001 | |
| 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 | |
| 1023 | 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) | |
| 1023 | ||
| 1024 | 1024 | */ |
| 1025 | 1025 | |
| 1026 | 1026 | |
| r11247 | r11248 | |
| 1192 | 1192 | READ8_MEMBER( abc1600_state::cio_pa_r ) |
| 1193 | 1193 | { |
| 1194 | 1194 | /* |
| 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 | ||
| 1209 | 1209 | return 0; |
| 1210 | 1210 | } |
| 1211 | 1211 | |
| 1212 | 1212 | READ8_MEMBER( abc1600_state::cio_pb_r ) |
| 1213 | 1213 | { |
| 1214 | 1214 | /* |
| 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 | ||
| 1229 | 1229 | UINT8 data = 0; |
| 1230 | ||
| 1230 | ||
| 1231 | 1231 | // floppy interrupt |
| 1232 | 1232 | data |= wd17xx_intrq_r(m_fdc) << 7; |
| 1233 | 1233 | |
| r11247 | r11248 | |
| 1237 | 1237 | WRITE8_MEMBER( abc1600_state::cio_pb_w ) |
| 1238 | 1238 | { |
| 1239 | 1239 | /* |
| 1240 | ||
| 1241 | bit description | |
| 1242 | ||
| 1243 | PB0 PRBR | |
| 1244 | PB1 | |
| 1245 | PB2 | |
| 1246 | PB3 | |
| 1247 | PB4 | |
| 1248 | PB5 | |
| 1249 | PB6 | |
| 1250 | PB7 | |
| 1251 | ||
| 1252 | */ | |
| 1253 | 1240 | |
| 1241 | bit description | |
| 1242 | ||
| 1243 | PB0 PRBR | |
| 1244 | PB1 | |
| 1245 | PB2 | |
| 1246 | PB3 | |
| 1247 | PB4 | |
| 1248 | PB5 | |
| 1249 | PB6 | |
| 1250 | PB7 | |
| 1251 | ||
| 1252 | */ | |
| 1253 | ||
| 1254 | 1254 | // printer baudrate |
| 1255 | 1255 | int prbr = BIT(data, 0); |
| 1256 | 1256 | |
| r11247 | r11248 | |
| 1261 | 1261 | READ8_MEMBER( abc1600_state::cio_pc_r ) |
| 1262 | 1262 | { |
| 1263 | 1263 | /* |
| 1264 | ||
| 1265 | bit description | |
| 1266 | ||
| 1267 | PC0 1 | |
| 1268 | PC1 DATA IN | |
| 1269 | PC2 1 | |
| 1270 | PC3 1 | |
| 1271 | ||
| 1272 | */ | |
| 1273 | 1264 | |
| 1265 | bit description | |
| 1266 | ||
| 1267 | PC0 1 | |
| 1268 | PC1 DATA IN | |
| 1269 | PC2 1 | |
| 1270 | PC3 1 | |
| 1271 | ||
| 1272 | */ | |
| 1273 | ||
| 1274 | 1274 | UINT8 data = 0x0d; |
| 1275 | 1275 | |
| 1276 | // data in | |
| 1276 | // data in | |
| 1277 | 1277 | data |= (m_rtc->dio_r() | m_nvram->do_r()) << 1; |
| 1278 | ||
| 1278 | ||
| 1279 | 1279 | return data; |
| 1280 | 1280 | } |
| 1281 | 1281 | |
| 1282 | 1282 | WRITE8_MEMBER( abc1600_state::cio_pc_w ) |
| 1283 | 1283 | { |
| 1284 | 1284 | /* |
| 1285 | ||
| 1286 | bit description | |
| 1287 | ||
| 1288 | PC0 CLOCK | |
| 1289 | PC1 DATA OUT | |
| 1290 | PC2 RTC CS | |
| 1291 | PC3 NVRAM CS | |
| 1292 | ||
| 1293 | */ | |
| 1294 | 1285 | |
| 1286 | bit description | |
| 1287 | ||
| 1288 | PC0 CLOCK | |
| 1289 | PC1 DATA OUT | |
| 1290 | PC2 RTC CS | |
| 1291 | PC3 NVRAM CS | |
| 1292 | ||
| 1293 | */ | |
| 1294 | ||
| 1295 | 1295 | int clock = BIT(data, 0); |
| 1296 | 1296 | int data_out = BIT(data, 1); |
| 1297 | 1297 | int rtc_cs = BIT(data, 2); |
| 1298 | 1298 | int nvram_cs = BIT(data, 3); |
| 1299 | 1299 | |
| 1300 | 1300 | logerror("CLK %u DATA %u RTC %u NVRAM %u\n", clock, data_out, rtc_cs, nvram_cs); |
| 1301 | ||
| 1301 | ||
| 1302 | 1302 | m_rtc->cs_w(rtc_cs); |
| 1303 | 1303 | m_rtc->dio_w(data_out); |
| 1304 | 1304 | m_rtc->clk_w(clock); |
| 1305 | ||
| 1305 | ||
| 1306 | 1306 | m_nvram->cs_w(nvram_cs); |
| 1307 | 1307 | m_nvram->di_w(data_out); |
| 1308 | 1308 | m_nvram->sk_w(clock); |
| r11247 | r11248 | |
| 1344 | 1344 | static const wd17xx_interface fdc_intf = |
| 1345 | 1345 | { |
| 1346 | 1346 | DEVCB_NULL, |
| 1347 | DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pb7_w), | |
| 1347 | DEVCB_DEVICE_LINE_MEMBER(Z8536B1_TAG, z8536_device, pb7_w), | |
| 1348 | 1348 | DEVCB_DRIVER_LINE_MEMBER(abc1600_state, drq_w), |
| 1349 | 1349 | { FLOPPY_0, NULL, NULL, NULL } |
| 1350 | 1350 | }; |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | 3 | Skeleton driver for HP9816 (HP Series 200 series, Technical Desktops) |
| 4 | ||
| 4 | ||
| 5 | 5 | see for docs: http://www.hpmuseum.net/collection_document.php |
| 6 | ||
| 7 | TODO: everything! | |
| 8 | 6 | |
| 7 | TODO: everything! | |
| 8 | ||
| 9 | 9 | ****************************************************************************/ |
| 10 | 10 | |
| 11 | 11 | #include "emu.h" |
| r11247 | r11248 | |
|---|---|---|
| 78 | 78 | void compis_state::video_start() |
| 79 | 79 | { |
| 80 | 80 | // find memory regions |
| 81 | // | |
| 81 | // m_char_rom = machine.region("pcg")->base(); | |
| 82 | 82 | |
| 83 | 83 | VIDEO_START_NAME(generic_bitmapped)(machine()); |
| 84 | 84 | } |
| r11247 | r11248 | |
| 131 | 131 | AM_RANGE( 0x60000, 0x6ffff) AM_RAM |
| 132 | 132 | AM_RANGE( 0x70000, 0x7ffff) AM_RAM |
| 133 | 133 | |
| 134 | // | |
| 134 | // AM_RANGE( 0x80000, 0xeffff) AM_NOP | |
| 135 | 135 | AM_RANGE( 0xe8000, 0xeffff) AM_ROM AM_REGION("bios",0) AM_WRITE8(vram_w,0xffff) |
| 136 | 136 | AM_RANGE( 0xf0000, 0xfffff) AM_ROM AM_REGION("bios",0) AM_WRITE8(vram_w,0xffff) |
| 137 | 137 | ADDRESS_MAP_END |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /* |
| 2 | Amiga 1200 | |
| 2 | Amiga 1200 | |
| 3 | 3 | |
| 4 | 4 | Preliminary MAME driver by Mariusz Wojcieszek |
| 5 | 5 | CD-ROM controller by Ernesto Corvi |
| r11247 | r11248 | |
|---|---|---|
| 311 | 311 | { |
| 312 | 312 | /* |
| 313 | 313 | |
| 314 | ||
| 314 | bit description | |
| 315 | 315 | |
| 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 | |
| 324 | 324 | |
| 325 | ||
| 325 | */ | |
| 326 | 326 | |
| 327 | 327 | int kbdata = BIT(data, 0); |
| 328 | 328 | int kbclk = BIT(data, 1); |
| r11247 | r11248 | |
| 355 | 355 | { |
| 356 | 356 | /* |
| 357 | 357 | |
| 358 | ||
| 358 | bit description | |
| 359 | 359 | |
| 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 | |
| 368 | 368 | |
| 369 | ||
| 369 | */ | |
| 370 | 370 | |
| 371 | 371 | m_key_latch = BITSWAP8(data, 7, 6, 5, 4, 0, 1, 2, 3) & 0x0f; |
| 372 | 372 | } |
| r11247 | r11248 | |
|---|---|---|
| 198 | 198 | /* |
| 199 | 199 | static ACIA6850_INTERFACE( acia_intf ) |
| 200 | 200 | { |
| 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 | |
| 209 | 209 | };*/ |
| 210 | 210 | |
| 211 | 211 | /****************************************************************************** |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | ||
| 2 | ||
| 3 | 3 | PDP-11 |
| 4 | 4 | |
| 5 | 5 | 23/02/2009 Skeleton driver. |
| r11247 | r11248 | |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | READ16_MEMBER(pdp11_state::term_rx_status_r) |
| 51 | { | |
| 51 | { | |
| 52 | 52 | return m_term_status; |
| 53 | 53 | } |
| 54 | 54 | |
| r11247 | r11248 | |
| 74 | 74 | INPUT_PORTS_END |
| 75 | 75 | |
| 76 | 76 | |
| 77 | static MACHINE_RESET(pdp11) | |
| 78 | { | |
| 79 | // Load M9301-YA | |
| 77 | static MACHINE_RESET(pdp11) | |
| 78 | { | |
| 79 | // Load M9301-YA | |
| 80 | 80 | UINT8* user1 = machine.region("user1")->base(); |
| 81 | 81 | UINT8* maincpu = machine.region("maincpu")->base(); |
| 82 | 82 | int i; |
| 83 | ||
| 83 | ||
| 84 | 84 | for(i=0;i<0x100;i++) { |
| 85 | 85 | UINT8 nib1 = user1[i+0x000] ^ 0x00; |
| 86 | 86 | UINT8 nib2 = user1[i+0x200] ^ 0x01; |
| 87 | 87 | UINT8 nib3 = user1[i+0x400] ^ 0x0f; |
| 88 | 88 | UINT8 nib4 = user1[i+0x600] ^ 0x0e; |
| 89 | ||
| 89 | ||
| 90 | 90 | maincpu[0xea00 + i*2 + 1] = (nib1 << 4) + nib2; |
| 91 | 91 | maincpu[0xea00 + i*2 + 0] = (nib3 << 4) + nib4; |
| 92 | 92 | } |
| r11247 | r11248 | |
| 95 | 95 | UINT8 nib2 = user1[i+0x200] ^ 0x01; |
| 96 | 96 | UINT8 nib3 = user1[i+0x400] ^ 0x0f; |
| 97 | 97 | UINT8 nib4 = user1[i+0x600] ^ 0x0e; |
| 98 | ||
| 98 | ||
| 99 | 99 | maincpu[0xf600 + (i-0x100)*2 + 1] = (nib1 << 4) + nib2; |
| 100 | 100 | maincpu[0xf600 + (i-0x100)*2 + 0] = (nib3 << 4) + nib4; |
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | static MACHINE_RESET(pdp11ub2) | |
| 105 | { | |
| 104 | static MACHINE_RESET(pdp11ub2) | |
| 105 | { | |
| 106 | 106 | // Load M9312 |
| 107 | 107 | UINT8* user1 = machine.region("user1")->base(); |
| 108 | 108 | UINT8* maincpu = machine.region("maincpu")->base(); |
| 109 | 109 | int i; |
| 110 | ||
| 110 | ||
| 111 | 111 | // 3 2 1 8 |
| 112 | 112 | // 7 6 5 4 |
| 113 | 113 | // ~11 ~10 9 0 |
| 114 | // 15 14 13 ~12 | |
| 114 | // 15 14 13 ~12 | |
| 115 | 115 | for(i=0;i<0x100;i++) { |
| 116 | 116 | UINT8 nib1 = user1[i*4+0]; |
| 117 | 117 | UINT8 nib2 = user1[i*4+1]; |
| 118 | 118 | UINT8 nib3 = user1[i*4+2]; |
| 119 | 119 | UINT8 nib4 = user1[i*4+3]; |
| 120 | ||
| 120 | ||
| 121 | 121 | maincpu[0xea00 + i*2 + 0] = (nib2 << 4) + ((nib1 & 0x0e) | (nib3 & 1)); |
| 122 | 122 | maincpu[0xea00 + i*2 + 1] = ((nib4 ^ 0x01)<<4) + ((nib1 & 0x01) | ((nib3 ^ 0x0c) & 0x0e)); |
| 123 | 123 | } |
| 124 | ||
| 124 | ||
| 125 | 125 | cpu_set_reg(machine.device("maincpu"), T11_PC, 0xea10); // diag*/ |
| 126 | //cpu_set_reg(machine.device("maincpu"), T11_PC, 0xea64); | |
| 126 | //cpu_set_reg(machine.device("maincpu"), T11_PC, 0xea64); // no-diag | |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | static MACHINE_RESET(pdp11qb) | |
| 129 | static MACHINE_RESET(pdp11qb) | |
| 130 | 130 | { |
| 131 | 131 | cpu_set_reg(machine.device("maincpu"), T11_PC, 0xea00); |
| 132 | 132 | } |
| r11247 | r11248 | |
| 159 | 159 | MCFG_CPU_PROGRAM_MAP(pdp11_mem) |
| 160 | 160 | |
| 161 | 161 | MCFG_MACHINE_RESET(pdp11) |
| 162 | ||
| 162 | ||
| 163 | 163 | /* video hardware */ |
| 164 | 164 | MCFG_FRAGMENT_ADD( generic_terminal ) |
| 165 | 165 | MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, terminal_intf) |
| r11247 | r11248 | |
| 171 | 171 | |
| 172 | 172 | static MACHINE_CONFIG_DERIVED( pdp11qb, pdp11 ) |
| 173 | 173 | MCFG_MACHINE_RESET(pdp11qb) |
| 174 | ||
| 174 | ||
| 175 | 175 | MCFG_CPU_MODIFY("maincpu") |
| 176 | 176 | MCFG_CPU_CONFIG(mxv11_data) |
| 177 | 177 | MCFG_CPU_PROGRAM_MAP(pdp11qb_mem) |
| r11247 | r11248 | |
| 179 | 179 | |
| 180 | 180 | /* ROM definition */ |
| 181 | 181 | ROM_START( pdp11ub ) |
| 182 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) | |
| 182 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) | |
| 183 | 183 | ROM_REGION( 0x1000, "user1", ROMREGION_ERASEFF ) |
| 184 | 184 | ROM_LOAD( "23-034a9.bin", 0x0000, 0x0200, CRC(01c5d78d) SHA1(b447c67bfd5134c142240a919f23a949e1953fb2)) |
| 185 | 185 | ROM_LOAD( "23-035a9.bin", 0x0200, 0x0200, CRC(c456df6c) SHA1(188c8ece6a2d67911016f55dd22b698a40aff515)) |
| r11247 | r11248 | |
| 188 | 188 | ROM_END |
| 189 | 189 | |
| 190 | 190 | ROM_START( pdp11ub2 ) |
| 191 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) | |
| 191 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) | |
| 192 | 192 | ROM_REGION( 0x1000, "user1", ROMREGION_ERASEFF ) |
| 193 | 193 | ROM_LOAD( "23-248f1.bin", 0x0000, 0x0400, CRC(ecda1a6d) SHA1(b2bf770dda349fdd469235871564280baf06301d)) |
| 194 | 194 | //ROM_LOAD( "23-616f1-1666.bin", 0x0000, 0x0400, CRC(a3dfb5aa) SHA1(7f06c624ae3fbb49535258b8722b5a3c548da3ba)) |
| 195 | 195 | ROM_END |
| 196 | 196 | |
| 197 | 197 | ROM_START( pdp11qb ) |
| 198 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) | |
| 198 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) | |
| 199 | 199 | ROM_LOAD16_BYTE( "m7195fa.1", 0xc000, 0x2000, CRC(0fa58752) SHA1(4bcd006790a60f2998ee8377ac5e2c18ef330930)) |
| 200 | 200 | ROM_LOAD16_BYTE( "m7195fa.2", 0xc001, 0x2000, CRC(15b6f60c) SHA1(80dd4f8ca3c27babb5e75111b04241596a07c53a)) |
| 201 | 201 | ROM_END |
| 202 | 202 | /* Driver */ |
| 203 | 203 | |
| 204 | 204 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 205 | COMP( ????, pdp11ub, 0, 0, pdp11, pdp11, 0, "Digital Equipment Corporation", "PDP-11 [Unibus](M9301-YA)", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 206 | COMP( ????, pdp11ub2, pdp11ub, 0, pdp11ub2, pdp11, 0, "Digital Equipment Corporation", "PDP-11 [Unibus](M9312)", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 207 | COMP( ????, pdp11qb, pdp11ub, 0, pdp11qb, pdp11, 0, "Digital Equipment Corporation", "PDP-11 [Q-BUS] (M7195 - MXV11)", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 205 | COMP( ????, pdp11ub, 0, 0, pdp11, pdp11, 0, "Digital Equipment Corporation", "PDP-11 [Unibus](M9301-YA)", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 206 | COMP( ????, pdp11ub2, pdp11ub, 0, pdp11ub2, pdp11, 0, "Digital Equipment Corporation", "PDP-11 [Unibus](M9312)", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 207 | COMP( ????, pdp11qb, pdp11ub, 0, pdp11qb, pdp11, 0, "Digital Equipment Corporation", "PDP-11 [Q-BUS] (M7195 - MXV11)", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 208 | 208 |
| r11247 | r11248 | |
|---|---|---|
| 25 | 25 | : driver_device(machine, config), |
| 26 | 26 | m_hgdc(*this, "upd7220"), |
| 27 | 27 | m_cass(*this, "cassette"), |
| 28 | ||
| 28 | ||
| 29 | 29 | { } |
| 30 | 30 | |
| 31 | 31 | required_device<upd7220_device> m_hgdc; |
| r11247 | r11248 | |
| 150 | 150 | { |
| 151 | 151 | a5105_state *state = space->machine().driver_data<a5105_state>(); |
| 152 | 152 | /* |
| 153 | xxxx ---- unknown | |
| 154 | ---- xxxx keyboard mux | |
| 155 | */ | |
| 153 | xxxx ---- unknown | |
| 154 | ---- xxxx keyboard mux | |
| 155 | */ | |
| 156 | 156 | |
| 157 | 157 | state->m_key_mux = data; |
| 158 | 158 | } |
| r11247 | r11248 | |
| 161 | 161 | { |
| 162 | 162 | a5105_state *state = space->machine().driver_data<a5105_state>(); |
| 163 | 163 | /*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 | |
| 168 | 168 | */ |
| 169 | 169 | switch (data & 6) |
| 170 | 170 | { |
| r11247 | r11248 | |
| 217 | 217 | static ADDRESS_MAP_START( a5105_io , AS_IO, 8) |
| 218 | 218 | ADDRESS_MAP_UNMAP_HIGH |
| 219 | 219 | 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? | |
| 223 | 223 | AM_RANGE(0x98, 0x99) AM_DEVREADWRITE_MODERN("upd7220", upd7220_device, read, write) |
| 224 | 224 | |
| 225 | 225 | AM_RANGE(0x9c, 0x9c) AM_WRITE(pcg_val_w) |
| 226 | // | |
| 226 | // AM_RANGE(0x9d, 0x9d) crtc area (ff-based), palette routes here | |
| 227 | 227 | AM_RANGE(0x9e, 0x9e) AM_WRITE(pcg_addr_w) |
| 228 | 228 | |
| 229 | // | |
| 229 | // AM_RANGE(0xa0, 0xa1) ay8910? | |
| 230 | 230 | AM_RANGE(0xa8, 0xa8) AM_READWRITE(a5105_memsel_r,a5105_memsel_w) |
| 231 | 231 | AM_RANGE(0xa9, 0xa9) AM_READ(key_r) |
| 232 | 232 | AM_RANGE(0xaa, 0xaa) AM_READWRITE(key_mux_r,key_mux_w) |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | 3 | Skeleton driver for Applix 1616 computer |
| 4 | ||
| 4 | ||
| 5 | 5 | See for docs: http;//www.microbee-mspp.org.au |
| 6 | 6 | You need to sign up and make an introductory thread. |
| 7 | 7 | Then you will be granted permission to visit the repository. |
| 8 | ||
| 9 | TODO: everything! | |
| 8 | ||
| 9 | TODO: everything! | |
| 10 | 10 | - Required device Z8530 Z80SCC (not emulated, but it is just a dual-channel |
| 11 | 11 | serial controller, possibly just like the other ones) |
| 12 | 12 | - Keyboard is a standard pc keyboard |
| r11247 | r11248 | |
|---|---|---|
| 478 | 478 | char filename[MAX_DRIVER_NAME_CHARS + 5]; |
| 479 | 479 | |
| 480 | 480 | sprintf(filename,"%s.hack", machine.system().name); |
| 481 | ||
| 481 | ||
| 482 | 482 | state->m_file = global_alloc(emu_file(machine.options().memcard_directory(), OPEN_FLAG_WRITE)); |
| 483 | 483 | state->m_file->open(filename); |
| 484 | 484 | } |
| r11247 | r11248 | |
|---|---|---|
| 786 | 786 | |
| 787 | 787 | MCFG_VIDEO_START(macv8) |
| 788 | 788 | MCFG_VIDEO_RESET(macrbv) |
| 789 | ||
| 789 | ||
| 790 | 790 | MCFG_SCREEN_MODIFY("screen") |
| 791 | 791 | MCFG_SCREEN_UPDATE(macrbvvram) |
| 792 | 792 | |
| r11247 | r11248 | |
| 818 | 818 | |
| 819 | 819 | MCFG_VIDEO_START(macsonora) |
| 820 | 820 | MCFG_VIDEO_RESET(macrbv) |
| 821 | ||
| 821 | ||
| 822 | 822 | MCFG_SCREEN_MODIFY("screen") |
| 823 | 823 | MCFG_SCREEN_UPDATE(macrbvvram) |
| 824 | 824 |
| r11247 | r11248 | |
|---|---|---|
| 556 | 556 | MCFG_CARTSLOT_EXTENSION_LIST("nes,unf") |
| 557 | 557 | MCFG_CARTSLOT_NOT_MANDATORY |
| 558 | 558 | MCFG_CARTSLOT_LOAD(nes_cart) |
| 559 | MCFG_CARTSLOT_PARTIALHASH(nes_partialhash) | |
| 559 | MCFG_CARTSLOT_PARTIALHASH(nes_partialhash) | |
| 560 | 560 | |
| 561 | 561 | MCFG_FLOPPY_DRIVE_ADD(FLOPPY_0, nes_floppy_config) |
| 562 | 562 | MACHINE_CONFIG_END |
| r11247 | r11248 | |
|---|---|---|
| 380 | 380 | |
| 381 | 381 | MCFG_GFXDECODE(mz800) |
| 382 | 382 | MCFG_VIDEO_START(mz800) |
| 383 | ||
| 383 | ||
| 384 | 384 | MCFG_SCREEN_MODIFY("screen") |
| 385 | 385 | MCFG_SCREEN_UPDATE(mz800) |
| 386 | 386 |
| r11247 | r11248 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | NeXT | |
| 4 | 4 | |
| 5 | ||
| 5 | 05/11/2009 Skeleton driver. | |
| 6 | 6 | |
| 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; | |
| 9 | 9 | |
| 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) | |
| 13 | 13 | |
| 14 | 14 | ****************************************************************************/ |
| 15 | 15 | |
| r11247 | r11248 | |
| 93 | 93 | if(!space->debugger_access()) |
| 94 | 94 | printf("%08x\n",cpu_get_pc(&space->device())); |
| 95 | 95 | /* |
| 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 | */ | |
| 116 | 116 | |
| 117 | 117 | return state->m_scr2; |
| 118 | 118 | } |
| r11247 | r11248 | |
| 128 | 128 | static READ32_HANDLER( next_scr1_r ) |
| 129 | 129 | { |
| 130 | 130 | /* |
| 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 | */ | |
| 139 | 139 | |
| 140 | 140 | return 0x00012002; // TODO |
| 141 | 141 | } |
| r11247 | r11248 | |
|---|---|---|
| 188 | 188 | static TIMER_CALLBACK( floppy_motor_off_tick ) |
| 189 | 189 | { |
| 190 | 190 | prof80_state *state = machine.driver_data<prof80_state>(); |
| 191 | ||
| 191 | ||
| 192 | 192 | state->floppy_motor_off(); |
| 193 | 193 | } |
| 194 | 194 |
| r11247 | r11248 | |
|---|---|---|
| 155 | 155 | MCFG_CPU_ADD(KB_COP421_TAG, COP421, 3900000) // ? |
| 156 | 156 | MCFG_CPU_IO_MAP(kb_cop_io_map) |
| 157 | 157 | MCFG_CPU_CONFIG(cop_intf) |
| 158 | ||
| 158 | ||
| 159 | 159 | MCFG_CPU_ADD("fdccpu", M6504, 2000000) /* 16.000 MHz / 8 in when DIS asserted, 16.000 MHz / 9 otherwise (?) */ |
| 160 | 160 | MCFG_CPU_PROGRAM_MAP(lisa_fdc_map) |
| 161 | 161 |
| r11247 | r11248 | |
|---|---|---|
| 770 | 770 | { |
| 771 | 771 | { "ctc" }, |
| 772 | 772 | { "z80pio_0" }, |
| 773 | // | |
| 773 | // { "upd765" }, /* TODO */ | |
| 774 | 774 | { NULL } |
| 775 | 775 | }; |
| 776 | 776 |
| r11247 | r11248 | |
|---|---|---|
| 293 | 293 | MCFG_MC6845_ADD("crtc", MC6845, 2000000, kaypro2x_crtc) /* comes out of ULA - needs to be measured */ |
| 294 | 294 | |
| 295 | 295 | MCFG_VIDEO_START( kaypro ) |
| 296 | ||
| 296 | ||
| 297 | 297 | /* sound hardware */ |
| 298 | 298 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 299 | 299 | MCFG_SOUND_ADD("beep", BEEP, 0) |
| r11247 | r11248 | |
|---|---|---|
| 453 | 453 | READ8_MEMBER( pc8001_state::dma_io_r ) |
| 454 | 454 | { |
| 455 | 455 | address_space *program = m_maincpu->memory().space(AS_PROGRAM); |
| 456 | ||
| 456 | ||
| 457 | 457 | return program->read_byte(offset); |
| 458 | 458 | } |
| 459 | 459 | |
| 460 | 460 | WRITE8_MEMBER( pc8001_state::dma_io_w ) |
| 461 | 461 | { |
| 462 | 462 | address_space *program = m_maincpu->memory().space(AS_PROGRAM); |
| 463 | ||
| 463 | ||
| 464 | 464 | program->write_byte(offset, data); |
| 465 | 465 | } |
| 466 | 466 | |
| r11247 | r11248 | |
| 498 | 498 | |
| 499 | 499 | /* setup memory banking */ |
| 500 | 500 | UINT8 *ram = ram_get_ptr(m_ram); |
| 501 | ||
| 501 | ||
| 502 | 502 | memory_configure_bank(machine(), "bank1", 1, 1, machine().region("n80")->base(), 0); |
| 503 | 503 | program->install_read_bank(0x0000, 0x5fff, "bank1"); |
| 504 | 504 | program->unmap_write(0x0000, 0x5fff); |
| r11247 | r11248 | |
|---|---|---|
| 33 | 33 | - Blue Moon Story: moans with a kanji msg;. |
| 34 | 34 | - Bubblegum Crisis: crashes due of a spurious irq (works if you soft reset the emulation when it triggers the halt opcode); |
| 35 | 35 | - Can Can Bunny: bitmap artifacts on intro, could be either ALU or floppy issues; |
| 36 | ||
| 36 | - Fire Hawk: tries to r/w the opn ports (probably crashed due to floppy?) | |
| 37 | 37 | - Grobda: palette is ugly (parent pc8801 only); |
| 38 | 38 | - Hang-On: typical busted attributes for a N-BASIC game |
| 39 | 39 | - Wanderers from Ys: user data disk looks screwed? It loads with everything as maximum as per now ... |
| r11247 | r11248 | |
| 66 | 66 | * with 0x2000 ROM size you can load 2d and 2hd floppies; |
| 67 | 67 | - Later models have palette bugs with some games (Alphos, Tokyo Nampa Street). |
| 68 | 68 | 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 | ||
| 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) | |
| 70 | 70 | |
| 71 | 71 | Bankswitch Notes: |
| 72 | 72 | - 0x31 - graphic banking |
| r11247 | r11248 | |
|---|---|---|
| 3 | 3 | Skeleton driver for 68k Single Board Computer |
| 4 | 4 | |
| 5 | 5 | 29/03/2011 |
| 6 | ||
| 6 | ||
| 7 | 7 | http://www.kmitl.ac.th/~kswichit/68k/68k.html |
| 8 | ||
| 8 | ||
| 9 | 9 | TODO: |
| 10 | 10 | - Add RTC (type DS12887) |
| 11 | 11 | - Add UART (type mc6850) |
| r11247 | r11248 | |
| 49 | 49 | UINT8 m_term_data; |
| 50 | 50 | }; |
| 51 | 51 | |
| 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 | |
| 53 | 53 | READ16_MEMBER( c68ksbc_state::c68ksbc_status_r ) |
| 54 | 54 | { |
| 55 | 55 | if (m_term_data) |
| r11247 | r11248 | |
|---|---|---|
| 116 | 116 | DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0), /* interrupt handler */ |
| 117 | 117 | DEVCB_DRIVER_LINE_MEMBER(lc80_state, ctc_z0_w), /* ZC/TO0 callback */ |
| 118 | 118 | DEVCB_DRIVER_LINE_MEMBER(lc80_state, ctc_z1_w), /* ZC/TO1 callback */ |
| 119 | DEVCB_DRIVER_LINE_MEMBER(lc80_state, ctc_z2_w) | |
| 119 | DEVCB_DRIVER_LINE_MEMBER(lc80_state, ctc_z2_w) | |
| 120 | 120 | }; |
| 121 | 121 | |
| 122 | 122 | /* Z80-PIO Interface */ |
| r11247 | r11248 | |
|---|---|---|
| 227 | 227 | |
| 228 | 228 | MCFG_MACHINE_RESET( apple1 ) |
| 229 | 229 | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 230 | ||
| 230 | ||
| 231 | 231 | MCFG_SCREEN_ADD("screen", RASTER) |
| 232 | 232 | MCFG_SCREEN_REFRESH_RATE(60) |
| 233 | 233 | /* Video is blanked for 70 out of 262 scanlines per refresh cycle. |
| r11247 | r11248 | |
| 243 | 243 | MCFG_SCREEN_VISIBLE_AREA(0, 40 * 7 - 1, 0, 24 * 8 - 1) |
| 244 | 244 | MCFG_SCREEN_UPDATE(apple1) |
| 245 | 245 | |
| 246 | ||
| 246 | ||
| 247 | 247 | MCFG_GFXDECODE(apple1) |
| 248 | 248 | MCFG_PALETTE_LENGTH(2) |
| 249 | 249 | MCFG_PALETTE_INIT(black_and_white) |
| r11247 | r11248 | |
|---|---|---|
| 157 | 157 | 59x7268.bin: Second late IBM 5160 PC/XT BIOS/BASIC 1.1. vissible in memory at F8000-FFFFF. (EPROM) |
| 158 | 158 | ROM_LOAD( "62x0819.bin", 0xf0000, 0x8000, CRC(758ff036) SHA1(045e27a70407d89b7956ecae4d275bd2f6b0f8e2)) |
| 159 | 159 | ROM_LOAD( "59x7268.bin", 0xf8000, 0x8000, CRC(4f417635) SHA1(daa61762d3afdd7262e34edf1a3d2df9a05bcebb)) |
| 160 | ||
| 160 | ||
| 161 | 161 | 78x7460.bin: IBM 5162 PC/XT 286 BIOS. vissible in even memory at F0000-FFFFF (mirror at E0000-EFFFF). |
| 162 | 162 | 78x7461.bin: IBM 5162 PC/XT 286 BIOS. vissible in odd memory at F0000-FFFFF (mirror at E0000-EFFFF). |
| 163 | 163 | ROM_LOAD16_BYTE( "78x7460.bin", 0xf0000, 0x8000, CRC(1db4bd8f) SHA1(7be669fbb998d8b4626fefa7cd1208d3b2a88c31)) |
| r11247 | r11248 | |
| 207 | 207 | |
| 208 | 208 | 59x7291.bin: Second version Hard drive controller ROM. Visible in memory at C8000-C8FFF. |
| 209 | 209 | ROM_LOAD( "59x7291.bin", 0xc8000, 0x1000, CRC(25920437) SHA1(de970bcc5c6f1b588fbc4c76617165ce8eb2bf1d)) |
| 210 | ||
| 210 | ||
| 211 | 211 | 104839e.bin: Hard drive controller Z80 firmware ROM. Not mapped in PC memory. (Mapped in Z80 microcontroller memory at 0000-7FFF) |
| 212 | 212 | ROM_LOAD( "104839e.bin", 0x0000, 0x1000, CRC(3ad32fcc) SHA1(0127fa520aaee91285cb46a640ed835b4554e4b3)) |
| 213 | 213 | |
| r11247 | r11248 | |
| 225 | 225 | ROM_LOAD( "6137322.bin", 0x8000, 0x8000, CRC(5e6cc82f) SHA1(45b3ffb5a9c51986862f8d47b3e03dcaaf4073d5)) |
| 226 | 226 | ROM_LOAD( "6137323.bin", 0x0000, 0x8000, CRC(f564f342) SHA1(c5ef17fd1569043cb59f61faf828ea8b0ee95526)) |
| 227 | 227 | |
| 228 | ||
| 228 | ||
| 229 | 229 | XC215 C 0.bin: IBM Music feature card Z80 firmware ROM. Not mapped in PC memory. (Mapped in Z80 microcontroller memory at 0000-7FFF) |
| 230 | 230 | ROM_LOAD( "xc215 c 0.bin", 0x0000, 0x8000, CRC(28c58a4f) SHA1(e7edf28d20e6c146e3144526c89cd6beea64663b)) |
| 231 | 231 | |
| r11247 | r11248 | |
| 288 | 288 | |
| 289 | 289 | static INPUT_PORTS_START( ibm5150 ) |
| 290 | 290 | 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 */ | |
| 293 | 293 | PORT_INCLUDE( pcvideo_cga ) |
| 294 | 294 | INPUT_PORTS_END |
| 295 | 295 | |
| r11247 | r11248 | |
| 297 | 297 | |
| 298 | 298 | static const kb_keytronic_interface pc_keytronic_intf = |
| 299 | 299 | { |
| 300 | DEVCB_DEVICE_LINE_MEMBER("mb", ibm5160_mb_device, keyboard_clock_w), | |
| 300 | DEVCB_DEVICE_LINE_MEMBER("mb", ibm5160_mb_device, keyboard_clock_w), | |
| 301 | 301 | DEVCB_DEVICE_LINE_MEMBER("mb", ibm5160_mb_device, keyboard_data_w) |
| 302 | 302 | }; |
| 303 | 303 | |
| r11247 | r11248 | |
| 307 | 307 | DEVCB_DEVICE_LINE("keyboard", kb_keytronic_data_w) |
| 308 | 308 | }; |
| 309 | 309 | |
| 310 | static DEVICE_INPUT_DEFAULTS_START(cga) | |
| 310 | static DEVICE_INPUT_DEFAULTS_START(cga) | |
| 311 | 311 | DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x20) |
| 312 | 312 | DEVICE_INPUT_DEFAULTS_END |
| 313 | 313 | |
| r11247 | r11248 | |
| 320 | 320 | |
| 321 | 321 | MCFG_IBM5150_MOTHERBOARD_ADD("mb","maincpu",pc_keytronic_keyboard_intf) |
| 322 | 322 | MCFG_DEVICE_INPUT_DEFAULTS(cga) |
| 323 | ||
| 323 | ||
| 324 | 324 | /* video hardware */ |
| 325 | 325 | MCFG_FRAGMENT_ADD( pcvideo_cga ) |
| 326 | 326 | |
| r11247 | r11248 | |
| 348 | 348 | |
| 349 | 349 | MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu",pc_keytronic_keyboard_intf) |
| 350 | 350 | MCFG_DEVICE_INPUT_DEFAULTS(cga) |
| 351 | ||
| 351 | ||
| 352 | 352 | /* video hardware */ |
| 353 | 353 | MCFG_FRAGMENT_ADD( pcvideo_cga ) |
| 354 | 354 | |
| r11247 | r11248 | |
| 358 | 358 | |
| 359 | 359 | /* keyboard */ |
| 360 | 360 | MCFG_KB_KEYTRONIC_ADD("keyboard", pc_keytronic_intf) |
| 361 | ||
| 361 | ||
| 362 | 362 | /* internal ram */ |
| 363 | 363 | MCFG_RAM_ADD(RAM_TAG) |
| 364 | 364 | MCFG_RAM_DEFAULT_SIZE("640K") |
| r11247 | r11248 | |
|---|---|---|
| 508 | 508 | MCFG_GFXDECODE(pegasus) |
| 509 | 509 | MCFG_PALETTE_LENGTH(2) |
| 510 | 510 | MCFG_PALETTE_INIT(black_and_white) |
| 511 | ||
| 511 | ||
| 512 | 512 | /* devices */ |
| 513 | 513 | MCFG_PIA6821_ADD( "pia_s", pegasus_pia_s_intf ) |
| 514 | 514 | MCFG_PIA6821_ADD( "pia_u", pegasus_pia_u_intf ) |
| r11247 | r11248 | |
|---|---|---|
| 194 | 194 | { |
| 195 | 195 | UINT8 data; |
| 196 | 196 | /* 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 | */ | |
| 202 | 202 | data = input_port_read(machine(), "s4"); |
| 203 | 203 | return data; |
| 204 | 204 | } |
| r11247 | r11248 | |
| 206 | 206 | WRITE8_MEMBER( tsispch_state::peripheral_w ) |
| 207 | 207 | { |
| 208 | 208 | /* 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 | */ | |
| 215 | 215 | tsispch_state *state = machine().driver_data<tsispch_state>(); |
| 216 | 216 | state->m_paramReg = data; |
| 217 | 217 | cputag_set_input_line(machine(), "dsp", INPUT_LINE_RESET, BIT(data,6)?CLEAR_LINE:ASSERT_LINE); |
| r11247 | r11248 | |
| 525 | 525 | Drivers |
| 526 | 526 | ******************************************************************************/ |
| 527 | 527 | |
| 528 | /* YEAR NAME | |
| 528 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 529 | 529 | COMP( 1985, prose2k, 0, 0, prose2k, prose2k, prose2k, "Telesensory Systems Inc/Speech Plus", "Prose 2000/2020", GAME_NOT_WORKING | GAME_NO_SOUND ) |
| r11247 | r11248 | |
|---|---|---|
| 456 | 456 | MCFG_SCREEN_SIZE(512, 256) |
| 457 | 457 | MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1) |
| 458 | 458 | |
| 459 | MCFG_VIDEO_START(specialp) | |
| 459 | MCFG_VIDEO_START(specialp) | |
| 460 | 460 | MACHINE_CONFIG_END |
| 461 | 461 | |
| 462 | 462 | static MACHINE_CONFIG_DERIVED( specimx, special ) |
| r11247 | r11248 | |
| 469 | 469 | /* video hardware */ |
| 470 | 470 | MCFG_SCREEN_MODIFY("screen") |
| 471 | 471 | MCFG_SCREEN_UPDATE(specimx) |
| 472 | ||
| 472 | ||
| 473 | 473 | MCFG_VIDEO_START(specimx) |
| 474 | 474 | |
| 475 | 475 | MCFG_PALETTE_LENGTH(16) |
| r11247 | r11248 | |
|---|---|---|
| 264 | 264 | |
| 265 | 265 | There are 8 LEDs, and an 8 digit 14 segment VFD with commas and periods. |
| 266 | 266 | This display is the same one as can be found on the speak and spell. |
| 267 | ||
| 267 | ||
| 268 | 268 | A * comma |
| 269 | 269 | *********** * |
| 270 | 270 | * *I *J K* * |
| 271 | 271 | F* * * * *B |
| 272 | 272 | * * * * * |
| 273 | G**** *****H | |
| 273 | G**** *****H | |
| 274 | 274 | * * * * * |
| 275 | 275 | E* * * * *C |
| 276 | 276 | * *N *M L* * |
| r11247 | r11248 | |
| 378 | 378 | 6 - LED column G, button column G |
| 379 | 379 | 7 - LED column H, button column H |
| 380 | 380 | 8 - button column I |
| 381 | 9 - | |
| 381 | 9 - | |
| 382 | 382 | |
| 383 | 383 | The rows/columns are indicated on the game board: |
| 384 | 384 | |
| 385 | 385 | |
| 386 | ABCDEFGH I | |
| 386 | ABCDEFGH I | |
| 387 | 387 | -------------- |
| 388 | 388 | | | 8 |
| 389 | 389 | | | 7 |
| 390 | | | 6 | |
| 390 | | | 6 | |
| 391 | 391 | | | 5 |
| 392 | 392 | | | 4 |
| 393 | 393 | | | 3 |
| r11247 | r11248 | |
| 436 | 436 | Hardware: |
| 437 | 437 | --------- |
| 438 | 438 | |
| 439 | On the board are 13 chips. | |
| 439 | On the board are 13 chips. | |
| 440 | 440 | |
| 441 | 441 | The CPU is a Z80A running at 3.9MHz, with 20K of ROM and 1K of RAM mapped. |
| 442 | 442 | I/O is composed of an 8255 triple port adaptor, and a Z80A PIO parallel I/O |
| r11247 | r11248 | |
| 446 | 446 | same as on the other talking chess boards. The TSI chip is running at 26.37KHz. |
| 447 | 447 | It uses a 470K resistor and a 100pf capacitor. |
| 448 | 448 | |
| 449 | The "perfect" clock would be 1/RC most likely (actually this will be skewed a tad by | |
| 449 | The "perfect" clock would be 1/RC most likely (actually this will be skewed a tad by | |
| 450 | 450 | duty cycle of the oscillator) which with those parts values gives 21.27KHz. The |
| 451 | 451 | formula is probably more likely to be 1/1.2RC or so. |
| 452 | 452 | |
| r11247 | r11248 | |
| 461 | 461 | Memory map: |
| 462 | 462 | ----------- |
| 463 | 463 | |
| 464 | 0000-1FFF: 8K ROM 101-64018 | |
| 464 | 0000-1FFF: 8K ROM 101-64018 | |
| 465 | 465 | 2000-3FFF: 8K ROM 101-64019 (also used on the sensory champ. chess challenger) |
| 466 | 466 | 4000-5FFF: 4K ROM 101-32024 |
| 467 | 467 | 6000-7FFF: 1K of RAM (2114 * 2) |
| r11247 | r11248 | |
| 475 | 475 | |
| 476 | 476 | Decoding isn't performed using a selector, but instead address lines are used. |
| 477 | 477 | |
| 478 | A2 connects to /CE on the 8255 | |
| 478 | A2 connects to /CE on the 8255 | |
| 479 | 479 | A3 connects to /CE on the Z80A PIO |
| 480 | 480 | |
| 481 | 481 | A1 connects to control/data select on PIO & A0 of 8255 |
| r11247 | r11248 | |
| 1169 | 1169 | |
| 1170 | 1170 | ROM_REGION(0x1000, "mcu", 0) |
| 1171 | 1171 | ROM_LOAD("100-1009.bin", 0x0000, 0x0400, CRC(60eb343f) SHA1(8a63e95ebd62e123bdecc330c0484a47c354bd1a)) |
| 1172 | ||
| 1172 | ||
| 1173 | 1173 | ROM_REGION(0x2000, "speech", 0) |
| 1174 | 1174 | ROM_LOAD("101-32118.bin", 0x0000, 0x1000, CRC(A0B8BB8F) SHA1(F56852108928D5C6CACCFC8166FA347D6760A740)) |
| 1175 | 1175 | ROM_END |
| r11247 | r11248 | |
| 1182 | 1182 | |
| 1183 | 1183 | ROM_REGION(0x1000, "mcu", 0) |
| 1184 | 1184 | ROM_LOAD("100-1009.bin", 0x0000, 0x0400, CRC(60eb343f) SHA1(8a63e95ebd62e123bdecc330c0484a47c354bd1a)) |
| 1185 | ||
| 1185 | ||
| 1186 | 1186 | ROM_REGION(0x2000, "speech", 0) |
| 1187 | 1187 | ROM_LOAD("101-32118.bin", 0x0000, 0x1000, CRC(A0B8BB8F) SHA1(F56852108928D5C6CACCFC8166FA347D6760A740)) |
| 1188 | 1188 | ROM_END |
| r11247 | r11248 | |
|---|---|---|
| 54 | 54 | */ |
| 55 | 55 | |
| 56 | 56 | /* 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 | |
| 61 | 61 | |
| 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. | |
| 65 | 65 | |
| 66 | ||
| 66 | -- Cowering (2011) | |
| 67 | 67 | */ |
| 68 | 68 | |
| 69 | 69 |
| r11247 | r11248 | |
|---|---|---|
| 46 | 46 | int m_remove_led_flag; |
| 47 | 47 | int m_selecting; |
| 48 | 48 | int m_save_key_data; |
| 49 | attotime m_wait_time; | |
| 49 | attotime m_wait_time; | |
| 50 | 50 | int *m_current_field; |
| 51 | 51 | int m_confirm_board_click; |
| 52 | 52 | int m_board[64]; |
| r11247 | r11248 | |
| 383 | 383 | |
| 384 | 384 | /* Only if valid data and mouse button is pressed */ |
| 385 | 385 | |
| 386 | if (key_data && input_port_read(space->machine(), "BUTTON_L")) | |
| 386 | if (key_data && input_port_read(space->machine(), "BUTTON_L")) | |
| 387 | 387 | { |
| 388 | 388 | |
| 389 | 389 | /* Set or remove pieces */ |
| r11247 | r11248 | |
|---|---|---|
| 1921 | 1921 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1922 | 1922 | MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) |
| 1923 | 1923 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 1924 | ||
| 1924 | ||
| 1925 | 1925 | /* keyboard */ |
| 1926 | 1926 | MCFG_KB_KEYTRONIC_ADD("keyboard", pc_keytronic_intf) |
| 1927 | 1927 | |
| r11247 | r11248 | |
| 2481 | 2481 | ROMX_LOAD( "p1_t_pls.rf4", 0xfe000, 0x2000, CRC(c8210ffb) SHA1(f2d1a6c90e4708bcc56186b2fb906fa852667084), ROM_BIOS(4)) |
| 2482 | 2482 | ROM_SYSTEM_BIOS(4, "t3", "Test RAM") |
| 2483 | 2483 | ROMX_LOAD( "p1_t_ram.rf4", 0xfe000, 0x2000, CRC(e42f5a61) SHA1(ce2554eae8f0d2b6d482890dd198cf7e2d29c655), ROM_BIOS(5)) |
| 2484 | ||
| 2484 | ||
| 2485 | 2485 | ROM_LOAD( "boot_net.rf4", 0x0000, 0x2000, CRC(316c2030) SHA1(d043325596455772252e465b85321f1b5c529d0b)) // NET BUIS |
| 2486 | 2486 | ROM_REGION(0x2000,"gfx1", ROMREGION_ERASE00) |
| 2487 | 2487 | ROM_LOAD( "poisk.cga", 0x0000, 0x0800, CRC(f6eb39f0) SHA1(0b788d8d7a8e92cc612d044abcb2523ad964c200)) |
| r11247 | r11248 | |
| 2562 | 2562 | |
| 2563 | 2563 | ***************************************************************************/ |
| 2564 | 2564 | |
| 2565 | /* YEAR NAME PARENT COMPAT | |
| 2565 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ | |
| 2566 | 2566 | COMP( 1984, dgone, ibm5150, 0, pccga, pccga, pccga, "Data General", "Data General/One" , GAME_NOT_WORKING) /* CGA, 2x 3.5" disk drives */ |
| 2567 | 2567 | COMP( 1985, bw230, ibm5150, 0, pccga, bondwell, bondwell, "Bondwell Holding", "BW230 (PRO28 Series)", 0 ) |
| 2568 | 2568 | COMP( 1988, europc, ibm5150, 0, europc, europc, europc, "Schneider Rdf. AG", "EURO PC", GAME_NOT_WORKING) |
| 2569 | 2569 | |
| 2570 | 2570 | // pcjr (better graphics, better sound) |
| 2571 | COMP( 1983, ibmpcjr, ibm5150, 0, ibmpcjr, | |
| 2571 | COMP( 1983, ibmpcjr, ibm5150, 0, ibmpcjr, | |
| 2572 | 2572 | COMP( 1985, ibmpcjx, ibm5150, 0, ibmpcjr, tandy1t, pcjr, "International Business Machines", "IBM PC JX", GAME_IMPERFECT_COLORS | GAME_NOT_WORKING) |
| 2573 | 2573 | |
| 2574 | 2574 | // tandy 1000 |
| r11247 | r11248 | |
|---|---|---|
| 291 | 291 | unsigned long length, const char *functions) |
| 292 | 292 | { |
| 293 | 293 | 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); | |
| 297 | 297 | } |
| 298 | 298 | } |
| 299 | 299 |
| r11247 | r11248 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | http://retro.hansotten.nl/index.php?page=1802-cosmicos |
| 6 | 6 | |
| 7 | ||
| 7 | ||
| 8 | 8 | HEX-monitor |
| 9 | 9 | |
| 10 | 10 | 0 - start user program |
| r11247 | r11248 | |
|---|---|---|
| 135 | 135 | output_set_led_value(i,!BIT(state->m_latch_data,i)); |
| 136 | 136 | output_set_led_value(10+i,!BIT(state->m_latch_data,7-i)); |
| 137 | 137 | } |
| 138 | ||
| 139 | 138 | |
| 139 | ||
| 140 | 140 | //logerror("LCD Status Data = %d\n",data); |
| 141 | 141 | |
| 142 | 142 | |
| r11247 | r11248 | |
| 160 | 160 | else |
| 161 | 161 | output_set_led_value(LED_offset+offset,0); |
| 162 | 162 | |
| 163 | // | |
| 163 | // logerror("milano_write_led Offset = %d Data = %d\n",offset,data); | |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | static WRITE8_HANDLER ( write_led ) |
| r11247 | r11248 | |
| 214 | 214 | { |
| 215 | 215 | line=get_first_cleared_bit(state->m_latch_data); |
| 216 | 216 | tmp=input_port_read(space->machine(), board_lines[line]); |
| 217 | ||
| 217 | ||
| 218 | 218 | if (tmp != 0xff) |
| 219 | 219 | data=convert_imputmask(tmp); |
| 220 | 220 |
| r11247 | r11248 | |
|---|---|---|
| 293 | 293 | |
| 294 | 294 | /* Take care of flashing characters */ |
| 295 | 295 | //if ((chr & 0x80) && (m_framecnt & 0x08)) |
| 296 | // | |
| 296 | // chr = 0x20; | |
| 297 | 297 | |
| 298 | 298 | chr &= 0x7f; |
| 299 | 299 |
| r11247 | r11248 | |
|---|---|---|
| 2086 | 2086 | if (scanline == 224) |
| 2087 | 2087 | { |
| 2088 | 2088 | // 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. | |
| 2090 | 2090 | // * 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 | |
| 2092 | 2092 | // 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 | |
| 2094 | 2094 | // 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 | |
| 2096 | 2096 | // values > 206. |
| 2097 | 2097 | // * 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 | |
| 2100 | 2100 | // with anything between 207-224. |
| 2101 | 2101 | // * 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). | |
| 2106 | 2106 | // 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 | |
| 2108 | 2108 | // glitchness depending on the value used here. |
| 2109 | 2109 | // More work on IRQs is definitely necessary! |
| 2110 | 2110 | int ch, ctrl; |
| r11247 | r11248 | |
|---|---|---|
| 434 | 434 | MCFG_MACHINE_RESET( kc85_4 ) |
| 435 | 435 | |
| 436 | 436 | MCFG_VIDEO_START( kc85_4 ) |
| 437 | ||
| 437 | ||
| 438 | 438 | MCFG_SCREEN_MODIFY("screen") |
| 439 | 439 | MCFG_SCREEN_UPDATE( kc85_4 ) |
| 440 | 440 | MACHINE_CONFIG_END |
| Previous | 15994 Revisions | Next |