User Tools

Site Tools


notes:comporg:spring2024:projects:def0

This is an old revision of the document!


DEF0

Set Drawing Points

Select Texture

When selecting a texture it is similar to C but is far more simplified. Normally, in C you would do the following:

#define Texture 0

In asm this translates to the following:

mov R7, 0
out GPU_SelectedTexture, R7

What is happening in the above snip of code is that we are putting in our number ID for our texture into register 7 and then feeding R7 into the GPU_SelectedTexture.

Select Region

After you have successfully selected your texture you need to select a region inside your texture file. To accomplish this in asm you are repeating similar steps as to selecting a texture. Here is a sample of what that would look like:

mov R7, 1
out GPU_SelectedRegion, R7

Read from Gamepad

Comparisons

Loops

TASK

Implemented from scratch, in assembly:

  • select the loaded texture
  • select 4 objects (regions) to display
  • display the object on the screen, allowing for its control via the gamepads
    • each gamepad direction should display a different object
  • implement bounds checks on the screen edges, preventing the object from moving off the screen
notes/comporg/spring2024/projects/def0.1707752462.txt.gz · Last modified: 2024/02/12 15:41 by wgates1