Searched Projects

Tags: GPU

project.name
47 Stars     5626 Views
Everything is working great in this build!  So I will be taking about a week break from this.
Well except single pixel drawing on GPU but more on that later.

I included a Hello World program and a screen clear test program running by default.
But I would love to see what programs people can come up with. So definitely fork this and make your own programs for it, and link them in the comments below!

Also I am working on adding more instructions for the cpu and the gpu, let me know what might be useful in the comments and definitely check my in progress updates below!

I am running into an issue with per pixel drawing giving a contention error which doesn't make sense as i have tested the chip. unless the rgb screen col and row pins are also outputs i don't get what is going on.

For now though i'm taking a break from that and working on implementing some more of the OPs.

Here is a list of instructions. I'll add descriptions soon.
Anything with a * before it is not implemented yet.
0 NOP [0]
1 JMP [1]
2 SETA [10]
3 SETB [11]
4 LDA [100]
5 LDB [101]
6 WRA [110]
7 WRB [111]

*8 IA [1000]
*9 IB [1001]
*10 DA [1010]
*11 DB [1011]
*12 SLA [1100]
*13 SLB [1101]
*14 SRA [1110]
*15 SRB [1111]

16 ADD [1 0000]
17 SUB [1 0001]
18 MUL [1 0010]
19 DIV [1 0011]

20 EQL [1 0100]
21 NEQL [1 0101]
22 GRT [1 0110]
23 LSS [1 0111]
24 GRQL [1 1000]
25 LEQL [1 1001]

26 SSP [1 1010]
27 PUSH [1 1011]
28 POP [1 1100]
29 LTS [1 1101]

*30 PROC [1 1110]
*31 EPROC [1 1111]

32 SAS [10 0000]

project.name
3 Stars     195 Views
User:

Basic GPU

Basic GPU

A basic GPU. Here the horizontal offset is connected to a counter that causes the image to permanently move. The screen is 16x8 pixels in size and operates at 1BPP. A vertical offset and possibly sprite capabilities are coming soon.


project.name
0 Stars     186 Views

RECOMMENDED FOR COMPUTERS 

This is the second addition of the B8 Series. Otherwise known as the BURTONABLE 8 256 it is capable of running programs 256 lines long! as well as 7 instructions to use

LDA 0001: Loads the given value into the Accumulator

ADD 0010: The given value will be added to the accumulator

SUB 0011: The given value will be subtracted from the accumulator

OUT 1110: Shows the output of A and B

HALT 1111: Stops all

PRT 0110: Prints a 7 bit ASCII character to the TTY

CLRTTY 0101: Clears the TTY element

DRAW BLACK 1001: Draws the color black to the X (4 bits) and the Y (4 bits)

DRAW WHITE 1011: Draws the color white to the X (4 bits) and the Y (4 bits)

JC 1100: Only jumps up by the given data if 2 negative numbers add up to a positive number

sometimes the codes get corrupted just spam reset a couple times

FUN CODES: To use them, just double click the EEPROM

To retrieve a code just press the save button and then open the dev console (FN + Volume up MAC) or F12 (PC)

To put codes in the EEPROM double click it and paste the code

circle.

2952,2968,2984,2999,2998,2997,2980,2964,2948,2933,2934,2935,1635,1641,1650,1635,1644,1637,3840,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

I would love to see your codes too so post them in the comments!

THIS VERSION IS OUTDATED HERE IS THE LINK TO THE NEW ONE https://circuitverse.org/users/160624/projects/b8256-v3

Oh and also The original B8 got deleted :(


project.name
1 Stars     362 Views

USE ON A COMPUTER

Same as V2 exempt that there is a Jump if zero command

JO: Jumps if the ALU output is 0

And you can under stand things better!

(these instructions arent done)


project.name
0 Stars     36 Views
User:
User Image Mel

BT2123

BT2123
GPU

A 16-Bit Graphics Processing Unit.


====PINOUT====

Inputs:

  • DI - Display In, values to be displayed on the current row
  • GND - Ground
  • POW - Power
  • HALT - Stops the GPU and reverts the row selector to R0
  • CLK - Clock, the speed at which the screen will be scanned

Outputs:

  • DO - Display Out, values to be displayed on the current row
  • R - Row Selector, which row will have its pixels altered



Preloaded into the GPU is a frame that displays the message "Hi" + A Heart.


project.name
0 Stars     40 Views
User:

This is not the final version of the GPU, but it is the current version and working very well. Supports 16 colors

UPDATE: Replaced the ROMs with a RAM. Hope this can make it easier!


project.name
0 Stars     27 Views
User:

GPU

GPU
GPU

project.name
0 Stars     21 Views
User:

CB PPU

CB stands for "Color Burst"

This is a graphics processor/screen driver for 8-bit CPUs.
It works with 16x16 screens or under. 
It has a sprite system that has 16 slots.
Most of this description you can find in the project. 

Update Notes:

V1 (2024, April 30):
Frame buffer works! Implemented single pixel drawing.

V2 (2024, May 2):
Tinting and Grayscale color operations are added to the pixel drawer. But further development on this is scrapped due to being inefficient.

V3 (2024, May 15) Release 1:
First release of Color Burst! Yipee!!!
Anyways, full flag register, instructions, sprites, and background!

REGISTERS

FLG:
The Flag register for effects.
Op:
The chosen operation (writing to it executes the operation)
Pos1: 
Used interchangeably but usually a position (changes based on OP)
Pos2:
Used interchangeably but usually a position (changes based on OP)
SPos:
The Position of the currently selected Sprite
S:
The Slot used for table and sprite updates
BK:
The background color (RRRGGBBB)
CLR register: 
This holds the color register for stuff (RRRGGBBB)

FLAG Register

AECg BGRM

M = Pos1, Pos2 OR Pos, Dim
R = Adds 32 to r channel from then on (Tint Red)
G = Adds 32 to g channel from then on (Tint Green)
B = Adds 32 to b channel from then on (Tint Blue)
g = Uses CLR as grayscale value from then on
C = Nothing?
E = Disable background
A = Graphics update by clock or manual

INSTRUCTION SET

00: NOP
01: Flip - Invokes a Graphics update (32 units)
02: Disable Sprite - Disables the sprite at slot S
03: Enable Sprite - Enables the sprite at slot S
04: CreateSp - Creates a sprite using Pos1 as position, Pos2 as dim or pos, C as color
05: UpdateSpPos - Changes the position of sprite at S into Pos1
06: UpdateSpDim - Changes dim of sprite at S to Pos2
07: UpdateSpClr - Changes the color of sprite at S to C
08: Scroll - Adds to the Sprite positions based on Pos1  (32 units)

GUIDE

In order to enable RTX, set the C flag to 1. (JOKE)

--QNA--

Q: Why is it called PPU?

A: It's called that because PPU stands for Picture Processing Unit. I used this name because by naming it a GPU it would sound more powerful than it actually is. Also the NES' graphics processor calls itself PPU as well.

Q: Why in the heck would you make this?

A: Because I wanted to make Graphical games on my CPU projects. 

Q: What happens if you scroll it past the side?

A: It will wrap the coordinates around which might make a weird effect due to how the sprites are drawn.

Q: Can it work with 4K?

A: Maybe... Just kidding, it's impossible to drive anything over 16x16 due to the coordinates being only 4 bits each.

--Format--

Color on Color Burst is specified as

RRRGGBBB

This means that there's an unequal distribution of green in comparison with other colors. Unfortunately in order to achieve full use of the 8 bits, I have decided to make greennot as precise. These colors are also shifted in order to fit the 24 bit depth additive color that drives the screen.

Position and Dimensions are specified as

XXXXYYYY

This means that this PPU will only drive a 16x16 or smaller screen.

--Sprites--

Anyways you can make a total of 16 different sprites. Each sprite is well, a rectangle. By the M flag you can select whether you want to specify each sprite as Position and Dimension or Position and Position. It uses the POS1 and POS2 Register for this operation. If you try to use a value over 16 on the S register, it will wrap. Also, sprites are drawn bottom to top so sprite 16 would be on top and 1 on bottom.

--Background--

Each graphics update, the screen is erased and replaced with the background color. In order to change this color, update the BK register. The erasing and updating can be disabled though by using the E flag so that you could theoretically have more than 16 sprites. You can of course read the position from the selected Sprite as well using SPOS.

--Effects--

There are a few effects to choose from on here. Tint Red, Tint Green, Tint Blue, and grayscale. These instructions are controlled by the flag register as R,G,B,g. In order to use them, just set them to 1. Also the tint operations add 32 to the channels by default but future versions of this PPU could have a register to change that.

--Instructions--

Instructions are triggered upon writing to the register. There are 8 instructions. Flip just updates the screen with new data. Scroll just uses the value of POS1 in order to update every sprite by adding it to the position. (This takes 32 units). Other instructions are explained in the set well.

--Other--

If you want to update the graphics by clock instead of instruction, you can change A to 1 and then you can choose a clock speed for the updates (Keep in mind that the clock must last for over 32 units due to graphics updates taking that long.


project.name
1 Stars     102 Views
User:

FEMBOY-8

Functional Electronic Machine Binary Operator Yes

8-bit CPU

Working on a NEW CPU: Femboy-16!


ASSEMBLER:

https://output.jsbin.com/wutikij

GPU:

https://circuitverse.org/users/214464/projects/cb-ppu


INSTRUCTION SET:
00: NOP - Nothing
01: HLT - Halt program
02: OUT [id] - Output the accumulator out of an output
03: LDI A, [d8] - Loads immediate 8 bit word into the accumulator
04: MOV [r], A - Move register to accumulator
05: MOV A, [r] - Move accumulator to register
06: INC [r] - Increment a register
07: DEC [r] - Decrememt a register
08: ADD [r], A - Add the accumulator from a register
09: SUB [r], A - Subtract the accumulator from a register
0A: AND [r], A - And the register and accumulator
0B: IOR [r], A - OR the register and accumulator
0C: XOR [r], A - XOR the register and accumulator
0D: NOT [r] - NOT a register
0E: SRR [r] - Barrel shift accumulator right
0F: SRL [r] - Barrel shift accumulator left
10: JUP [d8] - Jump to a location
11: JPP [r] - Jump to a register value
12: JPL A, [d8] - Jump if accumulator is less than 0
13: JZO A, [d8] - Jump if accumulator is 0
14: JPG A, [d8] - Jump if accumulator is greater than 0
15: JLE A, [d8] - Jump if accumulator is less than or equal to 0
16: JGE A, [d8] Jump if accumulator is greater than or equal to 0
17: JNZ A, [d8] Jump if accumulator is not 0
18: CLR [r] - Clear a register
19: INP [id] - Store INPUT id in accumulator
1A: MOV pA, [r] - Move the value at address A register r
1B:  MOV [r], pA - Move register r into address A
1C: MOV [p], A - Move a value in a pointer to the accumulator
1D: MOV A, [p] - Move the accumulator to a location
1E: MLT [r], A - Multiply register r by the accumulator
1F: DIV [r], A - Divide register r by accumulator


REGISTERS:
00: REGISTER 1
01: REGISTER 2
02: REGISTER 3
04: REGISTER 4
05: ZERO FLAG (R)
06:
PC (R)
07: ALU Result (R)


Update Notes:

V4:
So this is the 4th iteration of my CPU lol... I added a few programs for you all to try out and you can even use an assembler now!

V5:
Long time since I updated this... But I've added a GPU! It's called "Color burst" and you can go try out some premade programs I have added on it! There's an assembler guide with GPU dev guide and I encourage you all to go try and make some graphical programs! Also more docs can be found on it's project page.


To-Do:
Increase amount of registers to 8
Make a simple command line
Make a simple operating system for the CPU


project.name
0 Stars     6 Views
User:

CSC4536-new(my style) V6

CSC4536-new(my style) V6

Its a Good CPU You Can Fork This If You Want