From bc58f2b8dc5f65482e490ea832b6f715918b586d Mon Sep 17 00:00:00 2001 From: wheremyfoodat Date: Mon, 29 Aug 2022 04:16:43 +0300 Subject: [PATCH] Document lines with overlapping vertices --- docs/cpuspecifications.md | 6 +++--- docs/graphicsprocessingunitgpu.md | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/cpuspecifications.md b/docs/cpuspecifications.md index c7da31a..48b62b0 100644 --- a/docs/cpuspecifications.md +++ b/docs/cpuspecifications.md @@ -351,12 +351,12 @@ Note that the instruction following the branch will always be executed.
bgez rs,dest if rs>=0 then pc=$+4+(-8000h..+7FFFh)*4 bgtz rs,dest if rs>0 then pc=$+4+(-8000h..+7FFFh)*4 blez rs,dest if rs<=0 then pc=$+4+(-8000h..+7FFFh)*4 - bltzal rs,dest ra=$+8; if rs<0 then pc=$+4+(..)*4 - bgezal rs,dest ra=$+8; if rs>=0 then pc=$+4+(..)*4 + bltzal rs,dest if rs<0 then pc=$+4+(..)*4; ra=$+8; + bgezal rs,dest if rs>=0 then pc=$+4+(..)*4; ra=$+8; ``` jr/jalr can be used to jump to an unaligned address, in which case an address error (AdEL) exception will be raised on the next instruction fetch.
-Additionally, bltzal/bgezal will always place the return address in $ra, whether or not the branch is taken
+Additionally, bltzal/bgezal will always place the return address in $ra, whether or not the branch is taken. Additionally, if `rs` is $ra, then the value used for the comparison is $ra's value before linking.
#### JALR cautions Caution: The JALR source code syntax varies (IDT79R3041 specs say "jalr rs,rd", diff --git a/docs/graphicsprocessingunitgpu.md b/docs/graphicsprocessingunitgpu.md index de913f5..88d6c56 100644 --- a/docs/graphicsprocessingunitgpu.md +++ b/docs/graphicsprocessingunitgpu.md @@ -231,8 +231,9 @@ Vertex YYYYXXXX - required, two signed 16 bits values When polyline mode is active, at least two vertices must be sent to the GPU. The vertex list is terminated by the bits 12-15 and 28-31 equaling `0x5`, or `(word & 0xF000F000) == 0x50005000`. The terminator value occurs on the first -word of the vertex (i.e. the color word if it's a gouraud shaded). +word of the vertex (i.e. the color word if it's a gouraud shaded).
+If the 2 vertices in a line overlap, then the GPU will draw a 1x1 rectangle in the location of the 2 vertices using the colour of the first vertex. #### Note Lines are displayed up to \ their lower-right coordinates (ie.