pres.tex 3.76 KB
Newer Older
PoroCYon's avatar
PoroCYon committed
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
\documentclass[english,aspectratio=169]{beamer} % TODO: for faster compilation: ,draft
% ,handout,notes=show
% ,notes=only

\newsavebox{\verbbox}

\usepackage{babel,url,graphicx,booktabs,alltt,xcolor,listings}
\usepackage{subfig,hyperref}
\usepackage[utf8]{inputenc}
\usepackage[normalem]{ulem}

\graphicspath{ {img/} }

% hack required for TeXLive 2018
\makeatletter
\let\@@magyar@captionfix\relax
\makeatother

% page numbers
\addtobeamertemplate{navigation symbols}{}{%
    \usebeamerfont{footline}%
    \usebeamercolor[fg]{footline}%
    \hspace{1em}%
    \insertframenumber/\inserttotalframenumber
}

\usepackage{perpage} %the perpage package
\MakePerPage{footnote} %the perpage package command

\title{\textbf{Lovebyte 256 second seminar: Gameboy/Gameboy Color Sizecoding}}
\author{\textbf{PoroCYon / K2\^{}TiTAN}}
\date{}

%\AtBeginSection[]
%{
%  \begin{frame}
%    \frametitle{Table of Contents}
%    \tableofcontents[currentsection]
%  \end{frame}
%}

\usetheme{Szeged}
\usecolortheme{seagull}

%\usetheme{Singapore}
%\usecolortheme{default}

%\usetheme{Hannover}
%\usecolortheme{default}

\begin{document}

\frame{\titlepage}

% frame options: plain (for large contents), shrink (lots of text), allowframebreaks, fragile
% \pause, <a-b>
% \begin{columns}[align] \begin{column}[align]{5cm} ...
% \begin{block,alertblock,exampleblock}
% \include, dan pas \input

\begin{frame}{What's a GB?}
	\begin{itemize}
		\item Z80-ish @ 4.2/8.4 MHz
		\item 8k/32k RAM, 8k/16k VRAM
		\item Background, window, 40 sprites (10/line)
	\end{itemize}
\end{frame}

\begin{frame}{Toolchains}
	\begin{description}
		\item[Assembler]: \texttt{rgbasm} from
			\texttt{rgbds}\footnote{\url{https://rgbds.gbdev.io/}}.
		\item[\texttt{rgbfix}]: to fix up cart headers (included in \texttt{rgbds})
		\item[HW docs]: Pan Docs\footnote{\url{https://gbdev.io/pandocs/}},
			GBDev wiki\footnote{\url{https://gbdev.gg8.se/wiki/articles/Main_Page}}
		\item[Emulator]: BGB, Gambatte, Sameboy, ...
	\end{description}
\end{frame}

\begin{frame}{Hurdle 1: cartridge entrypoint}
	\begin{itemize}
		\item Entrypoint at \texttt{+0x100} in file
		\item \texttt{+0x000}: RST, \texttt{+0x040}: IRQ (vblank etc)
	\end{itemize}

	~\\

	\begin{itemize}
		\item Skip RST and maybe IRQ, pad with zeros\footnote{
			\url{https://www.pouet.net/prod.php?which=70163} does this, too}
	\end{itemize}
\end{frame}

\begin{frame}{Hurdle 2: cartridge header}
	\begin{itemize}
		\item \texttt{+0x100}: Entry point
		\item \texttt{+0x104..0x133}: Nintendo logo (include in safe version!
			skip in emulator version)
		\item \texttt{+0x134..0x14f}: Cartridge metadata (title, CGB, ROM/RAM size, ...)
	\end{itemize}

	~\\

	\begin{itemize}
		\item Drop IRQs (zeroed out) when specific metadata values (eg. CGB
			mode) are needed
	\end{itemize}
\end{frame}

\begin{frame}{Graphics and sound}
	Graphics:
	\begin{itemize}
		\item Tiled background, 2bpp, scrollable
		\item Window: smaller background, no transparency, less controllable
		\item Sprites: similar format as background, 8x8 or 8x16
		\item CGB: palette of 32768 colors
		\item Init: \texttt{LCDC} register
	\end{itemize}

	Sound:
	\begin{itemize}
		\item 4-channel PSG
		\item More annoying to init (\texttt{NR50}, \texttt{NR51},
			\texttt{NR52})
	\end{itemize}
\end{frame}

\begin{frame}{Example prod}
	\begin{center}
		{\large ``Pocket party''\footnote{\url{https://www.pouet.net/prod.php?which=85348}}
		by PoroCYon/K2\^{}TiTAN\normalsize} (4k)

		\includegraphics[height=0.5\textheight]{pparty-screen.png}

		\begin{itemize}
			\item Most of the ROM is background image data
		\end{itemize}
	\end{center}
\end{frame}

\begin{frame}{Conclusion}
	\begin{center}
		{\Huge \textbf{Go make an intro!}}
	\end{center}
\end{frame}

%\begin{frame}{Questions}
%	\begin{center}
%		\Huge \textbf{Questions?}
%	\end{center}
%\end{frame}

\end{document}