L02_SomeBasics-1

L02_SomeBasics-1 - CS1372 CS1372: HELPING TO PUT THE...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
CS1372: HELPING TO PUT THE COMPUTING IN ECE CS1372 Some Basics
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS1372: HELPING TO PUT THE COMPUTING IN ECE Computer Numbers Binary Two's complement Hexadecimal
Background image of page 2
CS1372: HELPING TO PUT THE COMPUTING IN ECE What are the components? Processor -- Does math, logic, testing (=0) Memory -- Stores data AND program Also is where program interfaces with I/O devices Input -- Gameboy has 10 pushbuttons Output Video screen Sound
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS1372: HELPING TO PUT THE COMPUTING IN ECE Machine Model Processor Memory Video Controller Display Sound Controller Speakers/ Jacks Button Controller Buttons
Background image of page 4
CS1372: HELPING TO PUT THE COMPUTING IN ECE Light Up a Pixel
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS1372: HELPING TO PUT THE COMPUTING IN ECE REG_DISPCNT 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 0F 0E 0D 0C 0B 0A 09 08 07 06 05 04 03 02 01 00 Mode BG0 BG1 BG2 BG3 Bits 0-2 Mode (at 0X4 000 000) 0,1,2 Tile Modes 3, 4, 5 Bitmap Modes For bitmapped graphics use BG2
Background image of page 6
CS1372: HELPING TO PUT THE COMPUTING IN ECE REG_DISPCNT 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 0F 0E 0D 0C 0B 0A 09 08 07 06 05 04 03 02 01 00 Mode BG0 BG1 BG2 BG3 Bits 0-2 Mode 0,1,2 Tile Modes 3, 4, 5 Bitmap Modes For bitmapped graphics use BG2 10000000011 2 = 2 10 + 2 1 + 2 0 = 1024 + 2 + 1 = 1027
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS1372: HELPING TO PUT THE COMPUTING IN ECE Video Memory (in Mode 3) Located at 0x6 000 000 Consists of 240 x 160 16-bit shorts
Background image of page 8
CS1372: HELPING TO PUT THE COMPUTING IN ECE Let's Light Up a Pixel int main(void) { *(unsigned short *)0x4000000 = 1027; *(unsigned short *)0x6000240 = 32767; while(1) { } return 0; }
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS1372: HELPING TO PUT THE COMPUTING IN ECE Structure of C Program C programs consist of one or more files Each file may contain 0 or more functions Executable code must appear in functions
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 31

L02_SomeBasics-1 - CS1372 CS1372: HELPING TO PUT THE...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online