Variables and Data Structures:

Constants:

SEARCH
EQU
72
RSVP
EQU
54
ACCEPT
EQU
63
REJECT
EQU
99
SERVER
EQU
81
UPDATE
EQU
36
GOODBYE
EQU
90

Flags:

timerTick This flag is used to call the OldTimerIsr once every 1/18 of a second
timerFlag This flag is set high at every tick (1/72 of a second)
keyboardFlag This flag gives the status of the keyboard [ which key was pressed ]
fireStatus

This flag is set when the left mouse button is pressed

shotStatus

This flag is set if the player has successfully shot a sprite

missFlag This flag is set if the player has missed the sprite
drawFlag This flag is set whenever the Scratch Buffer is updated

row/colFlag

These flags determine the slopes for the bouncing sprite [ + or - ]
serverFlag This flag is set when a SERVER packet is received
gameInProgress This flag is set when a VERSUS game is in progress

waitingFlag

This flag is set after sending an RSVP packet
sendFlag This flag is used to delay the SEARCH packets so that they are sent 36 times a second
versusFlag This flag is used to produce appropriate delays in the versus mode
arcadeFlag This flag is used to produce appropriate delays in the arcade mode
animateFlag This flag is used to animate the sprite in the practice mode
blowFlag This flag is set when an UPDATE packet arrives
practiceFlag This flag is used to produce appropriate delays in the practice mode
playing This flag is set as long as a Wav file is playing

 

Variables:

oldTimerIsr dd This stores default IVT entree for the timer ISR
oldKeyboardIsr dd This stores default IVT entree for the keyboard ISR
menuOption db

arcadeMode
versusMode
practiceMode
quit

00
01
02
03
Single Player Mode
Network Game
Tutorial Mode
Leave Game
menuHash dw Hash Table
sbuf_page dw Page Number where Wav file is loaded - sent to DMA
sbuf_offset dw Offset of the loaded Wav file - sent to DMA
snd_offset dw Sound Offset from Segment to the page beginning
sbuf_length dw Sound Buffer Length
handle dw Stores the handle for the various files opened
loadBuf <> Waveheader Structure storing the Wav file header
miss db Number of misses in the arcade / versus modes
hits

db

Number of hits in the arcade / versus modes
randRow dw Row for the sprite on the screen
randCol dw Column of sprite on the screen
randLoc dw Location for sprite on the screen
speedR db Variable Row speed for sprite
speedC db Variable Column speed for sprite
mousePosition dw Position of mouse on the screen
fadeNum db Random number for fading sequence
myNum db Versus Mode Player's number assigned by NetBios
oppNum db Versus Mode Opponent's number assigned by NetBios
grp_name db Network Group Name - BATTLE PONGG$$$$
my_name db Network Player Name - BATTLE PONGG00$$

Structure:

WaveHeader

db
dd
db
dd
dw
dw
dd
dd
dw
dw
db
dd

Format - RIFF
File length
Wave format - WAVEfmt_
Format Length
Format Tag
Channel
Samples
Bytes Per Second
Bk Alignment
Bits Per Second
Data - data
Data Length

 

Scan Codes:

Up Arrow
72 (extended)
Dn Arrow
80 (extended)
Esc Key
1
Enter Key
28


Note:

There are seperate segments allocated for Sound [ SoundSeg ], Midi [ MidiSeg ], and Graphics [ WallpaperSeg, ScratchSeg, ImageArray ]