:: WinCPC - work in progress ::

Windows Vista timing problems:

update, jan 20, 2009: Good news from a WinCPC user called Themis: He experienced, that in Windows 7 the timing problems are gone. :) Hooorrraayyyy. Thanks Themis for that wonderful information.

dec 11, 2007: I fixed the timing problems. But I experienced new problems with the Vista multimedia APIs. And, I'm not alone. SipX of SIPfoundry has battled too against these troubles. So I decided to rewrite the sound output (inclusive drive noise output) in DirectX.

elder informations: I'm currently working on Vista bug fixes. WinCPC uses 8 sound queues to precalculate the sound output. This results in a latency of 6 frames or approx. 120 milliseconds. WinCPC waits until the current framebuffer is cleared and fills the next. It seems, that in Windows Vista this method of WinCPC's timing is no longer useful. The outcome of the completely rewrite of Vista's multimedia architecture is, that these sound queues are processed parallelely. Here is a trace table of two turns in WinCPC to show you the timing trouble issues of Vista. f0-f7 are flags (dwFlags of WAVEHDR) of the separate sound queues. n is the sequence number. There are two lines described in the chart. The first line shows the flags before waiting to 03 and the second line the result after waiting.
Windows XP                 Windows Vista
f0 f1 f2 f3 f4 f5 f6 f7 n  f0 f1 f2 f3 f4 f5 f6 f7 n
-------------------------  -------------------------
03 03 03 03 03 03 03 03 0  03 03 03 03 03 03 03 03 0 --- turn 1 (init)
03 03 03 03 03 03 03 03 0  03 03 03 03 03 03 03 03 0
12 03 03 03 03 03 03 03 1  12 03 03 03 03 03 03 03 1
12 03 03 03 03 03 03 03 1  12 03 03 03 03 03 03 03 1
12 12 03 03 03 03 03 03 2  12 12 03 03 03 03 03 03 2
12 12 03 03 03 03 03 03 2  12 12 03 03 03 03 03 03 2
12 12 12 03 03 03 03 03 3  12 12 12 03 03 03 03 03 3
12 12 12 03 03 03 03 03 3  12 12 12 03 03 03 03 03 3
12 12 12 12 03 03 03 03 4  12 12 12 12 03 03 03 03 4
12 12 12 12 03 03 03 03 4  12 12 12 12 03 03 03 03 4
12 12 12 12 12 03 03 03 5  03 12 12 12 12 03 03 03 5
12 12 12 12 12 03 03 03 5  03 12 12 12 12 03 03 03 5
12 12 12 12 12 12 03 03 6  03 12 12 12 12 12 03 03 6
12 12 12 12 12 12 03 03 6  03 12 12 12 12 12 03 03 6 
03 12 12 12 12 12 12 03 7  03 12 12 12 12 12 12 03 7
03 12 12 12 12 12 12 03 7  03 12 12 12 12 12 12 03 7
03 12 12 12 12 12 12 12 0  03 12 12 12 12 12 12 12 0 --- turn 2 (levelled off)
03 12 12 12 12 12 12 12 0  03 12 12 12 12 12 12 12 0
12 12 12 12 12 12 12 12 1  12 12 12 12 12 12 12 12 1
12 03 12 12 12 12 12 12 1  12 03 12 12 12 12 12 12 1
12 12 12 12 12 12 12 12 2  12 12 12 12 12 12 12 12 2
12 12 03 12 12 12 12 12 2  12 12 03 03 12 12 12 12 2
12 12 12 12 12 12 12 12 3  12 12 12 03 12 12 12 12 3
12 12 12 03 12 12 12 12 3  12 12 12 03 12 12 12 12 3
12 12 12 12 12 12 12 12 4  12 12 12 12 12 12 12 12 4
12 12 12 12 03 12 12 12 4  12 12 12 12 03 03 03 12 4
12 12 12 12 12 12 12 12 5  12 12 12 12 12 03 03 12 5
12 12 12 12 12 03 12 12 5  12 12 12 12 12 03 03 12 5
12 12 12 12 12 12 12 12 6  12 12 12 12 12 12 03 12 6
12 12 12 12 12 12 03 12 6  12 12 12 12 12 12 03 12 6
12 12 12 12 12 12 12 12 7  12 12 12 12 12 12 12 12 7
12 12 12 12 12 12 12 03 7  03 12 12 12 12 12 12 03 7


work in progress (updated oct 27, 2007):

+ reduce CPU usage during waiting for next frame (100%)
+ toggle breakpoints in assembler code editor (100%)
+ YM recorder (100%)
+ catch mouse in windowed mode (100%)
+ pick ROM files from other directories (100%)
+ Autotype (Amanuensis) (100%)
+ Diskbrowser with autostarter (100%)
+ Copy files from Windows to DSK and vice versa (100%)
+ Link file exts .DSK, .CDT, .TZX and .SNA (100%)
+ Unlink file exts .DSK, .CDT, .TZX and .SNA (100%)
+ PPI registers in Debugger (100%)
+ fix Windows Vista timing issue (75%)
+ Easy quick start icons for games for rapid game change (75%)
+ SYMBiFACE II hard disk emulation (75%)
+ BCD/binary decoding of RTC (75%)


wish list:

+ Two-joystick support
+ Recording tape data to cdt or tzx
+ tape deck should read WAV files
+ convert WinCPC from Delphi to FreePascal / Lazarus
+ port of WinCPC to linux
+ CRTC types 1, 2 and 3
+ plus support (ASIC/sprites)