This preview shows page 1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-107-108-109-110-111-112-113-114-115-116-117-118-119-120-121-122-215-216-217-218-219-220-221-222-223-224-225-226-227-228-229 out of 229 pages.
I. IntroductionSAGaSprite Animated GameMatthew Duane - md2835Sam Freeman – snf2108Anthony Garvan – ag3035Carlos Vázquez - caa2140Table of ContentsI. Introduction.............................................................................................................................. 4I.1 A Typical SAGa Game......................................................................................................4II. General Layout of SAGa.........................................................................................................5III. VGA controller........................................................................................................................5IV. Keyboard and Networking.....................................................................................................9IV.1 Keyboard........................................................................................................................ 9IV.2 Networking......................................................................................................................9IV.1 DM9000A Fast Ethernet controller................................................................................10IV.2 Network Software..........................................................................................................10IV.2(a) General Communication Framework....................................................................11IV.2(b) Synchronization of Initial Game State..................................................................11IV.2(c) Updating the Non-Active Player During Gameplay...............................................13V. Audio controller..................................................................................................................... 13VI. Gameplay and Game Logic.................................................................................................14VI.1 Sprite Conversion and Storage.....................................................................................14VI.2 Terrain Design..............................................................................................................15VI.3 Game Logic...................................................................................................................15VI.4 Gameplay...................................................................................................................... 17VII. Lessons Learned................................................................................................................18VIII. Roles................................................................................................................................. 19Carlos ................................................................................................................................... 19Tony ..................................................................................................................................... 19Sam....................................................................................................................................... 19Matt....................................................................................................................................... 19IX. SAGa-specific Code:...........................................................................................................20Hardware:.............................................................................................................................. 20de2_sram_controller.vhd..................................................................................................20de2_vga_raster.vhd..........................................................................................................21main.vhd......................................................................................................................... 155pll.vhd............................................................................................................................. 162de2_ps2.vhd................................................................................................................... 170DM9000A_IF.v................................................................................................................175YcbCr2RGB.v................................................................................................................. 176ram2.v............................................................................................................................. 179MAC_3.v......................................................................................................................... 184itu_r656_decoder.v.........................................................................................................186dul_port_c1024.v............................................................................................................ 192de2_wm8731_audio.vhd ................................................................................................195Software.............................................................................................................................. 201gameLogic.h................................................................................................................... 201math.h............................................................................................................................. 203network.h........................................................................................................................ 203rxInterrupt.h.................................................................................................................... 210sprites.h.......................................................................................................................... 212terrain.h..........................................................................................................................218main.c............................................................................................................................. 221I. IntroductionSAGa is an adaptation of the popular Worms1 turn-based PC game from the 1990's. The core of the game includes an expansive gameboard with randomly-generated terrain, animated worms and weaponry, destructive environments, and multi-player functionality via either single-system