Shared Flashcard Set

Details

GMMaArchF1
N/A
88
Computer Science
Undergraduate 3
05/24/2011

Additional Computer Science Flashcards

 


 

Cards

Term
Which video modes have a hardware double buffer?  
Definition

4,5

 

Term
How many keys/buttons does the GBA have for input
Definition
10
Term
Which one of these do you NOT enable in the display control register
Definition
Palettes
Term
Which hardware register do you change to force the display to go blank
Definition
0x04000000 - REG_DISPCNT (display control)
Term
For the GBA's color, there are bits for BGR. How many bits are for each color
Definition
5B,5G,5R
Term
Which CPU does the GBA use
Definition

ARM7 16.7 MHz

 

Term
How many total palettes can be available at any one time
Definition

32

 

Term
When you did the double buffer lab using video mode 3, which function needed to be called after the “Draw_WaitVBlank” function
Definition
Draw_Present
Term
The GBA processor has which of these
Definition

--Has--

Hardware Multiplier

Three Stage Pipeline

 

-----Doesn't have-----

hardware divide intruction

floating point unit

 

Term
Which code could you add to the beginning of the Wait4VBlank function code to ensure that if you call it twice in a row, you would wait for the next vertical blank
Definition
While(REG_VCOUNT == 160){}
Term
which of these is UNTRUE about the Game Boy Advnaced Architecture
Definition

Operating System

 

 

--True ans--

have complete control over hardware

each executable must contain code neccessary

macimum control means maximum responsobility

Term
What sequence would be used to get a 1 bit for each key currently pressed
Definition

(~REG_KEY & 0x03FF)

 

Term
When accessing the Game Cartridge ROM, the speed is represented as a pair of wait-states such as 3/1. What do first and second numbers represent respectively
Definition
selecting an address/ transfer of Data
Term
Which line of code would draw a pixel correctly in video mode 4, for an odd x?  unsigned short offset = (y * 240 + x) >> 1;  
Definition
videoBuffer[offset] = (color<<8) | videoBuffer[offset] & 0x00FF
Term
What are the different byte widths that can be copied per count using DMA
Definition
2,4
Term

What is the purpose of this code?

#define REG_VCOUNT *(volatile unsigned short*)0x04000006
while(REG_VCOUNT != 160){}                                            

Definition
wait until GBA is on the first line of vertical blank
Term
Which video modes use palettes
Definition
0,1,2,4
Term
Since the GBA CPU is a CISC processor we can manipulate multiple data items in memory at once
Definition
false... its a RISC
Term
Which of these is UNTRUE about IWRAM (Internal Working RAM)
Definition

 

 

 

--true ans--

Only 32KB of mem

Fastest Memory in GBA

Ideal for running ARM code at full speed

Directly addressible on 32 bit internal data bus

Term

In the RGB macro, what is the purpose of “0x1F” in the three locations:

 

RGB(r,g,b)    ((r & 0x1F)   |   ((g & 0x1F) << 5)   |   ((b & 0x1F) << 10))

Definition
To limit the three colors to only 5 bits
Term
The game’s executable is run directly on the Game Cartridge ROM instead of on the System RAM by default
Definition
True
Term

DMA can be used to transfer memory the following ways except one.

Pick the incorrect choice

Definition

ans 

Source and destination address increments 16 bytes after each copy

 

correct ways

Source and destination address remains constant after each copy

Source address decrements and destination address increments after each copy

Source and destination address increments 4 bytes after each copy

Term
Both the screen refresh rate and your game’s frames per second will always be constant at ~60 Hz (59.73 Hertz)
Definition
false
Term
Which GBA color format values are the same
Definition
0x7FFF 0xFFFF
Term
 You will potentially cause visual artifacts if you update video memory during the vertical draw period
Definition
True
Term
The DMA controller takes over the hardware by halting the CPU during its transfer of data
Definition
False
Term
Which code waits for the beginning of the Vblank period
Definition

while (REG_VCOUNT != 160){}

Term
What is the system bus bit depth of the GBA
Definition
32 - bit
Term
What are the dimensions in pixels of the GBA screen
Definition
240 x 160
Term
In video mode 4, you can write one byte of pixel information into video memory using one assignment instruction: videobuffer[y * 240 + x] = color;
Definition
False
Term
How much data can you transfer with DMA in each count
Definition
16 or 32
Term
The GBA screen refreshes at fixed intervals with both horizontal and vertical blank periods
Definition
false
Term
What is the maximum sprite size supported by the GBA
Definition
64x64
Term
Where does sprite image data need to be loaded to
Definition
Video RAM
Term
How many offsets are there for char base blocks (tile image data) and screen base blocks (tile map data) respectively
Definition
4,32
Term
What is the maximum number of hardware non-rotational backgrounds available in video mode 1
Definition
2
Term
The GBA has built in support for floating point operations
Definition
False
Term
In sprite 1d mapping mode, its tiles are stored sequentially allowing for it to be copied using a DMA transfer
Definition
True
Term
In a tile-based video mode, blitting code is required for every background you enable
Definition
False
Term
How many tile map sizes are available for text (non-rotational) backgrounds
Definition
4
Term
How many 2-byte attributes are allocated in OAM to control sprite display (without rotational data)
Definition
3
Term
There is more video memory available for sprite image data in tile-based video modes than in the bit-mapped modes
Definition
true
Term
There is more video memory available for sprite image data in tile-based video modes than in the bit-mapped modes
Definition
True
Term
When tile map data is loaded into video memory, it must be loaded at a hardware specific offset and must not run past the next offset
Definition
False
Term
Which data transfer using DMA is NOT possible
Definition

anything to ROM

 

--possible ones--

EWRAM to Video Memory 

Game Pak ROM to EWRAM 

I/O RAM to OAM 

Term
Which one of the following can two backgrounds share
Definition

All of others can be shared

Tile image, map , palette

Term
How many total bytes of memory are needed for rotation/scale data of a sprite
Definition
8 bytes
Term
Can you create a hardware sprite that will only appear as one pixel on the screen
Definition
Yes
Term
What is a rotational tile map an array of
Definition
Tile image indicies
Term
What is the maximum number of rotational backgrounds available in any one video mode
Definition
2
Term
For a standard 256 color palette, which index 0-255 is used for the transparency
Definition
0
Term
The data used to determine a sprite's degree of rotation is located in which of the four 2-byte attributes
Definition
3
Term
The same tile image data and/or tile map data loaded into video memory can be indexed by more than one background simultaneously
Definition
True
Term
Which video mode would you use if you wanted two scrolling backgrounds and one rotational background
Definition
1
Term
Where are the hardware sprites properties loaded into memory
Definition
OAM
Term
What software functions can we call that are resident in the GBA to control background rotation
Definition
none
Term
What sequence would be used to get a 1 bit for each key currently pressed
Definition
(~REG_KEY & 0x03FF) (none)
Term
Copying data to the OAM during the vertical draw period will NOT cause visual artifacts
Definition
False
Term
How do you get a pixel in a sprite to be transparent
Definition
have a sprite pixel index the first palette entry
Term
You use REG_HOFS and REG_VOFS to scroll a rotational background in video mode 2
Definition

False

 

Term
Which statement is UNTRUE about hardware sprites
Definition
Sprite Image data has to be copied over after the initial copy
Term
Sprites can be flipped and rotated at the same time
Definition
False
Term
You have less hardware sprites available in a bitmap video mode than a tile video mode
Definition
False
Term
What is the maximum number of hardware sprites that you can have in any video mode
Definition
128
Term
The data processing operations can operate on 8, 16, or 32 bit values
Definition
False
Term
It is possible for an interrupt to occur while you are handling another interrupt
Definition
True
Term
Which register would you check to determine which interrupt has occurred
Definition
REG_IF
Term
Which hardware subsystem catches interrupt messages
Definition
none(Interrupt subsystem)
Term
Which step does NOT automatically happen when an interrupt gets triggered
Definition
Disables all interupts
Term
If you multiply a 24.8 and a 24.8 fixed point value, what is the resulting fixed point value? (left side of "." is the total integer bits, right side of "." is the total fraction bits)
Definition
16.16
Term
What is pointer aliasing in reference to two pointers
Definition
Both point to the same address
Term
How do you restore an interrupt
Definition
REG_IF = nFlags
Term
If your loop iteration count can NOT be zero then what type of loop construct should we use
Definition
do {} while()
Term
Where do you copy the address of your custom interrupt service routine to in GBA memory
Definition
0x3007FFC - beginning of stack in iwRam
Term
To reduce the impact of pointer aliasing overhead (extra data retrieval) what optimization can we use
Definition
Assign a local variable to value
Term
Using a pointer to move sequentially through an array is more efficient than using x[i] because all ARM load and store instructions have a post increment mode
Definition
True
Term
 Before setting up an Interrupt Service Routine (ISR) what must be done
Definition
Disable all interupts
Term
Can a timer counter be extended by using other registers
Definition
yes, a timer counter can be linked to the next counter to extend the 16bit range
Term
How many bits are used for tile map entries of rotational backgrounds
Definition
8
Term
How many digital sound channels are available on the GBA
Definition
2
Term
Multiplying a matrix A by matrix B will always result in the same matrix as multiplying matrix B by matrix A
Definition
False
Term
Because of the way parameters are passed to C/C++ non-member functions (NMF) and C++ member functions (MF), those that pass over N parameters should be considered less efficient. What is N
Definition
4 for c/c++ NMF, 3 for c++ member funcs
Term
How many registers must you set to transform a rotational background properly
Definition
6
Term
What will happen if you left shift a 24.8 fixed point value by 24
Definition
Your will lose the integer part of the number
Term
You may need to handle multiple interrupts at one time
Definition
True
Term
The system can be configured for either big or little endian operation, but little endian is the default
Definition
True
Term
If your code uses addition, subtraction, and multiplication then there is no performance difference between signed an unsigned operations
Definition
True
Term
 Since the GBA CPU is a RISC processor, we can manipulate multiple data items in memory at once
Definition
False
Supporting users have an ad free experience!