User Tools

Site Tools


notes:comporg

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
notes:comporg [2019/02/14 09:10]
mkowulic [Useful links]
notes:comporg [2019/04/18 00:45] (current)
sepp [Portal Kombat]
Line 3: Line 3:
 {{  :​notes:​asm.jpg ​ |}} {{  :​notes:​asm.jpg ​ |}}
  
-====MEMES==== +======Course Notes Wiki====== 
-(For your temporary enjoyment)+This is a space for members of the Computer Organization class to create a source of information reflective and assisting to the course.
  
-{{:notes:​tmg-article_tall_jpeg_quality_20.jpg?​400|}}+Aside from assignments that may have you specifically perform operations here, you should contribute when you encounter any of the following:
  
-{{:​notes:​index.jpeg?​400|}}+  * Some neat bit of information related to the class 
 +  * Some clarification or understanding you've had with respect to concepts in the class 
 +  * Organizational/​style improvements to existing content 
 +  * Questions you have that may deserve a more visual answer
  
 =====Useful links===== =====Useful links=====
Line 18: Line 21:
     * https://​timcheeseman.com/​nesdev/​2016/​02/​06/​color-in-motion.html     * https://​timcheeseman.com/​nesdev/​2016/​02/​06/​color-in-motion.html
     * https://​timcheeseman.com/​nesdev/​2016/​02/​22/​sprites-and-input.html     * https://​timcheeseman.com/​nesdev/​2016/​02/​22/​sprites-and-input.html
- +  * A useful introduction to NES hardware, but a bit lengthy. 
-  * https://​www.youtube.com/​watch?​v=XwGj1ciSAtw +    * https://​www.youtube.com/​watch?​v=XwGj1ciSAtw 
-  * ^ A useful introduction to NES hardware, but a bit lengthy. +  * Mednafen Help 
-  *https://​www.fantasyanime.com/​emuhelp/​mednafen ​(for mednafen help) +    * https://​www.fantasyanime.com/​emuhelp/​mednafen 
- +  ​* This sends you to a nice page discussing Object Attribute Memory for a sprite. 
-  *http://​wiki.nesdev.com/​w/​index.php/​PPU_OAM +    ​* http://​wiki.nesdev.com/​w/​index.php/​PPU_OAM 
-  *This sends you to a nice page discussing Object Attribute Memory for a sprite. +  * https://​nesdoug.com/ 
- +  * https://​games.greggman.com/​game/​programming_m_c__kids/​ 
-  *https://​games.greggman.com/​game/​programming_m_c__kids/​ +  * http://​nintendoage.com/​forum/​messageview.cfm?​catid=22&​threadid=7155 
- +    * NES programming broken into weekly lessons.  
-  *http://​nintendoage.com/​forum/​messageview.cfm?​catid=22&​threadid=7155 +  * http://​www.dustmop.io/​blog/​2015/​04/​28/​nes-graphics-part-1/​ 
-  *NES programming broken into weekly lessons. ​ +  ​* http://​www.dustmop.io/​blog/​2015/​04/​28/​nes-graphics-part-1/​ 
- +    ​* A good intro/​overview of the NES tile graphics, how they'​re stored, how to access them, and color palettes
-  *http://​www.dustmop.io/​blog/​2015/​04/​28/​nes-graphics-part-1/​ +
-  *A good intro/​overview of the NES tile graphics, how they'​re stored, how to access them, and color palettes+
   * 6502 assembly   * 6502 assembly
     * http://​nintendoage.com/​pub/​faq/​NA/​index.html?​load=nerdy_nights_out.html     * http://​nintendoage.com/​pub/​faq/​NA/​index.html?​load=nerdy_nights_out.html
Line 42: Line 43:
   * https://​wiki.nesdev.com/​w/​index.php/​Programming_guide   * https://​wiki.nesdev.com/​w/​index.php/​Programming_guide
   * http://​blog.fritzvd.com/​2016/​06/​13/​Getting-started-with-NES-programming/​   * http://​blog.fritzvd.com/​2016/​06/​13/​Getting-started-with-NES-programming/​
-======Login Problems====== +  * http://​www.geocities.jp/​yy_6502/​yychr/​0yychr.html 
-Some people have reported problems logging into the wiki. There seems to be two sources of problems experienced:​ +    * YYCHR download, works with wine on the pod 
- +  * NES Sprites: 
-  * User cannot log in+    * https://​nesdoug.com/​2018/​09/​05/​06-sprites/​ 
-  * User cannot log in using "​Secure Login". +  *http://​gendev.spritesmind.net/​page-collide.html 
- +    ​*Useful guide to basic collision detection schemes, usable ​for multiple sprites 
-If you are confident you are using the correct username and password, and are using a version of Internet Explorer, it is suggested that you use a different browser, such as Firefox, Safari, or Chrome+    https://​mednafen.github.io/​documentation/​debugger.html 
- +  * https://www.datacrystal.romhacking.net/​wiki/​Super_Mario_Bros.:RAM_map 
-If the "​Secure Login" doesn'​t seem to be working ​for you, the behavior seems to occur when user passwords contain symbols like quote marks and asterisks. In which case, you can either: +    * https://www.romhacking.net/​forum/​index.php?​topic=25371.0 
- +  * https://​shiru.untergrund.net/​articles/​programming_nes_games_in_c.htm 
-  ​Uncheck "Use Secure Login"This sort of defeats the purpose of having security though, so it isn't outwardly recommended+  * https://​megacatstudios.com/​blogs/​press/​creating-nes-graphics 
-  * Change your password to something that doesn'​t contain quote marks or asterisksWe don't yet know **exactly** which characters cause this problem, but we suspect it is characters that aren't being properly escaped that could have special syntactical meaning. +  * https://​www.nutsvolts.com/​magazine/​article/​using-seven-segment-displays-part-2 (Practical Decoder/​Driver ICS) 
- +  * https://​easyeda.com/​modules/​5611BH_e4b1d99de0464446949d4933562b1710 (seven-segment display) 
-======Syntax====== +  * https://​megacatstudios.com/​blogs/​press/​organizing-nes-graphics-banks 
-For those unfamiliar, here is a page on [[wiki:syntax|wiki editing syntax]] that can be used here. +  * NES ROM analysis videos 
- +    * [[https://​www.youtube.com/​watch?​v=2VHySu_jaPw|SMB3 sound fx bug]] 
-======Course Notes Wiki====== +    * [[https://​www.youtube.com/​watch?​v=wfrNnwJrujw|SMB3 loading seam]]
-This is a space for members of the Computer Organization class to create a source of information reflective and assisting to the course+
- +
-Aside from assignments that may have you specifically perform operations here, you should contribute when you encounter any of the following+
- +
-  * Some neat bit of information related to the class +
-  * Some clarification or understanding you've had with respect to concepts in the class +
-  * Organizational/style improvements to existing content +
-  * Questions you have that may deserve a more visual answer+
  
 ====January 22, 2019==== ====January 22, 2019====
Line 222: Line 215:
 Remember to set your seed in the beginning of your program. Calls to the Prng will return a random byte, but manipulating said byte could produce a specified range of outcomes you desire. Remember to set your seed in the beginning of your program. Calls to the Prng will return a random byte, but manipulating said byte could produce a specified range of outcomes you desire.
  
-==February 13th, 2019==+====February 13th, 2019====
  
 PPU OAM, or Object Attribute Memory is memory inside of the PPU that can store up to 64 sprites'​ information inside 4 bytes each. The first byte, or Byte 0, is used for referring to the positioning of the top of the referred sprite in the y axis. Byte 1 is more focused on where the sprite exists on the pattern table. The bits in Byte 2 can be used to do a variety of attribute shifting to the sprite including flipping it on the x and y axis, setting the priority of the image in comparison to the background, the palette of the sprite, and much more! Byte 3 wraps things up with the x - coordinate of the left side of the sprite. To determine whether a sprite will be on top or underneath another, look at the addresses in comparison to one another. The sprite data that occurs first in OAM will be the one that appears in the front. PPU OAM, or Object Attribute Memory is memory inside of the PPU that can store up to 64 sprites'​ information inside 4 bytes each. The first byte, or Byte 0, is used for referring to the positioning of the top of the referred sprite in the y axis. Byte 1 is more focused on where the sprite exists on the pattern table. The bits in Byte 2 can be used to do a variety of attribute shifting to the sprite including flipping it on the x and y axis, setting the priority of the image in comparison to the background, the palette of the sprite, and much more! Byte 3 wraps things up with the x - coordinate of the left side of the sprite. To determine whether a sprite will be on top or underneath another, look at the addresses in comparison to one another. The sprite data that occurs first in OAM will be the one that appears in the front.
 +
 +====February 14th, 2019====
 +
 +A carry is when you want to perform a mathematical operation, and the result goes above 255. The carry flag basically just says that there is an additional bit set to 1 in the stored value. This is necessary since the accumulator only holds 8-bit values. Carry flag allows you to do MOAR!!!
 +
 +
 +
 +=====Game Creation Project Guidelines=====
 +
 +  * First one can be written in assembly or C
 +  * Can be one or Two Player
 +  * Nothing more complicated than simple early games like Pac-Man
 +  * Can be done alone or in groups
 +  * Our Projects
 +    * Rana and Mike - Brain storm, zombie tower defense
 +    * Jimito - Boss Breaker: Every level is a Boss fight
 +    * Josh - Lancer: Medieval tag with pointy sticks!
 +    * Stephen - Portal Kombat: Two player Mayhem!
 +    * a
 +    * a
 +    * a
 +    * a
 +
 +
 +
 +
 +====Portal Kombat====
 +Created by Stephen
 +This will be a primitive form of Mortal Kombat... but with portals!
 +    *TODO
 +      * New sprites ​ x
 +      * <​del>​Walls</​del>​
 +      * Portals!
 +        * Build portals ​ x
 +        * Set up teleportation logic x
 +      * Attack
 +        * Make weapons appear and move x
 +        * Collision detection (Yippee) x
 +        * <​del>​Score</​del>​
 +        * Life x
 +      * Title Screen
 +        * Choose character x
 +        * P1 & P2 x
 +      * End Game Stuff
 +        * Life decreasing x
 +        * FINISH HIM! x
 +      * Bonus stuff
 +        * Restarting x
 +        * Second level???
 +        * Change the way Thing attack works (Thing is definitely not a viable option at this point)
 +        * Show character names when arrow is over the sprite
 +====Boss Breaker====
 +  * Jimito
 +  * Game concept: Every level is a Boss, Bullet-hell,​ Shooter ​
 +  * Boss ideas
 +     ​-SWARM:​ alien mass attacks, while the boss slowly grows
 +     ​-Forger:​ fire scatters about the screen, while the forger makes an arsenal
 +     ​-Factory:​ machines make robots to defend, while boss is built
 +
 +Progess:​\\ ​
 +SWARM: Swarmlings fly around, boss auto updates, boss presetup is done, Final boss almost done, health bars for players and boss, all modes done.
 +
 +To-do:​\\ ​
 +  * Final Boss Movement
 +  * win screen
 +  * Music?
 +====Brain Storm====
 +    * Rana and Mike
 +    * concept : Plants Vs zombies style tower defense
 +    * player protects the brain from zombies trying to eat it
 +    * If zombies reach the far left of the screen the brain'​s health goes down every tick until it reaches zero - lose condition
 +    * Win if successfully defending for three waves
 +    * Power Ups
 +        * heal the brain a little (Heart)
 +    * Zombies
 +        * 2x sizes to start off, little ones and boss ones
 +        * maybe different colors based on difficulty
 +    * Brain Wave
 +        * Player Projectiles,​ maybe just little ">"​s or something
 +
 +====Lancer====
 +    *Joshua
 +    *Main concept: 2 players chasing each other around, trying to hit the sides/back of the other sprite until an arbitrary score is achieved
 +    *side concepts: PowerUps, multiple arenas, hazards, platformer mode (stretch goal).
 +    *Controls: 4 directional movement with the d-pad(diagonal presents problems with hit detection), sprint with the B button (1 ppf vs 3 ppf(pixels per frame) movement speed), A for powerups (displayed in upper left corner for player 1, upper right corner for player 2).
 +
 +====Asteroids by Dylan & Billy====
 +
 +==Premise==
 +
 +Earth is being assaulted by asteroids and, as 
 +the main character, it's your duty to protect it. 
 +With your state of the art space ship and cannons, ​
 +you can blow the asteroids into small bits that can 
 +burn up in Earth'​s atmosphere.
 +
 +     
 +==Mechanical Process==
 +
 +Earth is seen at the bottom of the screen ​
 +with your space ship positioned directly above it.
 +Once start is pressed, the asteroids will start
 +hurdling towards Earth from the top of the screen ​
 +progressively quicker and quicker. You can use the 
 +directional keys to move around, and B to shoot at 
 +the asteroids above. <​del>​The asteroid sprites will be 
 +shot from a moving tile above the top of the 
 +screen.</​del>​ The asteroids are set to a main asteroid clock that shoots the asteroids in increasingly difficult speeds. With a random number generator, an element of unpredictability is added as well. At the same time, obstacles such as satellites will be moving horizontally across the screen. These will block your fire as well as your movement. However, there will be powerups that may spawn that you'll only have to shoot to acquire!
 +
 +==Pending Ideas==  ​
 +  * Although it was stated that the projectiles will be fired from a moving tile, it may be much more simple to just have the coordinates used to spawn the projectiles directly.
 +
 +==Point System==
 +  * Destroyed asteroid: +10
 +  * Missed missile: -1
 +  * Damaged satellite: -10
 +  * (Co-op)Damaged opposing player: +5
 +
 +==Game Mode==
 +  * 2 player allows the game to have 3 separate game modes:
 +  * Classic 1 player run to save the world!
 +  * 2 player versus: The 2nd player plays as an aggressive space invader with the quest to annihilate Earth.
 +  * 2 player co-op: The 2nd player assists the 1st by joining the fray to protect humanity.
 +
 +==power-up types==
 +  - Shot delay decrease
 +  - screen clear
 +  - ship speed increase
 +  - Heals
 +=====Bug Corner=====
 +
 +Post bugs here, either debugged bugs that you feel might pop up for others, or current bugs pending debugging.
 +
 +====Generic Bugs====
 +
 +Found a bug with hit detection.
 +
 +When checking Input1 for Player1, cannot reference arithmetic regarding player2.
 +
 +An example would be:
 +
 +<​code>​player1.x > player2.x + SPRITE_WIDTH</​code>​
 +
 +This will soft-lock the game upon running an if-statement containing this. However:
 +
 +<​code>​player1.x - SPRITE_WIDTH > player2.x</​code>​
 +
 +will work, and is identical in functionality. Will report back if I figure out the exact problem, and if it will work the same way with Player2'​s collision detection.
 +
 +====Game Specific Bugs====
 +
 +=====Programming Considerations=====
 +Due to the restrictive nature of the NES hardware, some "​common sense" programming optimizations we would usually make are impractical here.
 +
 +For example: arrays. For NES programming,​ especially when dealing with lots of sprites, it seems counter-intuitive,​ but we may want to avoid using arrays, because it actually causes a lot more work for the 6502 CPU in the NES. See this forum post for some further explanation (and some other solutions):
 +
 +  * https://​forums.nesdev.com/​viewtopic.php?​f=2&​t=17465&​start=0
 +
 +We have to remember: NES programming,​ even with the benefit of C, is NOT going to be a clean, efficient endeavor. There will be messiness. This is but one example.
 +
 +Some related resources talking about programming considerations due to the hardware:
 +
 +  * https://​news.ycombinator.com/​item?​id=15002510
 +  * https://​shiru.untergrund.net/​articles/​programming_nes_games_in_c.htm
 +
 +===Variables===
 +Due to the limitations of the hardware, making variables as small as possible is a common consideration. Many read/write variables, such as the X/Y coordinates of sprites, use the "​uint8_t"​ variable type, which corresponds to an "​unsigned char" under normal circumstances. Make note of the variable'​s maximum and minimum values, as overflows and underflows can go undetected.
 +======Login Problems======
 +Some people have reported problems logging into the wiki. There seems to be two sources of problems experienced:​
 +
 +  * User cannot log in.
 +  * User cannot log in using "​Secure Login"​.
 +
 +If you are confident you are using the correct username and password, and are using a version of Internet Explorer, it is suggested that you use a different browser, such as Firefox, Safari, or Chrome.
 +
 +If the "​Secure Login" doesn'​t seem to be working for you, the behavior seems to occur when user passwords contain symbols like quote marks and asterisks. In which case, you can either:
 +
 +  * Uncheck "Use Secure Login"​. This sort of defeats the purpose of having security though, so it isn't outwardly recommended.
 +  * Change your password to something that doesn'​t contain quote marks or asterisks. We don't yet know **exactly** which characters cause this problem, but we suspect it is characters that aren't being properly escaped that could have special syntactical meaning.
 +
 +======Syntax======
 +For those unfamiliar, here is a page on [[wiki:​syntax|wiki editing syntax]] that can be used here.
 +
 =====DokuWiki wrap plugin===== =====DokuWiki wrap plugin=====
 http://​www.dokuwiki.org/​_media/​plugin:​wrap_plugin_example2.png http://​www.dokuwiki.org/​_media/​plugin:​wrap_plugin_example2.png
notes/comporg.1550153445.txt.gz · Last modified: 2019/02/14 09:10 by mkowulic