| Previous | 15994 Revisions | Next |
| r1039 Wednesday 26th September, 2007 at 23:00:59 UTC by Nathan Woods |
|---|
| 1. [Windows GUI] Sync with MAME32 2. Implemented UNUSED_FUNCTION [Oliver Stoeneberg] 3. Miscellaneous UNICODE=1/Win64 fixes [Oliver Stoeneberg] |
| [src/mess/audio] | kaypro.c mea8000.c |
| [src/mess/devices] | harddriv.c sonydriv.c |
| [src/mess/drivers] | adam.c amiga.c amstrad.c apple2.c at.c avigo.c comquest.c einstein.c intv.c ip22.c mekd2.c nc.c pc.c pcw16.c spectrum.c studio2.c ti99_4p.c vc4000.c |
| [src/mess/machine] | pdp1.c |
| [src/mess/osd/winui] | mess32ui.c |
| [src/mess/video] | kc.c m6847.c saa5050.c tx0.c |
| [src/osd/winui] | audit32.c datamap.c m32opts.c properties.c treeview.c win32ui.c |
| r1038 | r1039 | |
|---|---|---|
| 254 | 254 | static BOOL PumpMessage(void); |
| 255 | 255 | static BOOL OnIdle(HWND hWnd); |
| 256 | 256 | static void OnSize(HWND hwnd, UINT state, int width, int height); |
| 257 | static | |
| 257 | static LRESULT C | |
| 258 | 258 | |
| 259 | 259 | static void SetView(int menu_id); |
| 260 | 260 | static void ResetListView(void); |
| r1038 | r1039 | |
| 262 | 262 | static void DestroyIcons(void); |
| 263 | 263 | static void ReloadIcons(void); |
| 264 | 264 | static void PollGUIJoystick(void); |
| 265 | static void PressKey(HWND hwnd,UINT vk); | |
| 265 | //static void PressKey(HWND hwnd,UINT vk); | |
| 266 | 266 | static BOOL MameCommand(HWND hwnd,int id, HWND hwndCtl, UINT codeNotify); |
| 267 | 267 | static void KeyboardKeyDown(int syskey, int vk_code, int special); |
| 268 | 268 | static void KeyboardKeyUp(int syskey, int vk_code, int special); |
| 269 | 269 | static void KeyboardStateClear(void); |
| 270 | 270 | |
| 271 | 271 | static void UpdateStatusBar(void); |
| 272 | static BOOL PickerHitTest(HWND hWnd); | |
| 272 | //static BOOL PickerHitTest(HWND hWnd); | |
| 273 | 273 | static BOOL TreeViewNotify(NMHDR *nm); |
| 274 | 274 | |
| 275 | 275 | static void ResetBackground(char *szFile); |
| r1038 | r1039 | |
| 307 | 307 | |
| 308 | 308 | static void ToggleScreenShot(void); |
| 309 | 309 | static void AdjustMetrics(void); |
| 310 | static void EnablePlayOptions(int nIndex, core_options *o); | |
| 310 | //static void EnablePlayOptions(int nIndex, core_options *o); | |
| 311 | 311 | |
| 312 | 312 | /* Icon routines */ |
| 313 | 313 | static DWORD GetShellLargeIconSize(void); |
| r1038 | r1039 | |
| 854 | 854 | /*************************************************************************** |
| 855 | 855 | External functions |
| 856 | 856 | ***************************************************************************/ |
| 857 | ||
| 857 | #if 0 | |
| 858 | 858 | static void CopyOptions(core_options *pDestOpts, core_options *pSourceOpts) |
| 859 | 859 | { |
| 860 | 860 | options_enumerator *enumerator; |
| r1038 | r1039 | |
| 877 | 877 | } |
| 878 | 878 | } |
| 879 | 879 | |
| 880 | ||
| 881 | ||
| 882 | 880 | static BOOL WaitWithMessageLoop(HANDLE hEvent) |
| 883 | 881 | { |
| 884 | 882 | DWORD dwRet; |
| r1038 | r1039 | |
| 904 | 902 | } |
| 905 | 903 | return FALSE; |
| 906 | 904 | } |
| 905 | #endif | |
| 907 | 906 | |
| 908 | 907 | static DWORD RunMAME(int nGameIndex, const play_options *playopts) |
| 909 | 908 | { |
| r1038 | r1039 | |
| 1683 | 1682 | LONG common_control_version = GetCommonControlVersion(); |
| 1684 | 1683 | int validity_failed = 0; |
| 1685 | 1684 | TCHAR* t_inpdir; |
| 1685 | LONG_PTR l; | |
| 1686 | 1686 | |
| 1687 | 1687 | dprintf("about to init options\n"); |
| 1688 | 1688 | if (!OptionsInit()) |
| r1038 | r1039 | |
| 1803 | 1803 | } |
| 1804 | 1804 | |
| 1805 | 1805 | /* subclass history window */ |
| 1806 | g_lpHistoryWndProc = (WNDPROC)(LONG)(int)GetWindowLong(GetDlgItem(hMain, IDC_HISTORY), GWL_WNDPROC); | |
| 1807 | SetWindowLong(GetDlgItem(hMain, IDC_HISTORY), GWL_WNDPROC, (LONG)HistoryWndProc); | |
| 1806 | l = GetWindowLongPtr(GetDlgItem(hMain, IDC_HISTORY), GWLP_WNDPROC); | |
| 1807 | g_lpHistoryWndProc = (WNDPROC)l; | |
| 1808 | SetWindowLongPtr(GetDlgItem(hMain, IDC_HISTORY), GWLP_WNDPROC, (LONG_PTR)HistoryWndProc); | |
| 1808 | 1809 | |
| 1809 | 1810 | /* subclass picture frame area */ |
| 1810 | g_lpPictureFrameWndProc = (WNDPROC)(LONG)(int)GetWindowLong(GetDlgItem(hMain, IDC_SSFRAME), GWL_WNDPROC); | |
| 1811 | SetWindowLong(GetDlgItem(hMain, IDC_SSFRAME), GWL_WNDPROC, (LONG)PictureFrameWndProc); | |
| 1811 | l = GetWindowLongPtr(GetDlgItem(hMain, IDC_SSFRAME), GWLP_WNDPROC); | |
| 1812 | g_lpPictureFrameWndProc = (WNDPROC)l; | |
| 1813 | SetWindowLongPtr(GetDlgItem(hMain, IDC_SSFRAME), GWLP_WNDPROC, (LONG_PTR)PictureFrameWndProc); | |
| 1812 | 1814 | |
| 1813 | 1815 | /* subclass picture area */ |
| 1814 | g_lpPictureWndProc = (WNDPROC)(LONG)(int)GetWindowLong(GetDlgItem(hMain, IDC_SSPICTURE), GWL_WNDPROC); | |
| 1815 | SetWindowLong(GetDlgItem(hMain, IDC_SSPICTURE), GWL_WNDPROC, (LONG)PictureWndProc); | |
| 1816 | l = GetWindowLongPtr(GetDlgItem(hMain, IDC_SSPICTURE), GWLP_WNDPROC); | |
| 1817 | g_lpPictureWndProc = (WNDPROC)l; | |
| 1818 | SetWindowLongPtr(GetDlgItem(hMain, IDC_SSPICTURE), GWLP_WNDPROC, (LONG_PTR)PictureWndProc); | |
| 1816 | 1819 | |
| 1817 | 1820 | /* Load the pic for the default screenshot. */ |
| 1818 | 1821 | hMissing_bitmap = LoadBitmap(GetModuleHandle(NULL),MAKEINTRESOURCE(IDB_ABOUT)); |
| r1038 | r1039 | |
| 2101 | 2104 | mame32_pool = NULL; |
| 2102 | 2105 | } |
| 2103 | 2106 | |
| 2104 | static | |
| 2107 | static LRESULT C | |
| 2105 | 2108 | { |
| 2106 | 2109 | MINMAXINFO *mminfo; |
| 2107 | 2110 | int i; |
| r1038 | r1039 | |
| 3252 | 3255 | return ""; |
| 3253 | 3256 | } |
| 3254 | 3257 | |
| 3258 | #if 0 | |
| 3255 | 3259 | static BOOL PickerHitTest(HWND hWnd) |
| 3256 | 3260 | { |
| 3257 | 3261 | RECT rect; |
| r1038 | r1039 | |
| 3259 | 3263 | DWORD res = GetMessagePos(); |
| 3260 | 3264 | LVHITTESTINFO htInfo; |
| 3261 | 3265 | |
| 3262 | ||
| 3266 | | |
| 3263 | 3267 | p = MAKEPOINTS(res); |
| 3264 | 3268 | GetWindowRect(hWnd, &rect); |
| 3265 | 3269 | htInfo.pt.x = p.x - rect.left; |
| r1038 | r1039 | |
| 3268 | 3272 | |
| 3269 | 3273 | return (! (htInfo.flags & LVHT_NOWHERE)); |
| 3270 | 3274 | } |
| 3275 | #endif | |
| 3271 | 3276 | |
| 3272 | 3277 | static BOOL TreeViewNotify(LPNMHDR nm) |
| 3273 | 3278 | { |
| r1038 | r1039 | |
| 3710 | 3715 | } |
| 3711 | 3716 | } |
| 3712 | 3717 | |
| 3718 | #if 0 | |
| 3713 | 3719 | static void PressKey(HWND hwnd, UINT vk) |
| 3714 | 3720 | { |
| 3715 | 3721 | SendMessage(hwnd, WM_KEYDOWN, vk, 0); |
| 3716 | 3722 | SendMessage(hwnd, WM_KEYUP, vk, 0xc0000000); |
| 3717 | 3723 | } |
| 3724 | #endif | |
| 3718 | 3725 | |
| 3719 | 3726 | static void SetView(int menu_id) |
| 3720 | 3727 | { |
| r1038 | r1039 | |
| 5907 | 5914 | SetWindowPos(hMain, 0, area.x, area.y, area.width, area.height, SWP_NOZORDER | SWP_SHOWWINDOW | SWP_NOACTIVATE); |
| 5908 | 5915 | } |
| 5909 | 5916 | |
| 5910 | ||
| 5917 | #if 0 | |
| 5911 | 5918 | /* Adjust options - tune them to the currently selected game */ |
| 5912 | 5919 | static void EnablePlayOptions(int nIndex, core_options *o) |
| 5913 | 5920 | { |
| 5914 | 5921 | } |
| 5922 | #endif | |
| 5915 | 5923 | |
| 5916 | 5924 | int FindIconIndex(int nIconResource) |
| 5917 | 5925 | { |
| r1038 | r1039 | |
|---|---|---|
| 147 | 147 | { |
| 148 | 148 | datamap_entry *entry; |
| 149 | 149 | |
| 150 | assert(callback_type >= 0); | |
| 150 | 151 | assert(callback_type < DCT_COUNT); |
| 151 | 152 | |
| 152 | 153 | entry = find_entry(map, dlgitem); |
| r1038 | r1039 | |
|---|---|---|
| 644 | 644 | |
| 645 | 645 | const char * GetImageTabLongName(int tab_index) |
| 646 | 646 | { |
| 647 | assert(tab_index >= 0); | |
| 647 | 648 | assert(tab_index < ARRAY_LENGTH(image_tabs_long_name)); |
| 648 | 649 | return image_tabs_long_name[tab_index]; |
| 649 | 650 | } |
| 650 | 651 | |
| 651 | 652 | const char * GetImageTabShortName(int tab_index) |
| 652 | 653 | { |
| 654 | assert(tab_index >= 0); | |
| 653 | 655 | assert(tab_index < ARRAY_LENGTH(image_tabs_short_name)); |
| 654 | 656 | return image_tabs_short_name[tab_index]; |
| 655 | 657 | } |
| r1038 | r1039 | |
| 2965 | 2967 | */ |
| 2966 | 2968 | pathname = astring_assemble_3(astring_alloc(), GetIniDir(), PATH_SEPARATOR, "source"); |
| 2967 | 2969 | match = astring_assemble_3(astring_alloc(), astring_c(pathname), PATH_SEPARATOR, "*.ini"); |
| 2968 | if ((hFindFile = | |
| 2970 | if ((hFindFile = win_find_first_file_utf8(astring_c(match), &findFileData)) != INVALID_HANDLE_VALUE) | |
| 2969 | 2971 | { |
| 2970 | 2972 | astring_free(match); |
| 2971 | 2973 | match = astring_assemble_3(astring_alloc(), astring_c(pathname), PATH_SEPARATOR, findFileData.cFileName ); |
| r1038 | r1039 | |
|---|---|---|
| 450 | 450 | va_end(marker); |
| 451 | 451 | |
| 452 | 452 | t_s = tstring_from_utf8(ConvertToWindowsNewlines(buffer)); |
| 453 | if( !t_s || | |
| 453 | if( !t_s || _t | |
| 454 | 454 | return; |
| 455 | 455 | |
| 456 | 456 | textLength = Edit_GetTextLength(hEdit); |
| r1038 | r1039 | |
|---|---|---|
| 213 | 213 | |
| 214 | 214 | void InitTree(LPFOLDERDATA lpFolderData, LPFILTER_ITEM lpFilterList) |
| 215 | 215 | { |
| 216 | LONG_PTR l; | |
| 217 | ||
| 216 | 218 | g_lpFolderData = lpFolderData; |
| 217 | 219 | g_lpFilterList = lpFilterList; |
| 218 | 220 | |
| r1038 | r1039 | |
| 220 | 222 | |
| 221 | 223 | /* this will subclass the treeview (where WM_DRAWITEM gets sent for |
| 222 | 224 | the header control) */ |
| 223 | g_lpTreeWndProc = (WNDPROC)(LONG)(int)GetWindowLong(GetTreeView(), GWL_WNDPROC); | |
| 224 | SetWindowLong(GetTreeView(), GWL_WNDPROC, (LONG)TreeWndProc); | |
| 225 | l = GetWindowLongPtr(GetTreeView(), GWLP_WNDPROC); | |
| 226 | g_lpTreeWndProc = (WNDPROC)l; | |
| 227 | SetWindowLongPtr(GetTreeView(), GWLP_WNDPROC, (LONG_PTR)TreeWndProc); | |
| 225 | 228 | } |
| 226 | 229 | |
| 227 | 230 | void DestroyTree(HWND hWnd) |
| r1038 | r1039 | |
|---|---|---|
| 207 | 207 | static void BuildDataMap(void); |
| 208 | 208 | static void ResetDataMap(HWND hWnd); |
| 209 | 209 | |
| 210 | #if 0 | |
| 210 | 211 | static BOOL IsControlOptionValue(HWND hDlg,HWND hwnd_ctrl, core_options *opts ); |
| 212 | #endif | |
| 211 | 213 | |
| 212 | 214 | static void UpdateBackgroundBrush(HWND hwndTab); |
| 213 | 215 | HBRUSH hBkBrush; |
| r1038 | r1039 | |
| 1209 | 1211 | |
| 1210 | 1212 | // Disable apply button |
| 1211 | 1213 | PropSheet_UnChanged(GetParent(hDlg), hDlg); |
| 1212 | SetWindowLong(hDlg, DWL_MSGRESULT, PSNRET_NOERROR); | |
| 1214 | SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR); | |
| 1213 | 1215 | |
| 1214 | 1216 | // If we a closing, free the core_options |
| 1215 | 1217 | if (bClosing) |
| r1038 | r1039 | |
| 2245 | 2247 | #endif // MESS |
| 2246 | 2248 | } |
| 2247 | 2249 | |
| 2250 | #if 0 | |
| 2248 | 2251 | BOOL IsControlOptionValue(HWND hDlg,HWND hwnd_ctrl, core_options *opts ) |
| 2249 | 2252 | { |
| 2250 | 2253 | int control_id = GetWindowLong(hwnd_ctrl, GWL_ID); |
| r1038 | r1039 | |
| 2311 | 2314 | |
| 2312 | 2315 | return TRUE; |
| 2313 | 2316 | } |
| 2317 | #endif | |
| 2314 | 2318 | |
| 2315 | ||
| 2316 | 2319 | static void SetStereoEnabled(HWND hWnd, int nIndex) |
| 2317 | 2320 | { |
| 2318 | 2321 | BOOL enabled = FALSE; |
| r1038 | r1039 | |
|---|---|---|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | |
| 178 | ||
| 178 | #ifdef UNUSED_FUNCTION | |
| 179 | 179 | static int device_create_mess_hd(mess_image *image, int create_format, option_resolution *create_args) |
| 180 | 180 | { |
| 181 | 181 | int err; |
| r1038 | r1039 | |
| 202 | 202 | error: |
| 203 | 203 | return INIT_FAIL; |
| 204 | 204 | } |
| 205 | #endif | |
| 205 | 206 | |
| 206 | 207 | |
| 207 | ||
| 208 | 208 | /************************************* |
| 209 | 209 | * |
| 210 | 210 | * device_unload_mess_hd() |
| r1038 | r1039 | |
|---|---|---|
| 106 | 106 | return (sony_lines & SONY_CA1) && (sony_lines & SONY_LSTRB); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | #ifdef UNUSED_FUNCTION | |
| 109 | 110 | static floppy *get_sony_floppy(mess_image *img) |
| 110 | 111 | { |
| 111 | 112 | int id = image_index_in_device(img); |
| 112 | 113 | return &sony_floppy[id]; |
| 113 | 114 | } |
| 115 | #endif | |
| 114 | 116 | |
| 115 | 117 | |
| 116 | ||
| 117 | 118 | static void load_track_data(int floppy_select) |
| 118 | 119 | { |
| 119 | 120 | int track_size; |
| r1038 | r1039 | |
|---|---|---|
| 10 | 10 | #include "sound/custom.h" |
| 11 | 11 | #include "streams.h" |
| 12 | 12 | |
| 13 | #ifdef UNUSED_FUNCTION | |
| 13 | 14 | static sound_stream *channel; |
| 15 | #endif | |
| 14 | 16 | #define BELL_FREQ 1000 |
| 15 | 17 | static INT32 bell_signal; |
| 18 | #ifdef UNUSED_FUNCTION | |
| 16 | 19 | static INT32 bell_counter; |
| 20 | #endif | |
| 17 | 21 | |
| 18 | 22 | #define CLICK_FREQ 2000 |
| 19 | 23 | static INT32 click_signal; |
| 24 | #ifdef UNUSED_FUNCTION | |
| 20 | 25 | static INT32 click_counter; |
| 26 | #endif | |
| 21 | 27 | |
| 28 | #ifdef UNUSED_FUNCTION | |
| 22 | 29 | static void kaypro_sound_update(void *param,stream_sample_t **inputs, stream_sample_t **_buffer,int length) |
| 23 | 30 | { |
| 24 | 31 | stream_sample_t *buffer = _buffer[0]; |
| r1038 | r1039 | |
| 40 | 47 | } |
| 41 | 48 | |
| 42 | 49 | |
| 43 | ||
| 44 | 50 | static int kaypro_sh_start(int clock, const struct CustomSound_interface *config) |
| 45 | 51 | { |
| 46 | 52 | channel = stream_create(0, 1, Machine->sample_rate, 0, kaypro_sound_update); |
| 47 | 53 | return 0; |
| 48 | 54 | } |
| 55 | #endif | |
| 49 | 56 | |
| 50 | 57 | |
| 51 | ||
| 52 | 58 | /****************************************************** |
| 53 | 59 | * Ring my bell ;) |
| 54 | 60 | ******************************************************/ |
| r1038 | r1039 | |
|---|---|---|
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | |
| 264 | ||
| 264 | #ifdef UNUSED_FUNCTION | |
| 265 | 265 | /* linear interpolation */ |
| 266 | 266 | static double mea8000_interp_f( double org, double dst ) |
| 267 | 267 | { |
| 268 | 268 | return org + ((dst-org) * mea8000.framepos) / mea8000.framelength; |
| 269 | 269 | } |
| 270 | #endif | |
| 270 | 271 | |
| 271 | 272 | |
| 272 | ||
| 273 | 273 | #ifndef FLOAT_MODE /* UINT16 version */ |
| 274 | 274 | |
| 275 | 275 |
| r1038 | r1039 | |
|---|---|---|
| 1487 | 1487 | } |
| 1488 | 1488 | |
| 1489 | 1489 | |
| 1490 | ||
| 1490 | #ifdef MAME_DEBUG | |
| 1491 | 1491 | static int get_beamx(void) |
| 1492 | 1492 | { |
| 1493 | 1493 | mame_time scanline_time; |
| r1038 | r1039 | |
| 1521 | 1521 | } |
| 1522 | 1522 | return result; |
| 1523 | 1523 | } |
| 1524 | #endif | |
| 1524 | 1525 | |
| 1525 | 1526 | |
| 1526 | ||
| 1527 | 1527 | INLINE void prepare_scanline(int xpos) |
| 1528 | 1528 | { |
| 1529 | 1529 | UINT8 attrs, data, attr; |
| r1038 | r1039 | |
|---|---|---|
| 227 | 227 | tx0_plot_pixel(bitmap, x, y++, color); |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | #ifdef UNUSED_FUNCTION | |
| 230 | 231 | /* draw a horizontal line */ |
| 231 | 232 | static void tx0_draw_hline(mame_bitmap *bitmap, int x, int y, int width, int color) |
| 232 | 233 | { |
| 233 | 234 | while (width--) |
| 234 | 235 | tx0_plot_pixel(bitmap, x++, y, color); |
| 235 | 236 | } |
| 237 | #endif | |
| 236 | 238 | |
| 237 | ||
| 238 | 239 | /* |
| 239 | 240 | draw the operator control panel (fixed backdrop) |
| 240 | 241 | */ |
| r1038 | r1039 | |
|---|---|---|
| 112 | 112 | video_start_generic(machine); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | #ifdef UNUSED_FUNCTION | |
| 115 | 116 | static void saa5050_vh_callback (void) |
| 116 | 117 | { |
| 117 | 118 | if (frame_count++ > 49) |
| 118 | 119 | frame_count = 0; |
| 119 | 120 | } |
| 121 | #endif | |
| 120 | 122 | |
| 121 | 123 | /* || */ |
| 122 | 124 |
| r1038 | r1039 | |
|---|---|---|
| 560 | 560 | KC85/4 video hardware |
| 561 | 561 | ***************************************************************************/ |
| 562 | 562 | |
| 563 | #ifdef UNUSED_FUNCTION | |
| 563 | 564 | static void kc85_common_vh_eof_callback(void) |
| 564 | 565 | { |
| 565 | 566 | EVENT_LIST_ITEM *pItem; |
| r1038 | r1039 | |
| 577 | 578 | logerror ("Event log reset in callback fn.\n"); |
| 578 | 579 | } |
| 579 | 580 | } |
| 581 | #endif | |
| 580 | 582 | |
| 581 | ||
| 582 | 583 | static void kc85_common_vh_start(void) |
| 583 | 584 | { |
| 584 | 585 | kc85_blink_state = 0; |
| r1038 | r1039 | |
|---|---|---|
| 37 | 37 | |
| 38 | 38 | #define LOG_SOFTWARE 0 |
| 39 | 39 | |
| 40 | #ifdef UNUSED_FUNCTION | |
| 40 | 41 | static int requested_device_type(char *tchar); |
| 42 | #endif | |
| 41 | 43 | |
| 42 | 44 | static void SoftwarePicker_OnHeaderContextMenu(POINT pt, int nColumn); |
| 43 | 45 | |
| r1038 | r1039 | |
| 190 | 192 | |
| 191 | 193 | |
| 192 | 194 | // ------------------------------------------------------------------------ |
| 193 | ||
| 195 | #ifdef UNUSED_FUNCTION | |
| 194 | 196 | static int requested_device_type(char *tchar) |
| 195 | 197 | { |
| 196 | 198 | int device = -1; |
| r1038 | r1039 | |
| 214 | 216 | |
| 215 | 217 | return device; |
| 216 | 218 | } |
| 219 | #endif | |
| 217 | 220 | |
| 218 | 221 | |
| 219 | ||
| 220 | 222 | // ------------------------------------------------------------------------ |
| 221 | 223 | // UI |
| 222 | 224 | // ------------------------------------------------------------------------ |
| r1038 | r1039 | |
| 289 | 291 | } |
| 290 | 292 | |
| 291 | 293 | |
| 292 | ||
| 294 | #ifdef UNUSED_FUNCTION | |
| 293 | 295 | static void MessHashErrorProc(const char *message) |
| 294 | 296 | { |
| 295 | 297 | SetStatusBarTextF(0, "Hash file: %s", message); |
| 296 | 298 | } |
| 299 | #endif | |
| 297 | 300 | |
| 298 | 301 | |
| 299 | ||
| 300 | 302 | static BOOL AddSoftwarePickerDirs(HWND hwndPicker, LPCSTR pszDirectories, LPCSTR pszSubDir) |
| 301 | 303 | { |
| 302 | 304 | LPCSTR s; |
| r1038 | r1039 | |
|---|---|---|
| 1029 | 1029 | mame_timer_adjust(parallel_drum.il_timer, il_phase, 0, PARALLEL_DRUM_ROTATION_TIME); |
| 1030 | 1030 | } |
| 1031 | 1031 | |
| 1032 | #ifdef UNUSED_FUNCTION | |
| 1032 | 1033 | static TIMER_CALLBACK(il_timer_callback) |
| 1033 | 1034 | { |
| 1034 | 1035 | if (parallel_drum.dba) |
| r1038 | r1039 | |
| 1046 | 1047 | parallel_drum.il_timer = mame_timer_alloc(il_timer_callback); |
| 1047 | 1048 | parallel_drum_set_il(0); |
| 1048 | 1049 | } |
| 1050 | #endif | |
| 1049 | 1051 | |
| 1050 | 1052 | /* |
| 1051 | 1053 | Open a file for drum |
| r1038 | r1039 | |
|---|---|---|
| 44 | 44 | #include "includes/comquest.h" |
| 45 | 45 | #include "devices/cartslot.h" |
| 46 | 46 | |
| 47 | #ifdef UNUSED_FUNCTION | |
| 47 | 48 | static READ8_HANDLER(comquest_read) |
| 48 | 49 | { |
| 49 | 50 | UINT8 data=0; |
| r1038 | r1039 | |
| 55 | 56 | { |
| 56 | 57 | logerror("comquest read %.4x %.2x\n",offset,data); |
| 57 | 58 | } |
| 59 | #endif | |
| 58 | 60 | |
| 59 | 61 | static ADDRESS_MAP_START( comquest_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 60 | 62 | // { 0x0000, 0x7fff, MRA8_BANK1 }, |
| r1038 | r1039 | |
|---|---|---|
| 1246 | 1246 | /**********************************************************************************************************/ |
| 1247 | 1247 | /* NC200 hardware */ |
| 1248 | 1248 | |
| 1249 | ||
| 1249 | #ifdef UNUSED_FUNCTION | |
| 1250 | 1250 | static WRITE8_HANDLER(nc200_display_memory_start_w) |
| 1251 | 1251 | { |
| 1252 | 1252 | /* bit 7: A15 */ |
| r1038 | r1039 | |
| 1258 | 1258 | #ifdef VERBOSE |
| 1259 | 1259 | logerror("disp memory w: %04x\n", (int) nc_display_memory_start); |
| 1260 | 1260 | #endif |
| 1261 | ||
| 1262 | 1261 | } |
| 1262 | #endif | |
| 1263 | 1263 | |
| 1264 | 1264 | static void nc200_printer_handshake_in(int number, int data, int mask) |
| 1265 | 1265 | { |
| r1038 | r1039 | |
| 1362 | 1362 | NULL, |
| 1363 | 1363 | }; |
| 1364 | 1364 | |
| 1365 | #ifdef UNUSED_FUNCTION | |
| 1365 | 1366 | static void nc200_floppy_drive_index_callback(int drive_id) |
| 1366 | 1367 | { |
| 1367 | 1368 | #ifdef NC200_DEBUG |
| r1038 | r1039 | |
| 1371 | 1372 | |
| 1372 | 1373 | // nc_update_interrupts(); |
| 1373 | 1374 | } |
| 1375 | #endif | |
| 1374 | 1376 | |
| 1375 | 1377 | static void nc200_machine_reset(running_machine *machine) |
| 1376 | 1378 | { |
| r1038 | r1039 | |
|---|---|---|
| 209 | 209 | AM_RANGE(0xE0, 0xFF) AM_READWRITE( adam_paddle_r, SN76496_0_w ) |
| 210 | 210 | ADDRESS_MAP_END |
| 211 | 211 | |
| 212 | #ifdef UNUSED_FUNCTION | |
| 212 | 213 | /* |
| 213 | 214 | I do now know the real memory map of the Master 6801... |
| 214 | 215 | and the 6801 ASM code is a replacement coded for this driver. |
| 215 | 216 | */ |
| 216 | ||
| 217 | 217 | static ADDRESS_MAP_START( master6801_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 218 | 218 | AM_RANGE( 0x0100, 0x3fff) AM_ROM /* Replacement Master ROM code */ |
| 219 | 219 | AM_RANGE( 0x4000, 0xffff) AM_READWRITE( master6801_ram_r, master6801_ram_w ) /* RAM Memory shared with Z80 not banked*/ |
| 220 | 220 | ADDRESS_MAP_END |
| 221 | #endif | |
| 221 | 222 | |
| 222 | 223 | INPUT_PORTS_START( adam ) |
| 223 | 224 | PORT_START /* IN0 */ |
| r1038 | r1039 | |
|---|---|---|
| 628 | 628 | } |
| 629 | 629 | |
| 630 | 630 | /* interfaces to a pc-at keyboard */ |
| 631 | static | |
| 631 | static | |
| 632 | 632 | { |
| 633 | 633 | //logerror("keyboard data shift r: %02x\n", pcw16_keyboard_data_shift); |
| 634 | 634 | pcw16_keyboard_state &= ~(PCW16_KEYBOARD_BUSY_STATUS); |
| r1038 | r1039 | |
| 642 | 642 | } |
| 643 | 643 | |
| 644 | 644 | /* if force keyboard clock is low it is safe to send */ |
| 645 | static int | |
| 645 | static int | |
| 646 | 646 | { |
| 647 | 647 | /* clock is not forced low */ |
| 648 | 648 | /* and not busy - i.e. not already sent a char */ |
| 649 | 649 | return ((pcw16_keyboard_bits_output & PCW16_KEYBOARD_CLOCK)!=0); |
| 650 | 650 | } |
| 651 | 651 | |
| 652 | #ifdef UNUSED_FUNCTION | |
| 652 | 653 | /* issue a begin byte transfer */ |
| 653 | 654 | static void pcw16_begin_byte_transfer(void) |
| 654 | 655 | { |
| 655 | 656 | } |
| 657 | #endif | |
| 656 | 658 | |
| 657 | ||
| 658 | 659 | /* signal a code has been received */ |
| 659 | 660 | static void pcw16_keyboard_signal_byte_received(int data) |
| 660 | 661 | { |
| r1038 | r1039 | |
| 1456 | 1457 | ROM_LOAD("pcw045.sys",0x10000, 524288, CRC(c642f498) SHA1(8a5c05de92e7b2c5acdfb038217503ad363285b5)) |
| 1457 | 1458 | ROM_END |
| 1458 | 1459 | |
| 1460 | #ifdef UNUSED_FUNCTION | |
| 1459 | 1461 | static void pcw16_printer_getinfo(const device_class *devclass, UINT32 state, union devinfo *info) |
| 1460 | 1462 | { |
| 1461 | 1463 | /* printer */ |
| r1038 | r1039 | |
| 1467 | 1469 | default: printer_device_getinfo(devclass, state, info); break; |
| 1468 | 1470 | } |
| 1469 | 1471 | } |
| 1472 | #endif | |
| 1470 | 1473 | |
| 1471 | 1474 | static void pcw16_floppy_getinfo(const device_class *devclass, UINT32 state, union devinfo *info) |
| 1472 | 1475 | { |
| r1038 | r1039 | |
|---|---|---|
| 1391 | 1391 | |
| 1392 | 1392 | static int betadisk_status; |
| 1393 | 1393 | static int betadisk_active; |
| 1394 | #ifdef UNUSED_FUNCTION | |
| 1394 | 1395 | static void (*betadisk_memory_update)(void); |
| 1395 | 1396 | |
| 1396 | 1397 | static OPBASE_HANDLER(betadisk_opbase_handler) |
| r1038 | r1039 | |
| 1418 | 1419 | |
| 1419 | 1420 | return pc & 0x0ffff; |
| 1420 | 1421 | } |
| 1422 | #endif | |
| 1421 | 1423 | |
| 1422 | 1424 | static void betadisk_wd179x_callback(wd17xx_state_t state, void *param) |
| 1423 | 1425 | { |
| r1038 | r1039 | |
| 1449 | 1451 | } |
| 1450 | 1452 | } |
| 1451 | 1453 | |
| 1454 | #ifdef UNUSED_FUNCTION | |
| 1452 | 1455 | /* these are active only when betadisk is enabled */ |
| 1453 | 1456 | static WRITE8_HANDLER(betadisk_w) |
| 1454 | 1457 | { |
| r1038 | r1039 | |
| 1459 | 1462 | } |
| 1460 | 1463 | } |
| 1461 | 1464 | |
| 1462 | ||
| 1463 | 1465 | /* these are active only when betadisk is enabled */ |
| 1464 | 1466 | static READ8_HANDLER(betadisk_r) |
| 1465 | 1467 | { |
| r1038 | r1039 | |
| 1478 | 1480 | |
| 1479 | 1481 | return 0x0ff; |
| 1480 | 1482 | } |
| 1483 | #endif | |
| 1481 | 1484 | |
| 1482 | 1485 | static void betadisk_init(void) |
| 1483 | 1486 | { |
| r1038 | r1039 | |
|---|---|---|
| 166 | 166 | int3_regs[0] &= ~source_mask; |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | #ifdef UNUSED_FUNCTION | |
| 169 | 170 | // raise a local1 interrupt |
| 170 | 171 | static void int3_raise_local1_irq(UINT8 source_mask) |
| 171 | 172 | { |
| r1038 | r1039 | |
| 184 | 185 | { |
| 185 | 186 | int3_regs[2] &= ~source_mask; |
| 186 | 187 | } |
| 188 | #endif | |
| 187 | 189 | |
| 188 | 190 | static READ32_HANDLER( hpc3_pbus6_r ) |
| 189 | 191 | { |
| r1038 | r1039 | |
| 894 | 896 | } |
| 895 | 897 | } |
| 896 | 898 | |
| 899 | #ifdef UNUSED_FUNCTION | |
| 897 | 900 | static READ32_HANDLER( unk_r ) |
| 898 | 901 | { |
| 899 | 902 | // mame_printf_info("UNK_R: PC=%x\n", activecpu_get_pc()); |
| r1038 | r1039 | |
| 909 | 912 | { |
| 910 | 913 | return 0xffffffff; |
| 911 | 914 | } |
| 915 | #endif | |
| 912 | 916 | |
| 913 | 917 | // a bit hackish, but makes the memory detection work properly and allows a big cleanup of the mapping |
| 914 | 918 | static WRITE32_HANDLER( ip22_write_ram ) |
| r1038 | r1039 | |
| 1553 | 1557 | } |
| 1554 | 1558 | } |
| 1555 | 1559 | |
| 1560 | #ifdef UNUSED_FUNCTION | |
| 1556 | 1561 | static void ip22_harddisk_getinfo(const device_class *devclass, UINT32 state, union devinfo *info) |
| 1557 | 1562 | { |
| 1558 | 1563 | /* harddisk */ |
| r1038 | r1039 | |
| 1564 | 1569 | default: harddisk_device_getinfo(devclass, state, info); break; |
| 1565 | 1570 | } |
| 1566 | 1571 | } |
| 1572 | #endif | |
| 1567 | 1573 | |
| 1568 | 1574 | MACHINE_DRIVER_START( ip225015 ) |
| 1569 | 1575 | MDRV_CPU_ADD_TAG( "main", R5000BE, 50000000*3 ) |
| r1038 | r1039 | |
|---|---|---|
| 132 | 132 | AM_RANGE(0x02, 0x02) AM_WRITE(keylatch_w) |
| 133 | 133 | ADDRESS_MAP_END |
| 134 | 134 | |
| 135 | #ifdef UNUSED_FUNCTION | |
| 135 | 136 | static ADDRESS_MAP_START( mpt02_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 136 | 137 | AM_RANGE(0x0000, 0x07ff) AM_ROM |
| 137 | 138 | AM_RANGE(0x0800, 0x09ff) AM_RAM |
| r1038 | r1039 | |
| 144 | 145 | AM_RANGE(0x02, 0x02) AM_WRITE(keylatch_w) |
| 145 | 146 | AM_RANGE(0x04, 0x04) AM_READWRITE(cdp1864_dispoff_r, cdp1864_tone_latch_w) |
| 146 | 147 | ADDRESS_MAP_END |
| 148 | #endif | |
| 147 | 149 | |
| 148 | 150 | /* Input Ports */ |
| 149 | 151 |
| r1038 | r1039 | |
|---|---|---|
| 41 | 41 | #define LOG(x) /* x */ |
| 42 | 42 | #endif |
| 43 | 43 | |
| 44 | #ifdef UNUSED_FUNCTION | |
| 44 | 45 | static READ8_HANDLER(mekd2_pia_r) { return 0xff; } |
| 45 | 46 | static READ8_HANDLER(mekd2_cas_r) { return 0xff; } |
| 46 | 47 | static READ8_HANDLER(mekd2_kbd_r) { return 0xff; } |
| 48 | #endif | |
| 47 | 49 | |
| 48 | 50 | UINT8 pia[8]; |
| 49 | 51 | |
| 52 | #ifdef UNUSED_FUNCTION | |
| 50 | 53 | static WRITE8_HANDLER(mekd2_pia_w) { } |
| 51 | 54 | static WRITE8_HANDLER(mekd2_cas_w) { } |
| 55 | #endif | |
| 52 | 56 | |
| 53 | 57 | static WRITE8_HANDLER(mekd2_kbd_w) |
| 54 | 58 | { |
| r1038 | r1039 | |
|---|---|---|
| 198 | 198 | ADDRESS_MAP_END |
| 199 | 199 | |
| 200 | 200 | |
| 201 | ||
| 201 | #ifdef UNUSED_FUNCTION | |
| 202 | 202 | static ADDRESS_MAP_START(ps2m30286_io, ADDRESS_SPACE_IO, 8) |
| 203 | 203 | AM_RANGE(0x0000, 0x001f) AM_READWRITE(dma8237_0_r, dma8237_0_w) |
| 204 | 204 | AM_RANGE(0x0020, 0x003f) AM_READWRITE(pic8259_0_r, pic8259_0_w) |
| r1038 | r1039 | |
| 227 | 227 | AM_RANGE(0x03f0, 0x03f7) AM_READWRITE(pc_fdc_r, pc_fdc_w) |
| 228 | 228 | AM_RANGE(0x03f8, 0x03ff) AM_READWRITE(uart8250_0_r, uart8250_0_w) |
| 229 | 229 | ADDRESS_MAP_END |
| 230 | #endif | |
| 230 | 231 | |
| 231 | ||
| 232 | 232 | INPUT_PORTS_START( atcga ) |
| 233 | 233 | PORT_START /* IN0 */ |
| 234 | 234 | PORT_BIT ( 0xf0, 0xf0, IPT_UNUSED ) |
| r1038 | r1039 | |
|---|---|---|
| 380 | 380 | amigakbd_init(); |
| 381 | 381 | } |
| 382 | 382 | |
| 383 | #ifdef UNUSED_FUNCTION | |
| 383 | 384 | static DRIVER_INIT( amiga_ecs ) |
| 384 | 385 | { |
| 385 | 386 | static const amiga_machine_interface amiga_intf = |
| r1038 | r1039 | |
| 411 | 412 | /* initialize keyboard */ |
| 412 | 413 | amigakbd_init(); |
| 413 | 414 | } |
| 415 | #endif | |
| 414 | 416 | |
| 415 | ||
| 416 | 417 | static DRIVER_INIT( cdtv ) |
| 417 | 418 | { |
| 418 | 419 | static const amiga_machine_interface amiga_intf = |
| r1038 | r1039 | |
|---|---|---|
| 435 | 435 | einstein_update_interrupts(); |
| 436 | 436 | } |
| 437 | 437 | |
| 438 | #ifdef UNUSED_FUNCTION | |
| 438 | 439 | /* not required for this interrupt source */ |
| 439 | 440 | static void einstein_fire_int_reset(int which) |
| 440 | 441 | { |
| r1038 | r1039 | |
| 442 | 443 | |
| 443 | 444 | einstein_update_interrupts(); |
| 444 | 445 | } |
| 446 | #endif | |
| 445 | 447 | |
| 446 | 448 | static int einstein_keyboard_interrupt(int which) |
| 447 | 449 | { |
| r1038 | r1039 | |
| 458 | 460 | return 0x0ff; |
| 459 | 461 | } |
| 460 | 462 | |
| 463 | #ifdef UNUSED_FUNCTION | |
| 461 | 464 | static int einstein_fire_interrupt(int which) |
| 462 | 465 | { |
| 463 | 466 | logerror("fire int routine in daisy chain\n"); |
| 464 | 467 | /* return vector */ |
| 465 | 468 | return 0x0ff; |
| 466 | 469 | } |
| 470 | #endif | |
| 467 | 471 | |
| 468 | 472 | /* reti has no effect on this interrupt */ |
| 469 | 473 | static void einstein_keyboard_reti(int which) |
| r1038 | r1039 | |
| 475 | 479 | { |
| 476 | 480 | } |
| 477 | 481 | |
| 482 | #ifdef UNUSED_FUNCTION | |
| 478 | 483 | /* reti has no effect on this interrupt */ |
| 479 | 484 | static void einstein_fire_reti(int which) |
| 480 | 485 | { |
| 481 | 486 | } |
| 487 | #endif | |
| 482 | 488 | |
| 483 | 489 | static struct z80_irq_daisy_chain einstein_daisy_chain[] = |
| 484 | 490 | { |
| r1038 | r1039 | |
|---|---|---|
| 467 | 467 | } |
| 468 | 468 | } |
| 469 | 469 | |
| 470 | #ifdef UNUSED_FUNCTION | |
| 470 | 471 | static void intvkbd_cassette_getinfo(const device_class *devclass, UINT32 state, union devinfo *info) |
| 471 | 472 | { |
| 472 | 473 | /* cassette */ |
| r1038 | r1039 | |
| 484 | 485 | case DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "tap"); break; |
| 485 | 486 | } |
| 486 | 487 | } |
| 488 | #endif | |
| 487 | 489 | |
| 488 | 490 | SYSTEM_CONFIG_START(intvkbd) |
| 489 | 491 | CONFIG_DEVICE(intvkbd_cartslot_getinfo) |
| r1038 | r1039 | |
|---|---|---|
| 1726 | 1726 | 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0 |
| 1727 | 1727 | }; |
| 1728 | 1728 | |
| 1729 | #ifdef UNUSED_FUNCTION | |
| 1729 | 1730 | /* every 2us let's the crtc do the job !*/ |
| 1730 | 1731 | static void amstrad_update_video_1(int dummy) |
| 1731 | 1732 | { |
| 1732 | 1733 | amstrad_vh_execute_crtc_cycles(2); |
| 1733 | 1734 | } |
| 1735 | #endif | |
| 1734 | 1736 | |
| 1735 | 1737 | static TIMER_CALLBACK(amstrad_vh_execute_crtc_cycles_callback) |
| 1736 | 1738 | { |
| r1038 | r1039 | |
|---|---|---|
| 151 | 151 | return amd_flash_bank_handler_r(avigo_flash_at_0x8000, flash_offset); |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | #ifdef UNUSED_FUNCTION | |
| 154 | 155 | /* memory 0x08000-0x0bfff */ |
| 155 | 156 | static WRITE8_HANDLER(avigo_flash_0x8000_write_handler) |
| 156 | 157 | { |
| r1038 | r1039 | |
| 161 | 162 | |
| 162 | 163 | amd_flash_bank_handler_w(avigo_flash_at_0x8000, flash_offset, data); |
| 163 | 164 | } |
| 165 | #endif | |
| 164 | 166 | |
| 165 | ||
| 166 | 167 | static void avigo_refresh_ints(void) |
| 167 | 168 | { |
| 168 | 169 | if (avigo_irq!=0) |
| r1038 | r1039 | |
|---|---|---|
| 680 | 680 | MDRV_GFXDECODE(apple2_gfxdecodeinfo) |
| 681 | 681 | MACHINE_DRIVER_END |
| 682 | 682 | |
| 683 | #ifdef UNUSED_FUNCTION | |
| 683 | 684 | static MACHINE_DRIVER_START( ace100 ) |
| 684 | 685 | MDRV_IMPORT_FROM( apple2_common ) |
| 685 | 686 | MDRV_VIDEO_START(apple2p) |
| 686 | 687 | MDRV_GFXDECODE(apple2_gfxdecodeinfo) |
| 687 | 688 | MACHINE_DRIVER_END |
| 689 | #endif | |
| 688 | 690 | |
| 689 | 691 | ROM_START(las3000) |
| 690 | 692 | ROM_REGION(0x0800,REGION_GFX1,0) |
| r1038 | r1039 | |
|---|---|---|
| 313 | 313 | ROM_LOAD("spchrom.bin", 0x0000, 0x8000, CRC(58b155f7)) /* system speech ROM */ |
| 314 | 314 | ROM_END |
| 315 | 315 | |
| 316 | #ifdef UNUSED_FUNCTION | |
| 316 | 317 | static void ti99_4p_cassette_getinfo(const device_class *devclass, UINT32 state, union devinfo *info) |
| 317 | 318 | { |
| 318 | 319 | /* cassette */ |
| r1038 | r1039 | |
| 324 | 325 | default: cassette_device_getinfo(devclass, state, info); break; |
| 325 | 326 | } |
| 326 | 327 | } |
| 328 | #endif | |
| 327 | 329 | |
| 328 | 330 | static void ti99_4p_floppy_getinfo(const device_class *devclass, UINT32 state, union devinfo *info) |
| 329 | 331 | { |
| r1038 | r1039 | |
|---|---|---|
| 105 | 105 | static READ16_HANDLER( pc16le_YM3812_0_r ) { return read16le_with_read8_handler(pc_YM3812_0_r, offset, mem_mask); } |
| 106 | 106 | static WRITE16_HANDLER( pc16le_YM3812_0_w ) { write16le_with_write8_handler(pc_YM3812_0_w, offset, data, mem_mask); } |
| 107 | 107 | |
| 108 | #ifdef UNUSED_FUNCTION | |
| 108 | 109 | static WRITE16_HANDLER( pc16le_SN76496_0_w ) { write16le_with_write8_handler(SN76496_0_w, offset, data, mem_mask); } |
| 110 | #endif | |
| 109 | 111 | |
| 110 | 112 | // IO Expansion, only a little bit for ibm bios self tests |
| 111 | 113 | //#define EXP_ON |
| r1038 | r1039 | |
|---|---|---|
| 138 | 138 | { -1 } /* end of array */ |
| 139 | 139 | }; |
| 140 | 140 | |
| 141 | #ifdef UNUSED_FUNCTION | |
| 141 | 142 | static INTERRUPT_GEN( vc4000 ) |
| 142 | 143 | { |
| 143 | 144 | } |
| 145 | #endif | |
| 144 | 146 | |
| 145 | 147 | static const unsigned char vc4000_palette[] = |
| 146 | 148 | { |
| Previous | 15994 Revisions | Next |