-
Notifications
You must be signed in to change notification settings - Fork 10
/
zx-next-dev-guide.tex
135 lines (108 loc) · 4.86 KB
/
zx-next-dev-guide.tex
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
\documentclass[12pt,twoside,openright,a4paper]{book}
\usepackage{fancyhdr}
\usepackage{a4wide}
\usepackage{etoc}
\usepackage{afterpage}
\usepackage{amsfonts}
\usepackage{anyfontsize}
\usepackage{url}
\usepackage{array}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{parcolumns}
\usepackage{enumitem}
\usepackage{etoolbox}
\usepackage{mdwlist}
\usepackage{tabularx}
\usepackage{mathabx}
\usepackage{numprint}
\usepackage{bigdelim}
\usepackage{hhline}
\usepackage{xfp}
\usepackage{xstring}
\usepackage{xparse}
\usepackage[table]{xcolor}
\usepackage[bottom]{footmisc}
\usepackage[nottoc,numbib]{tocbibind}
\usepackage[xparse,breakable,skins,listings]{tcolorbox}
\usepackage{hyperref}
\usepackage{microtype}
\usepackage{tikz}
\usepackage[
a4paper,
layout=a4paper,
bindingoffset=0.25cm, % offset pages to accomodate for binding
width=17cm, % this matches original LaTeX width, geometry makes it narrower by default
top=3cm, % reduce top edge, too big on default settings
bottom=2.5cm % page numbers should be much lower on the page
]{geometry}
% include definitions from external files (note: order of inputs is important!)
\input{defines}
\input{setup}
\input{tables}
\input{instructions}
\input{ports}
% ASCII text created with https://fsymbols.com/generators/carty/
% in case it's not obvious - these large titles are nicely visible in minimap¯\_(ツ)_/¯
\begin{document}
% note: each section must be `\include{}`ed; LaTeX will do a `\clearpage` in front which is what is desired. However if we just want to split larger section into multiple files, `\input{}` should be used instead which imports the contents of the file as if they were typed here.
% important: regardles of whether `\include{}` or `\input{}` is used, `.tex` extension must be ommited. Some LaTeX compilers auto-add the extension so it ends up doubled (`*.tex.tex`) and therefore file cannot be found. Works with MikTEX either way.
% ▒█▀▀▀ ▒█▀▀█ ▒█▀▀▀█ ▒█▄░▒█ ▀▀█▀▀
% ▒█▀▀▀ ▒█▄▄▀ ▒█░░▒█ ▒█▒█▒█ ░▒█░░
% ▒█░░░ ▒█░▒█ ▒█▄▄▄█ ▒█░░▀█ ░▒█░░
\SetupPageFormattingTitle
\include{chapter-title}
\SetupPageFormattingIntro
\include{chapter-copyright}
\include{chapter-acknowledge}
\SetupPageFormattingTOC
\include{chapter-toc}
% ▒█▀▀█ ▒█▀▀▀█ ▒█▄░▒█ ▀▀█▀▀ ▒█▀▀▀ ▒█▄░▒█ ▀▀█▀▀
% ▒█░░░ ▒█░░▒█ ▒█▒█▒█ ░▒█░░ ▒█▀▀▀ ▒█▒█▒█ ░▒█░░
% ▒█▄▄█ ▒█▄▄▄█ ▒█░░▀█ ░▒█░░ ▒█▄▄▄ ▒█░░▀█ ░▒█░░
\SetupPageFormattingBook
\include{chapter-introduction}
\include{chapter-z80}
% note: for Next chapter, we use `\include{}` for each section; we want each to be treated as its own section, with `\clearpage` etc.
\include{chapter-next}
\include{chapter-next-ports}
\include{chapter-next-memory}
\include{chapter-next-dma}
\include{chapter-next-palette}
\include{chapter-next-ula}
\include{chapter-next-layer2}
\include{chapter-next-tilemap}
\include{chapter-next-sprites}
\include{chapter-next-copper}
\include{chapter-next-sound}
\include{chapter-next-keyboard}
\include{chapter-next-interrupts}
\SetupPageFormattingInstructions
% note: we use `\input{}` instead of `\include{}` here; we just want to split otherwise large file into multiple files but don't want empty pages to be inserted in between. Ideally, we'd `\input{}` inside chapter file, but LaTeX doesn't support nested inputs, so we need to do it here.
\include{chapter-instr-glance}
\input{chapter-instr-glance-8bit-arithmetic}
\input{chapter-instr-glance-16bit-arithmetic}
\input{chapter-instr-glance-8bit-load}
\input{chapter-instr-glance-general}
\input{chapter-instr-glance-16bit-load}
\input{chapter-instr-glance-stack}
\input{chapter-instr-glance-exchange}
\input{chapter-instr-glance-bit}
\input{chapter-instr-glance-rotate-shift}
\input{chapter-instr-glance-jump}
\input{chapter-instr-glance-call-return}
\input{chapter-instr-glance-block}
\input{chapter-instr-glance-input}
\input{chapter-instr-glance-output}
\input{chapter-instr-glance-next}
\input{chapter-instr-glance-alphabetical}
\include{chapter-instr-close}
% ░█▀▀█ ▒█▀▀█ ▒█▀▀█ ▒█▀▀▀ ▒█▄░▒█ ▒█▀▀▄ ▀█▀ ▀▄▒▄▀
% ▒█▄▄█ ▒█▄▄█ ▒█▄▄█ ▒█▀▀▀ ▒█▒█▒█ ▒█░▒█ ▒█░ ░▒█░░
% ▒█░▒█ ▒█░░░ ▒█░░░ ▒█▄▄▄ ▒█░░▀█ ▒█▄▄▀ ▄█▄ ▄▀▒▀▄
\SetupPageFormattingAppendix
\include{chapter-instr-sorted-mnemonic}
\include{chapter-instr-sorted-opcode}
\include{chapter-bibliography}
\include{chapter-license}
\end{document}