CROSS REFERENCE TO RELATED APPLICATION The disclosure of Japanese Patent Application No. 2006-285379, filed Oct. 19, 2006, is incorporated herein by reference.
BACKGROUND OF THE INVENTION 1. Field of the Invention
The present invention relates to a game apparatus, a wireless module and a game system, and more particularly to a game apparatus, a wireless module and a game system capable of realizing a multiplayer gameplay using a plurality of game apparatuses capable of performing wireless communication with each other.
2. Description of the Background Art
Conventionally, there is a technique in which other game apparatuses each adjusts a transmission time of a signal based on a reception time of a signal transmitted from a reference game apparatus (Japanese Laid-Open Patent Publication No. 2000-135380 (hereinafter referred to as “patent document 1”), for example).
Conventionally, there is also a technique in which a master game apparatus transmits time information indicating a specific time to a client game apparatus, and the client game apparatus adjusts a game processing cycle based on the received time information (Japanese Laid-Open Patent Publication No. 2005-261856 (hereinafter referred to as “patent document 2”), for example).
Conventionally, there is also a technique in which a master game apparatus transmits a reset command to a client game apparatus in a constant cycle, and the client game apparatus resets a synchronization counter in response to the received reset command (Japanese Laid-Open patent Publication No. 8-243255 (hereinafter referred to as “patent document 3”), for example).
However, in the technique disclosed in patent document 1, communication timings are merely adjusted between a plurality of game apparatuses. With the technique disclosed in patent document 1 only, processing cycles to be executed by the plurality of game apparatuses cannot be synchronized to each other.
Furthermore, in the technique disclosed in patent document 2, the master game apparatus needs to transmit the time information to the client game apparatus on a regular basis, thereby correspondingly deteriorating a usage efficiency of a communication line.
Still furthermore, the technique disclosed in patent document 3 is effective only for wired communication. However, in the case where the technique disclosed in patent document 3 is applied to wireless communication, problems such as delay and jitter occur, thereby making it impossible to easily apply the technique disclosed in patent document 3 to wireless communication.
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide a game apparatus, a wireless module and a game system capable of easily synchronizing, when performing a multiplayer gameplay using a plurality of game apparatuses capable of performing wireless communication with each other, times at which the plurality of game apparatuses execute predetermined processes.
The present invention has the following features to attain the object mentioned above. The reference numerals, step numbers and the like in the parentheses indicate the correspondence with the embodiment described below in order to aid in understanding the present invention and are not intended to limit, in any way, the scope of the present invention.
A game apparatus (10a) according to the present invention which realizes a multiplayer gameplay using the game apparatus (10a) and at least one other game apparatus (10b) capable of performing wireless communication with each other, comprises: a wireless module (12a) having a time synchronization function of synchronizing a timer (124a) provided inside the wireless module (12a) to another timer (124b) provided inside another wireless module (12b) of the at least one other game apparatus (10b) which is set as a communication party for the multiplayer gameplay; a processing section (14a,18a) for executing a predetermined process; and an adjustment section (14a) for adjusting a time at which the processing section executes the predetermined process based on a value of the timer (124a) of the wireless module of the game apparatus.
The processing section may execute a process of generating image data and storing the image data in a display buffer, and the game apparatus may further include an output section for outputting the image data stored in the display buffer to a display section, and the adjustment section may adjust a time at which the output section outputs the image data to the display section based on the value of the timer of the wireless module of the game apparatus.
The processing section may execute a process of generating image data and storing the image data in a display buffer, and the game apparatus may further include an output section for outputting the image data stored in the display buffer, and the adjustment section may adjust a time at which the processing section updates the image data stored in the display buffer based on the value of the timer of the wireless module of the game apparatus.
The processing section may execute a process of generating image data and storing the image data in either of at least two display buffers, and the game apparatus may further include an output section for outputting the image data stored in either of the at least two display buffers to a display section, and the adjustment section may adjust a time at which the at least two display buffers used by the output section are switched between each other based on the value of the timer of the wireless module of the game apparatus.
The processing section may repeatedly execute game processing of one unit, which processing defines a predetermined procedure, and the adjustment section may adjust a time at which the processing section executes the game processing of one unit based on the value of the timer of the wireless module of the game apparatus.
The game apparatus may further comprise an input section operated by a player, wherein the processing section may execute the predetermined process based on operation information inputted to the input section, and the adjustment section may adjust a time at which the predetermined process, which is executed by the processing section based on the operation information, is executed based on the value of the timer of the wireless module of the game apparatus.
The wireless module may determine a time at which the operation information is exchanged with the at least one other game apparatus based on the value of the timer.
The game apparatus may further comprise a counter for measuring a processing cycle, wherein the processing section may execute the predetermined process in a cyclic manner based on a value of the counter, and the adjustment section may adjust the value of the counter based on the value of the timer of the wireless module of the game apparatus.
The wireless module may include interrupt signal outputting means of outputting an interrupt signal in a constant cycle based on the value of the timer, and the adjustment section may adjust a time at which the predetermined process is executed based on a time at which the wireless module outputs the interrupt signal. Thus, a change in the value of the timer included in the wireless module can be minimized.
The game apparatus may further comprise a counter for measuring a processing cycle, wherein the processing section may execute the predetermined process in a predetermined cycle based on a value of the counter, the interrupt signal outputting means may output the interrupt signal in the predetermined cycle based on the value of the timer, and the adjustment section may adjust the value of the counter such that the value of the counter obtained when the wireless module outputs the interrupt signal becomes close to a predetermined fixed value.
The wireless module may transmit a beacon signal to the said another wireless module, and include beacon interval setting means of setting a cycle of the beacon signal transmitted from the wireless module to a constant cycle, and the interrupt signal outputting means may output the interrupt signal when a transmission time of the beacon signal (a reception time of the beacon signal for the said another module acting as a client) arrives.
The processing section may repeatedly execute the predetermined process based on data necessary for game processing, which is received from the said another wireless module in a constant cycle, and include beacon interval setting means of setting a cycle of a beacon signal transmitted by the wireless module to the constant cycle, and the wireless module may transmit the beacon signal in a constant cycle based on the value of the timer, and transmit or receive the data necessary for the game processing to or from the said another wireless module each time the wireless module transmits the beacon signal to the said another wireless module, and the adjustment section may adjust the time at which the processing section executes the predetermined process based on a transmission time of the beacon signal, which is obtained based on the value of the timer of the wireless module of the game apparatus.
The game apparatus may further comprise an input section operated by a player, wherein the processing section may repeatedly execute the predetermined process based on operation information inputted to an input section of the game apparatus and the operation information inputted to another input section of the at least one other game apparatus, and the wireless module may exchange the operation information with the at least one other game apparatus each time the wireless module transmits the beacon signal to the said another wireless module.
The wireless module may further include interrupt signal outputting means of outputting the interrupt signal based on the value of the timer, when the transmission time of the beacon signal arrives, and the adjustment section may adjust a time at which the predetermined process is executed based on a time at which the wireless module outputs an interrupt signal.
The wireless module may transmit or receive the data necessary for the game processing to or from the said another wireless module after transmitting the beacon signal to the said another wireless module, and further include a sleep function of operating in a sleep mode until the transmission time of the beacon signal subsequently arrives after transmitting or receiving the data necessary for the game processing to or from the said another wireless module.
The processing section may read the value of the timer of the wireless module in a constant cycle, and adjust the time at which the processing section executes the predetermined process based on the read value.
The processing section may repeatedly execute game processing of one unit, which processing defines a predetermined procedure, and read the value of the timer of the wireless module in a cycle N times (N is a natural number) as long as the game processing of one unit.
The wireless module may synchronize the timer provided inside the wireless module to the said another timer provided inside the said another wireless module of the at least one other game apparatus based on an IEEE802.11 standard.
Another game apparatus (10a) according to the present invention which realizes a multiplayer gameplay using the game apparatus (10a) and at least one other game apparatus (10b) capable of performing wireless communication with each other, comprises: a wireless module (12a) having a time synchronization function of synchronizing a timer (124a) provided inside the wireless module (12a) to another timer (124b) provided inside another wireless module (12b) of the at least one other game apparatus (10b) which is set as a communication party for the multiplayer gameplay; a processing section (14a,18a) for executing a predetermined process; and a determination section (14a) for determining a time at which the processing section executes the predetermined process based on a value of the timer (124a) of the wireless module of the game apparatus.
Still another game apparatus (10a) according to the present invention which realizes a multiplayer gameplay using the game apparatus (10a) and at least one other game apparatus (10b) capable of performing wireless communication with each other, comprises: a connector (not shown) connectable to a wireless module (12a) having a time synchronization function of synchronizing a timer (124a) provided inside the wireless module (12a) to another timer (124b) provided inside another wireless module (12b) of the at least one other game apparatus (10b) which is set as a communication party for the multiplayer gameplay; a processing section (14a,18a) for executing a predetermined process; an adjustment section (14a) for adjusting a time at which the processing section executes the predetermined process based on the value of the timer (124a) of the wireless module connected to the connector.
A wireless module (12a) according to the present invention which realizes a multiplayer gameplay using a game apparatus (10a) and at least one other game apparatus (10b), comprises: time synchronization means (123a) of synchronizing a timer (124a) provided inside the wireless module (12a) to another timer (124b) provided inside another wireless module (12b); and interrupt signal outputting means (123a) of outputting an interrupt signal in a constant cycle based on a value of the timer (124a).
A game system according to the present invention is a game system which realizes a multiplayer game play using a plurality of game apparatuses including at least a first game apparatus (10a) and a second game apparatus (10b), all of which are capable of performing wireless communication with each other. The first game apparatus includes: a first wireless module (12a) having a time synchronization function of synchronizing a timer (124a) provided inside the first wireless module (12a) to another timer (124b) provided inside a second wireless module (12b) of the second game apparatus; a first processing section (14a,18a) for executing a predetermined process; and a first adjustment section (14a) for adjusting a time at which the first processing section executes the predetermined process based on a value of the timer (124a) of the first wireless module. The second game apparatus includes: the second wireless module having the time synchronization function of synchronizing the said another timer provided inside the second wireless module to the timer provided inside the first wireless module of the first game apparatus; a second processing section (14b,18b) for executing a predetermined process; and a second adjustment section (14b) for adjusting a time at which the second processing section executes the predetermined process based on a value of the said another timer (124b) of the second wireless module.
According to the present invention, it becomes possible to easily synchronize, when performing the multiplayer gameplay using a plurality of game apparatuses capable of performing wireless communication with each other, times at which the plurality of game apparatuses execute the predetermined processes.
These and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGSFIG. 1 is a block diagram illustrating a configuration of a game system according to a first embodiment of the present invention;
FIG. 2 is a sequence diagram illustrating an operation of the game system according to the first embodiment of the present invention;
FIG. 3 is diagram illustrating a corresponding relationship between a display screen and a value of aV counter181a;
FIG. 4 is a flowchart illustrating a flow of a process executed by awireless module12aand awireless module12baccording to the first embodiment of the present invention;
FIG. 5 is a flowchart illustrating a flow of a main process executed by agame processing section14aand agame processing section14baccording to the first embodiment of the present invention;
FIG. 6 is a flowchart illustrating a TBTT interrupt process executed by thegame processing section14aand thegame processing section14baccording to the first embodiment of the present invention;
FIG. 7 is a flowchart illustrating a V blank interrupt process executed by thegame processing section14aand thegame processing section14baccording to the present invention;
FIG. 8 is a sequence diagram illustrating a variant of the operation of the game system according to the first embodiment of the present invention;
FIG. 9 is a block diagram illustrating the configuration of the game system according to a second embodiment of the present invention;
FIG. 10 is a sequence diagram illustrating the operation of the game system according to the second embodiment of the present invention;
FIG. 11 is a flowchart illustrating the flow of the process executed by thewireless module12aand thewireless module12baccording to the second embodiment of the present invention; and
FIG. 12 is a flowchart illustrating the V blank interrupt process executed by thegame processing section14aand thegame processing section14baccording to the second embodiment of the present invention.
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, various embodiments of the present invention will be described.
First EmbodimentFIG. 1 is a block diagram illustrating a configuration of a game system according to a first embodiment of the present invention. Although the present embodiment illustrates an example where two game apparatuses (i.e., afirst game apparatus10aand asecond game apparatus10b) perform wireless communication with each other, the present invention is not limited thereto. The present invention is applicable to a case where three or more game apparatuses perform wireless communication with each other.
Thefirst game apparatus10aand thesecond game apparatus10bare set to each other as communication parties for a multiplayer gameplay. For example, prior to starting the multiplayer gameplay, thefirst game apparatus10aexchanges its own apparatus ID (which may be added with a user ID or a game program ID of a game program executed by thegame apparatus10a) with thesecond game apparatus10bby wireless communication, and presents information concerning thesecond game apparatus10bby means of an image, sound or the like to a player of thefirst game apparatus10a. Based on the information presented as such, the player of thefirst game apparatus10adetermines whether or not to start the multiplayer gameplay together with a player of thesecond game apparatus10b. If the both players instruct the game apparatuses10aand10brespectively to start the multiplayer gameplay together with each other via an input section, thefirst game apparatus10aand thesecond game apparatus10bare set to each other as the communication parties for the multiplayer gameplay.
Thefirst game apparatus10acomprises awireless module12a, agame processing section14a, an interruptcircuit16a, adisplay section18a, aclock20a, astorage section24a, aflame buffer26a, and aninput section28a. Thesecond game apparatus10bhas the same configuration as that of thefirst game apparatus10a, and therefore a detailed description of thesecond game apparatus10bwill be omitted.
To thefirst game apparatus10a, agame cartridge30ais connected via aconnector22a. Thegame cartridge30astores a game program for realizing a game which can be simultaneously played by a plurality of players performing wireless communication between a plurality of game apparatuses. The game program is loaded to thestorage section24avia theconnector22aand executed by thegame processing section14a. Note that the game program may be supplied to thestorage section24afrom a storage medium other than thegame cartridge30asuch as an optical disc or a magnetic disc, or from an external computer or other game apparatuses by wired communication or wireless communication.
Thewireless module12ahas a function of performing wireless communication with awireless module12bof thesecond game apparatus10bin accordance with a communication protocol which complies with a wireless LAN standard IEEE802.11. Although the present embodiment illustrates an example where thewireless module12ais embedded in thefirst game apparatus10a, the present invention is not limited thereto. Thewireless module12amay be connected to thefirst game apparatus10avia a not shown connector included in thefirst game apparatus10a.
Thewireless module12aincludes awireless section121a, astorage section122a, aprocessor123a, aTSF timer124aand aclock125a. Thewireless section121aconverts a baseband signal outputted from theprocessor123ainto a wireless signal, and also receives a wireless signal transmitted from thewireless module12bof thesecond game apparatus12band converts the received wireless signal into a baseband signal. Thestorage section122ais used by theprocessor123afor temporarily retaining data. In addition, thestorage section122ais also used as a transmission/reception buffer for passing data, which is transmitted and received between thefirst game apparatus10aand thesecond game apparatus10b(i.e., data to be transmitted to thesecond game apparatus10band data received from thesecond game apparatus10b), between thegame processing section14aand thewireless module12a. Theprocessor123acontrols wireless communication between thewireless module12aand thewireless module12bbased on the wireless LAN standard IEEE802.11. TheTSF timer124ais a timer for measuring a time period based on a clock signal outputted from theclock125aincluded in thewireless module12a, and is used for synchronizing a process executed by thewireless module12aand a process executed by thewireless module12b. A value of theTSF timer124aindicates an elapsed time since theTSF timer124astarts counting.
In the present embodiment, it is assumed that thewireless module12aoperates as a master, and thewireless module12boperates as a client. Note that when a plurality of wireless modules perform communication with each other, any method may be used for determining one of the wireless modules acting as a master. Each of thewireless module12aand thewireless module12bhas a TSF (Timing Synchronization Function) for synchronizing the process executed by thewireless module12aand the process executed by thewireless module12b. Thewireless module12aacting as the master transmits a beacon signal on a regular basis. Thegame processing section14acan set a transmission cycle of the beacon signal to any cycle (the transmission cycle of the beacon signal may be fixed). In the present embodiment, the transmission cycle of the beacon signal is set to 16.7 msec which is the same as a game processing cycle (i.e., a cycle in which game processing of one unit, which processing defines a predetermined procedure, is repeatedly executed, the cycle being 16.7 msec in the present embodiment) of thegame processing section14a. However, the transmission cycle of the beacon signal is not limited thereto. The transmission cycle of the beacon signal may be an integral multiple of the game processing cycle. The reason therefor will be described later. The beacon signal includes information about the value of theTSF timer124a(hereinafter referred to as a “TSF timer value”) indicating a transmit time of the beacon signal and a beacon interval (a transmission interval of the beacon signal). Aprocessor123bof thewireless module12bwhich receives a beacon signal transmitted from thewireless module12achanges a value of aTSF timer124bso as to become equal to the TSF timer value included in the received beacon signal as appropriate. As described above, the value of theTSF timer124bof thewireless module12bis changed as appropriate based on the beacon signal which is transmitted in a cyclic manner, thereby making it possible to synchronize theTSF timer124aof thewireless module12aand theTSF timer124bof thewireless module12b.
Since the beacon signal includes the information about the beacon interval as described above, thewireless module12bcan recognize a TBTT (Target Beacon Transmit Time) based on the value of theTSF timer124band the information about the beacon interval. When the TBTT arrives, thewireless module12aacting as the master starts an operation of transmitting a beacon signal, and thewireless module12bacting as the client starts an operation of preparing to receive the beacon signal.
In the present embodiment, as shown inFIG. 2, a beacon signal is transmitted from thewireless module12aacting as the master in a cycle of 16.7 msec, and immediately after the beacon signal is transmitted, operation information is transmitted/received between thewireless module12aacting as the master and thewireless module12bacting as the client, in order to share the operation information (information indicating a content of an operation inputted to the input section28 by the player of each of the game apparatuses) between thefirst game apparatus10aand thesecond game apparatus10b. When the transmission/reception of the operation information is completed, each of thewireless module12aand thewireless module12boperates in a sleep mode until the TBTT subsequently arrives. When the TBTT subsequently arrives (to be more precise, immediately before the TBTT subsequently arrives), each of thewireless module12aand thewireless module12breturns to a normal mode from the sleep mode, and thewireless module12astarts the operation of transmitting another beacon signal and thewireless module12bstarts the operation of preparing to receive the said another beacon signal. As such, while sharing the operation information between thefirst game apparatus10aand thesecond game apparatus10bin a cycle of 16.7 msec, power savings of thewireless module12aand thewireless module12bcan be achieved.
Note that it does not necessarily have to be the operation information which is transmitted/received between thewireless module12aand thewireless module12b. For example, a game parameter and the like generated by the game processing executed by each of the game apparatuses10aand10bmay be transmitted/received between thewireless modules12aand12b.
Furthermore, it is not necessary for each of thewireless modules12aand12bto be in the sleep mode after transmitting/receiving the operation information.
In the present embodiment, when the TBTT arrives, theprocessor123aoutputs an interrupt signal (hereinafter referred to as a TBTT interrupt signal). The same is also true of theprocessor123b. The present embodiment assumes that the TBTT interrupt signal is outputted every twelve times the TBTT arrives. However, a frequency in which the TBTT interrupt signal is outputted is not limited thereto. The TBTT interrupt signal may be outputted every N times (N is a natural number) the TBTT arrives. In this case, a cycle in which the TBTT interrupt signal is outputted is a cycle N times as long as the game processing cycle (16.7 msec) of thegame processing section14a.
Thegame processing section14aexecutes the game processing in accordance with the game program stored in thegame cartridge30a. The game processing is executed based on signals outputted from theinput section28aand the operation information, about thesecond game apparatus10b, which is received by thewireless module12a(information concerning an operation inputted by a user of thesecond game apparatus10b). Thegame processing section14agenerates a game image reflecting a result of the game processing, and writes image data of the game image into theflame buffer26a. The game image is updated in a cycle of 16.7 msec.
The interruptcircuit16aoutputs the TBTT interrupt signal outputted from thewireless module12aand a V blank interrupt signal outputted from thedisplay section18a, which is to be described later, to thegame processing section14aas interrupt request signals. When any interrupt request signal is outputted from the interruptcircuit16a, thegame processing section14atemporarily suspends the game processing so as to execute a predetermined interrupt process in response to the interrupt request signal, and resumes the game processing after the interrupt process is completed.
Thedisplay section18ahas a display screen, and displays the game image on the display screen based on the image data written by thegame processing section14ainto theflame buffer26a. The display screen is updated in a cycle of 16.7 msec. Thedisplay section18ais typically comprised of a liquid crystal panel and a display control circuit. Thedisplay section18ahas aV counter181a, and electrical signals corresponding to the image data read from theflame buffer26aare supplied to pixels on a scanning line corresponding to a value of theV counter181a. The value of theV counter181ais updated at a predetermined interval based on a clock signal outputted from theclock20a. The value of theV counter181ais reset to “0” after indicating “262”.
In thedisplay section18a, any pixel of an image displayed on the display screen is not updated during a time period from when scanning which is sequentially performed from a top scanning line of the display screen to a bottom scanning line thereof is completed to when the scanning is returned to the top scanning line (hereinafter referred to as a “V blank period”). During the V blank period, thedisplay section18adoes not access theflame buffer26a. Thus, thegame processing section14awrites the image data into theflame buffer26aduring the V blank period, thereby making it possible to update the image data without distorting the display image.
Note that theV counter181acontinues counting even during the V blank period. In the present embodiment, as shown inFIG. 3, the value of theV counter181aobtained when scanning is performed on the top scanning line of the display screen is “0”, the value of theV counter181aobtained when the scanning is performed on the bottom scanning line of the display screen is “191”, and the value of theV counter181aobtained immediately before the scanning is performed on the top scanning line of the display screen is “262”. In this case, a time period during which the value of theV counter181ais within a range from “192” to “262” is the V blank period. Thedisplay section18ahas a function of outputting the V blank interrupt signal when the V blank period arrives (i.e., when the value of theV counter181abecomes “192”). The interruptcircuit16awhich receives the V blank interrupt signal from thedisplay section18atransmits a V blank interrupt request signal to thegame processing section14a. Thegame processing section14astarts writing the image data into theflame buffer26ain response to the V blank interrupt request signal, thereby allowing thegame processing section14ato write the image data into theflame buffer26aduring the V blank period.
Thestorage section24ais a storage area used by thegame processing section14aexecuting the game program.
Theflame buffer26ais a storage area for temporarily retaining the image data generated by thegame processing section14aso as to be outputted to thedisplay section18a.
Theinput section28ais a game controller operated by the player, and outputs a signal in accordance with an operation performed by the player.
In the present embodiment, thegame processing section14aexecutes the game processing in the same cycle as that in which thedisplay section18aupdates the display screen (16.7 msec). Specifically, a series of processes in which thegame processing section14a(1) shares the operation information between thefirst game apparatus10aand thesecond game apparatus10b, (2) executes the game processing based on the shared operation information, and (3) generates the game image reflecting a result of the game processing and writes the generated image data into theflame buffer26ais repeated in a cycle of 16.7 msec.
In the case where the players of thefirst game apparatus10aand thesecond game apparatus10bplay the multiplayer game by causing thefirst game apparatus10aand thesecond game apparatus10bto perform wireless communication with each other, it is preferable that the game processing cycle of thegame processing section14aof thefirst game apparatus10acoincides with that of thegame processing section14bof thesecond game apparatus10b. This is because if the game processing cycles between thegame processing sections14aand14bare shifted from each other, a game processing result of thefirst game apparatus10aand a game processing result of thesecond game apparatus10bmay be accordingly shifted from each other.
In the present embodiment, thegame processing section14aof thefirst game apparatus10aadjusts theV counter181awith respect to a time at which thewireless module12aoutputs the TBTT interrupt signal. Similarly, thegame processing section14bof thesecond game apparatus10badjusts theV counter181bwith respect to a time at which thewireless module12boutputs the TBTT interrupt signal. Hereinafter, an adjustment process executed by thegame processing section14aadjusting theV counter181awill be described in detail.
In an interrupt process to be executed when thewireless module12aoutputs the TBTT interrupt signal (hereinafter referred to as a “TBTT interrupt process”), thegame processing section14atemporarily stores the value of theV counter181aobtained when the TBTT interrupt signal is outputted (hereinafter referred to as a “V counter value at TBTT” in thestorage section24a. Furthermore, in another interrupt process to be executed when thedisplay section18aoutputs the V blank interrupt signal (hereinafter referred as a “V blank interrupt process”), thegame processing section14acalculates a difference between the V counter value at TBTT stored in thestorage section24aand a predetermined ideal value (“0” in the present embodiment, for example), thereby increasing or decreasing the value of theV counter181abased on the difference such that the value of theV counter181aobtained when the TBTT interrupt signal is outputted becomes close to the predetermined ideal value. For example, when the V counter value at TBTT is “2”, “2” is subtracted from the value of theV counter181a. When the V counter value at TBTT is “260”, “3” is added to the value of theV counter181a. As described above, the value of theV counter181ais not changed when the TBTT interrupt process is executed, but changed when the V blank interrupt process is executed. This is because the value of theV counter181acan be changed during the V blank period. During the V blank period, the display screen is never distorted even if the value of theV counter181ais changed. Only if distortion on the display screen is allowed, the value of theV counter181amay be changed at any time.
Note that in the case where a certain value is subtracted from the value of theV counter181a, thegame processing section14aadjusts the subtracted value of theV counter181aso as not to be smaller than the value of theV counter181aobtained at a time of V blank interruption (“192” in the present embodiment). Specifically, in the case where “2” is subtracted from the value of theV counter181a, the value of theV counter181ais not to be changed until the value of theV counter181abecomes “195” or greater. In this case, the subtracted value of theV counter181awill be “193” or greater.
When the difference between the V counter value at TBTT and the predetermined ideal value is greater than a predetermined value (“4”, for example), instead of causing the value of theV counter181aobtained when the TBTT interrupt signal is outputted to instantly coincide with the predetermined ideal value, the value of theV counter181amay be caused to become close to the predetermined ideal value gradually in a plurality of stages. This can be realized, for example, when a range within which the value of theV counter181acan be changed at one time is limited from “−4” to “+4”. Thus, even when there is a great difference between the V counter value at TBTT and the predetermined ideal value, the game processing cycle can be adjusted without causing the player to feel awkward.
On the other hand, when the difference between the V counter value at TBTT and the predetermined ideal value is smaller than a predetermined value (“2”, for example), a change in the value of theV counter181amay be omitted.
By executing the adjustment process as described above, the game processing cycle of thegame processing section14ais synchronized to the TBTT in thewireless module12a. Similarly, in the case of thesecond game apparatus10b, thegame processing section14badjusts theV counter181b, thereby synchronizing the game processing cycle of thegame processing section14bto the TBTT in thewireless module12b. Here, the TSF allows the TBTT in thewireless module12aand the TBTT in thewireless module12bto be synchronized to each other. As a result, the game processing cycle of thegame processing section14aand the game processing cycle of thegame processing section14bare also synchronized to each other accordingly.
Hereinafter, described will be flows of processes executed by thegame processing section14a, thegame processing section14b, thewireless module12aand thewireless module12bwhen executing the game in accordance with the game program loaded to thestorage section24a(thestorage section24b) from thegame cartridge30a(thegame cartridge30b).
With reference to a flowchart shown inFIG. 4, the flow of the process executed by thewireless module12aand thewireless module12bwill be firstly described.
In step S10, theprocessor123aof thewireless module12aacting as the master outputs a beacon signal via thewireless section121a. The beacon signal includes the value ofTSF timer124aobtained at a transmit time of the beacon signal and the information about the beacon interval set by thegame processing section14a.
In step S12, based on the value of theTSF timer124aand the beacon interval, theprocessor123adetermines whether or not a TBTT arrives. When it is determined that the TBTT arrives, the process proceeds to step S14. Note that when thewireless module12aoperates in the sleep mode, thewireless module12areturns to the normal mode from the sleep mode in response to an arrival of the TBTT (strictly speaking, thewireless module12areturns to the normal mode from the sleep mode immediately prior to the TBTT).
In step S14, theprocessor123adetermines whether or not the currently arriving TBTT is a twelfth TBTT counting from when the TBTT interrupt signal is most recently outputted. When it is determined that the currently arriving TBTT is the twelfth TBTT, the process proceeds to step S16. On the other hand, when it is determined that the currently arriving TBTT is not the twelfth TBTT, the process proceeds to step S18. As a method of determining whether or not the currently arriving TBTT is the twelfth TBTT counting from when the TBTT interrupt signal is most recently outputted, a counter may be prepared in thestorage section122aso as to count the number of times the TBTT arrives from when the TBTT interrupt signal is most recently outputted. Then, the counter may count up each time the TBTT arrives, and the counter may be reset when the TBTT interrupt signal is newly outputted.
In step S16, theprocessor123aoutputs the TBTT interrupt signal to the interruptcircuit16a.
In step S18, theprocessor123aoutputs another beacon signal via thewireless section121a.
In step S20, via thewireless section121a, theprocessor123atransmits to thesecond game apparatus10bthe operation information about thefirst game apparatus10awhich is stored in thestorage section122aby thegame processing section14a, and receives the operation information about thesecond game apparatus10bfrom thesecond game apparatus10band stores the received operation information about thesecond game apparatus10bin thestorage section122a, in accordance with a predetermined procedure. Thereafter, thewireless module12ashifts to the sleep mode and the process returns to step S12.
In the present embodiment, a transmission cycle of the beacon signal is synchronized to the game processing cycle, and the operation information is exchanged between the two wireless modules at the beacon interval. Therefore, each of the two wireless modules can obtain most recent operation information about the other communication party in each game processing cycle, and thus it is effective that a process can be executed based on the most recent operation information in the each game processing cycle. Furthermore, since each of the wireless modules recognizes the TBTT (Target Beacon Transmit Time), times at which the operation information is transmitted/received between the wireless modules can be effectively synchronized to each other, thereby making it possible to cause the wireless modules to be intermittently operated in the sleep mode as appropriate.
A process from steps S12 to S20 is repeated in a cycle of 16.7 msec which is the transmission cycle of the beacon signal.
Next, in step S22, theprocessor123bof thewireless module12bacting as the client receives the beacon signal (which is transmitted from thewireless module12ain step S10) via thewireless section121b.
In step S24, theprocessor123bsets the value of theTSF timer124bbased on the TSF timer value included in the beacon signal received in step S22.
In step S26, based on the value of theTSF timer124band the beacon interval included in the beacon signal received in step S20, theprocessor123bdetermines whether or not a TBTT arrives. When it is determined that the TBTT arrives, the process proceeds to step S28. Note that when thewireless module12boperates in the sleep mode, thewireless module12breturns to the normal mode from the sleep mode in response to the arrival of the TBTT (strictly speaking, thewireless module12breturns to the normal mode from the sleep mode immediately prior to the TBTT).
In step S28, theprocessor123bdetermines whether or not the currently arriving TBTT is a twelfth TBTT counting from when the TBTT interrupt signal is most recently outputted. When it is determined that the currently arriving TBTT is the twelfth TBTT, the process proceeds to step S30. On the other hand, when it is determined that the currently arriving TBTT is not the twelfth TBTT, the process proceeds to step S32.
In step S30, theprocessor123boutputs the TBTT interrupt signal to the interruptcircuit16b.
In step S32, theprocessor123breceives the said another beacon signal (which is transmitted from thewireless module12ain step S18) via thewireless section121b.
In step S34, based on the TSF timer value included in the said another beacon signal received in step S32 (the value of theTSF timer124aobtained when thewireless module12atransmits the said another beacon signal in step S18), theprocessor123bupdates the value of theTSF timer124b, thereby correcting a difference between theTSF timer124aand theTSF timer124b.
In step S36, via thewireless section121b, theprocessor123breceives the operation information about thefirst game apparatus10afrom thefirst game apparatus10aand stores the received operation information about thefirst game apparatus10ain thestorage section122b, and transmits to thefirst game apparatus10athe operation information about thesecond game apparatus10bwhich is stored in thestorage section122bby thegame processing section14b, in accordance with a predetermined procedure. Thereafter, thewireless module12bshifts to the sleep mode and the process returns to step S26.
A process from steps S26 to S36 is repeatedly executed in a cycle of 16.7 msec which is the transmission cycle of the beacon signal.
Next, with reference to a flowchart shown inFIG. 5, the flow of the main process executed by thegame processing section14aand thegame processing section14bwill be described.
In step S40, thegame processing section14aof thefirst game apparatus10aacting as the master sets an interval of a beacon signal to be outputted from thewireless module12ato a time period N times as long as the game processing cycle (16.7 msec in the present embodiment).
In step S42, thegame processing section14ashares the operation information between thefirst game apparatus10aand thesecond game apparatus10b. Specifically, thegame processing section14astores the operation information about thefirst game apparatus10ain a transmission buffer (thestorage section122a) of thewireless module12a, and obtains the operation information about thesecond game apparatus10bstored in a reception buffer (thestorage section122a).
In step S44, based on the operation information shared in step S42 between thefirst game apparatus10aand thesecond game apparatus10b, thegame processing section14aexecutes the game processing. For example, when a first character operated by the player of thefirst game apparatus10aand a second character operated by the player of thesecond game apparatus10bexist in a shared virtual game space, thegame processing section14acontrols the first character based on the operation information about thefirst game apparatus10aand controls the second character based on the operation information about thesecond game apparatus10b.
In step S46, thegame processing section14adetermines whether or not the interruptcircuit16aoutputs a V blank interrupt signal as the interrupt request signal. When it is determined that the V blank interrupt signal is outputted, the process proceeds to step S48. On the other hand, when it is determined that the V blank interrupt signal is not yet outputted, the game processing in step S44 continues until the V blank interrupt signal is outputted. Note that when the V blank interruption occurs even in the middle of the game processing in step S44, the game processing in step S44 is stopped and the process proceeds to step S48.
In step S48, thegame processing section14agenerates game image data reflecting a result of the game processing in step S44 and writes the game image data into theflame buffer26a. Thereafter, the process returns to step S42.
A process from steps S42 to S48 is repeatedly executed in a cycle of 16.7 msec which is the game processing cycle of thegame processing section14a(in the present embodiment, the game processing cycle of thegame processing section14ais equivalent to a cycle in which the display screen of thedisplay section18ais updated).
Next, in step S50, thegame processing section14bof thesecond game apparatus10bacting as the client shares the operation information between thefirst game apparatus10aand thesecond game apparatus10b. Specifically, thegame processing section14bstores the operation information about thesecond game apparatus10bin a transmission buffer (thestorage section122b) of thewireless module12b, and obtains the operation information about thefirst game apparatus10astored in a reception buffer (thestorage section122b).
In step S52, based on the operation information shared in step S50 between thefirst game apparatus10aand thesecond game apparatus10b, thegame processing section14bexecutes the game processing. For example, when the first character operated by the player of thefirst game apparatus10aand the second character operated by the player of thesecond game apparatus10bexist in the shared virtual game space, thegame processing section14bcontrols the first character based on the operation information about thefirst game apparatus10aand controls the second character based on the operation information about thesecond game apparatus10b.
In step S54, thegame processing section14bdetermines whether or not the interruptcircuit16boutputs a V blank interrupt signal as the interrupt request signal. When it is determined that the V blank interrupt signal is outputted, the process proceeds to step S56. On the other hand, when it is determined that the V blank interrupt signal is not yet outputted, the game processing in step S52 continues until the V blank interrupt signal is outputted. Note that when the V blank interruption occurs even in the middle of the game processing in step S52, the game processing in step S52 is stopped and the process proceeds to step S56.
In step S56, thegame processing section14bgenerates game image data reflecting a result of the game processing in step S52 and writes the game image data into theflame buffer26b. Thereafter, the process returns to step S50.
A process from steps S50 to S56 is repeatedly executed in a cycle of 16.7 msec which is the game processing cycle of thegame processing section14b(in the present embodiment, the game processing cycle of thegame processing section14bis equivalent to a cycle in which the display screen of thedisplay section18bis updated).
Note that when the interruptcircuit16aoutputs the interrupt request signal, thegame processing section14asuspends the aforementioned main process so as to execute the interrupt process (the TBTT interrupt process or the V blank interrupt process) in response to the interrupt request signal. The same is also true of thegame processing section14b.
In the TBTT interrupt process, as shown inFIG. 6, thegame processing section14areads the value of theV counter181aobtained when the TBTT interrupt signal is outputted, and stores the value thus obtained as the V counter value at TBTT in thestorage section24a. The same is also true of thegame processing section14b.
In the V blank interrupt process, as shown inFIG. 7, based on the V counter value at TBTT stored in thestorage section24awhen the TBTT interrupt process is most recently executed, thegame processing section14aupdates the value of theV counter181a. A detailed process of updating the value of theV counter181ahas been described above. The same is also true of thegame processing section14b.
As described above, in the present embodiment, based on the TBTT interrupt signal outputted from each of thewireless module12aand thewireless module12bin a cycle N times as long as the game processing cycle, thefirst game apparatus10aand thesecond game apparatus10badjust theV counter181aand theV counter181b, respectively, thereby making it possible to synchronize the game processing executed by thefirst game apparatus10aand the game processing executed by thesecond game apparatus10b.
Particularly, thewireless module12aand thewireless module12bcan be realized simply by adding a slight change (i.e., adding a function of outputting the TBTT interrupt signal) to a conventional wireless module which complies with the wireless LAN standard IEEE802.11, thereby making it possible to achieve the present invention at a low cost.
Furthermore, the game processing cycles of thegame processing sections14aand14bcoincide with communication cycles (cycles in which the operation information is transmitted/received) of thewireless modules12aand12b, respectively. Therefore, unlike the conventional art, there is no need to create the game program taking into consideration differences between the game processing cycles of thegame processing sections14aand14band the communication cycles of thewireless modules12aand12b, respectively. Thus, it becomes possible to reduce troublesome tasks required for a programming work performed by a programmer.
Although the present embodiment illustrates an example where thewireless module12a(thewireless module12b) operates in the sleep mode for a time period from when the operation information is transmitted/received to when the TBTT subsequently arrives, the present invention is not limited thereto.
Although the present embodiment illustrates an example where thewireless module12a(thewireless module12b) complies with the wireless LAN standard IEEE802.11, the present invention is not limited thereto. Any wireless module having the TSF (a function of synchronizing timers provided inside the wireless modules) can be used. For example, a wireless module which complies with a standard such as Bluetooth (registered trademark) or Zigbee (registered trademark) can be used.
Although the present embodiment illustrates an example where the game processing cycle is synchronized to a cycle in which the display screen is updated, the present invention is not limited thereto. The game processing cycle may be different from the cycle in which the display screen is updated. In this case, thefirst game apparatus10a(thesecond game apparatus10b) needs to include, other than theV counter181a(theV counter181b), a game processing cycle counter for measuring the game processing cycle, and thegame processing section14a(thegame processing section14b) may adjust the game processing cycle counter based on a time at which the TBTT interrupt signal is outputted.
Although the present embodiment illustrates and example where the operation information is transmitted/received in a cycle of 16.7 msec, the present invention is not limited thereto. In the case where an operation performed by the player needs to be instantly reflected in the game processing such as an action game, for example, it is desirable that the operation information is frequently transmitted/received. On the contrary, in the case where the operation performed by the player does not need to be instantly reflected in the game processing such as a table game, it is not necessary to transmit/receive the operation information as frequently as the action game.
Although the present embodiment illustrates an example where the value of theV counter181a(theV counter181b) is adjusted so as to become close to “0” when the TBTT interrupt signal is outputted, the present invention is not limited thereto. The value of theV counter181a(theV counter181b) may be adjusted so as to become close to a specified value other than “0” when the TBTT interrupt signal is outputted.
The present embodiment illustrates an example where the game processing cycle is 16.7 msec. However, this is merely an example and the present invention is not limited thereto.
Although the present embodiment illustrates an example where the value of theV counter181a(theV counter181b) is adjusted based on the TBTT interrupt signal outputted from thewireless module12a(thewireless module12b) in response to the arrival of the TBTT, the present invention is not limited thereto. For example, irrespective of the arrival of the TBTT, theprocessor123a(theprocessor123b) of thewireless module12a(thewireless module12b) may output an interrupt signal (conveniently referred to as a “TSF timer interrupt signal”) in a cycle N times as long as the game processing cycle based on theTSF timer124a(theTSF timer124b), and thegame processing section14a(thegame processing section14b) may adjust the value of theV counter181a(theV counter181b) based on the TSF timer interrupt signal. In this case, the transmission interval of the beacon signal can be freely set irrespective of the game processing cycle. However, in this case, a counter for outputting the TSF timer interrupt signal in a predetermined cycle needs to be additionally prepared.
Furthermore, in an example shown inFIG. 2, thewireless module12aacting as the master outputs the TBTT interrupt signal at the same time as thewireless module12bacting as the client. However, thewireless module12adoes not need to output the TBTT interrupt signal at the same time as thewireless module12b. As shown inFIG. 8, for example, 16.7 msec after thewireless module12aoutputs the TBTT interrupt signal, the TBTT interrupt signal may be outputted from thewireless module12b.
Thewireless module12aand thewireless module12bmay not only have an operation mode for outputting the TBTT interrupt signal (tentatively referred to as a “local game mode”), as described in the present invention, but also have a function of operating in an infrastructure mode or an ad hoc mode, which are operation modes of a general wireless communication module (the TBTT interrupt signal is not outputted in the infrastructure mode or the ad hoc mode). In this case, each of thewireless module12aand thewireless module12bswitches the aforementioned operation modes between each other based on an instruction outputted from each of thegame processing section14aand thegame processing section14b.
Note that the infrastructure mode or the ad hoc mode are terms used in the wireless LAN standard IEEE802.11, and therefore the descriptions thereof will be omitted. The aforementioned local game mode is a mode in which the ad hoc mode is customized to be used for a communication game.
Furthermore, the present embodiment illustrates an example where the interruptcircuit16aoutputs the TBTT interrupt signal to thegame processing section14a, thereby causing thegame processing section14ato execute the adjustment process of adjusting theV counter181a. However, by additionally providing an adjustment circuit, the interruptcircuit16amay output the TBTT interrupt signal to the adjustment circuit, thereby causing the adjustment circuit to execute the adjustment process of adjusting theV counter181a. The adjustment circuit may be provided inside or outside thewireless module12a. Alternatively, the interruptcircuit16amay be provided inside thewireless module12a. Still alternatively, the interruptcircuit16amay output the TBTT interrupt signal to theprocessor123aof thewireless module12a, thereby causing theprocessor123ato execute the adjustment process of adjusting theV counter181a.
Furthermore, thegame processing section14aand/or thedisplay section18amay execute a predetermined process in a cycle of 16.7 msec based on theTSF timer124a(by reading theTSF timer124aor in response to an interrupt request outputted based on the TSF timer value) (in this case, theclock20aor theV counter181aare not necessary).
Still furthermore, each of thegame processing section14aand thedisplay section18amay not execute a process in a predetermined cycle. Specifically, in the case where a time at which thegame processing section14aof thefirst game apparatus10aexecutes the process needs to coincide with a time at which thegame processing section14bof thesecond game apparatus10bexecutes the process, and/or in the case where a time at which thedisplay section18aof thefirst game apparatus10aexecutes the process needs to coincide with a time at which thedisplay section18bof thesecond game apparatus10bexecutes the process, it can be achieved by causing each of the game apparatuses10aand10bto determine, based on its own TSF timer value (or based on its own V counter value adjusted in accordance with the TSF timer value), the time at which each of thegame processing section14aor14bexecutes the process and/or the time at which each of thedisplay section18aor18bexecutes the process.
Still furthermore, the present embodiment illustrates an example where oneflame buffer26ais provided. However, the present invention is applicable as a game apparatus in which a plurality of flame buffers26aare provided and the plurality of flame buffers26aare used by switching therebetween so as to be synchronized to the cycle in which thedisplay section18aupdates the display screen. In this case, thegame processing section14aswitches a flame buffer used by thedisplay section18a(a flame buffer which stores the image data to be outputted to the screen of thedisplay section18a) from one to another during the V blank period (specifically, when step S48 or the like is executed). In this case, not even during the V blank period, thegame processing section14awrites the image data into theflame buffer26anot currently used by thedisplay section18a, thereby making it possible to update the game image.
Although the present embodiment illustrates an example where theV counter181a(theV counter181b) is adjusted based on the TBTT interrupt signal outputted from thewireless module12a(thewireless module12b), the present invention is not limited thereto. TheV counter181a(theV counter181b) may be adjusted without using an interrupt signal outputted from thewireless module12a(thewireless module12b). Hereinafter, an example where the V counter is adjusted by polling without using the interrupt signal will be described as a second embodiment.
Second EmbodimentFIG. 9 is a block diagram illustrating the configuration of the game system according to the second embodiment of the present invention. The configuration shown inFIG. 9 is similar to that shown inFIG. 1 except that the TBTT interrupt signals are not outputted from theprocessors123aand123bto the interruptcircuits16aand16b, respectively, and therefore a detailed description thereof as shown inFIG. 9 will be omitted.
According to the second embodiment, as shown inFIG. 10, thegame processing section14aobtains the value of theTSF timer124a(the TSF timer value) of thewireless module12aon a regular basis in a cycle N times as long as 16.7 msec, thereby adjusting theV counter181abased on the TSF timer value thus obtained. The same is also true of thegame processing section14b.
Hereinafter, described will be the flows of the processes executed by thegame processing section14a, thegame processing section14b, thewireless module12aand thewireless module12bwhen executing the game in accordance with the game program loaded to thestorage section24a(thestorage section24b) from thegame cartridge30a(thegame cartridge30b).
FIG. 11 is a flowchart illustrating the flow of the process executed by thewireless module12aand thewireless module12bwill be described. Note that the process shown inFIG. 11 is similar to that shown inFIG. 4 except that a process which pertains to transmission of the TBTT interrupt signal (i.e., processes of steps S14, S16, S28 and S30 which are shown inFIG. 4) is deleted, and therefore a detailed description thereof as shown inFIG. 11 will be omitted.
Note that prior to step S10, thefirst game apparatus10aacting as the master previously adjusts the value of theV counter181asuch that the TSF timer value becomes equal to a natural number multiple of the game processing cycle at the time of the V blank interruption (i.e., at a time when the value of theV counter181abecomes “192” in the present embodiment). The same is also true of thesecond game apparatus10bacting as the client.
According to the second embodiment, the flow of the main process executed by thegame processing section14aand thegame processing section14bis the same as that in the first embodiment (seeFIG. 5). Note that in the first embodiment, the transmission interval of the beacon signal is set N times as long as the game processing cycle. However, in the second embodiment where the TBTT interrupt signal is not used, the transmission interval of the beacon signal may be set freely.
Note that when the interruptcircuit16aoutputs an interrupt request signal, thegame processing section14asuspends the aforementioned main process so as to execute an interrupt process (the V blank interrupt process) in response to the interrupt request signal. The same is also true of thegame processing section14b.
FIG. 12 is a flowchart illustrating a detail of the V blank interrupt process. In step S70, thegame processing section14adetermines whether or not the currently executed V blank interrupt process is a twelfth V blank interrupt process counting from when the value of theV counter181ais most recently updated. When it is determined that the currently executed V blank interrupt process is the twelfth V blank interrupt process, the process proceeds to step S72. On the other hand, when it is determined that the currently executed V blank interrupt process is not the twelfth V blank interrupt process, the V blank interrupt process is finished. In step S72, thegame processing section14aobtains the value of theTSF timer124aobtained when the twelfth V blank interrupt process is executed as the TSF timer value. In step S74, thegame processing section14acalculates a remainder by dividing the TSF timer value (in msec) obtained in step S72 by 16.7 msec which is the game processing cycle. In step S76, thegame processing section14aupdates the value of theV counter181abased on the remainder calculated in step S74.
Hereinafter, processes of steps S74 and S76 will be described in detail.
Thegame processing section14acalculates a difference between the remainder calculated in step S74 and a predetermined ideal value (“0” in the present embodiment, for example), thereby increasing or decreasing the value of theV counter181abased on the difference such that the remainder calculated in step S74 becomes close to the predetermined ideal value.
For example, the TSF timer value obtained in step S72 is 200.6 msec, a remainder calculated in step S74 is 0.2 msec from an expression 200.6 msec=16.7 msec×12+0.2 msec. In the present embodiment, theV counter181acounts from “0” to “262” during 16.7 msec which is the game processing cycle. Therefore, from an expression 263×0.2 msec÷16.7 msec=3.1, 0.2 msec corresponds to approximately three counts of theV counter181a(three scanning lines). Thus, in step S76, thegame processing section14asubtracts “3” from the value of theV counter181a.
Alternatively, for example, the TSF timer value obtained in step S72 is 249.8 msec, a remainder calculated in step S72 is 16.0 msec from an expression 249.8 msec=16.7 msec×14+16.0 msec. From an expression 263×16.0 msec÷16.7 msec=252.0, 16.0 msec corresponds to approximately 252 counts of theV counter181a(252 scanning lines). This indicates that if the value of theV counter181acounts up by “11” (=263−252), a remainder calculated in step S74 of the V blank interrupt process to be subsequently executed will be substantially “0”. Thus, in step S76, thegame processing section14aadds “11” to the value of theV counter181a.
When a value to be added/subtracted to/from the value of theV counter181ais greater than a predetermined value (“4”, for example), instead of adding/subtracting the value to/from the value of theV counter181a, the value of theV counter181amay be added/subtracted in a plurality of stages. On the other hand, when the value to be added/subtracted to/from the value of theV counter181ais smaller than a predetermined value (“2”, for example), a change in the value of theV counter181amay be omitted.
By executing the aforementioned process, it becomes possible to cause a time at which the V blank period starts to coincide with a time at which theTSF timer124aindicates a multiple of 16.7 msec. Therefore, it is assured that thegame processing section14aexecutes the game processing in a cycle of 16.7 msec based on theTSF timer124a. Similarly, it is also assured that thegame processing section14bexecutes the game processing in a cycle of 16.7 msec based on theTSF timer124b. The TSF of each of the wireless modules assures that theTSF timer124aand theTSF timer124bare synchronized to each other. As a result, the game processing cycle of thegame processing section14aand the game processing cycle of thegame processing section14bare also synchronized to each other accordingly.
Although the present embodiment illustrates an example where the value of the V counter is adjusted such that the remainder calculated in step S74 shown inFIG. 12 becomes close to “0”, the present invention is not limited thereto. The value of the V counter may be adjusted such that the remainder calculated in step S74 shown inFIG. 12 becomes close to a specified value other than “0”.
Although the present embodiment illustrates an example where the value of the V counter is adjusted based on the TSF counter value obtained when the V blank period starts, the present invention is not limited thereto.
Furthermore, in an example shown inFIG. 10, thegame processing section14aof thefirst game apparatus10aacting as the master reads the TSF timer value at the same time as thegame processing section14bof thesecond game apparatus10bacting as the client. However, thegame processing section14adoes not need to read the TSF timer value at the same time as thegame processing section14b. For example, 16.7 msec after thegame processing section14aof thefirst game apparatus10areads theTSF timer124a, thegame processing section14bof thesecond game apparatus10bmay read theTSF timer124b.
Although the present embodiment illustrates an example where the value of theV counter181a(theV counter181b) is adjusted every twelve times the V blank interrupt signal is outputted, the present invention is not limited thereto. For example, the value of theV counter181a(theV counter181b) may be adjusted each time the V blank interrupt signal is outputted.
While the invention has been described in detail, the foregoing description is in all aspects illustrative and not restrictive. It is understood that numerous other modifications and variations can be devised without departing from the scope of the invention.