different bus/register size in a cpu

Thread Starter

enjoykilian

Joined May 15, 2021
79
hello
I posted a few times before some posts about 8-16 bit cpus:
https://forum.allaboutcircuits.com/threads/cpu-design-software.180213/
https://forum.allaboutcircuits.com/threads/course-16-or-8-bit-cpu.180600/
https://forum.allaboutcircuits.com/threads/custom-ic-in-low-quantities.187133/

I finaly bought the ic's i need for building a 16 bit cpu.

But i got a few questions:

How can I get lots of rom (1-8Mb) (in DIP form) in my 16 bit cpu?
Wich type of rom?
Parallel or serial?
Should I use memory cartridges for eech program or 1 large rom ic?

The main problem I got with the previous questions:

I got a 16 bit bus so i can only use a maximum of a 16 bit addres rom parallell because I don't now how i²c or spi works, and it seems pretty difficult to Got the right hardware for it.
Or can i like send 1 word (16 bits) and then send another. but how could i do that?
Does it need additional hardware or do you need to program it:

Ow I think I need additional hardware for a 32 bit addres registor:

Because if i load 0x1234 into the addres registor of the rom and want to load 0x4321 into the addres registor i have no way of changing the first word (A0-A15) from the addres registor to the second word (A15-A31).

So i do need additional hardware right?

If a serial connection is easier can somebody explain it to me .

greetings
Kilian Kyndt
 

ronsimpson

Joined Oct 7, 2019
2,246
I use two 8 bit ROM or RAMs in parallel to make 16 bits. Connect the two address buses together A0 to A0 ...... A15 to A15. The data is D0 to D7 and D8 to D16.
I would keep the address bus at 16 bit because that is simple. You are a long way from needing "mega" memory. My first "PC" computer only had 8 bit data and 16 bit address and I could do word processing and spell checking and accounting, etc.

Serial memory is slow! Maybe you don't care.
 

Thread Starter

enjoykilian

Joined May 15, 2021
79
I use two 8 bit ROM or RAMs in parallel to make 16 bits. Connect the two address buses together A0 to A0 ...... A15 to A15. The data is D0 to D7 and D8 to D16.
I would keep the address bus at 16 bit because that is simple. You are a long way from needing "mega" memory. My first "PC" computer only had 8 bit data and 16 bit address and I could do word processing and spell checking and accounting, etc.

Serial memory is slow! Maybe you don't care.
The biggest reason i want "mega memory" is for video output
 

Thread Starter

enjoykilian

Joined May 15, 2021
79
Are you also designing a video processor? What's the plan for video output?

SPI I/O is a simple shift register interface designed to be easy to implement at the chip level.


i will use vga output similar to ben eater's "world worst video card" but better.
he uses 800x600@60Hz but his clock is 4 times slower so max resolution is 200x150
but i gonna use the recomended clock speed @ 40MHz because it's the same speed as my cpu clock
 

Thread Starter

enjoykilian

Joined May 15, 2021
79
2Gbit x 16 Parallel flash memory
https://uk.farnell.com/skyhigh-memo...i010/memory-flash-2gbit-1-8v-63bga/dp/2340570
won't go in the prototyping board so easily, though!
sorry with lots of memory i didnt mean 2Gbit i meant a maximum of like 10Mb or something around that
because now i will use for video memory a 256kb 8bit i/o chip (x2 for 16bit i/o):

https://www.digikey.be/nl/products/detail/alliance-memory-inc/AS6C62256-55PCN/4234592

but 1 image needs
(480000 pixels @ 800/600) wich is a minimum of 480kb per image and then i only got 1 bit per pixel so black or white for vga
and i want for each color (R G B) DAC of 5 bits so I can use one word per pixel which comes out to 2.4 Mb per picture
for example

if 1 word = 1 pixel
0 11111 11111 00000
NC R DAC G DAC B DAC
full red full green no blue
0.7V (vga standard) 0.7V 0V
is there a more efficiant way?
 

MrChips

Joined Oct 2, 2009
26,789
Without knowing the background of your project, building a computer from scratch is a very ambitious project.
So I am going to assume that you want to start with a simple design.

A simple basic CPU might be 8-bit data bus with 16-bit address.
You may want to go one step up to 16-bit data bus and 16-bit address. Anything above that is going to get complicated.

Serial memory interface is complex and not suitable for a basic CPU project.
So you are stuck with parallel ROM and RAM chips with 16-bit address.
16-bit address covers 65536 memory locations.

If you want a video interface then you have to think differently.
There are two approaches:
1) Text only using a video generation IC. This is doable as a DIY project.
2) Pixel graphics display using on board graphics memory. This gets complicated and is possibly beyond the scope of a DIY project.
 

Thread Starter

enjoykilian

Joined May 15, 2021
79
Without knowing the background of your project, building a computer from scratch is a very ambitious project.
So I am going to assume that you want to start with a simple design.

A simple basic CPU might be 8-bit data bus with 16-bit address.
You may want to go one step up to 16-bit data bus and 16-bit address. Anything above that is going to get complicated.

Serial memory interface is complex and not suitable for a basic CPU project.
So you are stuck with parallel ROM and RAM chips with 16-bit address.
16-bit address covers 65536 memory locations.

If you want a video interface then you have to think differently.
There are two approaches:
1) Text only using a video generation IC. This is doable as a DIY project.
2) Pixel graphics display using on board graphics memory. This gets complicated and is possibly beyond the scope of a DIY project.
i want to eventually run basic games like pong snake etc so i think iam going with pixel graphics
 

nsaspook

Joined Aug 27, 2009
10,097

The "world worst video card" was designed by people like me decades ago.
https://forum.allaboutcircuits.com/threads/mixing-74-ls-hct-with-diode-logic.163109/post-1432058
https://forum.allaboutcircuits.com/...decoders-are-used-for-what.110573/post-853943

The problem is not static video generation as that's a straight forward design, the problem is BUS sharing with VRAM updates (blanking time or dual port ram) and interfacing to the scan generator circuits as he talks about here. I love his design as he used most of the same techniques from decades ago.

For my mono board I used separate character 2114 RAM and video 2114 RAM to reduce the processing power (8080) needed for a simple character line display while having a separate graphics overlay that used the 8080 to scan transform vector graphic commands. The BUS was shared during blanking and used bank flipping for video page updates.
https://www.princeton.edu/~mae412/HANDOUTS/Datasheets/2114.pdf
 
Last edited:

MrChips

Joined Oct 2, 2009
26,789
i want to eventually run basic games like pong snake etc so i think iam going with pixel graphics
Before you start designing your system you need to sit down and be realistic.
You need to define the objectives of your project in realistic terms.

Here is what I can imagine.

1) You can build a basic CPU and a working computer from scratch. The purpose of this is to gain some knowledge and insight of how computers work. You also gain hardware and software experience on how to assemble a working computer. The extent of the usefulness of the final project will be very disappointing.

2) You can clone a popular (but obsolete) computer system such as Amiga, Apple IIe, VIC 20, Commodore 64, etc. with chips and components still available. With some effort, perseverance and mostly luck you will manage to get some computer games running for pure nostalgic entertainment.

3) You can assemble a complete modern and up-to-date PC with a fully assembled and populated MB (mother board), power supplies, interface cards, etc. You will learn what components go into a PC that can run MS Windows, Linux, and that can connect to the internet.

4) You can buy a raspberryPi and gain a world of experience on low cost computing, Linux, and internet communications.

5) You can roll your own system with an ARM processor, draw your own graphics on a color, touch screen LCD, write your own computer games, connect to the internet, create IOT applications, etc. The commercial possibilities are infinite.
 

Thread Starter

enjoykilian

Joined May 15, 2021
79
Before you start designing your system you need to sit down and be realistic.
You need to define the objectives of your project in realistic terms.

Here is what I can imagine.

1) You can build a basic CPU and a working computer from scratch. The purpose of this is to gain some knowledge and insight of how computers work. You also gain hardware and software experience on how to assemble a working computer. The extent of the usefulness of the final project will be very disappointing.

2) You can clone a popular (but obsolete) computer system such as Amiga, Apple IIe, VIC 20, Commodore 64, etc. with chips and components still available. With some effort, perseverance and mostly luck you will manage to get some computer games running for pure nostalgic entertainment.

3) You can assemble a complete modern and up-to-date PC with a fully assembled and populated MB (mother board), power supplies, interface cards, etc. You will learn what components go into a PC that can run MS Windows, Linux, and that can connect to the internet.

4) You can buy a raspberryPi and gain a world of experience on low cost computing, Linux, and internet communications.

5) You can roll your own system with an ARM processor, draw your own graphics on a color, touch screen LCD, write your own computer games, connect to the internet, create IOT applications, etc. The commercial possibilities are infinite.
the thing is i know it wont be very usefull but i want to learn and make something i could be proud of and i can do a little bit on because is playing your own programmed pong on your own hardware not like the best feeling ever
 

Thread Starter

enjoykilian

Joined May 15, 2021
79
If you want to create your own pong game I can help you with that.
There are two routes, hardware or software.

Have a look at this hardware approach.
https://forum.allaboutcircuits.com/ubs/diy-pong-part-1-of-4-getting-started.822/

If you want to do it in software we can do that too. It is easy enough to pick a hardware platform. The rest is a lot of time spent (100%) writing the program.
it doesn't have to be pong it can be any game actually but i want to play it on my own hardware that i can program with my own assembler
 

MrChips

Joined Oct 2, 2009
26,789
Let us go back in time and review the revolution and development of electronic gaming.

1) The first computer games were text input and output only, entered on a teletype machine with output printed on paper. Popular simulation games such as Hammurabi were in vogue. Of course response time was slow.

2) Animated graphical games began with Jupiter Lander which featured monochrome vector graphics on an X-Y oscilloscope screen.

3) With the advent of CRT screens, text based games developed more rapidly, with the likes of "Hitchhiker's Guide to the Galaxy".

4) Live action full color computer games finally took off with the introduction of personal computers, IBM, Atari, Amiga, Commodore, etc. introducing games and simulation such as Pacman, Space Invaders, Flight Simulator. The first video games were character based where graphics, images and objects were coded in character fonts. Movement of objects required a lot of effort since sections of the graphics screen had to be erased and redrawn.

The introduction of "sprites" where objects were precoded and can be overlayed and moved around the background image without having to redraw the screen.

5) Finally we arrive at full 24-bit color plus sound. Needless to say the hardware (graphics accelerators) and software, memory resources, are extremely complex and not something for the faint of heart to tackle as a DIY hardware project.
 

Thread Starter

enjoykilian

Joined May 15, 2021
79
Let us go back in time and review the revolution and development of electronic gaming.

1) The first computer games were text input and output only, entered on a teletype machine with output printed on paper. Popular simulation games such as Hammurabi were in vogue. Of course response time was slow.

2) Animated graphical games began with Jupiter Lander which featured monochrome vector graphics on an X-Y oscilloscope screen.

3) With the advent of CRT screens, text based games developed more rapidly, with the likes of "Hitchhiker's Guide to the Galaxy".

4) Live action full color computer games finally took off with the introduction of personal computers, IBM, Atari, Amiga, Commodore, etc. introducing games and simulation such as Pacman, Space Invaders, Flight Simulator. The first video games were character based where graphics, images and objects were coded in character fonts. Movement of objects required a lot of effort since sections of the graphics screen had to be erased and redrawn.

The introduction of "sprites" where objects were precoded and can be overlayed and moved around the background image without having to redraw the screen.

5) Finally we arrive at full 24-bit color plus sound. Needless to say the hardware (graphics accelerators) and software, memory resources, are extremely complex and not something for the faint of heart to tackle as a DIY hardware project.
The 4 option intresses me
 

MrChips

Joined Oct 2, 2009
26,789
If you are interested in taking a step back in time to experiment with sprite graphics then I would recommend acquiring a previously owned Commodore 64.

There are C-64 user groups that you can join. You will be able to extract essential information on getting started with creating your own games.

https://www.c64brain.com/graphics/commodore-64-sprites/

https://www.c64-wiki.com/wiki/Commodore_User_Groups

My favorite game on the Commodore 64 was Bugaboo.
https://en.wikipedia.org/wiki/Bugaboo_(The_Flea)
 

Thread Starter

enjoykilian

Joined May 15, 2021
79
If you are interested in taking a step back in time to experiment with sprite graphics then I would recommend acquiring a previously owned Commodore 64.

There are C-64 user groups that you can join. You will be able to extract essential information on getting started with creating your own games.

https://www.c64brain.com/graphics/commodore-64-sprites/

https://www.c64-wiki.com/wiki/Commodore_User_Groups

My favorite game on the Commodore 64 was Bugaboo.
https://en.wikipedia.org/wiki/Bugaboo_(The_Flea)
I actually just want to build my own i already have a plan and the parts needed so there is no way back i guess i am just trying to figure out what the best things to do are like what is the most optimized way of using ram etc
 
Top