summaryrefslogtreecommitdiff
path: root/src/z80/prototype1.org
blob: c9e8b0acc5558aaea20d99d90baec73c3a240feb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#+TITLE: Prototype 1
#+DATE: <2019-03-03>
#+SETUPFILE: ../../options.org

#+BEGIN_COMMENT
m4_define(`_REL_HEADER', `Previous: <a href="/z80/plm.html">PLM</a>
Next: <a href="/z80/prototype2.html">Prototype 2</a>Up: <a
href="/z80/">Z80</a>')m4_dnl
#+END_COMMENT

{{{date_place(Temuco, Chile)}}}@@html:<br>@@ Last edited: Bremen,
Germany, February 02, 2021

* Background

Back in 2015 I used to watch gameplays of the just released [[https://en.wikipedia.org/wiki/Fallout_4][Fallout 4]].
From this game the thing I loved the most was the pip-boy, so much so,
that I had the brilliant idea, /Why don't I build my own pip-boy? I
mean, How hard could it be?/.

Unsurprisingly, it turned to be harder than expected. I only knew how
to program at an application level (I wasn't that good at it either)
and had basically no knowledge of electronics, assembly language, nor
did I even have the components at my disposal.

* Beginning

Some time after this idea, I got myself an atmel328p and a programmer.
I learned to instruct this AVR to draw text on a 16x4 lcd and could
get input from buttons.

But I had some challenges. First, microcontrollers are usually based
on the Harvard architecture. This means that running programs from ram
was virtually impossible.

Added to this was the fact that the AVR had only 2K of ram and no way
to add more. I avoided serial alternatives, because they are slower
and can't be used as normal RAM inside C code.

These problems were ultimately fixed by switching to a Z80
microprocessor. The Z80 could in fact handle more memory and run code
from its RAM, but with it came also the limitation of size. All memory
had to be external to the chip's package and the processor itself came
with no peripherals, as microcontrollers usually do.

* First prototype

Three years later, and with the help of many people, I finally
managed to get all the components and build my first working
prototype. It did not look beautiful, but it was functional.

#+CAPTION: Prototype 1 together with its serial terminal
[[/img/prototype1.jpg]]

I wasn't satisfied with this prototype though. It was not what I had
envisioned. I wanted to have a pocket computer and this was nothing
like that. It was huge and full of parts.

* Partial conclusion

Thanks to this project I learned a lot about electronics, programming,
circuit design and the inner workigs from a computer.

Reinventing the wheel wouldn't have been the only way to acquire this
knowledge.  But I would definitely recommend it to anyone wanting to
learn about the internals of computers.

This being said, I can't deny that I still have a lot left to learn.

* The end?
I wouldn't publish something on the Internet just to say I wasn't able
to accomplish my dream. Or would I?

It turned out that the idea managed to stay alive long enough, to see
the day in which I decided to give it another try. This time, hoping
that the collected knowledge allows me to get further.

This requires its own [[local:/z80/plm.html][series of articles]] though.