1.1 --- a/vga.S Sun May 14 23:41:30 2017 +0200
1.2 +++ b/vga.S Mon May 15 01:02:04 2017 +0200
1.3 @@ -465,9 +465,6 @@
1.4 Initialise a line channel.
1.5 The line channel will be channel 0 (x = 0).
1.6
1.7 - Once the hsync channel has completed a transfer, the line channel
1.8 - transfer is initiated.
1.9 -
1.10 Specify a priority of 3:
1.11 DCHxCON<1:0> = CHPRI<1:0> = 3
1.12
1.13 @@ -483,6 +480,7 @@
1.14 Initiate channel transfers when the initiating interrupt condition
1.15 occurs:
1.16 DCHxECON<15:8> = CHSIRQ<7:0> = timer 2 interrupt
1.17 + DCHxECON<4> = SIRQEN = 1
1.18 */
1.19
1.20 la $v0, DCH0ECON
1.21 @@ -490,7 +488,7 @@
1.22 sw $v1, 0($v0)
1.23
1.24 /*
1.25 - The line channel has a cell size of 160 bytes:
1.26 + The line channel has a cell size as the number bytes in a line:
1.27 DCHxCSIZ<15:0> = CHCSIZ<15:0> = LINE_LENGTH
1.28 */
1.29
1.30 @@ -499,8 +497,8 @@
1.31 sw $v1, 0($v0)
1.32
1.33 /*
1.34 - Each source has a size identical to the cell size:
1.35 - DCHxSSIZ<15:0> = CHSSIZ<15:0> = n
1.36 + The source has a size identical to the cell size:
1.37 + DCHxSSIZ<15:0> = CHSSIZ<15:0> = LINE_LENGTH
1.38 */
1.39
1.40 la $v0, DCH0SSIZ
1.41 @@ -509,14 +507,14 @@
1.42
1.43 /*
1.44 The source address is the physical address of the line data:
1.45 - DCHxSSA = line data physical address
1.46 + DCHxSSA = physical(line data address)
1.47 */
1.48
1.49 la $v0, DCH0SSA
1.50 sw $zero, 0($v0)
1.51
1.52 /*
1.53 - Each destination has a size of 1 byte:
1.54 + The destination has a size of 1 byte:
1.55 DCHxDSIZ<15:0> = CHDSIZ<15:0> = 1
1.56 */
1.57
1.58 @@ -525,8 +523,8 @@
1.59 sw $v1, 0($v0)
1.60
1.61 /*
1.62 - For the line channel, the destination address is the physical address of
1.63 - PMDIN: DCHxDSA = physical(PMDIN)
1.64 + The destination address is the physical address of PMDIN:
1.65 + DCHxDSA = physical(PMDIN)
1.66 */
1.67
1.68 la $v0, DCH0DSA
1.69 @@ -558,7 +556,7 @@
1.70 li $v1, (1 << 28) /* IEC1<28> = DMA0IE = 1 */
1.71 sw $v1, SET($v0)
1.72
1.73 - /* Enable channels. */
1.74 + /* Enable channel. */
1.75
1.76 la $v0, DCH0CON
1.77 li $v1, 0b10000000
1.78 @@ -616,7 +614,7 @@
1.79 mtc0 $t3, CP0_DEBUG
1.80
1.81 mfc0 $t3, CP0_STATUS
1.82 - li $t4, STATUS_BEV
1.83 + li $t4, STATUS_BEV /* BEV = 1 or EBASE cannot be set */
1.84 or $t3, $t3, $t4
1.85 mtc0 $t3, CP0_STATUS
1.86
1.87 @@ -629,11 +627,6 @@
1.88 li $t3, CAUSE_IV /* IV = 1 (use EBASE+0x200 for interrupts) */
1.89 mtc0 $t3, CP0_CAUSE
1.90
1.91 - /* Multiple vector...
1.92 - la $t3, INTCON
1.93 - li $t4, (1 << 12)
1.94 - sw $t4, SET($t3) */
1.95 -
1.96 jr $ra
1.97 nop
1.98
1.99 @@ -643,8 +636,6 @@
1.100
1.101 .section .flash, "a"
1.102
1.103 -/* Exception servicing. */
1.104 -
1.105 exception_handler:
1.106 li $t8, 2500000
1.107 exc_loop: