LoginLogin

I made a Tiny Computer Interpreter on SmileBASIC, but I don't think I did the VRAM correctly

Root / Programming Questions / [.]

answerCreated:
Can someone explain to me how the VRAM in Tiny Computer is handled

Tiny PC's VRAM is made out of 32-bit ints, and one bit is one pixel. 1 = left most pixel 2 = 2nd pixel on left 4 = 3rd pixel on left and so on

Tiny PC's VRAM is made out of 32-bit ints, and one bit is one pixel. 1 = left most pixel 2 = 2nd pixel on left 4 = 3rd pixel on left and so on
Ah, so 8 would also be the 4th pixel?

Yes Pretty much powers of two

As Perska said, it's 32 registers (v0-v31), and each register is 32 bits. Each bit represents a pixel. v0 represents the top row, v31 represents the bottom row. The first bit of v0 represents the topmost, leftmost pixel on the screen. The last bit in v0 represents the topmost, rightmost pixel. If the bit is 1, the pixel is "set". If it's 0, it's "not set".

I see, but the representation of two pixels is quite weird in the interpreter, why does it occur Example
HELLO:
add v0 1 v0
vsync
jmp HELLO

Pixels that are turned on/off rapidly are blurred to allow grayscale.

Pixels that are turned on/off rapidly are blurred to allow grayscale.
Yes, this. Old LCD screens were a little bit slow, so it would take time for the pixel to turn on and off. However, you don't have to replicate this effect.

I actually recently made a system to allow pixels to be blurred when turned on/off, I could try adding that when you release this