Instructor Notes
February 13, 2008
quote
"The best way to predict the future is to invent it." (Alan Kay, 1971)
Z80 assembly applied intro
review
- new opcodes: JP, JR, PUSH, POP, CALL, RET
- the flag register (pg. 76 Z80 user's guide).
- conditional: Z flag, C flag
opcode: CP: CP C --> A - C
- addressing modes: direct, indirect
Z80 example
- example: loop for time delay
- Anthrax line 1704 example
- expand to 16 bit loop
special commands for the assembler
- ;
- include
- section "name",HOME[location]
- section "name",BSS[location]
- db
- EQU
- reference
GameBoy Architecture
get it all from gbspec.txt and gbhw.inc
Hello Video
- gbspec lines 611-788
- tiles, sprites
- window is 256x256 pixels = 32x32 tiles or sprites, screen is 160x144 pixels
- Tiles are ASCII character set, 8x8 pixels each starting at $8000 (Tile pattern table a.k.a. tile data table)
- Load tiles numbers into video memory, starting at $9800 (background tile map).
- We do not load the tiles themselves. Just the numbers.
- tiles are 16 bytes each, numbers are 1 byte each
- we cannot write to the background tile map or the title pattern table except between screen refreshes
Hello I/O
- gbspec lines 1016 to end of document
- I/O registers from $FF00 to $FF4B, and $FFFF
- timer, read joy pad, serial data, sound, video modes, window placement, etc.
Hello World
- walkthru of "hello world" code
IDE
download and install
- editor
- assembler
- emulator
- "hello world" test program
for another class
- instruction types
- more on addressing modes (TRS-80 book page 41 chap 3)
- interrupts
additional resources
- students need links and references for supporting materials to read outside of class