|
|
| version 1.2, 2004/08/02 13:38:46 | version 1.6, 2004/08/04 17:09:25 |
|---|---|
| Line 22 | Line 22 |
| #include "z80core.h" | #include "z80core.h" |
| #include "pccore.h" | #include "pccore.h" |
| #include "x1_io.h" | #include "iocore.h" |
| #include "x1_crtc.h" | |
| #include "timing.h" | #include "timing.h" |
| #include "draw.h" | #include "draw.h" |
| #include "fdd_ini.h" | #include "fdd_ini.h" |
| Line 45 static const OEMCHAR szClassName[] = OEM | Line 44 static const OEMCHAR szClassName[] = OEM |
| HWND hWndMain; | HWND hWndMain; |
| HINSTANCE hInst; | HINSTANCE hInst; |
| HINSTANCE hPreI; | HINSTANCE hPreI; |
| OEMCHAR modulefile[MAX_PATH]; | |
| OEMCHAR fddfolder[MAX_PATH]; | OEMCHAR fddfolder[MAX_PATH]; |
| OEMCHAR bmpfilefolder[MAX_PATH]; | OEMCHAR bmpfilefolder[MAX_PATH]; |
| Line 98 static void dispbmp(HINSTANCE hinst, HDC | Line 98 static void dispbmp(HINSTANCE hinst, HDC |
| HDC hmdc; | HDC hmdc; |
| hbmp = LoadBitmap(hinst, res); | hbmp = LoadBitmap(hinst, res); |
| GetObject(hbmp, sizeof(BITMAP), &bmp); | GetObject(hbmp, sizeof(bmp), &bmp); |
| hmdc = CreateCompatibleDC(hdc); | hmdc = CreateCompatibleDC(hdc); |
| SelectObject(hmdc, hbmp); | SelectObject(hmdc, hbmp); |
| BitBlt(hdc, x, y, bmp.bmWidth, bmp.bmHeight, hmdc, 0, 0, SRCCOPY); | BitBlt(hdc, x, y, bmp.bmWidth, bmp.bmHeight, hmdc, 0, 0, SRCCOPY); |
| Line 235 LRESULT CALLBACK WndProc(HWND hWnd, UINT | Line 235 LRESULT CALLBACK WndProc(HWND hWnd, UINT |
| break; | break; |
| case IDM_BOOT2HD: | case IDM_BOOT2HD: |
| xmenu_setbootmedia(DIP_BOOTMEDIA); | xmenu_setbootmedia(DIPSW_BOOTMEDIA); |
| updateflag = SYS_UPDATECFG; | updateflag = SYS_UPDATECFG; |
| break; | break; |
| Line 245 LRESULT CALLBACK WndProc(HWND hWnd, UINT | Line 245 LRESULT CALLBACK WndProc(HWND hWnd, UINT |
| break; | break; |
| case IDM_LOWRES: | case IDM_LOWRES: |
| xmenu_setresolute(DIP_RESOLUTE); | xmenu_setresolute(DIPSW_RESOLUTE); |
| updateflag = SYS_UPDATECFG; | updateflag = SYS_UPDATECFG; |
| break; | break; |
| Line 258 LRESULT CALLBACK WndProc(HWND hWnd, UINT | Line 258 LRESULT CALLBACK WndProc(HWND hWnd, UINT |
| break; | break; |
| case IDM_WIDTH80: | case IDM_WIDTH80: |
| crtc.TXT_XL = 80; | crtc.s.TXT_XL = 80; |
| crtc.GRP_XL = 640; | crtc.s.GRP_XL = 640; |
| vrambank_patch(); | vrambank_patch(); |
| scrnallflash = 1; | scrnallflash = 1; |
| break; | break; |
| case IDM_WIDTH40: | case IDM_WIDTH40: |
| crtc.TXT_XL = 40; | crtc.s.TXT_XL = 40; |
| crtc.GRP_XL = 320; | crtc.s.GRP_XL = 320; |
| vrambank_patch(); | vrambank_patch(); |
| scrnallflash = 1; | scrnallflash = 1; |
| break; | break; |
| Line 434 LRESULT CALLBACK WndProc(HWND hWnd, UINT | Line 434 LRESULT CALLBACK WndProc(HWND hWnd, UINT |
| PatBlt(hdc, 0, 0, width, height, PATCOPY); | PatBlt(hdc, 0, 0, width, height, PATCOPY); |
| SelectObject(hdc, hbrush); | SelectObject(hdc, hbrush); |
| dispbmp(hinst, hdc, "XMILBMP", | dispbmp(hinst, hdc, OEMTEXT("XMILBMP"), |
| (width - 201) / 2, (height - 31) / 2); | (width - 201) / 2, (height - 31) / 2); |
| dispbmp(hinst, hdc, "ZILOG", | dispbmp(hinst, hdc, OEMTEXT("ZILOG"), |
| width - (101 + 8 + 41 + 8 + 68 + 1), height - 38); | width - (101 + 8 + 41 + 8 + 68 + 1), height - 38); |
| dispbmp(hinst, hdc, "TURBOZ", | dispbmp(hinst, hdc, OEMTEXT("TURBOZ"), |
| width - (101 + 8 + 68 + 1), height - 18); | width - (101 + 8 + 68 + 1), height - 18); |
| dispbmp(hinst, hdc, "OPMSOUND", | dispbmp(hinst, hdc, OEMTEXT("OPMSOUND"), |
| width - (68 + 1), height - (25 + 1)); | width - (68 + 1), height - (25 + 1)); |
| } | } |
| else { | else { |
| Line 643 int WINAPI WinMain(HINSTANCE hInstance, | Line 643 int WINAPI WinMain(HINSTANCE hInstance, |
| return(FALSE); | return(FALSE); |
| } | } |
| file_setcd(__argv[0]); | GetModuleFileName(NULL, modulefile, sizeof(modulefile)); |
| file_setcd(modulefile); | |
| initload(); | initload(); |
| hInst = hInstance; | hInst = hInstance; |
| Line 673 int WINAPI WinMain(HINSTANCE hInstance, | Line 674 int WINAPI WinMain(HINSTANCE hInstance, |
| WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION | | WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION | |
| WS_MINIMIZEBOX, | WS_MINIMIZEBOX, |
| xmiloscfg.winx, xmiloscfg.winy, | xmiloscfg.winx, xmiloscfg.winy, |
| SCREEN_WIDTH, SCREEN_HEIGHT, | SURFACE_WIDTH, SURFACE_HEIGHT, |
| NULL, NULL, hInstance, NULL); | NULL, NULL, hInstance, NULL); |
| hWndMain = hWnd; | hWndMain = hWnd; |
| scrnmng_initialize(); | scrnmng_initialize(); |
| Line 714 int WINAPI WinMain(HINSTANCE hInstance, | Line 715 int WINAPI WinMain(HINSTANCE hInstance, |
| if (scrnmng_create(scrnmode) != SUCCESS) { | if (scrnmng_create(scrnmode) != SUCCESS) { |
| scrnmode ^= SCRNMODE_FULLSCREEN; | scrnmode ^= SCRNMODE_FULLSCREEN; |
| if (scrnmng_create(scrnmode) != SUCCESS) { | if (scrnmng_create(scrnmode) != SUCCESS) { |
| MessageBox(hWnd, "Couldn't create DirectDraw Object", | MessageBox(hWnd, OEMTEXT("Couldn't create DirectDraw Object"), |
| szProgName, MB_OK); | szProgName, MB_OK); |
| return(FALSE); | return(FALSE); |
| } | } |
| Line 726 int WINAPI WinMain(HINSTANCE hInstance, | Line 727 int WINAPI WinMain(HINSTANCE hInstance, |
| juliet2_reset(); | juliet2_reset(); |
| if (soundmng_initialize() == SUCCESS) { | if (soundmng_initialize() == SUCCESS) { |
| soundmng_pcmload(SOUND_PCMSEEK, "fddseek.wav", 0); | soundmng_pcmload(SOUND_PCMSEEK, OEMTEXT("fddseek.wav"), 0); |
| soundmng_pcmload(SOUND_PCMSEEK1, "fddseek1.wav", 0); | soundmng_pcmload(SOUND_PCMSEEK1, OEMTEXT("fddseek1.wav"), 0); |
| soundmng_pcmvolume(SOUND_PCMSEEK, xmilcfg.MOTORVOL); | soundmng_pcmvolume(SOUND_PCMSEEK, xmilcfg.MOTORVOL); |
| soundmng_pcmvolume(SOUND_PCMSEEK1, xmilcfg.MOTORVOL); | soundmng_pcmvolume(SOUND_PCMSEEK1, xmilcfg.MOTORVOL); |
| } | } |
| Line 735 int WINAPI WinMain(HINSTANCE hInstance, | Line 736 int WINAPI WinMain(HINSTANCE hInstance, |
| pccore_initialize(); | pccore_initialize(); |
| pccore_reset(); | pccore_reset(); |
| #if !defined(UNICODE) | |
| if (__argc > 1) { | if (__argc > 1) { |
| for (int i=1; i<__argc; i++) { | for (int i=1; i<__argc; i++) { |
| if (is_d8ufile(__argv[i])) { | if (is_d8ufile(__argv[i])) { |
| Line 744 int WINAPI WinMain(HINSTANCE hInstance, | Line 746 int WINAPI WinMain(HINSTANCE hInstance, |
| } | } |
| } | } |
| } | } |
| #endif | |
| scrndraw_redraw(); | scrndraw_redraw(); |