🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #495

Re: vertical retrace inte

#495
From: Cyberman
Date: Sat, 08 Aug 1992 03:11
77 lines
3959 bytes
     -=> Matthew Smith spoke of "Re: vertical retrace inte" <=-
    To All at 08-06-92  17:11
 MS> The problem is that for the interrupt controller was changed somewhere
 MS> when  the XT became the AT or something like that.  The original set of
 MS> hardware interrupts were limited from IRQ0 to IRQ7, however, they found
 MS> that add in cards needed more interrupts, so they added a second
 MS> interrupt controller  to give people IRQ8 through IRQ15.  However, to
 MS> stay compatable with the  original hardware, they daisy chained the new
 MS> controller onto the old  controller via IRQ 2.  The net result is that
 MS> any IRQ above 7 also generates  an IRQ 2.

        IRQ0     8  timer (55ms intervals, 18.2 per second)
        IRQ1	 9	keyboard service required
        IRQ2	 A	slave 8259 or EGA/VGA vertical retrace
        IRQ8	70	real time clock  (AT,XT286,PS50+)
        IRQ9	71	software redirected to IRQ2  (AT,XT286,PS50+)
        IRQ10	72	reserved  (AT,XT286,PS50+)
        IRQ11	73	reserved  (AT,XT286,PS50+)
        IRQ12	74	mouse interrupt  (PS50+)
        IRQ13	75	numeric coprocessor error  (AT,XT286,PS50+)
        IRQ14	76	fixed disk controller (AT,XT286,PS50+)
        IRQ15	77	reserved  (AT,XT286,PS50+)
        IRQ3	 B	COM2 or COM4 service required, (COM3-COM8 on MCA PS/2)
        IRQ4	 C	COM1 or COM3 service required
        IRQ5	 D	fixed disk or data request from LPT2
        IRQ6	 E	floppy disk service required
        IRQ7	 F	data request from LPT1 (unreliable on IBM mono)

Examining this IRQ map you will notice what you said is partly
true.  Notice the OR.  Also IRQ8-15 have thier own vectors since
the 8259 sends a vector to the x86 [3bit] this could mean that
the slave 8259 is for something else.  Not sure WHAT though!

 MS> Given that background, if you have a network adapter (or some other
 MS> hardware) that uses an IRQ above 7, then you can't be sure that when
 MS> you receive an IRQ 2 that it's the video card or not.  

I think this is defeatable.  I can't understand why poeple
overload IRQ's like that!

 MS> Maybe at that point you could poll the adapter to see if it is the
 MS> video card, and if not, pass it on to the old handler? 

The best way is to let the network drivers load and grab thier
vectors.  THEN grab the vector.

The routine would basically chain to the network whenever the
vertical retrace is not active.  otherwise it would switch your
Currently executing task.  YES this will require you to write a
simple multitasking kernal :).  Then when ever the current task
is done it generates another int say 0x60 that calls the task
switcher to go back to the program.  This would allow you to do
quite a bit.  Of course the Kernal would require the the
interupts would be off until the current task is changed.  This
scheme might work.  Just depends on how fast you computer is and
how goo you are at writting a small kernal to handle it.

Addition advantages for this are:
You can multitask in your game very easily.
Add real time animation to your game.
You could have mutliple "objects" run simultaneously.
    This would add realism and remove the "stupid loop" from the
    game.  You just set your objects "Free" within your system
    and let events happens.

Pitfalls:
Your updates will have to be REAL fast to be under 16ms long.
especially on an XT. :)
tasks would have to have some POOL of common information.

        Stephen Cyberman@Toz.Buffalo.NY.US
        Scripted at Fri  08-07-1992  10:51:35

... It balances!  It balances!  Run the paychecks!
--- Blue Wave/QWK v2.10
                         
Technical Details
Message-ID: <gate.c246oB1w165w@toz.buffalo.ny.us>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!rutgers!ub!toz!cyberman

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!rutgers!ub!toz!cyberman
From: cyberman@toz.buffalo.ny.us (Cyberman)
Newsgroups: rec.games.programmer
Subject: Re: vertical retrace inte
Message-ID: <gate.c246oB1w165w@toz.buffalo.ny.us>
Date: 8 Aug 92 03:11:10 GMT
Lines: 77
X-Maildoor: WaflineMail 1.00r