# HG changeset patch # User Paul Boddie # Date 1494802924 -7200 # Node ID 46c6e8d5307e73151023fcd0ce53c5e325451580 # Parent 4a66779421fc8701b43f2482b941ade12b045959 Tidied up the comments somewhat. diff -r 4a66779421fc -r 46c6e8d5307e vga.S --- a/vga.S Sun May 14 23:41:30 2017 +0200 +++ b/vga.S Mon May 15 01:02:04 2017 +0200 @@ -465,9 +465,6 @@ Initialise a line channel. The line channel will be channel 0 (x = 0). - Once the hsync channel has completed a transfer, the line channel - transfer is initiated. - Specify a priority of 3: DCHxCON<1:0> = CHPRI<1:0> = 3 @@ -483,6 +480,7 @@ Initiate channel transfers when the initiating interrupt condition occurs: DCHxECON<15:8> = CHSIRQ<7:0> = timer 2 interrupt + DCHxECON<4> = SIRQEN = 1 */ la $v0, DCH0ECON @@ -490,7 +488,7 @@ sw $v1, 0($v0) /* - The line channel has a cell size of 160 bytes: + The line channel has a cell size as the number bytes in a line: DCHxCSIZ<15:0> = CHCSIZ<15:0> = LINE_LENGTH */ @@ -499,8 +497,8 @@ sw $v1, 0($v0) /* - Each source has a size identical to the cell size: - DCHxSSIZ<15:0> = CHSSIZ<15:0> = n + The source has a size identical to the cell size: + DCHxSSIZ<15:0> = CHSSIZ<15:0> = LINE_LENGTH */ la $v0, DCH0SSIZ @@ -509,14 +507,14 @@ /* The source address is the physical address of the line data: - DCHxSSA = line data physical address + DCHxSSA = physical(line data address) */ la $v0, DCH0SSA sw $zero, 0($v0) /* - Each destination has a size of 1 byte: + The destination has a size of 1 byte: DCHxDSIZ<15:0> = CHDSIZ<15:0> = 1 */ @@ -525,8 +523,8 @@ sw $v1, 0($v0) /* - For the line channel, the destination address is the physical address of - PMDIN: DCHxDSA = physical(PMDIN) + The destination address is the physical address of PMDIN: + DCHxDSA = physical(PMDIN) */ la $v0, DCH0DSA @@ -558,7 +556,7 @@ li $v1, (1 << 28) /* IEC1<28> = DMA0IE = 1 */ sw $v1, SET($v0) - /* Enable channels. */ + /* Enable channel. */ la $v0, DCH0CON li $v1, 0b10000000 @@ -616,7 +614,7 @@ mtc0 $t3, CP0_DEBUG mfc0 $t3, CP0_STATUS - li $t4, STATUS_BEV + li $t4, STATUS_BEV /* BEV = 1 or EBASE cannot be set */ or $t3, $t3, $t4 mtc0 $t3, CP0_STATUS @@ -629,11 +627,6 @@ li $t3, CAUSE_IV /* IV = 1 (use EBASE+0x200 for interrupts) */ mtc0 $t3, CP0_CAUSE - /* Multiple vector... - la $t3, INTCON - li $t4, (1 << 12) - sw $t4, SET($t3) */ - jr $ra nop @@ -643,8 +636,6 @@ .section .flash, "a" -/* Exception servicing. */ - exception_handler: li $t8, 2500000 exc_loop: