Apparatus for processing interruption

Abstract: Shadow registers for processing interruption are provided in a CPU. When the control shifts to interruption routine, the shadow registers are used for the interruption routine by changing the use of ordinary registers thereto, and the ordinary registers are prohibited to be used during a period of the interruption. Subsequently to the finish of the interruption, the ordinary registers are re-used without the necessity of the store and the re-store of the ordinary registers.

Description: This invention relates to a method and an apparatus for processing interruption, and more particularly to an information processing apparatus in which external processing such as interruption in a computer system is necessitated. An information processing apparatus comprises various registers informing a system of a hardware structure or data format, and being specific areas on a memory for administrating processing status by the system. If contents of the registers are unduely broken, the system does not work properly. Even if control is shifted to external processing such as interruption, the contents of the registers can be utilized even at a routine for a jumped destination. In an ordinal system, however, a former status is broken, because the processing for the jumped destination uses the registers at the routine. Therefore, when the processing shifts to external routine, the contents of the registers are preserved, and the control must be returned to the original routine, after the preserved registers are restored with the original state at the time of the return to the original routine. Fig. 1 shows the shift of controls at interruption process, and the state of registers thereat. When the interruption occurs, the control of a CPU shifts to interruption routine. When the interruption finishes, the control usually returns to an instruction following an instruction having resulted in the interruption. At this time, the registers are restored with the state at which the interruption has started, so that processing at the original routine continues with ordinary operation subsequent to operation prior to the start of the interruption. The preservation of the registers at the interruption routine is carried out only for registers to be used at the interruption routine, and there is no necessity to carry out it for all registers. At any rate, a conventional information processing apparatus is provided with a memory having a work area for preserving contents of registers at interruption routine, wherein the preserved contents are broken in the work area at the finish of the interruption routine. For this reason, the store of the contents and the restore thereof are repeated in the work area at each time of the interruption routine. In case of a computer game machine, subsequent image process must be carried out during V and H blanks (vertical and horizontal retrace periods) having no image on a video screen. Even more, the process is an interruption process such as V blank interruption, H blank interruption, etc. Fig. 2 shows an image display on a TV screen realized by scanning lines. The scanning line runs left to right, and, when it reaches to the right end, it returns to the left end during a horizontal retrace period having no displayed image on the screen. On the other hand, the scanning line moves up to down, and, when it reaches to the bottom end, it returns to the top end during a vertical retrace period having no displayed image on the screen. Even a relatively long V blank occurring once in 1/60 sec. has a period of 3/242 sec. H blank is as extremely short as approximately 10 µsec. Therefore, a time for the store and restore of registers is not negligible, because the process of images to be next displayed must be done in these short periods. Therefore, there is disadvantage in the conventional information processing apparatus in that a part of the process to be carried out in the retrace periods is omitted. US 4905190, US 4410939, JP-A-5933558, US 4217638 and EP-A-0448212 all disclose apparatus in which shadow registers are provided. It is an object of the invention to provide an apparatus for processing interruption in which the store and the restore of registers are carried out with high speed at interruption routine. According to the present invention there is provided an apparatus for processing interruptions in an image-displaying system, comprising: a CPU for processing a television game program to generate instructions for said interruptions; an ordinary register provided in said CPU for storing a predetermined content to carry out an ordinary process; a plurality of shadow registers provided in said CPU for storing predetermined contents to carry out said interruptions; an external memory for storing image data for said television game; a controller unit for reading said image data from said external memory in accordance with said program processed in said CPU; and an image data-processing unit for processing said image data supplied from said controller unit to display an image on a television display; the apparatus being characterised by: said plurality of shadow registers comprising a first shadow register exclusively used for said controller unit, and a second shadow register exclusively used for said image data-processing unit; said CPU processing said interruptions during H and V blankings of said television display; and said CPU automatically changing to use one of said first and second shadow registers from said ordinary register, when said interruptions are processed during said H and V blankings by said CPU. A process to be carried out at the time of the jump to interruption routine is defined as prologue, and a process to be carried out at the time of the return to the jump source is defined as epilogue. For the prologue, (1) the store of registers, and, (2) an initial value-set of a register to be used at the interruption routine are carried out, and for the epilogue, (3) the restore of the registers is carried out. The above process is carried out at each time of the shift to interruption routine. At the same routine, the same process is normally repeated. If a part of the process can be omitted, the process can be increased in speed. In accordance with the above consideration, a CPU is provided with a shadow register in the invention, so that interruption process starts without access to a register at the occurrence source of interruption. The number of registers is large, among which only a register to be mainly used at interruption routine is made to be a shadow register. Fig. 3 shows a position of the shadow register. When the control shifts to interruption processing routine, a hatched portion of ordinary registers is changed to a shadow register, and a register (the hatched portion in Fig. 3) corresponding to the shadow register can be no longer used. Consequently, the store and the restore of a register which are carried out at each occurrence time of interruptions become unnecessary, and there is no necessity to initialize a content of the shadow register, when the content of the shadow register is used at the former state. In the accompanying drawings:- The invention will be explained in more detail in conjunction with the appended drawings, wherein : Fig. 1 is an explanatory diagram showing a conventional interruption processing, and the transition of a content of a register, Fig. 2 is an explanatory diagram showing H and V blanks, Fig. 3 is an explanatory diagram showing a position where a shadow register is provided, Fig. 4 is a block diagram showing a system of a computer game machine in a preferred embodiment according to the invention, Fig. 5 is an explanatory diagram showing a format of a shadow register included in a CPU in the preferred embodiment, Fig. 6 is an explanatory diagram showing the using state of interruption process and a register in the preferred embodiment, and Fig. 7 is an explanatory diagram showing the using state of interruption process having plural steps and a register in the preferred embodiment. Fig. 4 is a block diagram showing a system for a voice and image processing apparatus in the preferred embodiment according to the invention. A CPU controls each IC apparatus represented by rectangle blocks in Fig. 4. This processing apparatus comprises a game soft storing medium, such as CD-ROM, etc., a CPU of 32 bits, a control unit for transfer-control of image and voice data and for interface of each apparatus, an image data extension and transformation unit, an image data output unit, a voice data output unit, a video encoder unit, a video display unit, etc. Each unit is an IC apparatus, and has a memory such as K-RAM, M-RAM, R-RAM, V-RAM, etc. The CPU has a memory control function for controlling the DRAM via a memory support, an I/O control function for communicating with various peripheral devices via I/O ports, and an interruption control fntction, and is provided with a timer, parallel input and output ports, etc. The video display unit reads display-data written into the V-RAM by the CPU, and the read data is supplied to the video encoder unit to be displayed on the screen. The controller unit has a built-in SCSI controller, into which image and voice data are supplied from an external memory apparatus such as the CD-ROM, etc. via a SCSI interface. The supplied data are once buffered in the K-RAM. The priority of background image data for natural picture is determined in the controller unit to be supplied to the video encoder unit by one dot data unit. Data-compressed motion picture (full color, pallet) data is supplied to the image data extension unit. The image data extension unit extends the data, and the extended data is supplied to the video encoder unit. The video encoder unit carries out the process such as super-impose, color pallet regeneration, special effect, D/A conversion, etc. on data of VDP image, natural picture background image, and motion picture (full color, pallet) supplied from the video display unit, the controller unit, and the image data extension unit, and image signals encoded to be NTSC signals by the NTSC converter are supplied to the screen. ADPCM video data read from the CD-ROM, etc. is buffered in the K-RAM in the same manner as image data, and is supplied to the video data output unit to be reproduced therein by the controller unit. In the above embodied apparatus, each unit is an IC apparatus having an independent function. In addition, at each time when H or V blank interruption occurs, each unit functions in accordance with interruption process during non-display periods. For this purpose, the CPU is provided with shadow registers each assigned to a corresponding IC apparatus. Fig. 5 shows how the shadow register are provided to have the same contents therein. Each ordinary register is of 32 bits, and each shadow register is defined in the same formation of the ordinary register in a memory of the CPU. In this preferred embodiment, eight shadow registers are prepared to be used for interruption routine. When the control shifts to interruption processing routine corresponding to each IC apparatus, the CPU automatically changes the ordinary registers to the shadow registers corresponding to the IC apparatus. In this interruption routine, no store and no restore of the registers are carried out, and the shadow registers are directly used. Fig. 6 shows a flow of operation in the preferred embodiment. The initial set of the shadow registers is not set out in the flow chart, because the former state can be used without change. However, there is a case where the initial set thereof is necessitated. Although Fig. 6 shows parallel interruption process of the control unit and the image data extension unit, a case where the image data extension unit is called from the control unit can be processed without problem. The latter case is explained in Fig. 7, wherein the control is transferred from the control unit to the image data extension unit by generating interruption. When the control shifts to the interruption routine, the CPU changes to the shadow registers, so that the preservation state is held in the registers (including shadow registers) at the occurrence source of interruption corresponding to the shadow registers. Consequently, even if the control is returned from the interruption routine to the former routine, the control can re-start from a state prior to the occurrence of the interruption, because the contents of the registers have been held. In case of a computer game machine, interruption occurs in a hardware system during H or V blank, so that the explanations of the shadow registers has been made in interruption process so far. However, the concept of the shadow registers can be used for external process routine frequently used. There are two points for shadow registers in the invention, wherein the first point is that a special area is provided in a CPU, and the second point is that the CPU automatically carries out the change-over to comply with respective processings. That is, the store and the restore of registers which are carried out in the conventional processing apparatus become unnecessary to be carried out in the invention, and it is not necessary to make a sense of shadow registers by a program due to the fact that the change-over is made in a hardware system, so that the same using method of a program as in the, conventional processing method can be adopted in the invention. For this reason, there are advantages in the invention in that processing speed becomes high, and the descriptions of a program becomes simple. Especially, the advantages of the invention are significant in case where subsequent image processing must be finished in a short time as required in a television game machine, etc. Although the invention has been described with respect to specific embodiment for complete and clear disclosure, the appended claims are not to be thus limited but are to be construed as embodying all modification and alternative constructions that may occur to one skilled in the art which fairly fall within the basic teaching herein set forth.

Claims: An apparatus for processing interruptions in an image-displaying system, comprising: a CPU for processing a television game program to generate instructions for said interruptions; an ordinary register provided in said CPU for storing a predetermined content to carry out an ordinary process; a plurality of shadow registers provided in said CPU for storing predetermined contents to carry out said interruptions; an external memory for storing image data for said television game; a controller unit for reading said image data from said external memory in accordance with said program processed in said CPU; and an image data-processing unit for processing said image data supplied from said controller unit to display an image on a television display; the apparatus being characterised by: said plurality of shadow registers comprising a first shadow register exclusively used for said controller unit, and a second shadow register exclusively used for said image data-processing unit; said CPU processing said interruptions during H and V blankings of said television display; and said CPU automatically changing to use one of said first and second shadow registers from said ordinary register, when said interruptions are processed during said H and V blankings by said CPU. The apparatus as defined in claim 1, wherein: said interruptions comprise a first interruption relating to said controller unit which is first carried out in accordance with said first shadow register, and a second interruption relating to said image data-processing unit which is then carried out in accordance with said second shadow register following the completion of said first interruption. The apparatus as defined in claim 1, wherein: said interruptions comprise a first interruption relating to said controller unit which is carried out in accordance with said first shadow register, and a second interruption relating to said image data-processing unit which is carried out in accordance with said second shadow register, said second interruption being carried out during said first interruption. The apparatus as defined in claim 1, wherein: said image data-processing unit is at least one of an image data extension unit, a video display unit, and a video encoder unit.

Inventors: TAKANO TOSHIYA, TAKANO, TOSHIYA, Takano, Toshiya, c/o Hudson Soft Co., Ltd.
Applicants: HUDSON SOFT CO LTD, HUDSON SOFT CO., LTD.
Application year: 1993
Main classification: G06F9
IPC codes: G06F9