Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

My 8bit multi-output computer

A topic by JustAdy created Aug 30, 2023 Views: 1,393 Replies: 7
Viewing posts 1 to 5
(+1)

This is my 8bit computer i've been making now and then for few week. 

Its name is BEPMOC - 8bit easily programmable multi-output computer.

Here it's in an infinite loop counting up:

The four decimal outputs display data in RAM using the display instruction. 

The first and second HEX displays show whatever is on the CPU bus and the third is current RAM address(which addres is the computer currently accessing). 

They also show you what you're coding.


BEPMOC starts executing instruction on address 0x00 when the BOOT UP pin is pressed. This , inside the CPU, activates the clock.

This is the CPU:


It has three registers(A,B,C). ALU output is stored into R_C

The ALU can: add, subtract, AND, OR, NOT, XOR, <<, >>.

 It has a register for input B and a output register, which is copied in R_C.

The FLAGS chip gets ZERO, NEG, SUB flags(also Carry which is not used anywhere). 

Inside the chip is a comparator chip which uses the flags to get new flags(ZERO,  EQUALS,  LARGER, SMALLER), which are then passed to the Control Unit.

This is the CU:


The CU uses 4bit decoders to select operations. 

Operation chips use 4bit counter to step through subinstrctions(ENBL R_A, STR R_C, etc.), when they finish they send DONE signal to the Instruction counter and the NEXT INS chip, which retrieves next instruction from RAM.

Instructions are devided into two type: RAM accessing and not. 

Instructions which don't use RAM(0x00-0x0F) use only the second nibble. 

Instructions which use RAM(0x0X-0xFX(X=address)) use the first nibble for OP Code, and second for RAM address

The RAM is only 16Bytes 


(it was pain to make)


Instruction set (X=RAM address)

0x00ADD R_A R_B0x1XJUMP
0x01SUB R_A R_B
0x2XJUMP IF 0
0x02AND R_A R_B0x3XJUMP IF ==
0x03OR R_A R_B0x4XJUMP IF >
0x04XOR R_A R_B0x5XJUMP IF <
0x05NOT R_A0x6XMOV R_A RAM
0x06<< R_A0x7XMOV R_B RAM
0x07>> R_A0x8XMOV R_C RAM
0x08COMPARE R_A R_B0x9XMOV RAM R_A
0x09MOV R_A R_B0xAXMOV RAM R_B
0x0AMOV R_A R_C0xBXMOV RAM R_C
0x0BMOV R_B R_A0xCXDISPLAY ONTO DISPLAY 0
0x0CMOV R_B R_C0xDXDISPLAY ONTO DISPLAY 1
0x0DMOV R_C R_A0xEXDISPLAY ONTO DISPLAY 2
0x0EMOV R_C R_B0xFXDISPLAY ONTO DISPLAY 3
0x0FHALT

The limitation of this computer is its small RAM.

(+1)

Can you give the save folder? I would love to look around it.

Sorry for taking so long. Here you go: https://www.mediafire.com/file/b9qah9skw0kb9ng/BEPMOC.zip/file

(+1)

wow, i thought my computer was good 😅 I got long ways to go.

(1 edit)

2 questions:

1: Couldn't you have made the ram by putting two 8bit registers together with a demux and a mux and then putting two of the result together the same way etc until you have 16 bytes in one chip with 4bit addresses?

2: How do you make everything small and how do you curve busses?

EDIT: figured out how to curve busses.

1: Yes, I could have done the RAM like that, but i don't thing it matters which way you make it.

2: I modded it and made the chips smaller, but then wires look large. So now I use this modded version: https://itch.io/post/8412027

Thanks!

This is insane! I don't think I'd have it in me to make something like this! :)