PC Engine (TG16) emulator
”Ootake”
Solves "Delay Problem" of emulator at Ootake
Here for the method of settlement of "Delay by the PC environment".
 


Japanese(日本語) version is click here.

Hello. I am Kitao Nakamura producing "PC Engine" emulator "Ootake".
I have the request to the emulator authors. The request is a solution of "Delay Problem".

To my regret, the emulator with sticking to "Operation Sense of Joypad" is rare.

In the action game and the shooting game, the difficulty of the game goes up,
when there is "Delay Problem". This might be misunderstood , saying that "Became less capable"
and "It is not more interesting than old times".

Of course, it is likely to become less capable to age.
However, "Played with emulator with the delay problem" is the cause in most cases.
Even if humans becomes 30 years old or 40 years old, they do not become weak too much.

For instance, please play the high-score attack (2min mode) of "Super Star Soldier"
seriously by both "Ootake" and "MagicEngine" and compare.
In "Ootake", I can do play that exceeds 500,000 points also even by my arm.
However, in "MagicEngine", I felt that excess by 500,000 points might be absolutely impossible.
Because the joypad-reaction of "MagicEngine" is late.
(standard WindowsXP SP2 environment)

This greatly influences only no "Difference of the score" it and "Happiness of the game", too.
Honestly, even if "Super Star Soldier" is played by "MagicEngine",
happiness of "Original Super Star Soldier" cannot be tasted.

To our regret, also in the commodity (emulator used) for the active service game machine,
the commodity with big "Delay Problem" exists.
(I think that the manufacturer that puts the title with big "Delay Problem" on the market
doesn't have love to the game at all.)

The delay also has danger of making it to the one to which even "Evaluation of the game"
was mistaken. Therefore, "Ootake" is checked always severely
"Whether it is possible to enjoy it by the sense similar to a real machine or not?".
Because it is a respect of minimum to a past masterpiece "PC Engine(TG16)" game.

Method of "Delay Problem" solution executed by "Ootake"

In "Ootake", the "Delay Problem" is solved(reduced) by using two strategies.

The First Strategy...
When "Instruction that sees the state of joypad" comes, "Latest state of the Windows Joypad Input" is always acquired.

In a lot of emulators, "State of Windows Joypad Input" is acquired only once in one frame(1/60 seconds). As a result, if the joypad is input according to the timing immediately after acquisition, about one frame input will be delayed.

It can be solved by the above-mentioned strategy.
However, this strategy makes the emulation processing considerably heavy.

In "Ootake" for that, if "Instruction that sees the state of joypad" comes continuously, the frequency that "State of Windows Joypad Input" acquires is limited.

Concretely, when "State of Windows Joypad Input" is acquired, "Processed scanning lines No." is recorded. And, when the following "Instruction that sees the state of joypad" comes, if "Be still processing it at same scanning lines No.", the acquisition of "State of Windows Joypad Input" is omitted.

This method makes the reaction early enough, and processing doesn't become heavy too much.
* However, the emulator certainly becomes heavy for this processing. However, I think that it is necessary processing to "The happiness of the game is not ruined".


The Second Strategy...
The emulated processing is delimited by "about 1/240 seconds (1/60 seconds are divided into four)" unit. As a result, operation approaches "State of the passage of time in a real machine".

When the emulator works by "PC that there is room at the processing speed", it becomes as shown in figure below (Flow of 1/60 seconds).

->[ Emulate Processing ]->[ Wait V-Sync Processing (Rest) ]->[Draw Processing]->(To head)

In a word, the time of "Rest until the V-Sync signal comes" becomes long. (Oppositely, in "PC that there is no room in performance", this "Rest" decreases, and the time of "Emulate Processing" becomes long.)

At the time of this "Rest", the input judgment of joypad cannot be done. As a result, the period when joypad can be input narrows. It causes to be input delaying one frame.

Then, the method like the figure below (flow of 1/60 seconds) is executed in "Ootake".

->[Emu.]->[Rest]->[Emu.]->[Rest]->[Emu.]->[Rest]->[Emu.]->[Rest]->[Draw]->(To head)

In a word, the "Rest" is put every about 1/240 seconds (Divide without taking a rest to one degree). As a result, the flow of the passage of time near a real machine is made. The input judgment of joypad is prevented being delayed by this method.

Moreover, not only the reaction of the joypad but also the accuracy of emulation(Timer interruption etc.) rises by this processing.

Especially, this is important in the reproduction of the tone of PSG (wavy memory + noise) sound.
* In "Ootake", when "Light PSG" is chosen by "Volume" menu, it becomes usual operation every 1/60 seconds.


About the cause of becoming "Bigger Delay Problem"
In "Two strategies of Ootake" previously described, about one frame is prevented being delayed.

To my regret, there is a cause of "Big Delay Problem (about 2-4 frames)" that becomes a problem any more.
It is "Problem of DirectX(Direct Input) of Windows".

If "Direct Input of Windows" is not used well, a big delay is generated.
It seems to be different according to the library used. I am adding the following code for the development environment of Ootake (MinGW+DirectX library).

#define DIRECTINPUT_VERSION 0x0500

"Direct Input" of "Version 5(old)" is used. As a result, the least input delay has been achieved.
(confirm the operation on WindowsXP)

When the version above "Version 5(old)" is used, a big input delay is generated in Ootake, too.
There is a possibility that the person who had made "Direct Input of an old version" loved playing a game more. Or, there is a possibility that the delay occurs when the library is old.

To our regret, there are a lot of emulators where this delay problem occurs.
The problem is caused in "VirtuaNES (Excellent NES emulator)", too.
The problem is caused in "BuleMSX (Excellent MSX emulator)", too. *2008.9.20 It was considerably improved now (ver2.8 wonderful!).
These are very too good. In "Nestopia" and "ParaMSX(latest bata)", this problem is not caused. When the "action & shooting game" are played seriously and compared, the
difference is remarkable. (In "VirtureNES" and "BuleMSX", if improved it is glad as one user.)

* The above-mentioned is a confirmation of operation in "WindowsXP SP2" environment.

Thank you for reading.
2008.05.06 Written by Kitao Nakamura.


The solution of "Delay by the personal computer environment" was described.
Here for the method of settlement of
"Delay by the PC environment".



Return to "Ootake" Homepage


 


This page is link free.

Copyright(C)2006-2008 Kitao Nakamura.