TempleOSCDV4.08.ISO
This commit is contained in:
1 parent
b632ab9a4f
commit
2d56cda5f3
258 files changed
+6973
-5476
No files matched your search
@@ -1,5 +1,5 @@
|
||||
//See $LK,"::/Demo/Lectures/GraphicsCPULoad.CPP"$
|
||||
U8 reverse[256], //The VGA bits are bwd
|
||||
U8 rev[256], //The VGA bits are bwd
|
||||
|
||||
image[640*480/8]; //We need read-modify write.
|
||||
//0xA0000 alias memory can't be read.
|
||||
@@ -8,11 +8,11 @@ U0 MGInit()
|
||||
{
|
||||
I64 i,j;
|
||||
MemSet(image,0,sizeof(image));
|
||||
MemSet(reverse,0,sizeof(reverse));
|
||||
MemSet(rev,0,sizeof(rev));
|
||||
for (i=0;i<256;i++)
|
||||
for (j=0;j<8;j++)
|
||||
if (Bt(&i,j))
|
||||
Bts(&reverse[i],7-j);
|
||||
Bts(&rev[i],7-j);
|
||||
}
|
||||
|
||||
U0 MGUpdate()
|
||||
@@ -41,15 +41,15 @@ U0 MGHLine(I64 x1,I64 x2,I64 y)
|
||||
leading =8-x1&7;
|
||||
trailing=(x2+1)&7;
|
||||
if (leading+trailing>w)
|
||||
*ptr|=reverse[(0xFF00>>leading&(0x00FF<<trailing)>>8)];
|
||||
*ptr|=rev[(0xFF00>>leading&(0x00FF<<trailing)>>8)];
|
||||
else {
|
||||
whole_bytes=(w-leading-trailing)>>3;
|
||||
if (leading)
|
||||
*ptr++|=reverse[(0xFF00>>leading)&0xFF];
|
||||
*ptr++|=rev[(0xFF00>>leading)&0xFF];
|
||||
for (i=0;i<whole_bytes;i++)
|
||||
*ptr++=0xFF;
|
||||
if (trailing)
|
||||
*ptr++|=reverse[(0x00FF<<trailing)>>8];
|
||||
*ptr++|=rev[(0x00FF<<trailing)>>8];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
U0 PlotXY(I64 x,I64 y)
|
||||
{
|
||||
//Screen bits are reversed
|
||||
//Screen bits are revd
|
||||
LBts(text.vga_alias,y*GR_WIDTH+x^7);
|
||||
}
|
||||
|
||||
@@ -29,9 +29,9 @@ U0 Main()
|
||||
OutU8(VGAP_DATA,BLUE);
|
||||
for (i=0;i<200;i++)
|
||||
PlotXY(200-i,i);
|
||||
/*If you want a mixed color select multiple planes
|
||||
but you have to be sure the unselected planes
|
||||
are zero, so select them and make them zero.
|
||||
/*If you want a mixed color sel multiple planes
|
||||
but you have to be sure the unseled planes
|
||||
are zero, so sel them and make them zero.
|
||||
You can't do reads on VGA memory, by the way.
|
||||
That means no read-modify-writes, too.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user