Monday, November 27, 2017

Architecture Redesign

Hello once again,
The reason I haven't been posting regularly was because I was at a standstill for a little while. School got busy and I was at a point here where I felt stuck. Because of my weird mix between 16-bit and 8-bit things got complicated. I determined that I would need to buy an Arduino Mega, a digital to analog converter for the XY oscilloscope and external memory. All which required a large amount of wires which would need to be on a custom circuit board.... Yeah...no.
It started out with deciding to do a 16-bit memory because I saw that addressing with 8-bits only allowed me to have 256 possible "pixels" on the screen. Which if we are assuming a square display is only a 16x16 screen. Not enough to display any useful text. Golly I thought, I guess I'm forced to go with a 16-bit display which would be 65,536 "pixels" or a 256x256 screen. Perfect I thought! But I was leading myself into a rock and a hard place.

So, in the end: Scratch all that ^^. I'm going with a new design. One that will actually fit better with the requirements I've set. In the beginning I said I would be doing 8-bit. So this will truly be 8-bits.
For the display, I got the sudden realization while I was lying in bed last night. Each pixel doesn't need 8-bits of color resolution! If we assume that each pixel will either be on/off or black/white than we can represent 8 pixels per byte!
Here's the breakdown: We have one addressing byte which is 8 bits. To make that a square, we can use 4-bits for the X direction and 4-bits for the Y direction. This allows us to have a 16x16 grid for addressing with the addressing byte. We have to remember that there is the data byte as well. Since there are 8-bits per byte. We can multiply the 16x16 with the 8 and wallah! We have 128x128 screen with just 2-bytes.
Luckily for me, I was able to get a hold of this screen from an old flip phone. I'm not sure of the exact resolution. But I estimated it to be 90x90 pixels. This will be almost perfect if there can be 128x128 pixels addressable. (those extra pixels can be extra memory).

All this leads to a architecture redesign. Because i'm switching the "external memory" to 8-bit, the memory requirements are now small enough to where the video RAM as well as any extra registers can be stored inside the Arduino. I'm also tossing the XY oscilloscope in place for this screen which I am in the process of hacking. So now, all I need is a single Arduino that can I can hook the needed screen pins to, and wallah!

next steps: 
= Need to update the instruction set for the new architecture
= Start working on the software and standard for turning the logic gates into a format that can be uploaded to the Arduino during compilation.
= Start working on the software that will emulate the software (AmberOS) that will be loaded onto the virtual hardware.