CPU controlled apparatus capable of storing a program address

Abstract: In a game software apparatus, a ROM incorporating a program, a decoder for supplying a selection signal of the ROM, a backup RAM for holding a function outputted from a CPU incorporated in a game machine and a decoder for controlling the RAM are activated by a power supplied from the game machine. When the power from the game machine is cut off, the power source is changed by a changeover circuit so that power is supplied from a battery incorporated in the game software apparatus to the RAM and to the decoder while the power from the game machine is being cut. The two decoders and the changeover circuit are provided on a one-chip IC.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to an apparatus such as a game apparatus which is operated by a control of a central processing unit (CPU) for executing a control program. Description of the Prior Art An apparatus operating on the power supply from a power source generally uses the commercial alternating current (AC) power supply. Since it is inconvenient that a function of such an apparatus is started again from the beginning when the power supply is started again after the commercial AC power supply is cut due to power failure or after the apparatus is turned off, the function being performed at the time when the power is cut is backed up so that the function is continuously performed when the power supply is restored. During such a backup period, a battery is used as the power source. In order to reduce the power consumption of the battery to the minimum, it is preferable to back up only the irreducible minimum of the circuits in the apparatus with the battery. Therefore, in the case of an apparatus operated by a central processing unit (CPU), a memory such as a random access memory (RAM) is provided to maintain a program or a data activated while the power is being supplied at the point of time when the power is cut. The program or the data is successively stored in the RAM in advance while the power is being supplied. In a conventional arrangement of Fig. 1, an address command data from a CPU 30 is decoded firstly by a first circuit 31 and then by a second circuit 32, thereby obtaining an address of a read only memory (ROM) 33. It is impossible to use an output of the first circuit 31 without any processing. This output is not usable until it is further decoded by the second circuit 32. In this conventional arrangement, at least two ICs (31 and 32) are used. This is because the circuit is constructed by using a general purpose IC since no integrated circuit (IC) specifically used to decode an address command data from a CPU is provided. A third circuit 34 is used to supply a selection signal from the CPU 40 to a RAM 35. To the RAM 35, a new program address is written in accordance with the progress of the program. With respect to the power source, power from an AC adapter 36 is supplied to the CPU 30, to the first and second circuits 31 and 32 and to the ROM 33. Selection between the power from the AC adapter 36 and the power from a battery 37 is automatically made by diodes D1 and D2. The selected power is provided to the third circuit 34 and to the RAM 35. In this case, when power is outputted from the AC adapter 36, the diode D1 is ON and the diode D2 is OFF, so that power from the AC adapter 36 is selected. When no power is outputted from the AC adapter 36, the diode D1 is OFF and the diode D2 is ON, so that power from the battery 37 is selected. In this conventional arrangement, however, since a plurality of circuits are used to decode the addressing data from the CPU 30 (i.e. the addressing data is decoded by the first and second circuits 31 and 32) to thereby obtain the selection signal (address) of the ROM 33, the processing line to the ROM 33 is long. As a result, the signal delay between the input and the output increases. This is because there are stages of gates constituting the first and second circuits 31 and 32 provided in series and because delay is caused by distributed capacity of a connecting line between ICs. A signal for selecting the RAM 35 provided through the third circuit 34 is delayed in a similar manner. If the delay of the selection signal increases, the reading of a program data at the ROM 33 and the reading and writing at the RAM 35 will be delayed, so that the timing of the entire game apparatus does not concur with that of the CPU 30. Moreover, since the diodes D1 and D2 which are discrete parts are used to select the power source, a power loss is caused due to a voltage drop by the diodes D1 and D2. Further, because of the diodes D1 and D2 and the circuits 31, 32 and 34, the number of parts and the space on the circuit board occupied by those parts increase. An apparatus operated by a central processing unit according to the pre-characterizing part of claim 1 is known from EP-A-0 268 419. Nevertheless, according to this document, while the data of the program address when the main power source is turned off is stored in the RAM, the execution of the program is stopped by the turning off of the main power source. Accordingly, an arbitrary program point cannot be stored during the execution of the program so that the user can return to this program point. SUMMARY OF THE INVENTION It is therefore an object of the present invention to provide an new and improved apparatus operated by a CPU, which can overcome the above drawbacks. Another object of the present invention is to provide an apparatus in which the signal delay and the power loss are reduced to the minimum and the number of parts is small. This object is achieved by an apperatus operated by a CPU according to claim 1. The dependent claims are related to different advantageous aspects of the present invention. According to the invention the first and second controlling circuits and the changeover circuit are provided on a one-chip semiconductor substrate. According to the present invention, since the controlling circuits are formed as one IC, the arrangement that an IC and an IC are connected is unnecessary. Moreover, since the number of gates provided in series is generally small, the signal line is short, and the delay caused on the signal processing line is reduced accordingly. Further, since the power changeover circuit is formed in the IC in which the first and second controlling circuit are formed, the power changeover circuit can be formed by a device in which no voltage drop occurs or the voltage drop is small. BRIEF DESCRIPTION OF THE DRAWINGS This and other objects and features of this invention will become clear from the following description, taken in conjunction with the preferred embodiments with reference to the accompanied drawings in which: Fig. 1 is a block circuit diagram of a conventional apparatus; Fig. 2 is a block circuit diagram of a game apparatus embodying the present invention; Fig. 3 is a detailed circuit diagram of a power changeover circuit of the game apparatus; and Fig. 4 is a conceptional view showing the apparatus of Fig. 2 used for a television game apparatus. DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an embodiment of the present invention will be described with reference to the drawings. Referring to Fig. 2, reference numeral 1 represents a game machine, which is provided with a CPU 2 for controlling the entire apparatus and a work RAM 6 for executing a game. Reference numeral 24 represents an operation key for setting a preservation of a program address. Reference numeral 3 represents an AC adapter connected to the game machine 1. The AC adapter 3 converts, for example, a 100V commercial AC voltage into a 10V direct current (DC) voltage and supplies it to the game machine 1. The game machine 1 is provided with a switch 4 for turning on and off the power. Reference numeral 5 represents a game software apparatus detachably attached to the game machine 1. The game software apparatus 5 is provided with a one-chip IC 10, a battery 11, a ROM 12 incorporating a game program and a RAM 13 for storing an address of the program. The IC 10 is provided with decoders 7 and 8 for decoding an address data from the CPU 2, and a power changeover circuit 9. An address signal which is an output from the decoder 7 (first controlling circuit) is supplied to the ROM 12 to read out the program stored in the ROM 12. The program read out from the ROM 12 is transmitted from the game software apparatus 5 to the game machine 1 through a bus 14. The decoder 8 (second controlling circuit) decodes the address data transmitted from the CPU 2 to select the RAM 13 and supplies the decoded data to the RAM 13. When the operation key 24 is operated, an address data of the game program at that time is transmitted from the CPU 2 through a bus 15a and stored in the RAM 13. The data read out from the RAM 13 is outputted to a bus 15a and transmitted from the game software apparatus 5 to the game machine 1. The bus 15b is provided to command the reading/writing of the RAM 13. Reference numeral 16 represents a first power line connected to the game machine 1, through which power is supplied from the game machine 1. To the first power line 16, the decoder 7 and the ROM 12 are connected. The connections are indicated by dotted lines A and B. Reference numeral 17 represents a second power line connected to the battery 11 provided in the game software apparatus 5. The voltage supplied from the battery 11 is approximately 3V, which is lower than the voltage (5 to 10V, in this case, 5V) supplied from the game machine 1 to the power line 16. Reference numeral 9 is a power changeover circuit, an output line 18 of which is connected to the decoder 8 and the RAM 13. The first and second power lines 16 and 17 and the output line 18 are partly included in the IC 10. The power changeover circuit 9 supplies the output line 18 with power from the first power line 16 when power is supplied from the game machine 1 to the first power line 16, and supplies the output line 18 with power from the battery 11 when no power is supplied to the first power line 16. No power is supplied to the first power line 16, for example, when the AC adapter 3 is not plugged in to an outlet, when the main switch 4 is OFF and when a power failure occurs. The power changeover circuit 9 includes, as shown in Fig. 3, a comparator 25 for comparing the voltage on the line 16 and the voltage on the line 17, analog switches 26 and 28 inserted in the lines 16 and 17, respectively, and an inverter 27 for inverting an output of the comparator 25 to apply it to the analog switch 28. When a voltage is being applied to the line 16, since the voltage on the line 16 is higher than the voltage on the line 17, the output of the comparator 25 is of high level, thereby activating the analog switch 26. At this time, the analog switch 28 is cut off since a low-level voltage is applied thereto through the inverter 27. As a result, a voltage from the line 16 is applied to the output line 18. When no voltage is being applied to the line 16, since the output of the comparator 25 is of low level, the analog switch 26 is cut off. At this time, the analog switch 28 is activated since a high-level voltage is applied thereto from the inverter 27. As a result, a voltage from the line 17 is applied to the output line 18. Referring now to Fig. 2, an operation of the apparatus will be described. When the game software apparatus 5 is attached to the game machine 1 and the first power line 16 is supplied with power, in response to the start operation of the game, an addressing data is inputted from the CPU 2 of the game machine 1 through buses L1 and L2 to the game software apparatus 5. This data is decoded by the decoder 7. The decoded data is supplied to the ROM 12. Then, the program read out from the ROM 12 is transmitted through the bus 14 to the game machine 1, so that the program is executed by the CPU 2. A bus L3 is provided for another data. For example, an enabling signal of the ROM 12 is transmitted thereto. The RAM 6 incorporated in the game machine 1 is provided to execute various operations necessary for performing the game. When the user operates the operation key 24 while the game is being performed, an address data of an address of the program at that time, i.e. an address data of an address of the ROM at that time is transmitted from the CPU 2 through the bus 15a to the game software apparatus 5. When this happens, an address (selection signal) for selecting the RAM 13 is transmitted from the CPU 2 through the buses L1 and L2. This address is decoded by the decoder 8 and supplied to the RAM 13. Simultaneously, a writing command signal is supplied through the bus 15b to the RAM 13. As a result, the address data of the program transmitted through the bus 15a is written into the RAM 13. The data written in the RAM 13 is held as it is in the RAM 13 as far as the operation key 24 is not operated again. This data is backed up by the power from the battery 11 when no power is provided to the line 16, for example, due to power failure. The reading of the data from the RAM 13, i.e. the reading of the address data of the game program stored in the RAM 13 is performed in response to a command from the CPU 2 based on a key operation (a resuming key operation) by the user. The data read out from the RAM 13 is outputted to the bus 15a to be transmitted to the game machine 1. The system of the present invention having a function to write to the RAM 13, hold, read out from the RAM 13 and use a game condition during the game in response to a command from the CPU 2 is advantageous in the following regard. Generally, when a game ends in a failure, it is necessary to start the game again from the beginning. This is often waste of time to the user. On the contrary, it would be convenient if it is possible to turn back midway to start the game therefrom. The user operates the operation key 24 during the game. Then, an address of the program at that time is stored in the RAM 13. As a result, even if the game ends in a failure thereafter, the address data is read out from the RAM 13 so that the user may start the game from the mid-condition of the game. During a normal operation when the power from the first power line 16 is supplied, a game operation is performed based on an address command from the CPU 2. When no power is supplied to the first power line 16 under this condition, the decoder 7 and the ROM 12 are deactivated; however, the decoder 8 and the RAM 13 remain activated since they are provided with power from the battery 11 by the changeover circuit 9. At this time, however, the supply voltage applied to the decoder 8 is changed from 5V from the game machine 1 to 3V from the battery 11. The decoder 8 further operates to inhibit the writing to the RAM 13, whereby the data which have been written in the RAM 13 by the time the power source is changed are maintained intact. When the power from the first power line 16 is restored, since the previous data maintained in the RAM 13 are inputted to the CPU 2 through the bus 15a if a predetermined key operation is performed, the CPU 2 provides a command to proceed to the next address. Thereby, when the power from the first power line 16 was cut and restored thereafter, the game machine resumes the game based on a program continued from the program stored in the RAM 13. At this time, the changeover circuit 9 supplies the power from the power line 16 to the decoder 18 and to the RAM 13 through the output line 18. The game software apparatus 5 has a plurality of lines of terminal pins (not shown) at its left end. By inserting these terminal pins into a plurality of lines of sockets (not shown) of the game machine 1, the game software apparatus 5 is attached and electrically connected to the game machine 1. The game machine 1 is provided with a manual operation member. The user plays the game by operating this operation member. Referring to Fig. 4, there is shown the game machine of Fig. 2 used for a television game apparatus. Reference numeral 20 represents a television receiver. Reference numeral 21 represents a signal line connecting the game machine 1 and the television receiver 20. Reference designation 4a represents an operation button for operating the main switch 4. Reference numerals 22 and 23 represent operation members for playing the game, each of which is provided with an operation button. The game software apparatus 5 is inserted into the game machine 1 from the upside. While a game machine is described herein, the use of the present invention is not limited to a game machine; the present invention may be employed for various apparatus where it is necessary to maintain a function while the power is being cut. The present invention may be employed, for example, for a machine tool. While the ROM 12 of Fig. 2 stores a program for a game, when the program stored in the ROM 12 is a program for a purpose other than a game, the apparatus designated by 5 serves as a different apparatus. In any case, the apparatus designated by 5 not only supplies a function but also maintains a function while the power is being cut. As described above, according to the present invention, since the first controlling circuit (decoder 7) for controlling the first memory having a series of function data, the second controlling circuit (decoder 8) for maintaining data stored in the second memory and the power changeover circuit 9 are provided on a one-chip semiconductor substrate, the number of parts is small, and necessary connection operations and the space for installation are reduced. Since the signal processing line is short with respect to each of the first and second controlling circuits, the signal delay is reduced, so that the problem that the timing does not concur with that of another circuit is not caused. Further, since the power changeover circuit in the form of an IC can be constituted by a device in which no voltage drop occurs or the voltage drop is small, the problem of the power loss due to the voltage drop by the power changeover circuit is overcome. Obviously, many modifications and variations of the present invention are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims, the invention may be practiced other than as specifically described.

Claims: An apparatus operated by a central processing unit, comprising: a first memory for storing a control program; a second memory for storing an address of the control program; specifying means for specifying an address to be stored in the second memory; a first controlling circuit for outputting a data from the first memory according to a data from the central processing unit; a second controlling circuit for writing an address data of the control program into the second memory according to a data from the central processing unit; a first power source for a normal operation; a second power source for backup purpose; a first power line connected to the first power source, to the first memory and to the first controlling circuit; a second power line connected to the second power source; and a changeover circuit for connecting the second controlling circuit and the second memory to the first power line when a power is supplied from the first power source to the first power line and for connecting the second controlling circuit and the second memory to the second power line when no power is supplied from the first power source to the first power line, characterized in that a manually operated member (24) is provided, and that when the manually operated member (24) is operated during an execution of the program, the specifying means and the second controlling circuit operate so that the address of the program at that time is stored in the second memory without stopping the execution of the program. An apparatus according to claim 1, wherein said apparatus is a game apparatus and wherein said first and second memories and said one-chip semiconductor substrate are provided for a game software apparatus, and said central processing unit and said specifying means are provided for a game machine. An apparatus according to claim 1, wherein a game software apparatus is detachably attached to a game machine. An apparatus according to claim 1, characterized in that said first controlling circuit includes a first decoder which decodes address data from the central processing unit to supply an address signal to the first memory and wherein said second controlling circuit includes a second decoder which decodes address data transmitted from the central processing unit to select the second memory, said second decoder supplying an output thereof to the second memory, and that said first and second controlling circuits and said changeover circuit are provided on a one-chip semiconductor substrate.

Inventors: TANAKA TOSHIMASA, TANAKA, TOSHIMASA, TANAKA, TOSHIMASA, C/O ROHM CO., LTD.
Applicants: ROHM CO LTD, ROHM CO., LTD.
Application year: 1994
Main classification: A63F9
IPC codes: G06F19, G11C5, A63F13