WEBVTT
Kind: captions
Language: en

00:00:08.690 --> 00:00:13.910 align:start position:0%
 
[Music]

00:00:13.910 --> 00:00:13.920 align:start position:0%
 
 

00:00:13.920 --> 00:00:15.829 align:start position:0%
 
This<00:00:14.160><c> is</c><00:00:14.320><c> an</c><00:00:14.480><c> emulator</c><00:00:14.960><c> for</c><00:00:15.200><c> the</c><00:00:15.360><c> Nintendo</c>

00:00:15.829 --> 00:00:15.839 align:start position:0%
This is an emulator for the Nintendo
 

00:00:15.839 --> 00:00:18.150 align:start position:0%
This is an emulator for the Nintendo
Entertainment<00:00:16.480><c> System</c><00:00:17.039><c> running</c><00:00:17.440><c> entirely</c>

00:00:18.150 --> 00:00:18.160 align:start position:0%
Entertainment System running entirely
 

00:00:18.160 --> 00:00:20.950 align:start position:0%
Entertainment System running entirely
within<00:00:18.560><c> Portal</c><00:00:19.119><c> 2.</c><00:00:19.840><c> Now,</c><00:00:20.240><c> I'll</c><00:00:20.480><c> state</c><00:00:20.720><c> the</c>

00:00:20.950 --> 00:00:20.960 align:start position:0%
within Portal 2. Now, I'll state the
 

00:00:20.960 --> 00:00:22.950 align:start position:0%
within Portal 2. Now, I'll state the
obvious.<00:00:21.520><c> It's</c><00:00:21.760><c> barely</c><00:00:22.080><c> managing</c><00:00:22.480><c> two</c><00:00:22.720><c> frames</c>

00:00:22.950 --> 00:00:22.960 align:start position:0%
obvious. It's barely managing two frames
 

00:00:22.960 --> 00:00:24.710 align:start position:0%
obvious. It's barely managing two frames
per<00:00:23.199><c> second,</c><00:00:23.600><c> and</c><00:00:23.840><c> at</c><00:00:24.000><c> this</c><00:00:24.240><c> quality</c><00:00:24.560><c> and</c>

00:00:24.710 --> 00:00:24.720 align:start position:0%
per second, and at this quality and
 

00:00:24.720 --> 00:00:26.630 align:start position:0%
per second, and at this quality and
performance,<00:00:25.279><c> most</c><00:00:25.600><c> sensible</c><00:00:26.080><c> people</c><00:00:26.400><c> would</c>

00:00:26.630 --> 00:00:26.640 align:start position:0%
performance, most sensible people would
 

00:00:26.640 --> 00:00:29.349 align:start position:0%
performance, most sensible people would
consider<00:00:27.039><c> this</c><00:00:27.560><c> unplayable.</c><00:00:28.640><c> Nonetheless,</c>

00:00:29.349 --> 00:00:29.359 align:start position:0%
consider this unplayable. Nonetheless,
 

00:00:29.359 --> 00:00:31.910 align:start position:0%
consider this unplayable. Nonetheless,
what's<00:00:29.760><c> important</c><00:00:30.160><c> is</c><00:00:30.480><c> that</c><00:00:30.720><c> it</c><00:00:30.960><c> is</c><00:00:31.439><c> running</c>

00:00:31.910 --> 00:00:31.920 align:start position:0%
what's important is that it is running
 

00:00:31.920 --> 00:00:33.990 align:start position:0%
what's important is that it is running
and<00:00:32.160><c> it's</c><00:00:32.480><c> programmed</c><00:00:33.040><c> entirely</c><00:00:33.600><c> with</c><00:00:33.840><c> the</c>

00:00:33.990 --> 00:00:34.000 align:start position:0%
and it's programmed entirely with the
 

00:00:34.000 --> 00:00:36.389 align:start position:0%
and it's programmed entirely with the
scripting<00:00:34.399><c> language</c><00:00:34.719><c> of</c><00:00:34.960><c> Portal</c><00:00:35.440><c> 2.</c><00:00:36.160><c> But</c>

00:00:36.389 --> 00:00:36.399 align:start position:0%
scripting language of Portal 2. But
 

00:00:36.399 --> 00:00:38.389 align:start position:0%
scripting language of Portal 2. But
before<00:00:36.719><c> we</c><00:00:36.880><c> talk</c><00:00:37.120><c> about</c><00:00:37.360><c> what</c><00:00:37.600><c> this</c><00:00:37.840><c> is</c><00:00:38.079><c> and</c>

00:00:38.389 --> 00:00:38.399 align:start position:0%
before we talk about what this is and
 

00:00:38.399 --> 00:00:40.790 align:start position:0%
before we talk about what this is and
how<00:00:38.559><c> it</c><00:00:38.800><c> came</c><00:00:38.960><c> to</c><00:00:39.200><c> be,</c><00:00:39.680><c> let's</c><00:00:40.000><c> quickly</c><00:00:40.399><c> cover</c>

00:00:40.790 --> 00:00:40.800 align:start position:0%
how it came to be, let's quickly cover
 

00:00:40.800 --> 00:00:42.190 align:start position:0%
how it came to be, let's quickly cover
what<00:00:41.120><c> this</c>

00:00:42.190 --> 00:00:42.200 align:start position:0%
what this
 

00:00:42.200 --> 00:00:44.709 align:start position:0%
what this
isn't.<00:00:43.200><c> If</c><00:00:43.440><c> you</c><00:00:43.600><c> frequent</c><00:00:43.920><c> the</c><00:00:44.079><c> Portal</c><00:00:44.480><c> 2</c>

00:00:44.709 --> 00:00:44.719 align:start position:0%
isn't. If you frequent the Portal 2
 

00:00:44.719 --> 00:00:46.310 align:start position:0%
isn't. If you frequent the Portal 2
workshop,<00:00:45.280><c> you</c><00:00:45.440><c> may</c><00:00:45.600><c> have</c><00:00:45.760><c> come</c><00:00:45.920><c> across</c>

00:00:46.310 --> 00:00:46.320 align:start position:0%
workshop, you may have come across
 

00:00:46.320 --> 00:00:48.069 align:start position:0%
workshop, you may have come across
Chambers<00:00:46.800><c> where</c><00:00:47.039><c> people</c><00:00:47.280><c> attempt</c><00:00:47.680><c> to</c><00:00:47.840><c> create</c>

00:00:48.069 --> 00:00:48.079 align:start position:0%
Chambers where people attempt to create
 

00:00:48.079 --> 00:00:50.470 align:start position:0%
Chambers where people attempt to create
a<00:00:48.320><c> simple</c><00:00:48.719><c> computer</c><00:00:49.280><c> using</c><00:00:49.680><c> logic</c><00:00:50.160><c> gates</c>

00:00:50.470 --> 00:00:50.480 align:start position:0%
a simple computer using logic gates
 

00:00:50.480 --> 00:00:53.029 align:start position:0%
a simple computer using logic gates
built<00:00:50.719><c> out</c><00:00:50.879><c> of</c><00:00:51.039><c> lasers.</c><00:00:51.920><c> Indeed,</c><00:00:52.399><c> Portal</c><00:00:52.800><c> 2's</c>

00:00:53.029 --> 00:00:53.039 align:start position:0%
built out of lasers. Indeed, Portal 2's
 

00:00:53.039 --> 00:00:55.189 align:start position:0%
built out of lasers. Indeed, Portal 2's
testing<00:00:53.360><c> elements</c><00:00:53.840><c> are</c><00:00:54.079><c> touring</c><00:00:54.640><c> complete,</c>

00:00:55.189 --> 00:00:55.199 align:start position:0%
testing elements are touring complete,
 

00:00:55.199 --> 00:00:57.750 align:start position:0%
testing elements are touring complete,
which<00:00:55.440><c> means</c><00:00:55.680><c> that</c><00:00:56.160><c> in</c><00:00:56.559><c> theory,</c><00:00:57.199><c> they</c><00:00:57.440><c> can</c><00:00:57.600><c> be</c>

00:00:57.750 --> 00:00:57.760 align:start position:0%
which means that in theory, they can be
 

00:00:57.760 --> 00:01:00.709 align:start position:0%
which means that in theory, they can be
used<00:00:58.000><c> to</c><00:00:58.239><c> compute</c><00:00:58.920><c> anything.</c><00:00:59.920><c> But</c><00:01:00.239><c> just</c><00:01:00.480><c> like</c>

00:01:00.709 --> 00:01:00.719 align:start position:0%
used to compute anything. But just like
 

00:01:00.719 --> 00:01:02.470 align:start position:0%
used to compute anything. But just like
real<00:01:01.039><c> computers</c><00:01:01.440><c> are</c><00:01:01.680><c> limited</c><00:01:02.000><c> by</c><00:01:02.239><c> their</c>

00:01:02.470 --> 00:01:02.480 align:start position:0%
real computers are limited by their
 

00:01:02.480 --> 00:01:05.109 align:start position:0%
real computers are limited by their
physical<00:01:02.879><c> hardware,</c><00:01:03.600><c> in</c><00:01:03.840><c> reality,</c><00:01:04.479><c> you</c><00:01:04.799><c> can't</c>

00:01:05.109 --> 00:01:05.119 align:start position:0%
physical hardware, in reality, you can't
 

00:01:05.119 --> 00:01:07.990 align:start position:0%
physical hardware, in reality, you can't
construct<00:01:05.519><c> an</c><00:01:05.680><c> NES</c><00:01:06.320><c> with</c><00:01:06.640><c> this</c><00:01:06.960><c> alone.</c><00:01:07.760><c> Put</c>

00:01:07.990 --> 00:01:08.000 align:start position:0%
construct an NES with this alone. Put
 

00:01:08.000 --> 00:01:09.990 align:start position:0%
construct an NES with this alone. Put
simply,<00:01:08.479><c> the</c><00:01:08.640><c> Source</c><00:01:08.960><c> engine</c><00:01:09.280><c> has</c><00:01:09.520><c> a</c><00:01:09.680><c> certain</c>

00:01:09.990 --> 00:01:10.000 align:start position:0%
simply, the Source engine has a certain
 

00:01:10.000 --> 00:01:12.550 align:start position:0%
simply, the Source engine has a certain
budget<00:01:10.400><c> for</c><00:01:10.560><c> the</c><00:01:10.799><c> maximum</c><00:01:11.200><c> entity</c><00:01:11.600><c> count.</c><00:01:12.240><c> No,</c>

00:01:12.550 --> 00:01:12.560 align:start position:0%
budget for the maximum entity count. No,
 

00:01:12.560 --> 00:01:15.109 align:start position:0%
budget for the maximum entity count. No,
not<00:01:12.720><c> a</c><00:01:12.960><c> monetary</c><00:01:13.439><c> budget,</c><00:01:14.080><c> though.</c><00:01:14.640><c> Hold</c><00:01:14.880><c> on.</c>

00:01:15.109 --> 00:01:15.119 align:start position:0%
not a monetary budget, though. Hold on.
 

00:01:15.119 --> 00:01:16.950 align:start position:0%
not a monetary budget, though. Hold on.
Money<00:01:15.439><c> might</c><00:01:15.680><c> actually</c><00:01:15.920><c> be</c><00:01:16.080><c> a</c><00:01:16.240><c> decent</c><00:01:16.560><c> analogy</c>

00:01:16.950 --> 00:01:16.960 align:start position:0%
Money might actually be a decent analogy
 

00:01:16.960 --> 00:01:19.230 align:start position:0%
Money might actually be a decent analogy
for<00:01:17.119><c> this.</c><00:01:17.520><c> Say</c><00:01:17.759><c> we</c><00:01:18.000><c> start</c><00:01:18.240><c> with</c>

00:01:19.230 --> 00:01:19.240 align:start position:0%
for this. Say we start with
 

00:01:19.240 --> 00:01:21.910 align:start position:0%
for this. Say we start with
$2,48.<00:01:20.400><c> This</c><00:01:20.640><c> isn't</c><00:01:20.880><c> an</c><00:01:21.040><c> arbitrary</c><00:01:21.600><c> number,</c>

00:01:21.910 --> 00:01:21.920 align:start position:0%
$2,48. This isn't an arbitrary number,
 

00:01:21.920 --> 00:01:23.990 align:start position:0%
$2,48. This isn't an arbitrary number,
by<00:01:22.080><c> the</c><00:01:22.159><c> way.</c><00:01:22.400><c> It's</c><00:01:22.640><c> the</c><00:01:23.040><c> worked</c><00:01:23.360><c> entity</c><00:01:23.680><c> limit</c>

00:01:23.990 --> 00:01:24.000 align:start position:0%
by the way. It's the worked entity limit
 

00:01:24.000 --> 00:01:26.070 align:start position:0%
by the way. It's the worked entity limit
in<00:01:24.240><c> most</c><00:01:24.479><c> Source</c><00:01:24.799><c> games.</c><00:01:25.360><c> Exceeding</c><00:01:25.840><c> this</c>

00:01:26.070 --> 00:01:26.080 align:start position:0%
in most Source games. Exceeding this
 

00:01:26.080 --> 00:01:27.990 align:start position:0%
in most Source games. Exceeding this
number<00:01:26.400><c> instantly</c><00:01:26.880><c> crashes</c><00:01:27.280><c> the</c><00:01:27.520><c> game.</c><00:01:27.840><c> So,</c>

00:01:27.990 --> 00:01:28.000 align:start position:0%
number instantly crashes the game. So,
 

00:01:28.000 --> 00:01:29.830 align:start position:0%
number instantly crashes the game. So,
you<00:01:28.159><c> can</c><00:01:28.320><c> think</c><00:01:28.400><c> of</c><00:01:28.479><c> this</c><00:01:28.640><c> as</c><00:01:28.880><c> a</c><00:01:29.040><c> finite</c><00:01:29.520><c> budget</c>

00:01:29.830 --> 00:01:29.840 align:start position:0%
you can think of this as a finite budget
 

00:01:29.840 --> 00:01:31.270 align:start position:0%
you can think of this as a finite budget
for<00:01:30.000><c> the</c><00:01:30.240><c> construction</c><00:01:30.560><c> of</c><00:01:30.799><c> each</c><00:01:30.960><c> test</c>

00:01:31.270 --> 00:01:31.280 align:start position:0%
for the construction of each test
 

00:01:31.280 --> 00:01:33.510 align:start position:0%
for the construction of each test
chamber.<00:01:31.920><c> Every</c><00:01:32.159><c> element</c><00:01:32.560><c> you</c><00:01:32.880><c> place</c><00:01:33.280><c> and</c>

00:01:33.510 --> 00:01:33.520 align:start position:0%
chamber. Every element you place and
 

00:01:33.520 --> 00:01:35.670 align:start position:0%
chamber. Every element you place and
every<00:01:33.840><c> connection</c><00:01:34.240><c> you</c><00:01:34.479><c> make</c><00:01:34.880><c> cost</c><00:01:35.200><c> you</c><00:01:35.439><c> some</c>

00:01:35.670 --> 00:01:35.680 align:start position:0%
every connection you make cost you some
 

00:01:35.680 --> 00:01:37.830 align:start position:0%
every connection you make cost you some
of<00:01:35.840><c> that</c><00:01:36.079><c> budget.</c><00:01:36.720><c> While</c><00:01:36.960><c> a</c><00:01:37.119><c> simple</c><00:01:37.439><c> logic</c>

00:01:37.830 --> 00:01:37.840 align:start position:0%
of that budget. While a simple logic
 

00:01:37.840 --> 00:01:40.069 align:start position:0%
of that budget. While a simple logic
gate<00:01:38.079><c> is</c><00:01:38.400><c> perfectly</c><00:01:38.880><c> reasonable,</c><00:01:39.600><c> a</c><00:01:39.840><c> system</c>

00:01:40.069 --> 00:01:40.079 align:start position:0%
gate is perfectly reasonable, a system
 

00:01:40.079 --> 00:01:42.870 align:start position:0%
gate is perfectly reasonable, a system
on<00:01:40.320><c> the</c><00:01:40.479><c> scale</c><00:01:40.640><c> of</c><00:01:40.799><c> the</c><00:01:40.960><c> NES</c><00:01:41.759><c> quickly</c><00:01:42.240><c> gets</c><00:01:42.640><c> way</c>

00:01:42.870 --> 00:01:42.880 align:start position:0%
on the scale of the NES quickly gets way
 

00:01:42.880 --> 00:01:45.510 align:start position:0%
on the scale of the NES quickly gets way
too<00:01:43.200><c> expensive.</c><00:01:44.079><c> Even</c><00:01:44.320><c> if</c><00:01:44.479><c> we</c><00:01:44.720><c> use</c><00:01:45.040><c> cheaper</c>

00:01:45.510 --> 00:01:45.520 align:start position:0%
too expensive. Even if we use cheaper
 

00:01:45.520 --> 00:01:47.670 align:start position:0%
too expensive. Even if we use cheaper
parts,<00:01:46.000><c> so</c><00:01:46.159><c> to</c><00:01:46.320><c> speak,</c><00:01:46.640><c> by</c><00:01:46.880><c> building</c><00:01:47.200><c> our</c><00:01:47.439><c> own</c>

00:01:47.670 --> 00:01:47.680 align:start position:0%
parts, so to speak, by building our own
 

00:01:47.680 --> 00:01:49.510 align:start position:0%
parts, so to speak, by building our own
testing<00:01:48.079><c> elements,</c><00:01:48.560><c> we're</c><00:01:48.880><c> still</c><00:01:49.040><c> not</c><00:01:49.280><c> even</c>

00:01:49.510 --> 00:01:49.520 align:start position:0%
testing elements, we're still not even
 

00:01:49.520 --> 00:01:51.830 align:start position:0%
testing elements, we're still not even
close<00:01:49.759><c> to</c><00:01:49.920><c> the</c><00:01:50.159><c> right</c><00:01:50.399><c> ballpark,</c><00:01:51.280><c> the</c><00:01:51.520><c> cost</c><00:01:51.680><c> of</c>

00:01:51.830 --> 00:01:51.840 align:start position:0%
close to the right ballpark, the cost of
 

00:01:51.840 --> 00:01:54.230 align:start position:0%
close to the right ballpark, the cost of
a<00:01:52.000><c> single</c><00:01:52.240><c> element</c><00:01:52.720><c> cannot</c><00:01:53.119><c> be</c><00:01:53.280><c> a</c><00:01:53.520><c> fraction.</c>

00:01:54.230 --> 00:01:54.240 align:start position:0%
a single element cannot be a fraction.
 

00:01:54.240 --> 00:01:56.230 align:start position:0%
a single element cannot be a fraction.
As<00:01:54.560><c> remember,</c><00:01:55.040><c> under</c><00:01:55.280><c> the</c><00:01:55.439><c> hood,</c><00:01:55.759><c> this</c><00:01:55.920><c> budget</c>

00:01:56.230 --> 00:01:56.240 align:start position:0%
As remember, under the hood, this budget
 

00:01:56.240 --> 00:01:58.870 align:start position:0%
As remember, under the hood, this budget
is<00:01:56.399><c> an</c><00:01:56.640><c> entity</c><00:01:57.200><c> count.</c><00:01:57.840><c> That's</c><00:01:58.079><c> a</c><00:01:58.320><c> discrete</c>

00:01:58.870 --> 00:01:58.880 align:start position:0%
is an entity count. That's a discrete
 

00:01:58.880 --> 00:02:01.270 align:start position:0%
is an entity count. That's a discrete
undivisible<00:01:59.680><c> natural</c><00:02:00.079><c> number.</c><00:02:00.640><c> So,</c><00:02:00.799><c> in</c><00:02:01.040><c> our</c>

00:02:01.270 --> 00:02:01.280 align:start position:0%
undivisible natural number. So, in our
 

00:02:01.280 --> 00:02:03.030 align:start position:0%
undivisible natural number. So, in our
analogy,<00:02:01.840><c> that</c><00:02:02.079><c> means</c><00:02:02.240><c> that</c><00:02:02.399><c> the</c><00:02:02.640><c> cheapest</c>

00:02:03.030 --> 00:02:03.040 align:start position:0%
analogy, that means that the cheapest
 

00:02:03.040 --> 00:02:06.069 align:start position:0%
analogy, that means that the cheapest
possible<00:02:03.439><c> element</c><00:02:04.000><c> costs</c><00:02:04.560><c> $1.</c><00:02:05.520><c> Anything</c><00:02:05.840><c> we</c>

00:02:06.069 --> 00:02:06.079 align:start position:0%
possible element costs $1. Anything we
 

00:02:06.079 --> 00:02:08.790 align:start position:0%
possible element costs $1. Anything we
build<00:02:06.399><c> has</c><00:02:06.640><c> to</c><00:02:06.880><c> consist</c><00:02:07.200><c> of</c><00:02:07.520><c> less</c><00:02:07.840><c> than</c><00:02:08.160><c> 2,000</c>

00:02:08.790 --> 00:02:08.800 align:start position:0%
build has to consist of less than 2,000
 

00:02:08.800 --> 00:02:12.150 align:start position:0%
build has to consist of less than 2,000
discrete<00:02:09.360><c> parts.</c><00:02:10.160><c> The</c><00:02:10.319><c> NES</c><00:02:10.959><c> has</c><00:02:11.200><c> 8</c><00:02:11.440><c> kilob</c><00:02:12.000><c> of</c>

00:02:12.150 --> 00:02:12.160 align:start position:0%
discrete parts. The NES has 8 kilob of
 

00:02:12.160 --> 00:02:14.309 align:start position:0%
discrete parts. The NES has 8 kilob of
program<00:02:12.560><c> memory.</c><00:02:13.120><c> That's</c><00:02:13.440><c> over</c><00:02:13.680><c> 8,000</c>

00:02:14.309 --> 00:02:14.319 align:start position:0%
program memory. That's over 8,000
 

00:02:14.319 --> 00:02:17.830 align:start position:0%
program memory. That's over 8,000
individual<00:02:14.879><c> bytes</c><00:02:15.280><c> or</c><00:02:15.520><c> about</c><00:02:16.040><c> 64,000</c><00:02:17.040><c> bits.</c>

00:02:17.830 --> 00:02:17.840 align:start position:0%
individual bytes or about 64,000 bits.
 

00:02:17.840 --> 00:02:20.790 align:start position:0%
individual bytes or about 64,000 bits.
So<00:02:18.160><c> even</c><00:02:18.480><c> just</c><00:02:18.720><c> the</c><00:02:18.959><c> memory</c><00:02:19.440><c> alone</c><00:02:20.080><c> takes</c><00:02:20.400><c> up</c>

00:02:20.790 --> 00:02:20.800 align:start position:0%
So even just the memory alone takes up
 

00:02:20.800 --> 00:02:23.510 align:start position:0%
So even just the memory alone takes up
32<00:02:21.440><c> times</c><00:02:21.920><c> our</c><00:02:22.239><c> budget.</c><00:02:22.879><c> And</c><00:02:23.040><c> that's</c><00:02:23.200><c> before</c>

00:02:23.510 --> 00:02:23.520 align:start position:0%
32 times our budget. And that's before
 

00:02:23.520 --> 00:02:26.470 align:start position:0%
32 times our budget. And that's before
we<00:02:23.680><c> even</c><00:02:23.920><c> get</c><00:02:24.080><c> to</c><00:02:24.239><c> the</c><00:02:24.480><c> processor.</c><00:02:25.280><c> The</c><00:02:25.520><c> 6502</c>

00:02:26.470 --> 00:02:26.480 align:start position:0%
we even get to the processor. The 6502
 

00:02:26.480 --> 00:02:28.309 align:start position:0%
we even get to the processor. The 6502
was<00:02:26.720><c> generally</c><00:02:27.200><c> considered</c><00:02:27.520><c> to</c><00:02:27.760><c> be</c><00:02:27.840><c> a</c><00:02:28.080><c> pretty</c>

00:02:28.309 --> 00:02:28.319 align:start position:0%
was generally considered to be a pretty
 

00:02:28.319 --> 00:02:30.550 align:start position:0%
was generally considered to be a pretty
well<00:02:28.560><c> optimized</c><00:02:29.120><c> CPU.</c><00:02:29.840><c> And</c><00:02:30.000><c> by</c><00:02:30.239><c> today's</c>

00:02:30.550 --> 00:02:30.560 align:start position:0%
well optimized CPU. And by today's
 

00:02:30.560 --> 00:02:32.630 align:start position:0%
well optimized CPU. And by today's
standards,<00:02:31.040><c> it's</c><00:02:31.280><c> considered</c><00:02:31.760><c> ancient.</c><00:02:32.400><c> But</c>

00:02:32.630 --> 00:02:32.640 align:start position:0%
standards, it's considered ancient. But
 

00:02:32.640 --> 00:02:35.790 align:start position:0%
standards, it's considered ancient. But
even<00:02:32.959><c> that</c><00:02:33.280><c> thing</c><00:02:33.599><c> has</c><00:02:33.920><c> about</c><00:02:34.760><c> 3.5,000</c>

00:02:35.790 --> 00:02:35.800 align:start position:0%
even that thing has about 3.5,000
 

00:02:35.800 --> 00:02:37.910 align:start position:0%
even that thing has about 3.5,000
transistors.<00:02:36.800><c> That's</c><00:02:37.120><c> already</c><00:02:37.519><c> almost</c>

00:02:37.910 --> 00:02:37.920 align:start position:0%
transistors. That's already almost
 

00:02:37.920 --> 00:02:40.229 align:start position:0%
transistors. That's already almost
double<00:02:38.239><c> our</c><00:02:38.560><c> budget.</c><00:02:39.200><c> But</c><00:02:39.440><c> it</c><00:02:39.680><c> gets</c><00:02:39.920><c> worse</c>

00:02:40.229 --> 00:02:40.239 align:start position:0%
double our budget. But it gets worse
 

00:02:40.239 --> 00:02:42.470 align:start position:0%
double our budget. But it gets worse
once<00:02:40.480><c> you</c><00:02:40.720><c> realize</c><00:02:41.040><c> that</c><00:02:41.360><c> one</c><00:02:41.680><c> transistor</c>

00:02:42.470 --> 00:02:42.480 align:start position:0%
once you realize that one transistor
 

00:02:42.480 --> 00:02:45.110 align:start position:0%
once you realize that one transistor
requires<00:02:43.120><c> several</c><00:02:43.599><c> puzzle</c><00:02:44.080><c> elements.</c><00:02:44.879><c> The</c>

00:02:45.110 --> 00:02:45.120 align:start position:0%
requires several puzzle elements. The
 

00:02:45.120 --> 00:02:47.110 align:start position:0%
requires several puzzle elements. The
actual<00:02:45.440><c> complexity</c><00:02:45.840><c> of</c><00:02:46.000><c> a</c><00:02:46.160><c> chip</c><00:02:46.480><c> isn't</c><00:02:46.800><c> this</c>

00:02:47.110 --> 00:02:47.120 align:start position:0%
actual complexity of a chip isn't this
 

00:02:47.120 --> 00:02:48.949 align:start position:0%
actual complexity of a chip isn't this
cut<00:02:47.360><c> and</c><00:02:47.599><c> dry.</c><00:02:48.160><c> You</c><00:02:48.400><c> might</c><00:02:48.560><c> be</c><00:02:48.720><c> able</c><00:02:48.879><c> to</c>

00:02:48.949 --> 00:02:48.959 align:start position:0%
cut and dry. You might be able to
 

00:02:48.959 --> 00:02:51.030 align:start position:0%
cut and dry. You might be able to
represent<00:02:49.440><c> whole</c><00:02:49.760><c> logic</c><00:02:50.160><c> gates</c><00:02:50.480><c> or</c><00:02:50.640><c> circuits</c>

00:02:51.030 --> 00:02:51.040 align:start position:0%
represent whole logic gates or circuits
 

00:02:51.040 --> 00:02:52.790 align:start position:0%
represent whole logic gates or circuits
with<00:02:51.280><c> less</c><00:02:51.599><c> portal</c><00:02:52.000><c> 2</c><00:02:52.160><c> elements</c><00:02:52.480><c> than</c>

00:02:52.790 --> 00:02:52.800 align:start position:0%
with less portal 2 elements than
 

00:02:52.800 --> 00:02:54.710 align:start position:0%
with less portal 2 elements than
transistors,<00:02:53.599><c> but</c><00:02:53.840><c> unless</c><00:02:54.160><c> you're</c><00:02:54.400><c> up</c><00:02:54.560><c> for</c>

00:02:54.710 --> 00:02:54.720 align:start position:0%
transistors, but unless you're up for
 

00:02:54.720 --> 00:02:57.670 align:start position:0%
transistors, but unless you're up for
the<00:02:54.879><c> task</c><00:02:55.120><c> of</c><00:02:55.440><c> re-engineering</c><00:02:56.239><c> the</c><00:02:56.480><c> 6502</c><00:02:57.440><c> with</c>

00:02:57.670 --> 00:02:57.680 align:start position:0%
the task of re-engineering the 6502 with
 

00:02:57.680 --> 00:02:59.910 align:start position:0%
the task of re-engineering the 6502 with
no<00:02:58.000><c> breathing</c><00:02:58.400><c> room,</c><00:02:59.120><c> that's</c><00:02:59.440><c> not</c><00:02:59.599><c> happening</c>

00:02:59.910 --> 00:02:59.920 align:start position:0%
no breathing room, that's not happening
 

00:02:59.920 --> 00:03:02.949 align:start position:0%
no breathing room, that's not happening
anytime<00:03:00.400><c> soon.</c><00:03:01.120><c> Even</c><00:03:01.360><c> if</c><00:03:01.680><c> you</c><00:03:01.920><c> somehow</c><00:03:02.319><c> got</c><00:03:02.560><c> a</c>

00:03:02.949 --> 00:03:02.959 align:start position:0%
anytime soon. Even if you somehow got a
 

00:03:02.959 --> 00:03:05.750 align:start position:0%
anytime soon. Even if you somehow got a
onetoone<00:03:03.599><c> copy</c><00:03:04.000><c> of</c><00:03:04.159><c> the</c><00:03:04.400><c> physical</c><00:03:04.879><c> CPU</c>

00:03:05.750 --> 00:03:05.760 align:start position:0%
onetoone copy of the physical CPU
 

00:03:05.760 --> 00:03:08.229 align:start position:0%
onetoone copy of the physical CPU
running<00:03:06.000><c> in</c><00:03:06.319><c> Portal</c><00:03:06.800><c> 2,</c><00:03:07.280><c> your</c><00:03:07.519><c> next</c><00:03:07.760><c> immediate</c>

00:03:08.229 --> 00:03:08.239 align:start position:0%
running in Portal 2, your next immediate
 

00:03:08.239 --> 00:03:11.110 align:start position:0%
running in Portal 2, your next immediate
issue<00:03:08.720><c> would</c><00:03:08.959><c> be</c><00:03:09.400><c> performance.</c><00:03:10.400><c> Portal</c><00:03:10.879><c> 2</c>

00:03:11.110 --> 00:03:11.120 align:start position:0%
issue would be performance. Portal 2
 

00:03:11.120 --> 00:03:13.430 align:start position:0%
issue would be performance. Portal 2
runs<00:03:11.360><c> at</c><00:03:11.680><c> 60</c><00:03:12.000><c> ticks</c><00:03:12.400><c> per</c><00:03:12.640><c> second,</c><00:03:13.120><c> which</c><00:03:13.280><c> means</c>

00:03:13.430 --> 00:03:13.440 align:start position:0%
runs at 60 ticks per second, which means
 

00:03:13.440 --> 00:03:15.670 align:start position:0%
runs at 60 ticks per second, which means
that<00:03:13.680><c> you</c><00:03:13.840><c> can</c><00:03:14.000><c> only</c><00:03:14.400><c> simulate</c><00:03:15.200><c> 60</c>

00:03:15.670 --> 00:03:15.680 align:start position:0%
that you can only simulate 60
 

00:03:15.680 --> 00:03:18.070 align:start position:0%
that you can only simulate 60
connections<00:03:16.239><c> per</c><00:03:16.560><c> second.</c><00:03:17.280><c> That's</c><00:03:17.519><c> like</c><00:03:17.760><c> if</c>

00:03:18.070 --> 00:03:18.080 align:start position:0%
connections per second. That's like if
 

00:03:18.080 --> 00:03:20.710 align:start position:0%
connections per second. That's like if
electricity<00:03:18.879><c> moved</c><00:03:19.280><c> in</c><00:03:19.519><c> slow</c><00:03:19.840><c> motion.</c><00:03:20.480><c> We're</c>

00:03:20.710 --> 00:03:20.720 align:start position:0%
electricity moved in slow motion. We're
 

00:03:20.720 --> 00:03:22.710 align:start position:0%
electricity moved in slow motion. We're
no<00:03:20.879><c> longer</c><00:03:21.200><c> talking</c><00:03:21.440><c> in</c><00:03:21.680><c> frames</c><00:03:21.920><c> per</c><00:03:22.159><c> second.</c>

00:03:22.710 --> 00:03:22.720 align:start position:0%
no longer talking in frames per second.
 

00:03:22.720 --> 00:03:26.390 align:start position:0%
no longer talking in frames per second.
We're<00:03:23.040><c> talking</c><00:03:23.440><c> CPU</c><00:03:24.000><c> cycles</c><00:03:24.560><c> per</c><00:03:25.000><c> minute.</c><00:03:26.000><c> So,</c>

00:03:26.390 --> 00:03:26.400 align:start position:0%
We're talking CPU cycles per minute. So,
 

00:03:26.400 --> 00:03:28.309 align:start position:0%
We're talking CPU cycles per minute. So,
okay,<00:03:26.959><c> now</c><00:03:27.120><c> that</c><00:03:27.360><c> that's</c><00:03:27.599><c> out</c><00:03:27.760><c> of</c><00:03:27.840><c> the</c><00:03:28.000><c> way,</c>

00:03:28.309 --> 00:03:28.319 align:start position:0%
okay, now that that's out of the way,
 

00:03:28.319 --> 00:03:30.869 align:start position:0%
okay, now that that's out of the way,
how<00:03:28.720><c> does</c><00:03:29.040><c> this</c><00:03:29.360><c> work?</c><00:03:30.000><c> Well,</c><00:03:30.319><c> luckily,</c>

00:03:30.869 --> 00:03:30.879 align:start position:0%
how does this work? Well, luckily,
 

00:03:30.879 --> 00:03:33.270 align:start position:0%
how does this work? Well, luckily,
Portal<00:03:31.360><c> 2</c><00:03:31.519><c> has</c><00:03:31.760><c> a</c><00:03:31.920><c> very</c><00:03:32.239><c> powerful</c><00:03:32.720><c> built-in</c>

00:03:33.270 --> 00:03:33.280 align:start position:0%
Portal 2 has a very powerful built-in
 

00:03:33.280 --> 00:03:34.789 align:start position:0%
Portal 2 has a very powerful built-in
scripting<00:03:33.680><c> engine</c><00:03:34.000><c> that</c><00:03:34.239><c> lets</c><00:03:34.400><c> you</c><00:03:34.560><c> write</c>

00:03:34.789 --> 00:03:34.799 align:start position:0%
scripting engine that lets you write
 

00:03:34.799 --> 00:03:37.110 align:start position:0%
scripting engine that lets you write
code<00:03:35.040><c> to</c><00:03:35.280><c> automate</c><00:03:35.760><c> many</c><00:03:36.080><c> scripted</c><00:03:36.480><c> events.</c>

00:03:37.110 --> 00:03:37.120 align:start position:0%
code to automate many scripted events.
 

00:03:37.120 --> 00:03:38.869 align:start position:0%
code to automate many scripted events.
In<00:03:37.280><c> the</c><00:03:37.440><c> past,</c><00:03:37.680><c> I've</c><00:03:37.840><c> used</c><00:03:38.080><c> VScript</c><00:03:38.560><c> to</c><00:03:38.720><c> make</c>

00:03:38.869 --> 00:03:38.879 align:start position:0%
In the past, I've used VScript to make
 

00:03:38.879 --> 00:03:40.710 align:start position:0%
In the past, I've used VScript to make
whole<00:03:39.120><c> entire</c><00:03:39.519><c> gameplay</c><00:03:39.920><c> mods,</c><00:03:40.400><c> but</c><00:03:40.560><c> this</c>

00:03:40.710 --> 00:03:40.720 align:start position:0%
whole entire gameplay mods, but this
 

00:03:40.720 --> 00:03:42.550 align:start position:0%
whole entire gameplay mods, but this
time,<00:03:40.959><c> we're</c><00:03:41.200><c> looking</c><00:03:41.360><c> to</c><00:03:41.519><c> port</c><00:03:41.840><c> an</c><00:03:42.080><c> emulator</c>

00:03:42.550 --> 00:03:42.560 align:start position:0%
time, we're looking to port an emulator
 

00:03:42.560 --> 00:03:44.869 align:start position:0%
time, we're looking to port an emulator
to<00:03:42.799><c> it.</c><00:03:43.280><c> There</c><00:03:43.519><c> are</c><00:03:43.680><c> tons</c><00:03:43.920><c> of</c><00:03:44.080><c> great</c><00:03:44.319><c> emulators</c>

00:03:44.869 --> 00:03:44.879 align:start position:0%
to it. There are tons of great emulators
 

00:03:44.879 --> 00:03:46.710 align:start position:0%
to it. There are tons of great emulators
out<00:03:45.040><c> there,</c><00:03:45.360><c> but</c><00:03:45.599><c> we</c><00:03:45.760><c> just</c><00:03:45.920><c> need</c><00:03:46.159><c> one</c><00:03:46.400><c> that's</c>

00:03:46.710 --> 00:03:46.720 align:start position:0%
out there, but we just need one that's
 

00:03:46.720 --> 00:03:51.630 align:start position:0%
out there, but we just need one that's
really<00:03:47.040><c> easy</c><00:03:47.360><c> to</c><00:03:47.519><c> port.</c><00:03:48.480><c> So,</c><00:03:49.280><c> I</c><00:03:49.959><c> chose</c><00:03:50.959><c> Small</c>

00:03:51.630 --> 00:03:51.640 align:start position:0%
really easy to port. So, I chose Small
 

00:03:51.640 --> 00:03:54.789 align:start position:0%
really easy to port. So, I chose Small
Ness.<00:03:52.640><c> Now,</c><00:03:53.040><c> okay.</c><00:03:53.440><c> Okay,</c><00:03:53.760><c> hear</c><00:03:54.000><c> me</c><00:03:54.159><c> out.</c><00:03:54.640><c> Some</c>

00:03:54.789 --> 00:03:54.799 align:start position:0%
Ness. Now, okay. Okay, hear me out. Some
 

00:03:54.799 --> 00:03:56.869 align:start position:0%
Ness. Now, okay. Okay, hear me out. Some
of<00:03:54.959><c> you</c><00:03:55.360><c> might</c><00:03:55.680><c> call</c><00:03:55.840><c> me</c><00:03:56.000><c> an</c><00:03:56.239><c> idiot</c><00:03:56.400><c> for</c><00:03:56.640><c> this,</c>

00:03:56.869 --> 00:03:56.879 align:start position:0%
of you might call me an idiot for this,
 

00:03:56.879 --> 00:03:58.789 align:start position:0%
of you might call me an idiot for this,
and<00:03:57.120><c> others</c><00:03:57.519><c> might</c><00:03:57.680><c> see</c><00:03:57.840><c> this</c><00:03:58.080><c> as</c><00:03:58.319><c> even</c><00:03:58.560><c> more</c>

00:03:58.789 --> 00:03:58.799 align:start position:0%
and others might see this as even more
 

00:03:58.799 --> 00:04:01.110 align:start position:0%
and others might see this as even more
impressive.<00:03:59.680><c> Personally,</c><00:04:00.400><c> I</c><00:04:00.640><c> just</c><00:04:00.799><c> think</c><00:04:00.959><c> I</c>

00:04:01.110 --> 00:04:01.120 align:start position:0%
impressive. Personally, I just think I
 

00:04:01.120 --> 00:04:02.869 align:start position:0%
impressive. Personally, I just think I
shot<00:04:01.360><c> myself</c><00:04:01.599><c> in</c><00:04:01.840><c> the</c><00:04:01.920><c> foot,</c><00:04:02.159><c> but</c><00:04:02.480><c> managed</c><00:04:02.799><c> to</c>

00:04:02.869 --> 00:04:02.879 align:start position:0%
shot myself in the foot, but managed to
 

00:04:02.879 --> 00:04:05.589 align:start position:0%
shot myself in the foot, but managed to
hit<00:04:03.040><c> a</c><00:04:03.200><c> backflip</c><00:04:03.680><c> while</c><00:04:03.920><c> doing</c><00:04:04.120><c> so.</c><00:04:05.120><c> See,</c>

00:04:05.589 --> 00:04:05.599 align:start position:0%
hit a backflip while doing so. See,
 

00:04:05.599 --> 00:04:08.070 align:start position:0%
hit a backflip while doing so. See,
smallness<00:04:06.159><c> is</c><00:04:06.319><c> an</c><00:04:06.480><c> example</c><00:04:06.799><c> of</c><00:04:07.120><c> code</c><00:04:07.519><c> golfing.</c>

00:04:08.070 --> 00:04:08.080 align:start position:0%
smallness is an example of code golfing.
 

00:04:08.080 --> 00:04:09.750 align:start position:0%
smallness is an example of code golfing.
It's<00:04:08.319><c> an</c><00:04:08.480><c> attempt</c><00:04:08.720><c> to</c><00:04:08.879><c> achieve</c><00:04:09.200><c> the</c><00:04:09.360><c> shortest</c>

00:04:09.750 --> 00:04:09.760 align:start position:0%
It's an attempt to achieve the shortest
 

00:04:09.760 --> 00:04:11.670 align:start position:0%
It's an attempt to achieve the shortest
possible<00:04:10.239><c> source</c><00:04:10.560><c> code</c><00:04:10.879><c> while</c><00:04:11.200><c> still</c><00:04:11.439><c> having</c>

00:04:11.670 --> 00:04:11.680 align:start position:0%
possible source code while still having
 

00:04:11.680 --> 00:04:13.429 align:start position:0%
possible source code while still having
a<00:04:11.840><c> functioning</c><00:04:12.400><c> program.</c><00:04:12.959><c> The</c><00:04:13.200><c> final</c>

00:04:13.429 --> 00:04:13.439 align:start position:0%
a functioning program. The final
 

00:04:13.439 --> 00:04:15.509 align:start position:0%
a functioning program. The final
minified<00:04:13.920><c> version</c><00:04:14.159><c> of</c><00:04:14.319><c> Small</c><00:04:14.640><c> Ness</c><00:04:14.879><c> is</c><00:04:15.040><c> under</c>

00:04:15.509 --> 00:04:15.519 align:start position:0%
minified version of Small Ness is under
 

00:04:15.519 --> 00:04:18.710 align:start position:0%
minified version of Small Ness is under
5,000<00:04:16.320><c> bytes</c><00:04:16.880><c> of</c><00:04:17.199><c> C</c><00:04:17.440><c> code.</c><00:04:18.079><c> Of</c><00:04:18.239><c> course,</c><00:04:18.479><c> I</c>

00:04:18.710 --> 00:04:18.720 align:start position:0%
5,000 bytes of C code. Of course, I
 

00:04:18.720 --> 00:04:20.789 align:start position:0%
5,000 bytes of C code. Of course, I
won't<00:04:18.959><c> be</c><00:04:19.120><c> working</c><00:04:19.359><c> with</c><00:04:19.600><c> this</c><00:04:19.919><c> version.</c><00:04:20.479><c> It's</c>

00:04:20.789 --> 00:04:20.799 align:start position:0%
won't be working with this version. It's
 

00:04:20.799 --> 00:04:22.629 align:start position:0%
won't be working with this version. It's
completely<00:04:21.199><c> unreadable.</c><00:04:22.079><c> I'll</c><00:04:22.320><c> be</c><00:04:22.479><c> working</c>

00:04:22.629 --> 00:04:22.639 align:start position:0%
completely unreadable. I'll be working
 

00:04:22.639 --> 00:04:25.350 align:start position:0%
completely unreadable. I'll be working
with<00:04:22.880><c> deopfiscated</c><00:04:23.840><c> code</c><00:04:24.160><c> which</c><00:04:24.400><c> is</c><00:04:24.880><c> slightly</c>

00:04:25.350 --> 00:04:25.360 align:start position:0%
with deopfiscated code which is slightly
 

00:04:25.360 --> 00:04:28.550 align:start position:0%
with deopfiscated code which is slightly
better.<00:04:26.080><c> Even</c><00:04:26.400><c> so,</c><00:04:27.040><c> various</c><00:04:27.520><c> nasty</c><00:04:28.000><c> hacks</c><00:04:28.320><c> are</c>

00:04:28.550 --> 00:04:28.560 align:start position:0%
better. Even so, various nasty hacks are
 

00:04:28.560 --> 00:04:30.550 align:start position:0%
better. Even so, various nasty hacks are
employed<00:04:28.960><c> to</c><00:04:29.120><c> make</c><00:04:29.280><c> the</c><00:04:29.520><c> code</c><00:04:29.759><c> as</c><00:04:30.000><c> small</c><00:04:30.240><c> as</c>

00:04:30.550 --> 00:04:30.560 align:start position:0%
employed to make the code as small as
 

00:04:30.560 --> 00:04:32.550 align:start position:0%
employed to make the code as small as
physically<00:04:31.120><c> possible.</c><00:04:31.919><c> If</c><00:04:32.160><c> you're</c><00:04:32.240><c> not</c><00:04:32.400><c> a</c>

00:04:32.550 --> 00:04:32.560 align:start position:0%
physically possible. If you're not a
 

00:04:32.560 --> 00:04:34.550 align:start position:0%
physically possible. If you're not a
programmer,<00:04:33.199><c> this</c><00:04:33.440><c> is</c><00:04:33.680><c> kind</c><00:04:33.919><c> of</c><00:04:34.000><c> like</c><00:04:34.320><c> reading</c>

00:04:34.550 --> 00:04:34.560 align:start position:0%
programmer, this is kind of like reading
 

00:04:34.560 --> 00:04:36.950 align:start position:0%
programmer, this is kind of like reading
a<00:04:34.800><c> poem</c><00:04:35.199><c> written</c><00:04:35.440><c> in</c><00:04:35.680><c> emoji.</c><00:04:36.400><c> You</c><00:04:36.639><c> have</c><00:04:36.800><c> to</c>

00:04:36.950 --> 00:04:36.960 align:start position:0%
a poem written in emoji. You have to
 

00:04:36.960 --> 00:04:39.510 align:start position:0%
a poem written in emoji. You have to
really<00:04:37.360><c> sit</c><00:04:37.680><c> down</c><00:04:37.840><c> and</c><00:04:38.160><c> process</c><00:04:38.720><c> every</c><00:04:39.120><c> line</c>

00:04:39.510 --> 00:04:39.520 align:start position:0%
really sit down and process every line
 

00:04:39.520 --> 00:04:42.469 align:start position:0%
really sit down and process every line
to<00:04:39.840><c> understand</c><00:04:40.479><c> what</c><00:04:40.720><c> it</c><00:04:40.960><c> even</c><00:04:41.280><c> means.</c><00:04:42.240><c> This</c>

00:04:42.469 --> 00:04:42.479 align:start position:0%
to understand what it even means. This
 

00:04:42.479 --> 00:04:44.710 align:start position:0%
to understand what it even means. This
is<00:04:42.639><c> why</c><00:04:42.960><c> it</c><00:04:43.199><c> might</c><00:04:43.440><c> seem</c><00:04:43.759><c> like</c><00:04:43.919><c> a</c><00:04:44.160><c> bad</c><00:04:44.400><c> choice</c>

00:04:44.710 --> 00:04:44.720 align:start position:0%
is why it might seem like a bad choice
 

00:04:44.720 --> 00:04:47.350 align:start position:0%
is why it might seem like a bad choice
for<00:04:44.880><c> a</c><00:04:45.120><c> port.</c><00:04:45.759><c> The</c><00:04:46.000><c> code</c><00:04:46.240><c> isn't</c><00:04:46.560><c> easy</c><00:04:46.720><c> to</c><00:04:46.960><c> read.</c>

00:04:47.350 --> 00:04:47.360 align:start position:0%
for a port. The code isn't easy to read.
 

00:04:47.360 --> 00:04:49.590 align:start position:0%
for a port. The code isn't easy to read.
It<00:04:47.680><c> compromises</c><00:04:48.240><c> efficiency</c><00:04:48.800><c> for</c><00:04:49.040><c> a</c><00:04:49.199><c> shorter</c>

00:04:49.590 --> 00:04:49.600 align:start position:0%
It compromises efficiency for a shorter
 

00:04:49.600 --> 00:04:51.870 align:start position:0%
It compromises efficiency for a shorter
program<00:04:50.240><c> and</c><00:04:50.479><c> I</c><00:04:50.720><c> can</c><00:04:50.800><c> see</c><00:04:50.960><c> it</c><00:04:51.120><c> being</c><00:04:51.280><c> a</c><00:04:51.440><c> pain</c><00:04:51.680><c> to</c>

00:04:51.870 --> 00:04:51.880 align:start position:0%
program and I can see it being a pain to
 

00:04:51.880 --> 00:04:55.350 align:start position:0%
program and I can see it being a pain to
debug.<00:04:52.880><c> That</c><00:04:53.199><c> said,</c><00:04:53.840><c> it</c><00:04:54.160><c> being</c><00:04:54.479><c> tiny</c><00:04:55.040><c> does</c>

00:04:55.350 --> 00:04:55.360 align:start position:0%
debug. That said, it being tiny does
 

00:04:55.360 --> 00:04:57.749 align:start position:0%
debug. That said, it being tiny does
mean<00:04:55.680><c> that</c><00:04:55.919><c> there's</c><00:04:56.320><c> just</c><00:04:56.560><c> less</c><00:04:56.960><c> code</c><00:04:57.280><c> overall</c>

00:04:57.749 --> 00:04:57.759 align:start position:0%
mean that there's just less code overall
 

00:04:57.759 --> 00:05:00.310 align:start position:0%
mean that there's just less code overall
to<00:04:58.080><c> port.</c><00:04:58.639><c> And</c><00:04:58.800><c> since</c><00:04:59.040><c> I</c><00:04:59.280><c> understand</c><00:04:59.759><c> C</c><00:05:00.080><c> better</c>

00:05:00.310 --> 00:05:00.320 align:start position:0%
to port. And since I understand C better
 

00:05:00.320 --> 00:05:02.390 align:start position:0%
to port. And since I understand C better
than<00:05:00.479><c> the</c><00:05:00.639><c> NES,</c><00:05:01.360><c> I'll</c><00:05:01.680><c> probably</c><00:05:02.000><c> have</c><00:05:02.160><c> an</c>

00:05:02.390 --> 00:05:02.400 align:start position:0%
than the NES, I'll probably have an
 

00:05:02.400 --> 00:05:04.469 align:start position:0%
than the NES, I'll probably have an
easier<00:05:02.800><c> time</c><00:05:03.040><c> porting</c><00:05:03.440><c> a</c><00:05:03.680><c> bit</c><00:05:03.759><c> of</c><00:05:03.919><c> gibberish</c>

00:05:04.469 --> 00:05:04.479 align:start position:0%
easier time porting a bit of gibberish
 

00:05:04.479 --> 00:05:06.070 align:start position:0%
easier time porting a bit of gibberish
than<00:05:04.720><c> trying</c><00:05:04.960><c> to</c><00:05:05.120><c> understand</c><00:05:05.440><c> the</c><00:05:05.680><c> codebase</c>

00:05:06.070 --> 00:05:06.080 align:start position:0%
than trying to understand the codebase
 

00:05:06.080 --> 00:05:08.710 align:start position:0%
than trying to understand the codebase
of<00:05:06.240><c> a</c><00:05:06.479><c> larger</c><00:05:06.800><c> emulator.</c><00:05:07.680><c> In</c><00:05:07.919><c> other</c><00:05:08.160><c> words,</c><00:05:08.479><c> if</c>

00:05:08.710 --> 00:05:08.720 align:start position:0%
of a larger emulator. In other words, if
 

00:05:08.720 --> 00:05:10.310 align:start position:0%
of a larger emulator. In other words, if
given<00:05:09.039><c> the</c><00:05:09.280><c> choice</c><00:05:09.440><c> between</c><00:05:09.840><c> reading</c><00:05:10.160><c> that</c>

00:05:10.310 --> 00:05:10.320 align:start position:0%
given the choice between reading that
 

00:05:10.320 --> 00:05:12.710 align:start position:0%
given the choice between reading that
emoji<00:05:10.800><c> poem</c><00:05:11.199><c> and</c><00:05:11.520><c> dissecting</c><00:05:12.000><c> the</c><00:05:12.240><c> author's</c>

00:05:12.710 --> 00:05:12.720 align:start position:0%
emoji poem and dissecting the author's
 

00:05:12.720 --> 00:05:14.870 align:start position:0%
emoji poem and dissecting the author's
life<00:05:12.960><c> to</c><00:05:13.199><c> extract</c><00:05:13.520><c> the</c><00:05:13.759><c> story</c><00:05:14.080><c> that</c><00:05:14.400><c> way,</c>

00:05:14.870 --> 00:05:14.880 align:start position:0%
life to extract the story that way,
 

00:05:14.880 --> 00:05:16.790 align:start position:0%
life to extract the story that way,
unless<00:05:15.280><c> you're</c><00:05:15.440><c> a</c><00:05:15.680><c> trained</c><00:05:16.000><c> detective,</c>

00:05:16.790 --> 00:05:16.800 align:start position:0%
unless you're a trained detective,
 

00:05:16.800 --> 00:05:18.710 align:start position:0%
unless you're a trained detective,
you're<00:05:17.120><c> probably</c><00:05:17.520><c> much</c><00:05:17.840><c> better</c><00:05:18.080><c> off</c><00:05:18.320><c> just</c>

00:05:18.710 --> 00:05:18.720 align:start position:0%
you're probably much better off just
 

00:05:18.720 --> 00:05:21.270 align:start position:0%
you're probably much better off just
translating<00:05:19.199><c> the</c><00:05:19.440><c> damn</c><00:05:19.759><c> poem.</c><00:05:20.720><c> That</c><00:05:21.039><c> now</c>

00:05:21.270 --> 00:05:21.280 align:start position:0%
translating the damn poem. That now
 

00:05:21.280 --> 00:05:24.070 align:start position:0%
translating the damn poem. That now
brings<00:05:21.520><c> up</c><00:05:21.759><c> a</c><00:05:22.000><c> question.</c><00:05:22.960><c> How</c><00:05:23.280><c> different</c><00:05:23.680><c> is</c>

00:05:24.070 --> 00:05:24.080 align:start position:0%
brings up a question. How different is
 

00:05:24.080 --> 00:05:25.830 align:start position:0%
brings up a question. How different is
Squirrel,<00:05:24.639><c> the</c><00:05:24.880><c> Portal</c><00:05:25.199><c> 2</c><00:05:25.440><c> scripting</c>

00:05:25.830 --> 00:05:25.840 align:start position:0%
Squirrel, the Portal 2 scripting
 

00:05:25.840 --> 00:05:28.230 align:start position:0%
Squirrel, the Portal 2 scripting
language,<00:05:26.560><c> from</c><00:05:26.960><c> C,</c><00:05:27.440><c> the</c><00:05:27.680><c> language</c><00:05:28.000><c> that</c>

00:05:28.230 --> 00:05:28.240 align:start position:0%
language, from C, the language that
 

00:05:28.240 --> 00:05:30.550 align:start position:0%
language, from C, the language that
Smallness<00:05:28.880><c> is</c><00:05:29.120><c> written</c><00:05:29.360><c> in?</c><00:05:29.840><c> Can</c><00:05:30.080><c> we</c><00:05:30.320><c> map</c>

00:05:30.550 --> 00:05:30.560 align:start position:0%
Smallness is written in? Can we map
 

00:05:30.560 --> 00:05:33.350 align:start position:0%
Smallness is written in? Can we map
emoji<00:05:31.199><c> directly</c><00:05:31.600><c> to</c><00:05:31.919><c> words,</c><00:05:32.479><c> or</c><00:05:32.720><c> is</c><00:05:32.880><c> there</c><00:05:33.039><c> a</c>

00:05:33.350 --> 00:05:33.360 align:start position:0%
emoji directly to words, or is there a
 

00:05:33.360 --> 00:05:36.070 align:start position:0%
emoji directly to words, or is there a
unique<00:05:33.840><c> structural</c><00:05:34.560><c> difference?</c>

00:05:36.070 --> 00:05:36.080 align:start position:0%
unique structural difference?
 

00:05:36.080 --> 00:05:38.469 align:start position:0%
unique structural difference?
Smallness<00:05:36.720><c> uses</c><00:05:37.039><c> the</c><00:05:37.360><c> C</c><00:05:37.680><c> pre-processor</c>

00:05:38.469 --> 00:05:38.479 align:start position:0%
Smallness uses the C pre-processor
 

00:05:38.479 --> 00:05:40.390 align:start position:0%
Smallness uses the C pre-processor
define<00:05:38.880><c> directive</c><00:05:39.360><c> for</c><00:05:39.600><c> convenience</c><00:05:40.160><c> and</c>

00:05:40.390 --> 00:05:40.400 align:start position:0%
define directive for convenience and
 

00:05:40.400 --> 00:05:42.870 align:start position:0%
define directive for convenience and
smaller<00:05:40.800><c> code</c><00:05:41.120><c> size</c><00:05:41.680><c> which</c><00:05:42.000><c> squirrel</c><00:05:42.560><c> doesn't</c>

00:05:42.870 --> 00:05:42.880 align:start position:0%
smaller code size which squirrel doesn't
 

00:05:42.880 --> 00:05:44.629 align:start position:0%
smaller code size which squirrel doesn't
have.<00:05:43.520><c> This</c><00:05:43.759><c> basically</c><00:05:44.080><c> just</c><00:05:44.240><c> tells</c><00:05:44.479><c> the</c>

00:05:44.629 --> 00:05:44.639 align:start position:0%
have. This basically just tells the
 

00:05:44.639 --> 00:05:46.870 align:start position:0%
have. This basically just tells the
compiler<00:05:45.120><c> to</c><00:05:45.360><c> find</c><00:05:45.600><c> and</c><00:05:46.000><c> replace</c><00:05:46.479><c> all</c>

00:05:46.870 --> 00:05:46.880 align:start position:0%
compiler to find and replace all
 

00:05:46.880 --> 00:05:49.670 align:start position:0%
compiler to find and replace all
instances<00:05:47.360><c> of</c><00:05:47.520><c> a</c><00:05:47.759><c> given</c><00:05:48.000><c> token</c><00:05:48.800><c> with</c><00:05:49.360><c> some</c>

00:05:49.670 --> 00:05:49.680 align:start position:0%
instances of a given token with some
 

00:05:49.680 --> 00:05:52.390 align:start position:0%
instances of a given token with some
other<00:05:49.919><c> tokens.</c><00:05:50.800><c> So</c><00:05:51.039><c> in</c><00:05:51.280><c> our</c><00:05:51.440><c> squirrel</c><00:05:51.919><c> code</c><00:05:52.240><c> we</c>

00:05:52.390 --> 00:05:52.400 align:start position:0%
other tokens. So in our squirrel code we
 

00:05:52.400 --> 00:05:53.990 align:start position:0%
other tokens. So in our squirrel code we
can<00:05:52.479><c> replicate</c><00:05:52.880><c> this</c><00:05:53.120><c> by</c><00:05:53.360><c> just</c><00:05:53.600><c> performing</c>

00:05:53.990 --> 00:05:54.000 align:start position:0%
can replicate this by just performing
 

00:05:54.000 --> 00:05:56.230 align:start position:0%
can replicate this by just performing
that<00:05:54.320><c> find</c><00:05:54.560><c> and</c><00:05:54.800><c> replace</c><00:05:55.120><c> chore</c><00:05:55.520><c> manually.</c>

00:05:56.230 --> 00:05:56.240 align:start position:0%
that find and replace chore manually.
 

00:05:56.240 --> 00:05:58.790 align:start position:0%
that find and replace chore manually.
That<00:05:56.479><c> part</c><00:05:56.720><c> is</c><00:05:56.960><c> simple</c><00:05:57.280><c> enough.</c><00:05:58.080><c> Next</c><00:05:58.560><c> there's</c>

00:05:58.790 --> 00:05:58.800 align:start position:0%
That part is simple enough. Next there's
 

00:05:58.800 --> 00:06:01.670 align:start position:0%
That part is simple enough. Next there's
the<00:05:59.039><c> data</c><00:05:59.360><c> types.</c><00:05:59.919><c> The</c><00:06:00.160><c> NES</c><00:06:00.720><c> is</c><00:06:00.960><c> an</c><00:06:01.120><c> 8-bit</c>

00:06:01.670 --> 00:06:01.680 align:start position:0%
the data types. The NES is an 8-bit
 

00:06:01.680 --> 00:06:04.150 align:start position:0%
the data types. The NES is an 8-bit
system<00:06:02.080><c> housing</c><00:06:02.479><c> an</c><00:06:02.639><c> 8-bit</c><00:06:03.199><c> processor.</c><00:06:03.840><c> So,</c>

00:06:04.150 --> 00:06:04.160 align:start position:0%
system housing an 8-bit processor. So,
 

00:06:04.160 --> 00:06:06.309 align:start position:0%
system housing an 8-bit processor. So,
of<00:06:04.319><c> course,</c><00:06:04.479><c> the</c><00:06:04.720><c> emulator</c><00:06:05.360><c> uses</c><00:06:05.759><c> 8-bit</c>

00:06:06.309 --> 00:06:06.319 align:start position:0%
of course, the emulator uses 8-bit
 

00:06:06.319 --> 00:06:08.950 align:start position:0%
of course, the emulator uses 8-bit
unsigned<00:06:06.880><c> integers</c><00:06:07.520><c> extensively</c><00:06:08.240><c> to</c><00:06:08.479><c> imitate</c>

00:06:08.950 --> 00:06:08.960 align:start position:0%
unsigned integers extensively to imitate
 

00:06:08.960 --> 00:06:11.990 align:start position:0%
unsigned integers extensively to imitate
that<00:06:09.280><c> behavior,</c><00:06:10.080><c> but</c><00:06:10.560><c> squirrel</c><00:06:11.199><c> is</c><00:06:11.440><c> a</c><00:06:11.680><c> much</c>

00:06:11.990 --> 00:06:12.000 align:start position:0%
that behavior, but squirrel is a much
 

00:06:12.000 --> 00:06:14.309 align:start position:0%
that behavior, but squirrel is a much
higher<00:06:12.479><c> level</c><00:06:12.800><c> scripting</c><00:06:13.280><c> language,</c><00:06:13.759><c> and</c><00:06:14.000><c> its</c>

00:06:14.309 --> 00:06:14.319 align:start position:0%
higher level scripting language, and its
 

00:06:14.319 --> 00:06:17.909 align:start position:0%
higher level scripting language, and its
only<00:06:14.560><c> integer</c><00:06:15.039><c> type</c><00:06:15.360><c> is</c><00:06:15.919><c> 32</c><00:06:16.639><c> bits</c><00:06:17.120><c> wide.</c><00:06:17.759><c> If</c>

00:06:17.909 --> 00:06:17.919 align:start position:0%
only integer type is 32 bits wide. If
 

00:06:17.919 --> 00:06:19.350 align:start position:0%
only integer type is 32 bits wide. If
you're<00:06:18.080><c> not</c><00:06:18.240><c> super</c><00:06:18.560><c> familiar</c><00:06:18.880><c> with</c><00:06:19.039><c> these</c>

00:06:19.350 --> 00:06:19.360 align:start position:0%
you're not super familiar with these
 

00:06:19.360 --> 00:06:21.189 align:start position:0%
you're not super familiar with these
concepts,<00:06:19.919><c> it</c><00:06:20.160><c> might</c><00:06:20.319><c> not</c><00:06:20.560><c> be</c><00:06:20.720><c> immediately</c>

00:06:21.189 --> 00:06:21.199 align:start position:0%
concepts, it might not be immediately
 

00:06:21.199 --> 00:06:23.189 align:start position:0%
concepts, it might not be immediately
obvious<00:06:21.600><c> why</c><00:06:21.919><c> this</c><00:06:22.080><c> is</c><00:06:22.240><c> a</c><00:06:22.400><c> problem.</c><00:06:22.880><c> After</c>

00:06:23.189 --> 00:06:23.199 align:start position:0%
obvious why this is a problem. After
 

00:06:23.199 --> 00:06:25.590 align:start position:0%
obvious why this is a problem. After
all,<00:06:23.440><c> we</c><00:06:23.759><c> literally</c><00:06:24.240><c> have</c><00:06:24.479><c> more</c><00:06:24.880><c> bits.</c><00:06:25.440><c> How</c>

00:06:25.590 --> 00:06:25.600 align:start position:0%
all, we literally have more bits. How
 

00:06:25.600 --> 00:06:28.070 align:start position:0%
all, we literally have more bits. How
could<00:06:25.840><c> that</c><00:06:26.080><c> be</c><00:06:26.240><c> a</c><00:06:26.400><c> limitation?</c><00:06:27.360><c> Well,</c><00:06:27.680><c> it</c><00:06:27.919><c> all</c>

00:06:28.070 --> 00:06:28.080 align:start position:0%
could that be a limitation? Well, it all
 

00:06:28.080 --> 00:06:29.830 align:start position:0%
could that be a limitation? Well, it all
has<00:06:28.240><c> to</c><00:06:28.479><c> do</c><00:06:28.639><c> with</c><00:06:28.800><c> what</c><00:06:29.120><c> happens</c><00:06:29.360><c> if</c><00:06:29.600><c> you</c>

00:06:29.830 --> 00:06:29.840 align:start position:0%
has to do with what happens if you
 

00:06:29.840 --> 00:06:32.550 align:start position:0%
has to do with what happens if you
exceed<00:06:30.400><c> those</c><00:06:30.720><c> 8</c><00:06:30.960><c> bits.</c><00:06:31.520><c> On</c><00:06:31.759><c> a</c><00:06:31.919><c> true</c><00:06:32.080><c> 8-bit</c>

00:06:32.550 --> 00:06:32.560 align:start position:0%
exceed those 8 bits. On a true 8-bit
 

00:06:32.560 --> 00:06:34.550 align:start position:0%
exceed those 8 bits. On a true 8-bit
system,<00:06:33.039><c> the</c><00:06:33.280><c> largest</c><00:06:33.680><c> whole</c><00:06:34.000><c> number</c><00:06:34.240><c> you</c><00:06:34.479><c> can</c>

00:06:34.550 --> 00:06:34.560 align:start position:0%
system, the largest whole number you can
 

00:06:34.560 --> 00:06:36.510 align:start position:0%
system, the largest whole number you can
physically<00:06:35.039><c> represent</c><00:06:35.600><c> is</c>

00:06:36.510 --> 00:06:36.520 align:start position:0%
physically represent is
 

00:06:36.520 --> 00:06:39.510 align:start position:0%
physically represent is
255.<00:06:37.520><c> If</c><00:06:37.759><c> you</c><00:06:37.840><c> try</c><00:06:38.000><c> to</c><00:06:38.160><c> add</c><00:06:38.400><c> one</c><00:06:38.560><c> to</c><00:06:38.720><c> that,</c><00:06:39.199><c> you</c>

00:06:39.510 --> 00:06:39.520 align:start position:0%
255. If you try to add one to that, you
 

00:06:39.520 --> 00:06:41.350 align:start position:0%
255. If you try to add one to that, you
literally<00:06:39.919><c> run</c><00:06:40.080><c> out</c><00:06:40.240><c> of</c><00:06:40.319><c> bits</c><00:06:40.639><c> to</c><00:06:40.800><c> flip.</c><00:06:41.199><c> So</c>

00:06:41.350 --> 00:06:41.360 align:start position:0%
literally run out of bits to flip. So
 

00:06:41.360 --> 00:06:43.909 align:start position:0%
literally run out of bits to flip. So
the<00:06:41.600><c> value</c><00:06:41.919><c> rolls</c><00:06:42.240><c> over</c><00:06:42.560><c> back</c><00:06:42.800><c> to</c><00:06:43.039><c> zero.</c><00:06:43.600><c> On</c><00:06:43.759><c> a</c>

00:06:43.909 --> 00:06:43.919 align:start position:0%
the value rolls over back to zero. On a
 

00:06:43.919 --> 00:06:45.749 align:start position:0%
the value rolls over back to zero. On a
more<00:06:44.080><c> modern</c><00:06:44.479><c> computer,</c><00:06:44.880><c> we</c><00:06:45.120><c> can</c><00:06:45.280><c> easily</c>

00:06:45.749 --> 00:06:45.759 align:start position:0%
more modern computer, we can easily
 

00:06:45.759 --> 00:06:48.070 align:start position:0%
more modern computer, we can easily
represent<00:06:46.160><c> values</c><00:06:46.560><c> in</c><00:06:46.800><c> the</c><00:06:46.960><c> billions.</c><00:06:47.759><c> So</c><00:06:47.919><c> if</c>

00:06:48.070 --> 00:06:48.080 align:start position:0%
represent values in the billions. So if
 

00:06:48.080 --> 00:06:50.790 align:start position:0%
represent values in the billions. So if
you<00:06:48.240><c> add</c><00:06:48.479><c> 1</c><00:06:48.639><c> to</c><00:06:49.000><c> 255,</c><00:06:50.000><c> instead</c><00:06:50.319><c> of</c><00:06:50.400><c> becoming</c>

00:06:50.790 --> 00:06:50.800 align:start position:0%
you add 1 to 255, instead of becoming
 

00:06:50.800 --> 00:06:54.230 align:start position:0%
you add 1 to 255, instead of becoming
zero,<00:06:51.199><c> it'll</c><00:06:51.600><c> just</c><00:06:51.759><c> increment</c><00:06:52.319><c> to</c><00:06:53.000><c> 256.</c><00:06:54.000><c> This</c>

00:06:54.230 --> 00:06:54.240 align:start position:0%
zero, it'll just increment to 256. This
 

00:06:54.240 --> 00:06:55.990 align:start position:0%
zero, it'll just increment to 256. This
is<00:06:54.319><c> just</c><00:06:54.479><c> one</c><00:06:54.720><c> example</c><00:06:55.039><c> of</c><00:06:55.199><c> how</c><00:06:55.360><c> an</c><00:06:55.520><c> 8-</c><00:06:55.680><c> bit</c>

00:06:55.990 --> 00:06:56.000 align:start position:0%
is just one example of how an 8- bit
 

00:06:56.000 --> 00:06:58.870 align:start position:0%
is just one example of how an 8- bit
value<00:06:56.319><c> differs</c><00:06:56.639><c> from</c><00:06:56.880><c> a</c><00:06:57.039><c> 32-bit</c><00:06:57.759><c> value.</c><00:06:58.400><c> But</c>

00:06:58.870 --> 00:06:58.880 align:start position:0%
value differs from a 32-bit value. But
 

00:06:58.880 --> 00:07:00.950 align:start position:0%
value differs from a 32-bit value. But
yes,<00:06:59.280><c> at</c><00:06:59.440><c> the</c><00:06:59.599><c> end</c><00:06:59.680><c> of</c><00:06:59.759><c> the</c><00:06:59.919><c> day,</c><00:07:00.160><c> this</c><00:07:00.479><c> isn't</c><00:07:00.800><c> a</c>

00:07:00.950 --> 00:07:00.960 align:start position:0%
yes, at the end of the day, this isn't a
 

00:07:00.960 --> 00:07:03.110 align:start position:0%
yes, at the end of the day, this isn't a
deal<00:07:01.280><c> breakaker.</c><00:07:01.840><c> If</c><00:07:02.000><c> we</c><00:07:02.160><c> just</c><00:07:02.319><c> tell</c><00:07:02.560><c> our</c><00:07:02.800><c> code</c>

00:07:03.110 --> 00:07:03.120 align:start position:0%
deal breakaker. If we just tell our code
 

00:07:03.120 --> 00:07:05.270 align:start position:0%
deal breakaker. If we just tell our code
to<00:07:03.599><c> ignore</c><00:07:04.000><c> everything</c><00:07:04.479><c> after</c><00:07:04.800><c> the</c><00:07:05.039><c> first</c>

00:07:05.270 --> 00:07:05.280 align:start position:0%
to ignore everything after the first
 

00:07:05.280 --> 00:07:07.749 align:start position:0%
to ignore everything after the first
eight<00:07:05.520><c> bits</c><00:07:05.919><c> of</c><00:07:06.080><c> an</c><00:07:06.240><c> integer,</c><00:07:06.960><c> it</c><00:07:07.199><c> starts</c><00:07:07.520><c> to</c>

00:07:07.749 --> 00:07:07.759 align:start position:0%
eight bits of an integer, it starts to
 

00:07:07.759 --> 00:07:11.029 align:start position:0%
eight bits of an integer, it starts to
behave<00:07:08.400><c> pretty</c><00:07:08.800><c> much</c><00:07:09.039><c> like</c><00:07:09.360><c> an</c><00:07:09.599><c> 8-</c><00:07:09.840><c> bit</c><00:07:10.240><c> value.</c>

00:07:11.029 --> 00:07:11.039 align:start position:0%
behave pretty much like an 8- bit value.
 

00:07:11.039 --> 00:07:14.230 align:start position:0%
behave pretty much like an 8- bit value.
Adding<00:07:11.440><c> 1</c><00:07:11.680><c> to</c><00:07:11.919><c> 255</c><00:07:12.880><c> will</c><00:07:13.199><c> still</c><00:07:13.520><c> flip</c><00:07:13.759><c> the</c><00:07:13.919><c> 9th</c>

00:07:14.230 --> 00:07:14.240 align:start position:0%
Adding 1 to 255 will still flip the 9th
 

00:07:14.240 --> 00:07:17.350 align:start position:0%
Adding 1 to 255 will still flip the 9th
bit,<00:07:14.560><c> making</c><00:07:14.720><c> it</c><00:07:15.400><c> 256.</c><00:07:16.400><c> But</c><00:07:16.560><c> notice</c><00:07:16.960><c> that</c><00:07:17.199><c> if</c>

00:07:17.350 --> 00:07:17.360 align:start position:0%
bit, making it 256. But notice that if
 

00:07:17.360 --> 00:07:19.589 align:start position:0%
bit, making it 256. But notice that if
we<00:07:17.520><c> just</c><00:07:17.759><c> mask</c><00:07:18.160><c> out</c><00:07:18.479><c> all</c><00:07:18.720><c> the</c><00:07:18.880><c> other</c><00:07:19.039><c> bits</c><00:07:19.360><c> and</c>

00:07:19.589 --> 00:07:19.599 align:start position:0%
we just mask out all the other bits and
 

00:07:19.599 --> 00:07:22.070 align:start position:0%
we just mask out all the other bits and
leave<00:07:19.840><c> only</c><00:07:20.080><c> the</c><00:07:20.319><c> first</c><00:07:20.639><c> eight,</c><00:07:21.120><c> the</c><00:07:21.360><c> value</c><00:07:21.759><c> is</c>

00:07:22.070 --> 00:07:22.080 align:start position:0%
leave only the first eight, the value is
 

00:07:22.080 --> 00:07:24.469 align:start position:0%
leave only the first eight, the value is
zero.<00:07:22.960><c> It's</c><00:07:23.120><c> a</c><00:07:23.280><c> bit</c><00:07:23.440><c> easier</c><00:07:23.759><c> said</c><00:07:24.000><c> than</c><00:07:24.160><c> done,</c>

00:07:24.469 --> 00:07:24.479 align:start position:0%
zero. It's a bit easier said than done,
 

00:07:24.479 --> 00:07:26.070 align:start position:0%
zero. It's a bit easier said than done,
of<00:07:24.639><c> course.</c><00:07:24.960><c> This</c><00:07:25.199><c> isn't</c><00:07:25.520><c> something</c><00:07:25.759><c> you</c><00:07:25.919><c> can</c>

00:07:26.070 --> 00:07:26.080 align:start position:0%
of course. This isn't something you can
 

00:07:26.080 --> 00:07:28.070 align:start position:0%
of course. This isn't something you can
just<00:07:26.240><c> magically</c><00:07:26.800><c> tell</c><00:07:26.960><c> the</c><00:07:27.199><c> program</c><00:07:27.520><c> to</c><00:07:27.759><c> do.</c>

00:07:28.070 --> 00:07:28.080 align:start position:0%
just magically tell the program to do.
 

00:07:28.080 --> 00:07:30.150 align:start position:0%
just magically tell the program to do.
You<00:07:28.319><c> have</c><00:07:28.400><c> to</c><00:07:28.560><c> carefully</c><00:07:29.120><c> find</c><00:07:29.520><c> every</c><00:07:29.919><c> piece</c>

00:07:30.150 --> 00:07:30.160 align:start position:0%
You have to carefully find every piece
 

00:07:30.160 --> 00:07:32.390 align:start position:0%
You have to carefully find every piece
of<00:07:30.319><c> code</c><00:07:30.560><c> where</c><00:07:30.800><c> a</c><00:07:31.039><c> value</c><00:07:31.440><c> could</c><00:07:31.759><c> conceivably</c>

00:07:32.390 --> 00:07:32.400 align:start position:0%
of code where a value could conceivably
 

00:07:32.400 --> 00:07:34.710 align:start position:0%
of code where a value could conceivably
overflow<00:07:32.960><c> past</c><00:07:33.199><c> 8</c><00:07:33.440><c> bits</c><00:07:33.840><c> and</c><00:07:34.080><c> wrap</c><00:07:34.319><c> it</c><00:07:34.400><c> in</c><00:07:34.560><c> a</c>

00:07:34.710 --> 00:07:34.720 align:start position:0%
overflow past 8 bits and wrap it in a
 

00:07:34.720 --> 00:07:37.350 align:start position:0%
overflow past 8 bits and wrap it in a
function<00:07:35.039><c> that</c><00:07:35.360><c> prevents</c><00:07:35.759><c> it</c><00:07:35.919><c> from</c><00:07:36.240><c> doing</c><00:07:36.479><c> so.</c>

00:07:37.350 --> 00:07:37.360 align:start position:0%
function that prevents it from doing so.
 

00:07:37.360 --> 00:07:40.469 align:start position:0%
function that prevents it from doing so.
Then<00:07:37.919><c> come</c><00:07:38.160><c> the</c><00:07:38.479><c> pointers</c><00:07:39.440><c> to</c><00:07:39.680><c> minimize</c><00:07:40.160><c> code</c>

00:07:40.469 --> 00:07:40.479 align:start position:0%
Then come the pointers to minimize code
 

00:07:40.479 --> 00:07:43.430 align:start position:0%
Then come the pointers to minimize code
size.<00:07:41.039><c> Smallness</c><00:07:41.599><c> uses</c><00:07:42.000><c> various</c><00:07:42.639><c> raw</c><00:07:43.039><c> memory</c>

00:07:43.430 --> 00:07:43.440 align:start position:0%
size. Smallness uses various raw memory
 

00:07:43.440 --> 00:07:46.390 align:start position:0%
size. Smallness uses various raw memory
pointers<00:07:44.000><c> that</c><00:07:44.560><c> well</c><00:07:45.120><c> point</c><00:07:45.520><c> to</c><00:07:45.840><c> a</c><00:07:46.000><c> place</c><00:07:46.240><c> in</c>

00:07:46.390 --> 00:07:46.400 align:start position:0%
pointers that well point to a place in
 

00:07:46.400 --> 00:07:48.150 align:start position:0%
pointers that well point to a place in
the<00:07:46.560><c> computer's</c><00:07:47.039><c> memory</c><00:07:47.360><c> to</c><00:07:47.599><c> make</c><00:07:47.680><c> it</c><00:07:47.919><c> easier</c>

00:07:48.150 --> 00:07:48.160 align:start position:0%
the computer's memory to make it easier
 

00:07:48.160 --> 00:07:49.990 align:start position:0%
the computer's memory to make it easier
to<00:07:48.319><c> address</c><00:07:48.720><c> specific</c><00:07:49.120><c> array</c><00:07:49.440><c> elements</c><00:07:49.840><c> with</c>

00:07:49.990 --> 00:07:50.000 align:start position:0%
to address specific array elements with
 

00:07:50.000 --> 00:07:52.150 align:start position:0%
to address specific array elements with
a<00:07:50.160><c> smaller</c><00:07:50.560><c> code</c><00:07:50.800><c> footprint.</c><00:07:51.599><c> This</c><00:07:51.840><c> is</c><00:07:51.919><c> a</c>

00:07:52.150 --> 00:07:52.160 align:start position:0%
a smaller code footprint. This is a
 

00:07:52.160 --> 00:07:54.070 align:start position:0%
a smaller code footprint. This is a
feature<00:07:52.479><c> pretty</c><00:07:52.720><c> much</c><00:07:52.960><c> exclusive</c><00:07:53.520><c> to</c><00:07:53.680><c> lower</c>

00:07:54.070 --> 00:07:54.080 align:start position:0%
feature pretty much exclusive to lower
 

00:07:54.080 --> 00:07:55.990 align:start position:0%
feature pretty much exclusive to lower
level<00:07:54.319><c> languages</c><00:07:54.720><c> like</c><00:07:54.960><c> C.</c><00:07:55.360><c> And</c><00:07:55.520><c> while</c><00:07:55.759><c> it's</c>

00:07:55.990 --> 00:07:56.000 align:start position:0%
level languages like C. And while it's
 

00:07:56.000 --> 00:07:58.150 align:start position:0%
level languages like C. And while it's
obviously<00:07:56.479><c> very</c><00:07:56.800><c> powerful,</c><00:07:57.360><c> its</c><00:07:57.599><c> use</c><00:07:57.840><c> is</c>

00:07:58.150 --> 00:07:58.160 align:start position:0%
obviously very powerful, its use is
 

00:07:58.160 --> 00:08:00.070 align:start position:0%
obviously very powerful, its use is
generally<00:07:58.639><c> frowned</c><00:07:58.960><c> upon</c><00:07:59.199><c> in</c><00:07:59.440><c> larger</c><00:07:59.759><c> systems</c>

00:08:00.070 --> 00:08:00.080 align:start position:0%
generally frowned upon in larger systems
 

00:08:00.080 --> 00:08:01.990 align:start position:0%
generally frowned upon in larger systems
due<00:08:00.319><c> to</c><00:08:00.400><c> how</c><00:08:00.639><c> dangerous</c><00:08:01.039><c> it</c><00:08:01.199><c> can</c><00:08:01.360><c> be</c><00:08:01.520><c> to</c><00:08:01.680><c> handle</c>

00:08:01.990 --> 00:08:02.000 align:start position:0%
due to how dangerous it can be to handle
 

00:08:02.000 --> 00:08:04.469 align:start position:0%
due to how dangerous it can be to handle
memory<00:08:02.319><c> this</c><00:08:02.560><c> way.</c><00:08:03.120><c> As</c><00:08:03.360><c> such,</c><00:08:04.000><c> squirrel</c>

00:08:04.469 --> 00:08:04.479 align:start position:0%
memory this way. As such, squirrel
 

00:08:04.479 --> 00:08:06.070 align:start position:0%
memory this way. As such, squirrel
doesn't<00:08:04.800><c> have</c><00:08:04.960><c> any</c><00:08:05.199><c> support</c><00:08:05.520><c> for</c><00:08:05.759><c> raw</c>

00:08:06.070 --> 00:08:06.080 align:start position:0%
doesn't have any support for raw
 

00:08:06.080 --> 00:08:07.909 align:start position:0%
doesn't have any support for raw
pointers.<00:08:06.800><c> So</c><00:08:06.960><c> that</c><00:08:07.120><c> logic</c><00:08:07.520><c> has</c><00:08:07.680><c> to</c><00:08:07.759><c> be</c>

00:08:07.909 --> 00:08:07.919 align:start position:0%
pointers. So that logic has to be
 

00:08:07.919 --> 00:08:09.670 align:start position:0%
pointers. So that logic has to be
rewritten<00:08:08.400><c> to</c><00:08:08.560><c> use</c><00:08:08.800><c> regular</c><00:08:09.120><c> old</c><00:08:09.360><c> array</c>

00:08:09.670 --> 00:08:09.680 align:start position:0%
rewritten to use regular old array
 

00:08:09.680 --> 00:08:12.309 align:start position:0%
rewritten to use regular old array
indexes<00:08:10.160><c> instead.</c><00:08:11.120><c> Lastly,</c><00:08:11.759><c> smallness</c>

00:08:12.309 --> 00:08:12.319 align:start position:0%
indexes instead. Lastly, smallness
 

00:08:12.319 --> 00:08:14.710 align:start position:0%
indexes instead. Lastly, smallness
employs<00:08:12.720><c> an</c><00:08:13.039><c> even</c><00:08:13.360><c> nastier</c><00:08:14.080><c> C</c><00:08:14.319><c> language</c>

00:08:14.710 --> 00:08:14.720 align:start position:0%
employs an even nastier C language
 

00:08:14.720 --> 00:08:17.110 align:start position:0%
employs an even nastier C language
feature<00:08:15.120><c> called</c><00:08:15.360><c> the</c><00:08:15.680><c> goto</c><00:08:16.240><c> statement.</c><00:08:16.879><c> As</c>

00:08:17.110 --> 00:08:17.120 align:start position:0%
feature called the goto statement. As
 

00:08:17.120 --> 00:08:19.589 align:start position:0%
feature called the goto statement. As
the<00:08:17.280><c> name</c><00:08:17.440><c> implies,</c><00:08:17.919><c> it</c><00:08:18.160><c> lets</c><00:08:18.400><c> you</c><00:08:18.639><c> go</c><00:08:18.879><c> to</c><00:08:19.280><c> a</c>

00:08:19.589 --> 00:08:19.599 align:start position:0%
the name implies, it lets you go to a
 

00:08:19.599 --> 00:08:21.390 align:start position:0%
the name implies, it lets you go to a
specific<00:08:20.080><c> part</c><00:08:20.319><c> of</c><00:08:20.560><c> the</c><00:08:20.800><c> code</c>

00:08:21.390 --> 00:08:21.400 align:start position:0%
specific part of the code
 

00:08:21.400 --> 00:08:23.749 align:start position:0%
specific part of the code
unconditionally,<00:08:22.400><c> completely</c><00:08:23.039><c> ignoring</c><00:08:23.440><c> any</c>

00:08:23.749 --> 00:08:23.759 align:start position:0%
unconditionally, completely ignoring any
 

00:08:23.759 --> 00:08:25.830 align:start position:0%
unconditionally, completely ignoring any
proceeding<00:08:24.319><c> control</c><00:08:24.720><c> flow.</c><00:08:25.280><c> Letting</c><00:08:25.599><c> the</c>

00:08:25.830 --> 00:08:25.840 align:start position:0%
proceeding control flow. Letting the
 

00:08:25.840 --> 00:08:27.749 align:start position:0%
proceeding control flow. Letting the
developer<00:08:26.319><c> jump</c><00:08:26.560><c> around</c><00:08:26.800><c> the</c><00:08:27.039><c> code</c><00:08:27.280><c> like</c><00:08:27.520><c> this</c>

00:08:27.749 --> 00:08:27.759 align:start position:0%
developer jump around the code like this
 

00:08:27.759 --> 00:08:31.110 align:start position:0%
developer jump around the code like this
is<00:08:28.000><c> a</c><00:08:28.400><c> terrible</c><00:08:28.960><c> idea</c><00:08:29.360><c> for</c><00:08:29.599><c> 99%</c><00:08:30.240><c> of</c><00:08:30.479><c> scenarios,</c>

00:08:31.110 --> 00:08:31.120 align:start position:0%
is a terrible idea for 99% of scenarios,
 

00:08:31.120 --> 00:08:33.509 align:start position:0%
is a terrible idea for 99% of scenarios,
which<00:08:31.360><c> is</c><00:08:31.440><c> why</c><00:08:31.759><c> Squirrel</c><00:08:32.399><c> and</c><00:08:32.719><c> most</c><00:08:33.039><c> sensible</c>

00:08:33.509 --> 00:08:33.519 align:start position:0%
which is why Squirrel and most sensible
 

00:08:33.519 --> 00:08:35.829 align:start position:0%
which is why Squirrel and most sensible
languages<00:08:34.080><c> really</c><00:08:34.640><c> obviously</c><00:08:35.279><c> don't</c><00:08:35.519><c> support</c>

00:08:35.829 --> 00:08:35.839 align:start position:0%
languages really obviously don't support
 

00:08:35.839 --> 00:08:38.149 align:start position:0%
languages really obviously don't support
it.<00:08:36.479><c> To</c><00:08:36.640><c> imitate</c><00:08:37.039><c> that</c><00:08:37.279><c> behavior</c><00:08:37.599><c> in</c><00:08:37.839><c> a</c><00:08:38.000><c> more</c>

00:08:38.149 --> 00:08:38.159 align:start position:0%
it. To imitate that behavior in a more
 

00:08:38.159 --> 00:08:39.990 align:start position:0%
it. To imitate that behavior in a more
rational<00:08:38.640><c> way,</c><00:08:38.959><c> I'll</c><00:08:39.200><c> have</c><00:08:39.279><c> to</c><00:08:39.440><c> change</c><00:08:39.599><c> up</c><00:08:39.760><c> the</c>

00:08:39.990 --> 00:08:40.000 align:start position:0%
rational way, I'll have to change up the
 

00:08:40.000 --> 00:08:41.750 align:start position:0%
rational way, I'll have to change up the
control<00:08:40.240><c> flow</c><00:08:40.560><c> in</c><00:08:40.719><c> some</c><00:08:40.880><c> parts</c><00:08:41.200><c> and</c><00:08:41.440><c> wrap</c><00:08:41.599><c> a</c>

00:08:41.750 --> 00:08:41.760 align:start position:0%
control flow in some parts and wrap a
 

00:08:41.760 --> 00:08:43.269 align:start position:0%
control flow in some parts and wrap a
bunch<00:08:41.919><c> of</c><00:08:42.080><c> other</c><00:08:42.240><c> code</c><00:08:42.399><c> in</c><00:08:42.640><c> if</c><00:08:42.959><c> statements</c>

00:08:43.269 --> 00:08:43.279 align:start position:0%
bunch of other code in if statements
 

00:08:43.279 --> 00:08:45.550 align:start position:0%
bunch of other code in if statements
that<00:08:43.519><c> check</c><00:08:43.760><c> whether</c><00:08:44.080><c> GOTU</c><00:08:44.480><c> is</c><00:08:44.720><c> being</c>

00:08:45.550 --> 00:08:45.560 align:start position:0%
that check whether GOTU is being
 

00:08:45.560 --> 00:08:48.630 align:start position:0%
that check whether GOTU is being
used.<00:08:46.560><c> Okay,</c><00:08:47.120><c> so</c><00:08:47.440><c> that's</c><00:08:47.680><c> the</c><00:08:47.920><c> big</c><00:08:48.080><c> picture.</c>

00:08:48.630 --> 00:08:48.640 align:start position:0%
used. Okay, so that's the big picture.
 

00:08:48.640 --> 00:08:50.070 align:start position:0%
used. Okay, so that's the big picture.
There's<00:08:48.880><c> a</c><00:08:49.040><c> lot</c><00:08:49.120><c> that</c><00:08:49.360><c> has</c><00:08:49.440><c> to</c><00:08:49.600><c> be</c><00:08:49.760><c> changed</c>

00:08:50.070 --> 00:08:50.080 align:start position:0%
There's a lot that has to be changed
 

00:08:50.080 --> 00:08:51.910 align:start position:0%
There's a lot that has to be changed
already<00:08:50.399><c> and</c><00:08:50.640><c> the</c><00:08:50.880><c> odds</c><00:08:51.120><c> of</c><00:08:51.279><c> introducing</c><00:08:51.680><c> a</c>

00:08:51.910 --> 00:08:51.920 align:start position:0%
already and the odds of introducing a
 

00:08:51.920 --> 00:08:54.310 align:start position:0%
already and the odds of introducing a
new<00:08:52.080><c> bug</c><00:08:52.560><c> double</c><00:08:52.959><c> with</c><00:08:53.200><c> every</c><00:08:53.440><c> next</c><00:08:53.760><c> step.</c>

00:08:54.310 --> 00:08:54.320 align:start position:0%
new bug double with every next step.
 

00:08:54.320 --> 00:08:55.990 align:start position:0%
new bug double with every next step.
After<00:08:54.640><c> monotonously</c><00:08:55.279><c> skimming</c><00:08:55.680><c> through</c><00:08:55.839><c> the</c>

00:08:55.990 --> 00:08:56.000 align:start position:0%
After monotonously skimming through the
 

00:08:56.000 --> 00:08:58.070 align:start position:0%
After monotonously skimming through the
code<00:08:56.160><c> to</c><00:08:56.399><c> apply</c><00:08:56.640><c> all</c><00:08:56.800><c> these</c><00:08:57.040><c> changes,</c><00:08:57.680><c> I</c>

00:08:58.070 --> 00:08:58.080 align:start position:0%
code to apply all these changes, I
 

00:08:58.080 --> 00:08:59.990 align:start position:0%
code to apply all these changes, I
unsurprisingly<00:08:58.800><c> ran</c><00:08:59.040><c> into</c><00:08:59.200><c> a</c><00:08:59.360><c> few</c><00:08:59.519><c> compiler</c>

00:08:59.990 --> 00:09:00.000 align:start position:0%
unsurprisingly ran into a few compiler
 

00:09:00.000 --> 00:09:01.590 align:start position:0%
unsurprisingly ran into a few compiler
errors.<00:09:00.320><c> But</c><00:09:00.560><c> after</c><00:09:00.800><c> all</c><00:09:01.040><c> of</c><00:09:01.120><c> those</c><00:09:01.360><c> got</c>

00:09:01.590 --> 00:09:01.600 align:start position:0%
errors. But after all of those got
 

00:09:01.600 --> 00:09:04.470 align:start position:0%
errors. But after all of those got
resolved,<00:09:02.240><c> I</c><00:09:02.560><c> was</c><00:09:03.120><c> genuinely</c><00:09:03.760><c> shocked</c><00:09:04.160><c> to</c><00:09:04.320><c> see</c>

00:09:04.470 --> 00:09:04.480 align:start position:0%
resolved, I was genuinely shocked to see
 

00:09:04.480 --> 00:09:06.470 align:start position:0%
resolved, I was genuinely shocked to see
that<00:09:04.640><c> the</c><00:09:04.880><c> game</c><00:09:05.120><c> didn't</c><00:09:05.600><c> spontaneously</c>

00:09:06.470 --> 00:09:06.480 align:start position:0%
that the game didn't spontaneously
 

00:09:06.480 --> 00:09:08.550 align:start position:0%
that the game didn't spontaneously
explode<00:09:06.959><c> or</c><00:09:07.200><c> something.</c><00:09:07.680><c> In</c><00:09:07.839><c> fact,</c><00:09:08.080><c> it</c><00:09:08.320><c> even</c>

00:09:08.550 --> 00:09:08.560 align:start position:0%
explode or something. In fact, it even
 

00:09:08.560 --> 00:09:10.949 align:start position:0%
explode or something. In fact, it even
claimed<00:09:08.880><c> to</c><00:09:09.040><c> be</c><00:09:09.120><c> rendering</c><00:09:09.680><c> frames.</c><00:09:10.560><c> But</c>

00:09:10.949 --> 00:09:10.959 align:start position:0%
claimed to be rendering frames. But
 

00:09:10.959 --> 00:09:13.110 align:start position:0%
claimed to be rendering frames. But
taking<00:09:11.279><c> a</c><00:09:11.519><c> peek</c><00:09:11.680><c> at</c><00:09:11.839><c> the</c><00:09:12.080><c> frame</c><00:09:12.320><c> buffer,</c><00:09:12.880><c> it</c>

00:09:13.110 --> 00:09:13.120 align:start position:0%
taking a peek at the frame buffer, it
 

00:09:13.120 --> 00:09:14.790 align:start position:0%
taking a peek at the frame buffer, it
quickly<00:09:13.440><c> became</c><00:09:13.760><c> clear</c><00:09:14.000><c> that</c><00:09:14.320><c> all</c><00:09:14.560><c> those</c>

00:09:14.790 --> 00:09:14.800 align:start position:0%
quickly became clear that all those
 

00:09:14.800 --> 00:09:17.030 align:start position:0%
quickly became clear that all those
frames<00:09:15.200><c> were</c><00:09:15.519><c> pitch</c><00:09:15.920><c> black.</c><00:09:16.560><c> I</c><00:09:16.720><c> traced</c>

00:09:17.030 --> 00:09:17.040 align:start position:0%
frames were pitch black. I traced
 

00:09:17.040 --> 00:09:18.550 align:start position:0%
frames were pitch black. I traced
through<00:09:17.200><c> the</c><00:09:17.279><c> logic</c><00:09:17.519><c> of</c><00:09:17.600><c> the</c><00:09:17.760><c> emulator</c><00:09:18.160><c> a</c><00:09:18.399><c> bit,</c>

00:09:18.550 --> 00:09:18.560 align:start position:0%
through the logic of the emulator a bit,
 

00:09:18.560 --> 00:09:20.550 align:start position:0%
through the logic of the emulator a bit,
and<00:09:18.880><c> after</c><00:09:19.120><c> a</c><00:09:19.279><c> bit</c><00:09:19.440><c> more</c><00:09:19.600><c> debugging,</c><00:09:20.160><c> I</c><00:09:20.399><c> found</c>

00:09:20.550 --> 00:09:20.560 align:start position:0%
and after a bit more debugging, I found
 

00:09:20.560 --> 00:09:21.910 align:start position:0%
and after a bit more debugging, I found
that<00:09:20.720><c> the</c><00:09:20.959><c> flags</c><00:09:21.279><c> for</c><00:09:21.440><c> the</c><00:09:21.600><c> picture</c>

00:09:21.910 --> 00:09:21.920 align:start position:0%
that the flags for the picture
 

00:09:21.920 --> 00:09:24.630 align:start position:0%
that the flags for the picture
processing<00:09:22.320><c> unit</c><00:09:22.880><c> never</c><00:09:23.200><c> even</c><00:09:23.519><c> got</c><00:09:23.839><c> touched.</c>

00:09:24.630 --> 00:09:24.640 align:start position:0%
processing unit never even got touched.
 

00:09:24.640 --> 00:09:26.790 align:start position:0%
processing unit never even got touched.
To<00:09:24.880><c> debug</c><00:09:25.200><c> a</c><00:09:25.360><c> port</c><00:09:25.600><c> like</c><00:09:25.839><c> this,</c><00:09:26.160><c> your</c><00:09:26.399><c> best</c><00:09:26.560><c> bet</c>

00:09:26.790 --> 00:09:26.800 align:start position:0%
To debug a port like this, your best bet
 

00:09:26.800 --> 00:09:28.550 align:start position:0%
To debug a port like this, your best bet
is<00:09:26.959><c> to</c><00:09:27.120><c> print</c><00:09:27.440><c> some</c><00:09:27.600><c> output</c><00:09:28.000><c> from</c><00:09:28.240><c> your</c>

00:09:28.550 --> 00:09:28.560 align:start position:0%
is to print some output from your
 

00:09:28.560 --> 00:09:30.949 align:start position:0%
is to print some output from your
program<00:09:29.040><c> and</c><00:09:29.360><c> compare</c><00:09:29.680><c> it</c><00:09:29.839><c> to</c><00:09:30.000><c> the</c><00:09:30.240><c> original.</c>

00:09:30.949 --> 00:09:30.959 align:start position:0%
program and compare it to the original.
 

00:09:30.959 --> 00:09:32.790 align:start position:0%
program and compare it to the original.
What<00:09:31.200><c> you're</c><00:09:31.360><c> seeing</c><00:09:31.600><c> here</c><00:09:31.839><c> is</c><00:09:32.080><c> a</c><00:09:32.320><c> log</c><00:09:32.560><c> of</c><00:09:32.720><c> the</c>

00:09:32.790 --> 00:09:32.800 align:start position:0%
What you're seeing here is a log of the
 

00:09:32.800 --> 00:09:34.470 align:start position:0%
What you're seeing here is a log of the
bytes<00:09:33.200><c> being</c><00:09:33.440><c> read</c><00:09:33.600><c> from</c><00:09:33.680><c> the</c><00:09:33.920><c> Super</c><00:09:34.160><c> Mario</c>

00:09:34.470 --> 00:09:34.480 align:start position:0%
bytes being read from the Super Mario
 

00:09:34.480 --> 00:09:36.630 align:start position:0%
bytes being read from the Super Mario
Bros.<00:09:34.800><c> ROM</c><00:09:35.200><c> and</c><00:09:35.360><c> the</c><00:09:35.600><c> address</c><00:09:35.920><c> that</c><00:09:36.160><c> each</c><00:09:36.399><c> one</c>

00:09:36.630 --> 00:09:36.640 align:start position:0%
Bros. ROM and the address that each one
 

00:09:36.640 --> 00:09:38.710 align:start position:0%
Bros. ROM and the address that each one
was<00:09:36.800><c> read</c><00:09:37.040><c> from.</c><00:09:37.519><c> Comparing</c><00:09:37.920><c> it</c><00:09:38.080><c> side</c><00:09:38.320><c> by</c><00:09:38.480><c> side</c>

00:09:38.710 --> 00:09:38.720 align:start position:0%
was read from. Comparing it side by side
 

00:09:38.720 --> 00:09:40.470 align:start position:0%
was read from. Comparing it side by side
with<00:09:38.880><c> the</c><00:09:39.120><c> original</c><00:09:39.440><c> emulator</c><00:09:40.000><c> like</c><00:09:40.160><c> this</c>

00:09:40.470 --> 00:09:40.480 align:start position:0%
with the original emulator like this
 

00:09:40.480 --> 00:09:42.070 align:start position:0%
with the original emulator like this
helps<00:09:40.800><c> me</c><00:09:40.959><c> find</c><00:09:41.279><c> exactly</c><00:09:41.680><c> where</c><00:09:41.920><c> the</c>

00:09:42.070 --> 00:09:42.080 align:start position:0%
helps me find exactly where the
 

00:09:42.080 --> 00:09:44.389 align:start position:0%
helps me find exactly where the
emulation<00:09:42.720><c> takes</c><00:09:42.959><c> a</c><00:09:43.120><c> wrong</c><00:09:43.440><c> step.</c><00:09:44.080><c> In</c><00:09:44.240><c> this</c>

00:09:44.389 --> 00:09:44.399 align:start position:0%
emulation takes a wrong step. In this
 

00:09:44.399 --> 00:09:45.750 align:start position:0%
emulation takes a wrong step. In this
case,<00:09:44.560><c> we</c><00:09:44.800><c> can</c><00:09:44.880><c> see</c><00:09:44.959><c> that</c><00:09:45.120><c> the</c><00:09:45.360><c> address</c><00:09:45.600><c> from</c>

00:09:45.750 --> 00:09:45.760 align:start position:0%
case, we can see that the address from
 

00:09:45.760 --> 00:09:47.269 align:start position:0%
case, we can see that the address from
which<00:09:45.920><c> we're</c><00:09:46.080><c> reading</c><00:09:46.240><c> the</c><00:09:46.399><c> op</c><00:09:46.720><c> code</c><00:09:46.880><c> jumps</c><00:09:47.120><c> to</c>

00:09:47.269 --> 00:09:47.279 align:start position:0%
which we're reading the op code jumps to
 

00:09:47.279 --> 00:09:50.230 align:start position:0%
which we're reading the op code jumps to
the<00:09:47.440><c> wrong</c><00:09:47.680><c> value.</c><00:09:48.160><c> And</c><00:09:48.640><c> oh,</c><00:09:49.440><c> uh,</c><00:09:49.920><c> what's</c><00:09:50.160><c> an</c>

00:09:50.230 --> 00:09:50.240 align:start position:0%
the wrong value. And oh, uh, what's an
 

00:09:50.240 --> 00:09:52.949 align:start position:0%
the wrong value. And oh, uh, what's an
op<00:09:50.480><c> code,</c><00:09:50.720><c> you</c><00:09:50.880><c> ask?</c><00:09:51.440><c> Put</c><00:09:51.760><c> simply,</c><00:09:52.240><c> the</c><00:09:52.480><c> CPU</c>

00:09:52.949 --> 00:09:52.959 align:start position:0%
op code, you ask? Put simply, the CPU
 

00:09:52.959 --> 00:09:56.230 align:start position:0%
op code, you ask? Put simply, the CPU
inside<00:09:53.279><c> of</c><00:09:53.360><c> the</c><00:09:53.519><c> NES,</c><00:09:54.160><c> the</c><00:09:54.399><c> legendary</c><00:09:55.240><c> 6502,</c>

00:09:56.230 --> 00:09:56.240 align:start position:0%
inside of the NES, the legendary 6502,
 

00:09:56.240 --> 00:09:58.150 align:start position:0%
inside of the NES, the legendary 6502,
works<00:09:56.560><c> kind</c><00:09:56.800><c> of</c><00:09:56.880><c> like</c><00:09:57.040><c> a</c><00:09:57.279><c> tape</c><00:09:57.519><c> reader.</c><00:09:58.000><c> It</c>

00:09:58.150 --> 00:09:58.160 align:start position:0%
works kind of like a tape reader. It
 

00:09:58.160 --> 00:10:00.230 align:start position:0%
works kind of like a tape reader. It
reads<00:09:58.480><c> one</c><00:09:58.640><c> bite</c><00:09:58.959><c> at</c><00:09:59.120><c> a</c><00:09:59.200><c> time,</c><00:09:59.600><c> processes</c><00:10:00.000><c> the</c>

00:10:00.230 --> 00:10:00.240 align:start position:0%
reads one bite at a time, processes the
 

00:10:00.240 --> 00:10:01.829 align:start position:0%
reads one bite at a time, processes the
instruction<00:10:00.640><c> associated</c><00:10:01.120><c> with</c><00:10:01.360><c> it,</c><00:10:01.600><c> then</c>

00:10:01.829 --> 00:10:01.839 align:start position:0%
instruction associated with it, then
 

00:10:01.839 --> 00:10:03.509 align:start position:0%
instruction associated with it, then
moves<00:10:02.000><c> the</c><00:10:02.240><c> program</c><00:10:02.560><c> counter</c><00:10:02.880><c> forward</c><00:10:03.279><c> to</c>

00:10:03.509 --> 00:10:03.519 align:start position:0%
moves the program counter forward to
 

00:10:03.519 --> 00:10:05.350 align:start position:0%
moves the program counter forward to
either<00:10:03.839><c> get</c><00:10:04.080><c> some</c><00:10:04.240><c> value</c><00:10:04.480><c> for</c><00:10:04.720><c> the</c><00:10:05.040><c> current</c>

00:10:05.350 --> 00:10:05.360 align:start position:0%
either get some value for the current
 

00:10:05.360 --> 00:10:07.269 align:start position:0%
either get some value for the current
instruction<00:10:06.080><c> or</c><00:10:06.320><c> to</c><00:10:06.560><c> get</c><00:10:06.720><c> the</c><00:10:06.959><c> next</c>

00:10:07.269 --> 00:10:07.279 align:start position:0%
instruction or to get the next
 

00:10:07.279 --> 00:10:09.350 align:start position:0%
instruction or to get the next
instruction.<00:10:08.160><c> Of</c><00:10:08.320><c> course,</c><00:10:08.560><c> I'm</c><00:10:08.880><c> definitely</c>

00:10:09.350 --> 00:10:09.360 align:start position:0%
instruction. Of course, I'm definitely
 

00:10:09.360 --> 00:10:10.870 align:start position:0%
instruction. Of course, I'm definitely
oversimplifying<00:10:10.160><c> this,</c><00:10:10.320><c> and</c><00:10:10.560><c> I'm</c><00:10:10.720><c> not</c>

00:10:10.870 --> 00:10:10.880 align:start position:0%
oversimplifying this, and I'm not
 

00:10:10.880 --> 00:10:12.470 align:start position:0%
oversimplifying this, and I'm not
exactly<00:10:11.279><c> qualified</c><00:10:11.760><c> to</c><00:10:11.920><c> talk</c><00:10:12.080><c> about</c><00:10:12.240><c> the</c>

00:10:12.470 --> 00:10:12.480 align:start position:0%
exactly qualified to talk about the
 

00:10:12.480 --> 00:10:15.190 align:start position:0%
exactly qualified to talk about the
intricacies<00:10:12.959><c> of</c><00:10:13.120><c> the</c><00:10:13.360><c> 6502,</c><00:10:14.320><c> but</c><00:10:14.640><c> this</c><00:10:14.880><c> should</c>

00:10:15.190 --> 00:10:15.200 align:start position:0%
intricacies of the 6502, but this should
 

00:10:15.200 --> 00:10:16.870 align:start position:0%
intricacies of the 6502, but this should
at<00:10:15.279><c> least</c><00:10:15.600><c> help</c><00:10:15.839><c> you</c><00:10:16.079><c> understand</c><00:10:16.560><c> what's</c>

00:10:16.870 --> 00:10:16.880 align:start position:0%
at least help you understand what's
 

00:10:16.880 --> 00:10:19.509 align:start position:0%
at least help you understand what's
going<00:10:17.200><c> wrong.</c><00:10:17.920><c> some</c><00:10:18.320><c> instruction</c><00:10:18.959><c> is</c><00:10:19.279><c> telling</c>

00:10:19.509 --> 00:10:19.519 align:start position:0%
going wrong. some instruction is telling
 

00:10:19.519 --> 00:10:21.990 align:start position:0%
going wrong. some instruction is telling
the<00:10:19.680><c> NES</c><00:10:20.320><c> to</c><00:10:20.640><c> change</c><00:10:20.880><c> the</c><00:10:21.200><c> address</c><00:10:21.519><c> that</c><00:10:21.760><c> it's</c>

00:10:21.990 --> 00:10:22.000 align:start position:0%
the NES to change the address that it's
 

00:10:22.000 --> 00:10:24.389 align:start position:0%
the NES to change the address that it's
reading<00:10:22.320><c> from.</c><00:10:22.800><c> But</c><00:10:22.959><c> our</c><00:10:23.200><c> emulated</c><00:10:23.760><c> CPU</c>

00:10:24.389 --> 00:10:24.399 align:start position:0%
reading from. But our emulated CPU
 

00:10:24.399 --> 00:10:26.310 align:start position:0%
reading from. But our emulated CPU
messes<00:10:24.800><c> this</c><00:10:25.040><c> up</c><00:10:25.279><c> and</c><00:10:25.519><c> lands</c><00:10:25.839><c> on</c><00:10:26.000><c> the</c><00:10:26.160><c> wrong</c>

00:10:26.310 --> 00:10:26.320 align:start position:0%
messes this up and lands on the wrong
 

00:10:26.320 --> 00:10:28.550 align:start position:0%
messes this up and lands on the wrong
address,<00:10:26.959><c> which</c><00:10:27.360><c> usually</c><00:10:27.760><c> gets</c><00:10:28.000><c> it</c><00:10:28.160><c> stuck</c><00:10:28.320><c> in</c>

00:10:28.550 --> 00:10:28.560 align:start position:0%
address, which usually gets it stuck in
 

00:10:28.560 --> 00:10:30.790 align:start position:0%
address, which usually gets it stuck in
some<00:10:28.720><c> infinite</c><00:10:29.200><c> loop.</c><00:10:29.839><c> Now,</c><00:10:30.240><c> there</c><00:10:30.560><c> were</c>

00:10:30.790 --> 00:10:30.800 align:start position:0%
some infinite loop. Now, there were
 

00:10:30.800 --> 00:10:32.710 align:start position:0%
some infinite loop. Now, there were
several<00:10:31.200><c> such</c><00:10:31.519><c> bugs,</c><00:10:31.839><c> so</c><00:10:32.079><c> I'll</c><00:10:32.320><c> skip</c><00:10:32.480><c> the</c>

00:10:32.710 --> 00:10:32.720 align:start position:0%
several such bugs, so I'll skip the
 

00:10:32.720 --> 00:10:34.470 align:start position:0%
several such bugs, so I'll skip the
details<00:10:32.959><c> for</c><00:10:33.200><c> brevity.</c><00:10:33.760><c> Most</c><00:10:33.920><c> of</c><00:10:34.079><c> them</c><00:10:34.240><c> came</c>

00:10:34.470 --> 00:10:34.480 align:start position:0%
details for brevity. Most of them came
 

00:10:34.480 --> 00:10:36.870 align:start position:0%
details for brevity. Most of them came
from,<00:10:35.040><c> who</c><00:10:35.200><c> would</c><00:10:35.360><c> have</c><00:10:35.440><c> guessed</c><00:10:35.680><c> it,</c><00:10:36.079><c> bugs</c><00:10:36.560><c> I</c>

00:10:36.870 --> 00:10:36.880 align:start position:0%
from, who would have guessed it, bugs I
 

00:10:36.880 --> 00:10:38.630 align:start position:0%
from, who would have guessed it, bugs I
introduced<00:10:37.360><c> while</c><00:10:37.680><c> porting</c><00:10:38.000><c> from</c><00:10:38.240><c> C</c><00:10:38.480><c> to</c>

00:10:38.630 --> 00:10:38.640 align:start position:0%
introduced while porting from C to
 

00:10:38.640 --> 00:10:40.550 align:start position:0%
introduced while porting from C to
Squirrel.<00:10:39.200><c> While</c><00:10:39.519><c> resolving</c><00:10:39.839><c> these,</c><00:10:40.240><c> I</c><00:10:40.399><c> ran</c>

00:10:40.550 --> 00:10:40.560 align:start position:0%
Squirrel. While resolving these, I ran
 

00:10:40.560 --> 00:10:42.630 align:start position:0%
Squirrel. While resolving these, I ran
into<00:10:40.800><c> a</c><00:10:40.959><c> bit</c><00:10:41.040><c> of</c><00:10:41.200><c> good</c><00:10:41.360><c> news</c><00:10:41.760><c> and</c><00:10:42.079><c> some</c><00:10:42.320><c> bad</c>

00:10:42.630 --> 00:10:42.640 align:start position:0%
into a bit of good news and some bad
 

00:10:42.640 --> 00:10:44.389 align:start position:0%
into a bit of good news and some bad
news.<00:10:43.120><c> The</c><00:10:43.360><c> good</c><00:10:43.600><c> news</c><00:10:43.760><c> was</c><00:10:44.079><c> that</c><00:10:44.240><c> the</c>

00:10:44.389 --> 00:10:44.399 align:start position:0%
news. The good news was that the
 

00:10:44.399 --> 00:10:46.310 align:start position:0%
news. The good news was that the
emulator<00:10:44.880><c> was</c><00:10:45.120><c> getting</c><00:10:45.360><c> further</c><00:10:45.760><c> and</c><00:10:46.000><c> further</c>

00:10:46.310 --> 00:10:46.320 align:start position:0%
emulator was getting further and further
 

00:10:46.320 --> 00:10:47.990 align:start position:0%
emulator was getting further and further
into<00:10:46.560><c> the</c><00:10:46.720><c> Super</c><00:10:46.959><c> Mario</c><00:10:47.279><c> Bros.</c><00:10:47.680><c> program</c>

00:10:47.990 --> 00:10:48.000 align:start position:0%
into the Super Mario Bros. program
 

00:10:48.000 --> 00:10:50.470 align:start position:0%
into the Super Mario Bros. program
before<00:10:48.399><c> deviating.</c><00:10:49.360><c> But</c><00:10:49.519><c> the</c><00:10:49.839><c> bad</c><00:10:50.079><c> news</c><00:10:50.240><c> is</c>

00:10:50.470 --> 00:10:50.480 align:start position:0%
before deviating. But the bad news is
 

00:10:50.480 --> 00:10:52.630 align:start position:0%
before deviating. But the bad news is
that<00:10:50.720><c> the</c><00:10:50.959><c> log</c><00:10:51.279><c> was</c><00:10:51.519><c> now</c><00:10:51.760><c> too</c><00:10:52.000><c> long</c><00:10:52.240><c> to</c><00:10:52.399><c> look</c>

00:10:52.630 --> 00:10:52.640 align:start position:0%
that the log was now too long to look
 

00:10:52.640 --> 00:10:54.630 align:start position:0%
that the log was now too long to look
through<00:10:52.880><c> manually.</c><00:10:53.680><c> This</c><00:10:53.839><c> is</c><00:10:53.920><c> where</c><00:10:54.240><c> diffing</c>

00:10:54.630 --> 00:10:54.640 align:start position:0%
through manually. This is where diffing
 

00:10:54.640 --> 00:10:56.470 align:start position:0%
through manually. This is where diffing
becomes<00:10:55.040><c> useful.</c><00:10:55.519><c> If</c><00:10:55.760><c> you</c><00:10:55.839><c> have</c><00:10:56.000><c> two</c><00:10:56.240><c> text</c>

00:10:56.470 --> 00:10:56.480 align:start position:0%
becomes useful. If you have two text
 

00:10:56.480 --> 00:10:58.389 align:start position:0%
becomes useful. If you have two text
files<00:10:56.800><c> that</c><00:10:57.040><c> are</c><00:10:57.200><c> supposed</c><00:10:57.440><c> to</c><00:10:57.600><c> be</c><00:10:57.839><c> identical,</c>

00:10:58.389 --> 00:10:58.399 align:start position:0%
files that are supposed to be identical,
 

00:10:58.399 --> 00:11:00.550 align:start position:0%
files that are supposed to be identical,
like<00:10:58.560><c> the</c><00:10:58.800><c> logs</c><00:10:59.200><c> of</c><00:10:59.360><c> the</c><00:10:59.440><c> same</c><00:10:59.600><c> NES</c><00:11:00.079><c> simulator</c>

00:11:00.550 --> 00:11:00.560 align:start position:0%
like the logs of the same NES simulator
 

00:11:00.560 --> 00:11:02.389 align:start position:0%
like the logs of the same NES simulator
written<00:11:00.800><c> in</c><00:11:01.040><c> two</c><00:11:01.279><c> different</c><00:11:01.519><c> languages,</c><00:11:02.160><c> you</c>

00:11:02.389 --> 00:11:02.399 align:start position:0%
written in two different languages, you
 

00:11:02.399 --> 00:11:04.790 align:start position:0%
written in two different languages, you
can<00:11:02.480><c> use</c><00:11:02.640><c> a</c><00:11:02.880><c> tool</c><00:11:03.200><c> such</c><00:11:03.360><c> as</c><00:11:03.519><c> the</c><00:11:03.680><c> Unix</c><00:11:04.160><c> diff</c><00:11:04.640><c> to</c>

00:11:04.790 --> 00:11:04.800 align:start position:0%
can use a tool such as the Unix diff to
 

00:11:04.800 --> 00:11:06.949 align:start position:0%
can use a tool such as the Unix diff to
tell<00:11:04.959><c> you</c><00:11:05.279><c> exactly</c><00:11:05.839><c> where</c><00:11:06.079><c> the</c><00:11:06.320><c> two</c><00:11:06.480><c> logs</c>

00:11:06.949 --> 00:11:06.959 align:start position:0%
tell you exactly where the two logs
 

00:11:06.959 --> 00:11:09.030 align:start position:0%
tell you exactly where the two logs
start<00:11:07.120><c> to</c><00:11:07.360><c> desync.</c><00:11:08.320><c> Even</c><00:11:08.560><c> then,</c><00:11:08.880><c> the</c>

00:11:09.030 --> 00:11:09.040 align:start position:0%
start to desync. Even then, the
 

00:11:09.040 --> 00:11:11.110 align:start position:0%
start to desync. Even then, the
discrepancies<00:11:09.680><c> aren't</c><00:11:10.000><c> trivial</c><00:11:10.399><c> to</c><00:11:10.560><c> debug.</c>

00:11:11.110 --> 00:11:11.120 align:start position:0%
discrepancies aren't trivial to debug.
 

00:11:11.120 --> 00:11:12.949 align:start position:0%
discrepancies aren't trivial to debug.
Even<00:11:11.360><c> if</c><00:11:11.519><c> I</c><00:11:11.680><c> know</c><00:11:11.760><c> in</c><00:11:12.000><c> roughly</c><00:11:12.399><c> which</c><00:11:12.640><c> part</c><00:11:12.880><c> of</c>

00:11:12.949 --> 00:11:12.959 align:start position:0%
Even if I know in roughly which part of
 

00:11:12.959 --> 00:11:14.790 align:start position:0%
Even if I know in roughly which part of
the<00:11:13.120><c> code</c><00:11:13.360><c> the</c><00:11:13.519><c> issue</c><00:11:13.760><c> is</c><00:11:13.920><c> happening</c><00:11:14.320><c> and</c><00:11:14.640><c> have</c>

00:11:14.790 --> 00:11:14.800 align:start position:0%
the code the issue is happening and have
 

00:11:14.800 --> 00:11:17.269 align:start position:0%
the code the issue is happening and have
the<00:11:15.040><c> original</c><00:11:15.519><c> side</c><00:11:15.760><c> by</c><00:11:16.000><c> side</c><00:11:16.240><c> with</c><00:11:16.480><c> my</c><00:11:16.720><c> port,</c>

00:11:17.269 --> 00:11:17.279 align:start position:0%
the original side by side with my port,
 

00:11:17.279 --> 00:11:19.910 align:start position:0%
the original side by side with my port,
it's<00:11:17.600><c> still</c><00:11:17.920><c> never</c><00:11:18.240><c> immediately</c><00:11:18.920><c> obvious.</c>

00:11:19.910 --> 00:11:19.920 align:start position:0%
it's still never immediately obvious.
 

00:11:19.920 --> 00:11:21.590 align:start position:0%
it's still never immediately obvious.
Eventually,<00:11:20.399><c> I</c><00:11:20.640><c> got</c><00:11:20.720><c> to</c><00:11:20.880><c> the</c><00:11:21.040><c> point</c><00:11:21.200><c> where</c><00:11:21.440><c> all</c>

00:11:21.590 --> 00:11:21.600 align:start position:0%
Eventually, I got to the point where all
 

00:11:21.600 --> 00:11:23.269 align:start position:0%
Eventually, I got to the point where all
the<00:11:21.760><c> instructions</c><00:11:22.320><c> were</c><00:11:22.560><c> being</c><00:11:22.800><c> handled</c>

00:11:23.269 --> 00:11:23.279 align:start position:0%
the instructions were being handled
 

00:11:23.279 --> 00:11:25.269 align:start position:0%
the instructions were being handled
correctly,<00:11:23.920><c> and</c><00:11:24.079><c> I</c><00:11:24.240><c> even</c><00:11:24.480><c> got</c><00:11:24.640><c> it</c><00:11:24.800><c> to</c><00:11:24.959><c> draw</c>

00:11:25.269 --> 00:11:25.279 align:start position:0%
correctly, and I even got it to draw
 

00:11:25.279 --> 00:11:27.350 align:start position:0%
correctly, and I even got it to draw
something<00:11:25.519><c> to</c><00:11:25.760><c> the</c><00:11:25.920><c> screen,</c><00:11:26.480><c> but</c><00:11:26.800><c> it's</c><00:11:27.120><c> not</c>

00:11:27.350 --> 00:11:27.360 align:start position:0%
something to the screen, but it's not
 

00:11:27.360 --> 00:11:29.750 align:start position:0%
something to the screen, but it's not
exactly<00:11:27.760><c> looking</c><00:11:28.079><c> too</c><00:11:28.320><c> much</c><00:11:28.480><c> like</c><00:11:28.800><c> Mario.</c><00:11:29.519><c> The</c>

00:11:29.750 --> 00:11:29.760 align:start position:0%
exactly looking too much like Mario. The
 

00:11:29.760 --> 00:11:31.509 align:start position:0%
exactly looking too much like Mario. The
problem<00:11:30.000><c> was</c><00:11:30.240><c> that</c><00:11:30.480><c> the</c><00:11:30.720><c> rendering</c><00:11:31.120><c> of</c><00:11:31.279><c> each</c>

00:11:31.509 --> 00:11:31.519 align:start position:0%
problem was that the rendering of each
 

00:11:31.519 --> 00:11:34.550 align:start position:0%
problem was that the rendering of each
frame<00:11:31.839><c> was</c><00:11:32.399><c> offset</c><00:11:32.959><c> by</c><00:11:33.200><c> a</c><00:11:33.440><c> few</c><00:11:33.600><c> cycles.</c><00:11:34.320><c> The</c>

00:11:34.550 --> 00:11:34.560 align:start position:0%
frame was offset by a few cycles. The
 

00:11:34.560 --> 00:11:36.790 align:start position:0%
frame was offset by a few cycles. The
picture<00:11:34.880><c> processing</c><00:11:35.279><c> unit</c><00:11:35.519><c> of</c><00:11:35.680><c> the</c><00:11:35.839><c> NES</c><00:11:36.399><c> runs</c>

00:11:36.790 --> 00:11:36.800 align:start position:0%
picture processing unit of the NES runs
 

00:11:36.800 --> 00:11:39.509 align:start position:0%
picture processing unit of the NES runs
three<00:11:37.120><c> times</c><00:11:37.440><c> faster</c><00:11:37.839><c> than</c><00:11:38.079><c> the</c><00:11:38.320><c> CPU.</c><00:11:39.120><c> And</c><00:11:39.279><c> as</c>

00:11:39.509 --> 00:11:39.519 align:start position:0%
three times faster than the CPU. And as
 

00:11:39.519 --> 00:11:40.949 align:start position:0%
three times faster than the CPU. And as
soon<00:11:39.680><c> as</c><00:11:39.760><c> it's</c><00:11:40.000><c> done</c><00:11:40.160><c> processing</c><00:11:40.560><c> the</c><00:11:40.800><c> whole</c>

00:11:40.949 --> 00:11:40.959 align:start position:0%
soon as it's done processing the whole
 

00:11:40.959 --> 00:11:42.949 align:start position:0%
soon as it's done processing the whole
frame<00:11:41.200><c> buffer,</c><00:11:41.680><c> it</c><00:11:41.920><c> updates</c><00:11:42.240><c> a</c><00:11:42.480><c> few</c><00:11:42.640><c> values</c>

00:11:42.949 --> 00:11:42.959 align:start position:0%
frame buffer, it updates a few values
 

00:11:42.959 --> 00:11:44.389 align:start position:0%
frame buffer, it updates a few values
that<00:11:43.279><c> may</c><00:11:43.440><c> be</c><00:11:43.600><c> used</c><00:11:43.839><c> in</c><00:11:44.079><c> further</c>

00:11:44.389 --> 00:11:44.399 align:start position:0%
that may be used in further
 

00:11:44.399 --> 00:11:46.550 align:start position:0%
that may be used in further
calculations.<00:11:45.279><c> If</c><00:11:45.519><c> the</c><00:11:45.680><c> rendering</c><00:11:46.079><c> routine</c>

00:11:46.550 --> 00:11:46.560 align:start position:0%
calculations. If the rendering routine
 

00:11:46.560 --> 00:11:48.870 align:start position:0%
calculations. If the rendering routine
isn't<00:11:46.959><c> perfectly</c><00:11:47.360><c> in</c><00:11:47.680><c> sync,</c><00:11:48.160><c> the</c><00:11:48.399><c> processor</c>

00:11:48.870 --> 00:11:48.880 align:start position:0%
isn't perfectly in sync, the processor
 

00:11:48.880 --> 00:11:51.030 align:start position:0%
isn't perfectly in sync, the processor
falls<00:11:49.200><c> out</c><00:11:49.360><c> of</c><00:11:49.519><c> sync,</c><00:11:49.839><c> too.</c><00:11:50.399><c> This</c><00:11:50.560><c> offset</c>

00:11:51.030 --> 00:11:51.040 align:start position:0%
falls out of sync, too. This offset
 

00:11:51.040 --> 00:11:52.550 align:start position:0%
falls out of sync, too. This offset
would<00:11:51.200><c> then</c><00:11:51.440><c> accumulate</c><00:11:51.920><c> over</c><00:11:52.240><c> time,</c>

00:11:52.550 --> 00:11:52.560 align:start position:0%
would then accumulate over time,
 

00:11:52.560 --> 00:11:54.310 align:start position:0%
would then accumulate over time,
eventually<00:11:53.040><c> driving</c><00:11:53.360><c> the</c><00:11:53.519><c> emulator</c><00:11:54.079><c> off</c>

00:11:54.310 --> 00:11:54.320 align:start position:0%
eventually driving the emulator off
 

00:11:54.320 --> 00:11:56.470 align:start position:0%
eventually driving the emulator off
course.<00:11:55.040><c> At</c><00:11:55.200><c> first,</c><00:11:55.440><c> I</c><00:11:55.600><c> assumed</c><00:11:55.920><c> that</c><00:11:56.160><c> it</c><00:11:56.320><c> must</c>

00:11:56.470 --> 00:11:56.480 align:start position:0%
course. At first, I assumed that it must
 

00:11:56.480 --> 00:11:58.550 align:start position:0%
course. At first, I assumed that it must
have<00:11:56.720><c> been</c><00:11:56.880><c> some</c><00:11:57.040><c> silly</c><00:11:57.360><c> typo,</c><00:11:57.920><c> like</c><00:11:58.079><c> a</c><00:11:58.240><c> plus</c>

00:11:58.550 --> 00:11:58.560 align:start position:0%
have been some silly typo, like a plus
 

00:11:58.560 --> 00:12:00.389 align:start position:0%
have been some silly typo, like a plus
three<00:11:58.720><c> to</c><00:11:58.959><c> the</c><00:11:59.040><c> cycle</c><00:11:59.360><c> count</c><00:11:59.600><c> instead</c><00:11:59.920><c> of</c><00:12:00.079><c> plus</c>

00:12:00.389 --> 00:12:00.399 align:start position:0%
three to the cycle count instead of plus
 

00:12:00.399 --> 00:12:02.630 align:start position:0%
three to the cycle count instead of plus
two<00:12:00.560><c> by</c><00:12:00.800><c> sheer</c><00:12:01.120><c> accident.</c><00:12:01.760><c> But</c><00:12:02.000><c> either</c><00:12:02.320><c> way,</c>

00:12:02.630 --> 00:12:02.640 align:start position:0%
two by sheer accident. But either way,
 

00:12:02.640 --> 00:12:04.550 align:start position:0%
two by sheer accident. But either way,
seeing<00:12:02.880><c> as</c><00:12:03.040><c> how</c><00:12:03.200><c> the</c><00:12:03.279><c> emulator</c><00:12:03.760><c> worked</c><00:12:04.160><c> fine</c>

00:12:04.550 --> 00:12:04.560 align:start position:0%
seeing as how the emulator worked fine
 

00:12:04.560 --> 00:12:06.949 align:start position:0%
seeing as how the emulator worked fine
otherwise,<00:12:05.440><c> surely</c><00:12:05.920><c> it</c><00:12:06.240><c> couldn't</c><00:12:06.639><c> have</c><00:12:06.800><c> been</c>

00:12:06.949 --> 00:12:06.959 align:start position:0%
otherwise, surely it couldn't have been
 

00:12:06.959 --> 00:12:09.870 align:start position:0%
otherwise, surely it couldn't have been
a<00:12:07.279><c> fundamental</c><00:12:08.079><c> flaw,</c>

00:12:09.870 --> 00:12:09.880 align:start position:0%
a fundamental flaw,
 

00:12:09.880 --> 00:12:12.389 align:start position:0%
a fundamental flaw,
right?<00:12:10.880><c> When</c><00:12:11.040><c> I</c><00:12:11.279><c> wrote</c><00:12:11.519><c> the</c><00:12:11.760><c> functions</c><00:12:12.160><c> that</c>

00:12:12.389 --> 00:12:12.399 align:start position:0%
right? When I wrote the functions that
 

00:12:12.399 --> 00:12:14.790 align:start position:0%
right? When I wrote the functions that
would<00:12:12.560><c> mask</c><00:12:12.880><c> all</c><00:12:13.120><c> the</c><00:12:13.360><c> 32-bit</c><00:12:14.079><c> integers</c><00:12:14.560><c> down</c>

00:12:14.790 --> 00:12:14.800 align:start position:0%
would mask all the 32-bit integers down
 

00:12:14.800 --> 00:12:17.670 align:start position:0%
would mask all the 32-bit integers down
to<00:12:15.120><c> 8</c><00:12:15.360><c> or</c><00:12:15.839><c> 16</c><00:12:16.240><c> bits,</c><00:12:16.720><c> I</c><00:12:16.880><c> had</c><00:12:17.040><c> to</c><00:12:17.200><c> skim</c><00:12:17.440><c> through</c>

00:12:17.670 --> 00:12:17.680 align:start position:0%
to 8 or 16 bits, I had to skim through
 

00:12:17.680 --> 00:12:19.829 align:start position:0%
to 8 or 16 bits, I had to skim through
the<00:12:17.839><c> code</c><00:12:18.079><c> to</c><00:12:18.240><c> add</c><00:12:18.480><c> these</c><00:12:18.720><c> functions</c><00:12:19.120><c> to</c><00:12:19.440><c> each</c>

00:12:19.829 --> 00:12:19.839 align:start position:0%
the code to add these functions to each
 

00:12:19.839 --> 00:12:22.150 align:start position:0%
the code to add these functions to each
assignment<00:12:20.399><c> operation.</c><00:12:21.200><c> An</c><00:12:21.440><c> assignment</c><00:12:21.920><c> like</c>

00:12:22.150 --> 00:12:22.160 align:start position:0%
assignment operation. An assignment like
 

00:12:22.160 --> 00:12:25.110 align:start position:0%
assignment operation. An assignment like
this<00:12:22.720><c> would</c><00:12:22.959><c> become</c><00:12:23.360><c> this.</c><00:12:24.160><c> An</c><00:12:24.399><c> addition</c><00:12:24.800><c> like</c>

00:12:25.110 --> 00:12:25.120 align:start position:0%
this would become this. An addition like
 

00:12:25.120 --> 00:12:28.230 align:start position:0%
this would become this. An addition like
this<00:12:25.839><c> would</c><00:12:26.160><c> become</c><00:12:26.560><c> this.</c><00:12:27.600><c> And</c><00:12:27.920><c> most</c>

00:12:28.230 --> 00:12:28.240 align:start position:0%
this would become this. And most
 

00:12:28.240 --> 00:12:30.389 align:start position:0%
this would become this. And most
importantly,<00:12:29.040><c> increment</c><00:12:29.600><c> and</c><00:12:29.839><c> decrement</c>

00:12:30.389 --> 00:12:30.399 align:start position:0%
importantly, increment and decrement
 

00:12:30.399 --> 00:12:32.790 align:start position:0%
importantly, increment and decrement
operations<00:12:30.959><c> such</c><00:12:31.200><c> as</c><00:12:31.440><c> these</c><00:12:31.760><c> ones</c><00:12:32.240><c> would</c><00:12:32.560><c> end</c>

00:12:32.790 --> 00:12:32.800 align:start position:0%
operations such as these ones would end
 

00:12:32.800 --> 00:12:35.269 align:start position:0%
operations such as these ones would end
up<00:12:33.040><c> looking</c><00:12:33.360><c> like</c><00:12:33.800><c> these.</c><00:12:34.800><c> Here's</c><00:12:35.120><c> some</c>

00:12:35.269 --> 00:12:35.279 align:start position:0%
up looking like these. Here's some
 

00:12:35.279 --> 00:12:36.629 align:start position:0%
up looking like these. Here's some
homework<00:12:35.600><c> for</c><00:12:35.839><c> those</c><00:12:36.000><c> of</c><00:12:36.079><c> you</c><00:12:36.160><c> who</c><00:12:36.399><c> write</c>

00:12:36.629 --> 00:12:36.639 align:start position:0%
homework for those of you who write
 

00:12:36.639 --> 00:12:38.310 align:start position:0%
homework for those of you who write
code.<00:12:37.279><c> What's</c><00:12:37.519><c> the</c><00:12:37.760><c> difference</c><00:12:38.000><c> between</c>

00:12:38.310 --> 00:12:38.320 align:start position:0%
code. What's the difference between
 

00:12:38.320 --> 00:12:40.710 align:start position:0%
code. What's the difference between
these<00:12:38.639><c> two</c><00:12:38.920><c> operations?</c><00:12:39.920><c> Got</c><00:12:40.160><c> your</c><00:12:40.399><c> answers</c>

00:12:40.710 --> 00:12:40.720 align:start position:0%
these two operations? Got your answers
 

00:12:40.720 --> 00:12:43.030 align:start position:0%
these two operations? Got your answers
ready?<00:12:41.200><c> Okay,</c><00:12:41.600><c> so</c><00:12:41.920><c> unless</c><00:12:42.320><c> you've</c><00:12:42.560><c> only</c><00:12:42.800><c> ever</c>

00:12:43.030 --> 00:12:43.040 align:start position:0%
ready? Okay, so unless you've only ever
 

00:12:43.040 --> 00:12:45.269 align:start position:0%
ready? Okay, so unless you've only ever
written<00:12:43.360><c> Python,</c><00:12:44.079><c> you</c><00:12:44.240><c> might</c><00:12:44.480><c> know</c><00:12:44.720><c> that</c><00:12:44.959><c> this</c>

00:12:45.269 --> 00:12:45.279 align:start position:0%
written Python, you might know that this
 

00:12:45.279 --> 00:12:47.750 align:start position:0%
written Python, you might know that this
is<00:12:45.440><c> called</c><00:12:45.680><c> the</c><00:12:46.000><c> post</c><00:12:46.320><c> increment</c><00:12:46.880><c> operator.</c>

00:12:47.750 --> 00:12:47.760 align:start position:0%
is called the post increment operator.
 

00:12:47.760 --> 00:12:49.670 align:start position:0%
is called the post increment operator.
The<00:12:48.000><c> one</c><00:12:48.240><c> major</c><00:12:48.639><c> difference</c><00:12:48.959><c> that</c><00:12:49.279><c> sets</c><00:12:49.519><c> it</c>

00:12:49.670 --> 00:12:49.680 align:start position:0%
The one major difference that sets it
 

00:12:49.680 --> 00:12:51.990 align:start position:0%
The one major difference that sets it
apart<00:12:50.000><c> from</c><00:12:50.240><c> similar</c><00:12:50.639><c> operations</c><00:12:51.279><c> is</c><00:12:51.519><c> that</c><00:12:51.760><c> it</c>

00:12:51.990 --> 00:12:52.000 align:start position:0%
apart from similar operations is that it
 

00:12:52.000 --> 00:12:54.230 align:start position:0%
apart from similar operations is that it
only<00:12:52.399><c> increments</c><00:12:52.880><c> the</c><00:12:53.120><c> variable</c><00:12:53.680><c> after</c>

00:12:54.230 --> 00:12:54.240 align:start position:0%
only increments the variable after
 

00:12:54.240 --> 00:12:57.590 align:start position:0%
only increments the variable after
returning<00:12:54.720><c> it.</c><00:12:55.279><c> So</c><00:12:55.760><c> say</c><00:12:56.000><c> x</c><00:12:56.320><c> is</c><00:12:56.560><c> equal</c><00:12:56.880><c> to</c><00:12:57.040><c> 2.</c>

00:12:57.590 --> 00:12:57.600 align:start position:0%
returning it. So say x is equal to 2.
 

00:12:57.600 --> 00:12:59.670 align:start position:0%
returning it. So say x is equal to 2.
After<00:12:57.839><c> a</c><00:12:58.000><c> post</c><00:12:58.320><c> increment,</c><00:12:58.800><c> its</c><00:12:59.120><c> value</c><00:12:59.440><c> will</c>

00:12:59.670 --> 00:12:59.680 align:start position:0%
After a post increment, its value will
 

00:12:59.680 --> 00:13:02.790 align:start position:0%
After a post increment, its value will
be<00:12:59.920><c> three.</c><00:13:00.880><c> But</c><00:13:01.120><c> here's</c><00:13:01.519><c> the</c><00:13:01.760><c> catch.</c><00:13:02.399><c> If</c><00:13:02.639><c> you</c>

00:13:02.790 --> 00:13:02.800 align:start position:0%
be three. But here's the catch. If you
 

00:13:02.800 --> 00:13:06.389 align:start position:0%
be three. But here's the catch. If you
try<00:13:02.959><c> to</c><00:13:03.200><c> use</c><00:13:03.519><c> the</c><00:13:03.760><c> value</c><00:13:04.000><c> of</c><00:13:04.519><c> x++,</c><00:13:05.519><c> it'll</c><00:13:06.000><c> still</c>

00:13:06.389 --> 00:13:06.399 align:start position:0%
try to use the value of x++, it'll still
 

00:13:06.399 --> 00:13:09.030 align:start position:0%
try to use the value of x++, it'll still
be<00:13:06.720><c> two.</c><00:13:07.440><c> This</c><00:13:07.600><c> is</c><00:13:07.680><c> a</c><00:13:07.920><c> subtle</c><00:13:08.320><c> difference,</c><00:13:08.800><c> and</c>

00:13:09.030 --> 00:13:09.040 align:start position:0%
be two. This is a subtle difference, and
 

00:13:09.040 --> 00:13:11.110 align:start position:0%
be two. This is a subtle difference, and
most<00:13:09.360><c> experienced</c><00:13:09.920><c> programmers</c><00:13:10.560><c> will</c><00:13:10.880><c> keep</c>

00:13:11.110 --> 00:13:11.120 align:start position:0%
most experienced programmers will keep
 

00:13:11.120 --> 00:13:13.030 align:start position:0%
most experienced programmers will keep
this<00:13:11.279><c> in</c><00:13:11.440><c> mind</c><00:13:11.600><c> while</c><00:13:11.920><c> writing</c><00:13:12.240><c> code.</c><00:13:12.800><c> But</c>

00:13:13.030 --> 00:13:13.040 align:start position:0%
this in mind while writing code. But
 

00:13:13.040 --> 00:13:15.670 align:start position:0%
this in mind while writing code. But
here's<00:13:13.360><c> the</c><00:13:13.519><c> thing.</c><00:13:14.000><c> I</c><00:13:14.240><c> wasn't</c><00:13:14.639><c> writing</c><00:13:15.120><c> code,</c>

00:13:15.670 --> 00:13:15.680 align:start position:0%
here's the thing. I wasn't writing code,
 

00:13:15.680 --> 00:13:17.910 align:start position:0%
here's the thing. I wasn't writing code,
I<00:13:15.920><c> was</c><00:13:16.240><c> translating</c><00:13:16.880><c> it.</c><00:13:17.360><c> So</c><00:13:17.680><c> while</c>

00:13:17.910 --> 00:13:17.920 align:start position:0%
I was translating it. So while
 

00:13:17.920 --> 00:13:20.069 align:start position:0%
I was translating it. So while
mindlessly<00:13:18.560><c> wrapping</c><00:13:18.959><c> these</c><00:13:19.279><c> values,</c><00:13:19.760><c> I</c>

00:13:20.069 --> 00:13:20.079 align:start position:0%
mindlessly wrapping these values, I
 

00:13:20.079 --> 00:13:22.310 align:start position:0%
mindlessly wrapping these values, I
accidentally<00:13:20.800><c> swapped</c><00:13:21.279><c> all</c><00:13:21.519><c> post</c><00:13:21.760><c> increment</c>

00:13:22.310 --> 00:13:22.320 align:start position:0%
accidentally swapped all post increment
 

00:13:22.320 --> 00:13:24.790 align:start position:0%
accidentally swapped all post increment
operators<00:13:22.800><c> with</c><00:13:23.040><c> a</c><00:13:23.279><c> regular</c><00:13:23.760><c> increment.</c><00:13:24.560><c> This</c>

00:13:24.790 --> 00:13:24.800 align:start position:0%
operators with a regular increment. This
 

00:13:24.800 --> 00:13:26.870 align:start position:0%
operators with a regular increment. This
meant<00:13:25.040><c> that</c><00:13:25.200><c> I</c><00:13:25.360><c> would</c><00:13:25.519><c> exit</c><00:13:25.920><c> some</c><00:13:26.160><c> loops</c><00:13:26.560><c> one</c>

00:13:26.870 --> 00:13:26.880 align:start position:0%
meant that I would exit some loops one
 

00:13:26.880 --> 00:13:29.030 align:start position:0%
meant that I would exit some loops one
iteration<00:13:27.519><c> early</c><00:13:28.079><c> simply</c><00:13:28.399><c> because</c><00:13:28.560><c> the</c><00:13:28.800><c> value</c>

00:13:29.030 --> 00:13:29.040 align:start position:0%
iteration early simply because the value
 

00:13:29.040 --> 00:13:30.629 align:start position:0%
iteration early simply because the value
would<00:13:29.279><c> get</c><00:13:29.440><c> checked</c><00:13:29.920><c> after</c><00:13:30.240><c> it</c><00:13:30.480><c> was</c>

00:13:30.629 --> 00:13:30.639 align:start position:0%
would get checked after it was
 

00:13:30.639 --> 00:13:33.030 align:start position:0%
would get checked after it was
decremented.<00:13:31.600><c> So</c><00:13:31.839><c> that's</c><00:13:32.160><c> how</c><00:13:32.320><c> I</c><00:13:32.560><c> ended</c><00:13:32.800><c> up</c>

00:13:33.030 --> 00:13:33.040 align:start position:0%
decremented. So that's how I ended up
 

00:13:33.040 --> 00:13:36.470 align:start position:0%
decremented. So that's how I ended up
desynced<00:13:33.680><c> by</c><00:13:33.839><c> a</c><00:13:34.079><c> few</c><00:13:34.240><c> ppu</c><00:13:34.800><c> cycles</c><00:13:35.279><c> each</c><00:13:35.600><c> tick.</c>

00:13:36.470 --> 00:13:36.480 align:start position:0%
desynced by a few ppu cycles each tick.
 

00:13:36.480 --> 00:13:38.389 align:start position:0%
desynced by a few ppu cycles each tick.
I<00:13:36.720><c> also</c><00:13:36.959><c> ran</c><00:13:37.120><c> into</c><00:13:37.440><c> some</c><00:13:37.680><c> similar</c><00:13:38.000><c> bugs</c>

00:13:38.389 --> 00:13:38.399 align:start position:0%
I also ran into some similar bugs
 

00:13:38.399 --> 00:13:40.470 align:start position:0%
I also ran into some similar bugs
related<00:13:38.639><c> to</c><00:13:38.800><c> operator</c><00:13:39.279><c> precedence.</c><00:13:40.079><c> See</c>

00:13:40.470 --> 00:13:40.480 align:start position:0%
related to operator precedence. See
 

00:13:40.480 --> 00:13:42.310 align:start position:0%
related to operator precedence. See
squirrel<00:13:41.040><c> doesn't</c><00:13:41.360><c> have</c><00:13:41.680><c> shorthands</c><00:13:42.160><c> for</c>

00:13:42.310 --> 00:13:42.320 align:start position:0%
squirrel doesn't have shorthands for
 

00:13:42.320 --> 00:13:44.470 align:start position:0%
squirrel doesn't have shorthands for
bitwise<00:13:42.880><c> assignments.</c><00:13:43.600><c> In</c><00:13:43.760><c> other</c><00:13:43.920><c> words,</c><00:13:44.240><c> I</c>

00:13:44.470 --> 00:13:44.480 align:start position:0%
bitwise assignments. In other words, I
 

00:13:44.480 --> 00:13:46.949 align:start position:0%
bitwise assignments. In other words, I
can't<00:13:44.720><c> do</c><00:13:44.880><c> x</c><00:13:45.200><c> and</c><00:13:45.440><c> equal</c><00:13:45.760><c> 8.</c><00:13:46.079><c> For</c><00:13:46.160><c> example,</c><00:13:46.720><c> I</c>

00:13:46.949 --> 00:13:46.959 align:start position:0%
can't do x and equal 8. For example, I
 

00:13:46.959 --> 00:13:49.430 align:start position:0%
can't do x and equal 8. For example, I
have<00:13:47.040><c> to</c><00:13:47.120><c> do</c><00:13:47.360><c> x=</c><00:13:48.079><c> x</c><00:13:48.320><c> and</c><00:13:48.560><c> 8,</c><00:13:48.880><c> which</c><00:13:49.120><c> in</c><00:13:49.279><c> this</c>

00:13:49.430 --> 00:13:49.440 align:start position:0%
have to do x= x and 8, which in this
 

00:13:49.440 --> 00:13:51.590 align:start position:0%
have to do x= x and 8, which in this
case<00:13:49.680><c> is</c><00:13:49.920><c> still</c><00:13:50.320><c> identical.</c><00:13:51.040><c> But</c><00:13:51.200><c> if</c><00:13:51.440><c> the</c>

00:13:51.590 --> 00:13:51.600 align:start position:0%
case is still identical. But if the
 

00:13:51.600 --> 00:13:53.910 align:start position:0%
case is still identical. But if the
expression<00:13:52.079><c> was</c><00:13:52.399><c> more</c><00:13:52.800><c> complicated,</c><00:13:53.680><c> just</c>

00:13:53.910 --> 00:13:53.920 align:start position:0%
expression was more complicated, just
 

00:13:53.920 --> 00:13:56.710 align:start position:0%
expression was more complicated, just
transforming<00:13:54.560><c> it</c><00:13:54.720><c> to</c><00:13:54.959><c> this</c><00:13:55.519><c> is</c><00:13:55.839><c> no</c><00:13:56.079><c> longer</c>

00:13:56.710 --> 00:13:56.720 align:start position:0%
transforming it to this is no longer
 

00:13:56.720 --> 00:13:59.990 align:start position:0%
transforming it to this is no longer
identical<00:13:57.360><c> as</c><00:13:57.680><c> X</c><00:13:58.079><c> and</c><00:13:58.320><c> Y</c><00:13:58.800><c> bind</c><00:13:59.279><c> tighter</c><00:13:59.760><c> than</c>

00:13:59.990 --> 00:14:00.000 align:start position:0%
identical as X and Y bind tighter than
 

00:14:00.000 --> 00:14:03.269 align:start position:0%
identical as X and Y bind tighter than
YX<00:14:00.560><c> or</c><00:14:00.880><c> 12.</c><00:14:01.760><c> Anyway,</c><00:14:02.320><c> with</c><00:14:02.560><c> all</c><00:14:02.800><c> that</c><00:14:02.959><c> out</c><00:14:03.199><c> of</c>

00:14:03.269 --> 00:14:03.279 align:start position:0%
YX or 12. Anyway, with all that out of
 

00:14:03.279 --> 00:14:05.269 align:start position:0%
YX or 12. Anyway, with all that out of
the<00:14:03.360><c> way,</c><00:14:03.600><c> the</c><00:14:03.839><c> emulator</c><00:14:04.399><c> starts</c><00:14:04.800><c> rendering</c>

00:14:05.269 --> 00:14:05.279 align:start position:0%
the way, the emulator starts rendering
 

00:14:05.279 --> 00:14:07.910 align:start position:0%
the way, the emulator starts rendering
its<00:14:05.600><c> first</c><00:14:06.000><c> recognizable</c><00:14:06.720><c> frame.</c><00:14:07.440><c> Well,</c>

00:14:07.910 --> 00:14:07.920 align:start position:0%
its first recognizable frame. Well,
 

00:14:07.920 --> 00:14:09.910 align:start position:0%
its first recognizable frame. Well,
recognizable<00:14:08.639><c> is</c><00:14:08.880><c> about</c><00:14:09.040><c> as</c><00:14:09.199><c> far</c><00:14:09.279><c> as</c><00:14:09.440><c> it</c><00:14:09.600><c> goes</c>

00:14:09.910 --> 00:14:09.920 align:start position:0%
recognizable is about as far as it goes
 

00:14:09.920 --> 00:14:11.350 align:start position:0%
recognizable is about as far as it goes
currently.<00:14:10.399><c> It</c><00:14:10.560><c> might</c><00:14:10.720><c> be</c><00:14:10.880><c> hard</c><00:14:11.040><c> to</c><00:14:11.120><c> tell</c>

00:14:11.350 --> 00:14:11.360 align:start position:0%
currently. It might be hard to tell
 

00:14:11.360 --> 00:14:13.030 align:start position:0%
currently. It might be hard to tell
what's<00:14:11.680><c> going</c><00:14:11.760><c> on</c><00:14:12.000><c> for</c><00:14:12.160><c> the</c><00:14:12.320><c> lowresolution</c>

00:14:13.030 --> 00:14:13.040 align:start position:0%
what's going on for the lowresolution
 

00:14:13.040 --> 00:14:14.870 align:start position:0%
what's going on for the lowresolution
in-game<00:14:13.440><c> display.</c><00:14:13.920><c> So,</c><00:14:14.160><c> here's</c><00:14:14.399><c> a</c><00:14:14.639><c> direct</c>

00:14:14.870 --> 00:14:14.880 align:start position:0%
in-game display. So, here's a direct
 

00:14:14.880 --> 00:14:17.030 align:start position:0%
in-game display. So, here's a direct
dump<00:14:15.199><c> of</c><00:14:15.279><c> the</c><00:14:15.440><c> frame</c><00:14:15.680><c> buffer.</c><00:14:16.320><c> The</c><00:14:16.560><c> sprites</c>

00:14:17.030 --> 00:14:17.040 align:start position:0%
dump of the frame buffer. The sprites
 

00:14:17.040 --> 00:14:20.470 align:start position:0%
dump of the frame buffer. The sprites
are<00:14:17.279><c> all</c><00:14:17.519><c> there,</c><00:14:18.240><c> but</c><00:14:18.639><c> the</c><00:14:18.959><c> colors</c><00:14:19.360><c> are</c><00:14:19.760><c> off.</c>

00:14:20.470 --> 00:14:20.480 align:start position:0%
are all there, but the colors are off.
 

00:14:20.480 --> 00:14:22.389 align:start position:0%
are all there, but the colors are off.
Mario<00:14:20.959><c> seems</c><00:14:21.199><c> to</c><00:14:21.279><c> be</c><00:14:21.440><c> looking</c><00:14:21.680><c> fine,</c><00:14:22.079><c> but</c>

00:14:22.389 --> 00:14:22.399 align:start position:0%
Mario seems to be looking fine, but
 

00:14:22.399 --> 00:14:25.590 align:start position:0%
Mario seems to be looking fine, but
everything<00:14:22.800><c> else</c><00:14:23.199><c> looks</c><00:14:24.000><c> green</c><00:14:24.800><c> or</c><00:14:25.199><c> maybe</c>

00:14:25.590 --> 00:14:25.600 align:start position:0%
everything else looks green or maybe
 

00:14:25.600 --> 00:14:27.910 align:start position:0%
everything else looks green or maybe
blue.<00:14:26.399><c> And</c><00:14:26.720><c> actually,</c><00:14:27.279><c> that</c><00:14:27.519><c> would</c><00:14:27.600><c> be</c><00:14:27.760><c> a</c>

00:14:27.910 --> 00:14:27.920 align:start position:0%
blue. And actually, that would be a
 

00:14:27.920 --> 00:14:29.430 align:start position:0%
blue. And actually, that would be a
pretty<00:14:28.079><c> good</c><00:14:28.240><c> guess</c><00:14:28.480><c> at</c><00:14:28.800><c> what's</c><00:14:29.120><c> really</c>

00:14:29.430 --> 00:14:29.440 align:start position:0%
pretty good guess at what's really
 

00:14:29.440 --> 00:14:31.430 align:start position:0%
pretty good guess at what's really
happening.<00:14:30.079><c> Since</c><00:14:30.399><c> Mario</c><00:14:30.720><c> is</c><00:14:30.959><c> fine,</c><00:14:31.279><c> the</c>

00:14:31.430 --> 00:14:31.440 align:start position:0%
happening. Since Mario is fine, the
 

00:14:31.440 --> 00:14:33.269 align:start position:0%
happening. Since Mario is fine, the
issue<00:14:31.680><c> is</c><00:14:31.839><c> likely</c><00:14:32.160><c> isolated</c><00:14:32.639><c> to</c><00:14:32.880><c> just</c><00:14:33.040><c> the</c>

00:14:33.269 --> 00:14:33.279 align:start position:0%
issue is likely isolated to just the
 

00:14:33.279 --> 00:14:35.030 align:start position:0%
issue is likely isolated to just the
background<00:14:33.680><c> sprites.</c><00:14:34.240><c> And</c><00:14:34.399><c> since</c><00:14:34.639><c> everything</c>

00:14:35.030 --> 00:14:35.040 align:start position:0%
background sprites. And since everything
 

00:14:35.040 --> 00:14:37.350 align:start position:0%
background sprites. And since everything
seems<00:14:35.279><c> to</c><00:14:35.360><c> be</c><00:14:35.519><c> tinted</c><00:14:35.920><c> green</c><00:14:36.240><c> or</c><00:14:36.560><c> blue,</c><00:14:37.040><c> we</c><00:14:37.279><c> can</c>

00:14:37.350 --> 00:14:37.360 align:start position:0%
seems to be tinted green or blue, we can
 

00:14:37.360 --> 00:14:39.269 align:start position:0%
seems to be tinted green or blue, we can
start<00:14:37.600><c> to</c><00:14:37.760><c> suspect</c><00:14:38.160><c> that</c><00:14:38.399><c> the</c><00:14:38.560><c> background</c><00:14:39.040><c> is</c>

00:14:39.269 --> 00:14:39.279 align:start position:0%
start to suspect that the background is
 

00:14:39.279 --> 00:14:41.110 align:start position:0%
start to suspect that the background is
just<00:14:39.519><c> missing</c><00:14:39.839><c> the</c><00:14:40.079><c> red</c><00:14:40.399><c> color</c><00:14:40.639><c> channel</c>

00:14:41.110 --> 00:14:41.120 align:start position:0%
just missing the red color channel
 

00:14:41.120 --> 00:14:43.269 align:start position:0%
just missing the red color channel
entirely.<00:14:42.000><c> If</c><00:14:42.160><c> we</c><00:14:42.320><c> grab</c><00:14:42.480><c> the</c><00:14:42.639><c> hex</c><00:14:42.959><c> color</c>

00:14:43.269 --> 00:14:43.279 align:start position:0%
entirely. If we grab the hex color
 

00:14:43.279 --> 00:14:45.110 align:start position:0%
entirely. If we grab the hex color
values<00:14:43.600><c> for</c><00:14:43.760><c> the</c><00:14:43.920><c> title</c><00:14:44.240><c> box</c><00:14:44.560><c> and</c><00:14:44.800><c> compare</c>

00:14:45.110 --> 00:14:45.120 align:start position:0%
values for the title box and compare
 

00:14:45.120 --> 00:14:47.310 align:start position:0%
values for the title box and compare
them<00:14:45.279><c> to</c><00:14:45.519><c> the</c><00:14:45.680><c> original</c><00:14:46.000><c> emulator,</c><00:14:46.639><c> we</c><00:14:46.880><c> see</c>

00:14:47.310 --> 00:14:47.320 align:start position:0%
them to the original emulator, we see
 

00:14:47.320 --> 00:14:51.430 align:start position:0%
them to the original emulator, we see
that<00:14:48.320><c> nope,</c><00:14:49.120><c> never</c><00:14:49.360><c> mind.</c><00:14:50.079><c> It's</c><00:14:50.480><c> close,</c><00:14:50.959><c> but</c>

00:14:51.430 --> 00:14:51.440 align:start position:0%
that nope, never mind. It's close, but
 

00:14:51.440 --> 00:14:53.590 align:start position:0%
that nope, never mind. It's close, but
not<00:14:51.760><c> quite.</c><00:14:52.320><c> I</c><00:14:52.639><c> really</c><00:14:52.800><c> thought</c><00:14:52.959><c> I</c><00:14:53.120><c> was</c><00:14:53.279><c> on</c><00:14:53.440><c> to</c>

00:14:53.590 --> 00:14:53.600 align:start position:0%
not quite. I really thought I was on to
 

00:14:53.600 --> 00:14:55.750 align:start position:0%
not quite. I really thought I was on to
something.<00:14:54.240><c> Once</c><00:14:54.480><c> again,</c><00:14:54.720><c> to</c><00:14:54.959><c> debug</c><00:14:55.360><c> this,</c><00:14:55.600><c> I</c>

00:14:55.750 --> 00:14:55.760 align:start position:0%
something. Once again, to debug this, I
 

00:14:55.760 --> 00:14:57.590 align:start position:0%
something. Once again, to debug this, I
had<00:14:56.000><c> both</c><00:14:56.240><c> emulators</c><00:14:56.800><c> spit</c><00:14:57.040><c> out</c><00:14:57.199><c> a</c><00:14:57.360><c> bunch</c><00:14:57.440><c> of</c>

00:14:57.590 --> 00:14:57.600 align:start position:0%
had both emulators spit out a bunch of
 

00:14:57.600 --> 00:14:59.350 align:start position:0%
had both emulators spit out a bunch of
debug<00:14:58.000><c> information.</c><00:14:58.639><c> This</c><00:14:58.880><c> time</c><00:14:59.040><c> from</c><00:14:59.199><c> the</c>

00:14:59.350 --> 00:14:59.360 align:start position:0%
debug information. This time from the
 

00:14:59.360 --> 00:15:00.949 align:start position:0%
debug information. This time from the
background<00:14:59.760><c> rendering</c><00:15:00.160><c> procedure</c><00:15:00.560><c> of</c><00:15:00.800><c> the</c>

00:15:00.949 --> 00:15:00.959 align:start position:0%
background rendering procedure of the
 

00:15:00.959 --> 00:15:03.110 align:start position:0%
background rendering procedure of the
PPU<00:15:01.519><c> and</c><00:15:01.760><c> diff</c><00:15:02.079><c> it</c><00:15:02.160><c> all</c><00:15:02.320><c> to</c><00:15:02.560><c> isolate</c><00:15:02.959><c> the</c>

00:15:03.110 --> 00:15:03.120 align:start position:0%
PPU and diff it all to isolate the
 

00:15:03.120 --> 00:15:05.509 align:start position:0%
PPU and diff it all to isolate the
issue.<00:15:03.600><c> It</c><00:15:03.839><c> turns</c><00:15:04.079><c> out</c><00:15:04.320><c> there</c><00:15:04.639><c> was</c><00:15:04.880><c> exactly</c>

00:15:05.509 --> 00:15:05.519 align:start position:0%
issue. It turns out there was exactly
 

00:15:05.519 --> 00:15:07.430 align:start position:0%
issue. It turns out there was exactly
one<00:15:05.839><c> variable</c><00:15:06.240><c> in</c><00:15:06.480><c> the</c><00:15:06.639><c> smallestness</c><00:15:07.120><c> source</c>

00:15:07.430 --> 00:15:07.440 align:start position:0%
one variable in the smallestness source
 

00:15:07.440 --> 00:15:10.550 align:start position:0%
one variable in the smallestness source
code<00:15:07.760><c> that</c><00:15:08.079><c> wasn't</c><00:15:08.399><c> an</c><00:15:08.720><c> 8</c><00:15:08.959><c> or</c><00:15:09.279><c> 16</c><00:15:09.760><c> bit</c><00:15:10.000><c> unsigned</c>

00:15:10.550 --> 00:15:10.560 align:start position:0%
code that wasn't an 8 or 16 bit unsigned
 

00:15:10.560 --> 00:15:12.870 align:start position:0%
code that wasn't an 8 or 16 bit unsigned
integer,<00:15:11.040><c> but</c><00:15:11.279><c> rather</c><00:15:11.519><c> a</c><00:15:11.760><c> good</c><00:15:12.000><c> old</c><00:15:12.240><c> classic</c>

00:15:12.870 --> 00:15:12.880 align:start position:0%
integer, but rather a good old classic
 

00:15:12.880 --> 00:15:15.829 align:start position:0%
integer, but rather a good old classic
32-bit<00:15:13.680><c> signed</c><00:15:14.000><c> int.</c><00:15:14.560><c> I</c><00:15:14.800><c> was</c><00:15:14.959><c> unnecessarily</c>

00:15:15.829 --> 00:15:15.839 align:start position:0%
32-bit signed int. I was unnecessarily
 

00:15:15.839 --> 00:15:17.990 align:start position:0%
32-bit signed int. I was unnecessarily
masking<00:15:16.240><c> it</c><00:15:16.399><c> to</c><00:15:16.560><c> 16</c><00:15:16.959><c> bits.</c><00:15:17.440><c> And</c><00:15:17.680><c> after</c>

00:15:17.990 --> 00:15:18.000 align:start position:0%
masking it to 16 bits. And after
 

00:15:18.000 --> 00:15:20.470 align:start position:0%
masking it to 16 bits. And after
changing<00:15:18.320><c> that</c><00:15:18.639><c> one</c><00:15:18.959><c> line</c><00:15:19.199><c> of</c><00:15:19.360><c> code,</c><00:15:20.000><c> I</c><00:15:20.240><c> had</c>

00:15:20.470 --> 00:15:20.480 align:start position:0%
changing that one line of code, I had
 

00:15:20.480 --> 00:15:22.949 align:start position:0%
changing that one line of code, I had
finally<00:15:20.880><c> achieved</c><00:15:21.600><c> full</c><00:15:22.000><c> parody</c><00:15:22.480><c> with</c><00:15:22.639><c> the</c>

00:15:22.949 --> 00:15:22.959 align:start position:0%
finally achieved full parody with the
 

00:15:22.959 --> 00:15:25.350 align:start position:0%
finally achieved full parody with the
smallness<00:15:23.639><c> emulator.</c><00:15:24.639><c> All</c><00:15:24.639><c> right,</c><00:15:25.040><c> let's</c>

00:15:25.350 --> 00:15:25.360 align:start position:0%
smallness emulator. All right, let's
 

00:15:25.360 --> 00:15:26.870 align:start position:0%
smallness emulator. All right, let's
take<00:15:25.519><c> a</c><00:15:25.680><c> step</c><00:15:25.839><c> back</c><00:15:26.000><c> for</c><00:15:26.160><c> a</c><00:15:26.320><c> bit</c><00:15:26.399><c> and</c><00:15:26.639><c> look</c><00:15:26.800><c> at</c>

00:15:26.870 --> 00:15:26.880 align:start position:0%
take a step back for a bit and look at
 

00:15:26.880 --> 00:15:28.949 align:start position:0%
take a step back for a bit and look at
the<00:15:27.040><c> Portal</c><00:15:27.440><c> 2</c><00:15:27.680><c> side</c><00:15:27.920><c> of</c><00:15:28.079><c> things.</c><00:15:28.560><c> Other</c><00:15:28.800><c> than</c>

00:15:28.949 --> 00:15:28.959 align:start position:0%
the Portal 2 side of things. Other than
 

00:15:28.959 --> 00:15:31.189 align:start position:0%
the Portal 2 side of things. Other than
porting<00:15:29.279><c> an</c><00:15:29.440><c> emulator</c><00:15:29.839><c> from</c><00:15:30.079><c> C</c><00:15:30.399><c> to</c><00:15:30.560><c> Squirrel,</c>

00:15:31.189 --> 00:15:31.199 align:start position:0%
porting an emulator from C to Squirrel,
 

00:15:31.199 --> 00:15:33.110 align:start position:0%
porting an emulator from C to Squirrel,
what<00:15:31.440><c> do</c><00:15:31.600><c> you</c><00:15:31.760><c> have</c><00:15:31.920><c> to</c><00:15:32.079><c> do</c><00:15:32.320><c> to</c><00:15:32.639><c> make</c><00:15:32.800><c> it</c>

00:15:33.110 --> 00:15:33.120 align:start position:0%
what do you have to do to make it
 

00:15:33.120 --> 00:15:35.829 align:start position:0%
what do you have to do to make it
actually<00:15:33.600><c> show</c><00:15:33.839><c> up</c><00:15:34.240><c> in</c><00:15:34.560><c> game?</c><00:15:35.279><c> The</c><00:15:35.519><c> obvious</c>

00:15:35.829 --> 00:15:35.839 align:start position:0%
actually show up in game? The obvious
 

00:15:35.839 --> 00:15:38.150 align:start position:0%
actually show up in game? The obvious
first<00:15:36.160><c> concern</c><00:15:36.560><c> is</c><00:15:36.800><c> the</c><00:15:37.040><c> display.</c><00:15:37.680><c> With</c><00:15:37.920><c> just</c>

00:15:38.150 --> 00:15:38.160 align:start position:0%
first concern is the display. With just
 

00:15:38.160 --> 00:15:40.230 align:start position:0%
first concern is the display. With just
Squirrel<00:15:38.560><c> alone,</c><00:15:39.040><c> we</c><00:15:39.279><c> can't</c><00:15:39.519><c> create</c><00:15:39.680><c> a</c><00:15:39.920><c> custom</c>

00:15:40.230 --> 00:15:40.240 align:start position:0%
Squirrel alone, we can't create a custom
 

00:15:40.240 --> 00:15:42.150 align:start position:0%
Squirrel alone, we can't create a custom
screen<00:15:40.560><c> with</c><00:15:40.800><c> our</c><00:15:40.959><c> own</c><00:15:41.120><c> frame</c><00:15:41.440><c> buffer.</c><00:15:41.920><c> This</c>

00:15:42.150 --> 00:15:42.160 align:start position:0%
screen with our own frame buffer. This
 

00:15:42.160 --> 00:15:44.230 align:start position:0%
screen with our own frame buffer. This
is<00:15:42.240><c> a</c><00:15:42.480><c> scripting</c><00:15:42.880><c> language</c><00:15:43.279><c> after</c><00:15:43.519><c> all,</c><00:15:43.839><c> so</c><00:15:44.000><c> I</c>

00:15:44.230 --> 00:15:44.240 align:start position:0%
is a scripting language after all, so I
 

00:15:44.240 --> 00:15:45.910 align:start position:0%
is a scripting language after all, so I
can<00:15:44.399><c> only</c><00:15:44.560><c> really</c><00:15:44.880><c> use</c><00:15:45.040><c> it</c><00:15:45.199><c> to</c><00:15:45.440><c> script</c><00:15:45.760><c> the</c>

00:15:45.910 --> 00:15:45.920 align:start position:0%
can only really use it to script the
 

00:15:45.920 --> 00:15:48.310 align:start position:0%
can only really use it to script the
behavior<00:15:46.320><c> of</c><00:15:46.639><c> in-game</c><00:15:47.120><c> entities.</c><00:15:48.000><c> In</c><00:15:48.160><c> this</c>

00:15:48.310 --> 00:15:48.320 align:start position:0%
behavior of in-game entities. In this
 

00:15:48.320 --> 00:15:49.910 align:start position:0%
behavior of in-game entities. In this
case,<00:15:48.560><c> I'm</c><00:15:48.800><c> creating</c><00:15:49.040><c> a</c><00:15:49.279><c> large</c><00:15:49.440><c> grid</c><00:15:49.759><c> of</c>

00:15:49.910 --> 00:15:49.920 align:start position:0%
case, I'm creating a large grid of
 

00:15:49.920 --> 00:15:51.829 align:start position:0%
case, I'm creating a large grid of
self-elilluminated<00:15:50.800><c> cubes</c><00:15:51.199><c> and</c><00:15:51.440><c> updating</c>

00:15:51.829 --> 00:15:51.839 align:start position:0%
self-elilluminated cubes and updating
 

00:15:51.839 --> 00:15:53.590 align:start position:0%
self-elilluminated cubes and updating
their<00:15:52.079><c> color</c><00:15:52.399><c> every</c><00:15:52.639><c> time</c><00:15:52.800><c> that</c><00:15:52.959><c> a</c><00:15:53.199><c> new</c><00:15:53.360><c> frame</c>

00:15:53.590 --> 00:15:53.600 align:start position:0%
their color every time that a new frame
 

00:15:53.600 --> 00:15:56.069 align:start position:0%
their color every time that a new frame
is<00:15:53.759><c> ready.</c><00:15:54.240><c> Because</c><00:15:54.399><c> of</c><00:15:54.560><c> the</c><00:15:54.800><c> 20048</c><00:15:55.680><c> entity</c>

00:15:56.069 --> 00:15:56.079 align:start position:0%
is ready. Because of the 20048 entity
 

00:15:56.079 --> 00:15:58.069 align:start position:0%
is ready. Because of the 20048 entity
limit,<00:15:56.480><c> I</c><00:15:56.720><c> can't</c><00:15:56.959><c> actually</c><00:15:57.360><c> represent</c><00:15:57.839><c> the</c>

00:15:58.069 --> 00:15:58.079 align:start position:0%
limit, I can't actually represent the
 

00:15:58.079 --> 00:16:00.069 align:start position:0%
limit, I can't actually represent the
entire<00:15:58.399><c> NES</c><00:15:58.880><c> screen.</c><00:15:59.440><c> That's</c><00:15:59.680><c> why</c><00:15:59.839><c> the</c>

00:16:00.069 --> 00:16:00.079 align:start position:0%
entire NES screen. That's why the
 

00:16:00.079 --> 00:16:02.710 align:start position:0%
entire NES screen. That's why the
resolution<00:16:00.560><c> is</c><00:16:00.800><c> so</c><00:16:01.199><c> bad.</c><00:16:01.839><c> I'm</c><00:16:02.160><c> only</c><00:16:02.399><c> able</c><00:16:02.560><c> to</c>

00:16:02.710 --> 00:16:02.720 align:start position:0%
resolution is so bad. I'm only able to
 

00:16:02.720 --> 00:16:04.629 align:start position:0%
resolution is so bad. I'm only able to
render<00:16:03.120><c> every</c><00:16:03.440><c> seventh</c><00:16:03.839><c> pixel</c><00:16:04.240><c> without</c>

00:16:04.629 --> 00:16:04.639 align:start position:0%
render every seventh pixel without
 

00:16:04.639 --> 00:16:07.110 align:start position:0%
render every seventh pixel without
crashing<00:16:05.120><c> the</c><00:16:05.360><c> game.</c><00:16:05.920><c> But</c><00:16:06.079><c> the</c><00:16:06.320><c> display</c><00:16:06.800><c> is</c>

00:16:07.110 --> 00:16:07.120 align:start position:0%
crashing the game. But the display is
 

00:16:07.120 --> 00:16:09.030 align:start position:0%
crashing the game. But the display is
only<00:16:07.360><c> half</c><00:16:07.680><c> the</c><00:16:07.920><c> battle.</c><00:16:08.480><c> Running</c><00:16:08.800><c> the</c>

00:16:09.030 --> 00:16:09.040 align:start position:0%
only half the battle. Running the
 

00:16:09.040 --> 00:16:11.269 align:start position:0%
only half the battle. Running the
emulator<00:16:09.519><c> itself</c><00:16:10.000><c> isn't</c><00:16:10.399><c> as</c><00:16:10.720><c> straightforward</c>

00:16:11.269 --> 00:16:11.279 align:start position:0%
emulator itself isn't as straightforward
 

00:16:11.279 --> 00:16:13.350 align:start position:0%
emulator itself isn't as straightforward
as<00:16:11.440><c> you</c><00:16:11.680><c> think.</c><00:16:12.000><c> When</c><00:16:12.240><c> running</c><00:16:12.480><c> a</c><00:16:12.720><c> script,</c><00:16:13.120><c> the</c>

00:16:13.350 --> 00:16:13.360 align:start position:0%
as you think. When running a script, the
 

00:16:13.360 --> 00:16:15.590 align:start position:0%
as you think. When running a script, the
whole<00:16:13.680><c> engine</c><00:16:14.240><c> pauses</c><00:16:14.800><c> to</c><00:16:15.040><c> wait</c><00:16:15.279><c> for</c><00:16:15.440><c> that</c>

00:16:15.590 --> 00:16:15.600 align:start position:0%
whole engine pauses to wait for that
 

00:16:15.600 --> 00:16:17.829 align:start position:0%
whole engine pauses to wait for that
script<00:16:16.000><c> to</c><00:16:16.240><c> finish</c><00:16:16.560><c> executing.</c><00:16:17.360><c> If</c><00:16:17.519><c> we</c><00:16:17.680><c> just</c>

00:16:17.829 --> 00:16:17.839 align:start position:0%
script to finish executing. If we just
 

00:16:17.839 --> 00:16:19.990 align:start position:0%
script to finish executing. If we just
ran<00:16:18.079><c> the</c><00:16:18.320><c> emulator</c><00:16:18.800><c> indefinitely,</c><00:16:19.600><c> we</c><00:16:19.839><c> would</c>

00:16:19.990 --> 00:16:20.000 align:start position:0%
ran the emulator indefinitely, we would
 

00:16:20.000 --> 00:16:22.470 align:start position:0%
ran the emulator indefinitely, we would
lock<00:16:20.320><c> up</c><00:16:20.480><c> the</c><00:16:20.720><c> game.</c><00:16:21.360><c> Valve</c><00:16:21.839><c> foresaw</c>

00:16:22.470 --> 00:16:22.480 align:start position:0%
lock up the game. Valve foresaw
 

00:16:22.480 --> 00:16:23.990 align:start position:0%
lock up the game. Valve foresaw
something<00:16:22.720><c> like</c><00:16:22.959><c> this,</c><00:16:23.279><c> which</c><00:16:23.519><c> is</c><00:16:23.600><c> why</c><00:16:23.759><c> they</c>

00:16:23.990 --> 00:16:24.000 align:start position:0%
something like this, which is why they
 

00:16:24.000 --> 00:16:25.749 align:start position:0%
something like this, which is why they
implemented<00:16:24.560><c> an</c><00:16:24.800><c> exception</c><00:16:25.199><c> which</c><00:16:25.440><c> prevents</c>

00:16:25.749 --> 00:16:25.759 align:start position:0%
implemented an exception which prevents
 

00:16:25.759 --> 00:16:27.509 align:start position:0%
implemented an exception which prevents
any<00:16:26.079><c> script</c><00:16:26.399><c> query</c><00:16:26.720><c> from</c><00:16:26.880><c> running</c><00:16:27.199><c> longer</c>

00:16:27.509 --> 00:16:27.519 align:start position:0%
any script query from running longer
 

00:16:27.519 --> 00:16:30.230 align:start position:0%
any script query from running longer
than<00:16:27.839><c> 30</c><00:16:28.279><c> milliseconds.</c><00:16:29.279><c> Thanks</c><00:16:29.759><c> Valve,</c>

00:16:30.230 --> 00:16:30.240 align:start position:0%
than 30 milliseconds. Thanks Valve,
 

00:16:30.240 --> 00:16:32.069 align:start position:0%
than 30 milliseconds. Thanks Valve,
that's<00:16:30.560><c> great</c><00:16:30.800><c> and</c><00:16:31.040><c> all,</c><00:16:31.279><c> but</c><00:16:31.519><c> this</c><00:16:31.759><c> quickly</c>

00:16:32.069 --> 00:16:32.079 align:start position:0%
that's great and all, but this quickly
 

00:16:32.079 --> 00:16:34.310 align:start position:0%
that's great and all, but this quickly
becomes<00:16:32.399><c> a</c><00:16:32.560><c> pain</c><00:16:32.800><c> to</c><00:16:32.959><c> work</c><00:16:33.199><c> around.</c><00:16:33.920><c> Sure,</c>

00:16:34.310 --> 00:16:34.320 align:start position:0%
becomes a pain to work around. Sure,
 

00:16:34.320 --> 00:16:35.990 align:start position:0%
becomes a pain to work around. Sure,
either<00:16:34.639><c> way,</c><00:16:34.880><c> we'd</c><00:16:35.199><c> have</c><00:16:35.279><c> to</c><00:16:35.440><c> segment</c><00:16:35.839><c> the</c>

00:16:35.990 --> 00:16:36.000 align:start position:0%
either way, we'd have to segment the
 

00:16:36.000 --> 00:16:37.910 align:start position:0%
either way, we'd have to segment the
main<00:16:36.240><c> program</c><00:16:36.560><c> loop</c><00:16:36.880><c> across</c><00:16:37.199><c> multiple</c><00:16:37.680><c> game</c>

00:16:37.910 --> 00:16:37.920 align:start position:0%
main program loop across multiple game
 

00:16:37.920 --> 00:16:39.990 align:start position:0%
main program loop across multiple game
ticks.<00:16:38.480><c> This</c><00:16:38.639><c> way,</c><00:16:38.880><c> we</c><00:16:39.040><c> can</c><00:16:39.199><c> emulate</c><00:16:39.600><c> just</c><00:16:39.759><c> a</c>

00:16:39.990 --> 00:16:40.000 align:start position:0%
ticks. This way, we can emulate just a
 

00:16:40.000 --> 00:16:42.550 align:start position:0%
ticks. This way, we can emulate just a
few<00:16:40.160><c> CPU</c><00:16:40.560><c> cycles</c><00:16:40.880><c> of</c><00:16:41.040><c> the</c><00:16:41.199><c> NES</c><00:16:41.680><c> each</c><00:16:42.000><c> tick</c><00:16:42.320><c> and</c>

00:16:42.550 --> 00:16:42.560 align:start position:0%
few CPU cycles of the NES each tick and
 

00:16:42.560 --> 00:16:44.550 align:start position:0%
few CPU cycles of the NES each tick and
return<00:16:42.880><c> control</c><00:16:43.199><c> to</c><00:16:43.360><c> Portal</c><00:16:43.759><c> 2</c><00:16:44.000><c> for</c><00:16:44.240><c> the</c><00:16:44.399><c> rest</c>

00:16:44.550 --> 00:16:44.560 align:start position:0%
return control to Portal 2 for the rest
 

00:16:44.560 --> 00:16:47.189 align:start position:0%
return control to Portal 2 for the rest
of<00:16:44.639><c> the</c><00:16:44.800><c> frame.</c><00:16:45.519><c> But</c><00:16:45.920><c> unless</c><00:16:46.320><c> we</c><00:16:46.639><c> know</c><00:16:46.880><c> how</c>

00:16:47.189 --> 00:16:47.199 align:start position:0%
of the frame. But unless we know how
 

00:16:47.199 --> 00:16:49.590 align:start position:0%
of the frame. But unless we know how
long<00:16:47.600><c> any</c><00:16:47.839><c> given</c><00:16:48.160><c> iteration</c><00:16:48.639><c> will</c><00:16:48.959><c> take</c><00:16:49.279><c> ahead</c>

00:16:49.590 --> 00:16:49.600 align:start position:0%
long any given iteration will take ahead
 

00:16:49.600 --> 00:16:52.069 align:start position:0%
long any given iteration will take ahead
of<00:16:49.759><c> time,</c><00:16:50.240><c> we</c><00:16:50.480><c> always</c><00:16:50.880><c> run</c><00:16:51.120><c> the</c><00:16:51.279><c> risk</c><00:16:51.519><c> of</c><00:16:51.759><c> going</c>

00:16:52.069 --> 00:16:52.079 align:start position:0%
of time, we always run the risk of going
 

00:16:52.079 --> 00:16:54.310 align:start position:0%
of time, we always run the risk of going
over<00:16:52.480><c> those</c><00:16:52.800><c> 30</c><00:16:53.120><c> milliseconds,</c><00:16:54.000><c> which</c>

00:16:54.310 --> 00:16:54.320 align:start position:0%
over those 30 milliseconds, which
 

00:16:54.320 --> 00:16:56.710 align:start position:0%
over those 30 milliseconds, which
abruptly<00:16:54.800><c> halts</c><00:16:55.120><c> the</c><00:16:55.279><c> emulator</c><00:16:55.839><c> and</c><00:16:56.160><c> desyncs</c>

00:16:56.710 --> 00:16:56.720 align:start position:0%
abruptly halts the emulator and desyncs
 

00:16:56.720 --> 00:16:58.949 align:start position:0%
abruptly halts the emulator and desyncs
it.<00:16:57.120><c> Too</c><00:16:57.360><c> many</c><00:16:57.519><c> iterations</c><00:16:58.160><c> and</c><00:16:58.320><c> the</c><00:16:58.480><c> risk</c><00:16:58.720><c> is</c>

00:16:58.949 --> 00:16:58.959 align:start position:0%
it. Too many iterations and the risk is
 

00:16:58.959 --> 00:17:01.269 align:start position:0%
it. Too many iterations and the risk is
too<00:16:59.199><c> high.</c><00:16:59.680><c> Too</c><00:17:00.000><c> few</c><00:17:00.240><c> iterations</c><00:17:00.880><c> and</c><00:17:01.040><c> we're</c>

00:17:01.269 --> 00:17:01.279 align:start position:0%
too high. Too few iterations and we're
 

00:17:01.279 --> 00:17:03.430 align:start position:0%
too high. Too few iterations and we're
wasting<00:17:01.680><c> potential</c><00:17:02.160><c> emulation</c><00:17:02.800><c> time</c><00:17:03.120><c> during</c>

00:17:03.430 --> 00:17:03.440 align:start position:0%
wasting potential emulation time during
 

00:17:03.440 --> 00:17:06.230 align:start position:0%
wasting potential emulation time during
less<00:17:03.759><c> demanding</c><00:17:04.439><c> cycles.</c><00:17:05.439><c> The</c><00:17:05.600><c> best</c><00:17:05.760><c> way</c><00:17:06.000><c> I've</c>

00:17:06.230 --> 00:17:06.240 align:start position:0%
less demanding cycles. The best way I've
 

00:17:06.240 --> 00:17:08.150 align:start position:0%
less demanding cycles. The best way I've
found<00:17:06.400><c> to</c><00:17:06.640><c> work</c><00:17:06.799><c> around</c><00:17:07.120><c> this</c><00:17:07.360><c> is</c><00:17:07.520><c> to</c><00:17:07.760><c> spin</c><00:17:08.000><c> up</c>

00:17:08.150 --> 00:17:08.160 align:start position:0%
found to work around this is to spin up
 

00:17:08.160 --> 00:17:11.429 align:start position:0%
found to work around this is to spin up
a<00:17:08.319><c> new</c><00:17:08.559><c> script</c><00:17:08.959><c> VM</c><00:17:09.360><c> for</c><00:17:09.600><c> each</c><00:17:09.839><c> CPU</c><00:17:10.400><c> cycle.</c><00:17:11.120><c> Yes,</c>

00:17:11.429 --> 00:17:11.439 align:start position:0%
a new script VM for each CPU cycle. Yes,
 

00:17:11.439 --> 00:17:13.270 align:start position:0%
a new script VM for each CPU cycle. Yes,
this<00:17:11.679><c> introduces</c><00:17:12.160><c> a</c><00:17:12.319><c> ton</c><00:17:12.480><c> of</c><00:17:12.559><c> overhead,</c><00:17:13.120><c> but</c>

00:17:13.270 --> 00:17:13.280 align:start position:0%
this introduces a ton of overhead, but
 

00:17:13.280 --> 00:17:15.750 align:start position:0%
this introduces a ton of overhead, but
the<00:17:13.600><c> 30</c><00:17:13.919><c> millisecond</c><00:17:14.480><c> limit</c><00:17:14.799><c> only</c><00:17:15.120><c> applies</c><00:17:15.520><c> to</c>

00:17:15.750 --> 00:17:15.760 align:start position:0%
the 30 millisecond limit only applies to
 

00:17:15.760 --> 00:17:17.990 align:start position:0%
the 30 millisecond limit only applies to
individual<00:17:16.319><c> queries.</c><00:17:17.120><c> So</c><00:17:17.360><c> really,</c><00:17:17.679><c> I</c><00:17:17.919><c> can</c>

00:17:17.990 --> 00:17:18.000 align:start position:0%
individual queries. So really, I can
 

00:17:18.000 --> 00:17:19.829 align:start position:0%
individual queries. So really, I can
keep<00:17:18.160><c> the</c><00:17:18.319><c> game</c><00:17:18.559><c> busy</c><00:17:18.799><c> for</c><00:17:19.039><c> however</c><00:17:19.439><c> long</c><00:17:19.679><c> I</c>

00:17:19.829 --> 00:17:19.839 align:start position:0%
keep the game busy for however long I
 

00:17:19.839 --> 00:17:21.669 align:start position:0%
keep the game busy for however long I
like,<00:17:20.160><c> as</c><00:17:20.319><c> long</c><00:17:20.400><c> as</c><00:17:20.559><c> I'm</c><00:17:20.799><c> actively</c><00:17:21.199><c> starting</c>

00:17:21.669 --> 00:17:21.679 align:start position:0%
like, as long as I'm actively starting
 

00:17:21.679 --> 00:17:24.549 align:start position:0%
like, as long as I'm actively starting
new<00:17:21.919><c> script</c><00:17:22.240><c> VMs.</c><00:17:23.039><c> And</c><00:17:23.360><c> with</c><00:17:23.600><c> this</c><00:17:23.919><c> comes</c><00:17:24.240><c> our</c>

00:17:24.549 --> 00:17:24.559 align:start position:0%
new script VMs. And with this comes our
 

00:17:24.559 --> 00:17:27.270 align:start position:0%
new script VMs. And with this comes our
final<00:17:25.039><c> technical</c><00:17:25.520><c> problem.</c><00:17:26.400><c> The</c><00:17:26.640><c> emulator</c>

00:17:27.270 --> 00:17:27.280 align:start position:0%
final technical problem. The emulator
 

00:17:27.280 --> 00:17:29.669 align:start position:0%
final technical problem. The emulator
currently<00:17:27.839><c> runs</c><00:17:28.079><c> at</c><00:17:28.319><c> about</c><00:17:28.720><c> 5</c><00:17:29.039><c> seconds</c><00:17:29.440><c> per</c>

00:17:29.669 --> 00:17:29.679 align:start position:0%
currently runs at about 5 seconds per
 

00:17:29.679 --> 00:17:33.270 align:start position:0%
currently runs at about 5 seconds per
frame.<00:17:30.480><c> That's</c><00:17:30.799><c> a</c><00:17:31.120><c> fifth</c><00:17:31.600><c> of</c><00:17:31.919><c> 1</c><00:17:32.240><c> FPS.</c><00:17:33.039><c> Sorry</c>

00:17:33.270 --> 00:17:33.280 align:start position:0%
frame. That's a fifth of 1 FPS. Sorry
 

00:17:33.280 --> 00:17:34.789 align:start position:0%
frame. That's a fifth of 1 FPS. Sorry
for<00:17:33.440><c> the</c><00:17:33.600><c> colors,</c><00:17:33.919><c> by</c><00:17:34.080><c> the</c><00:17:34.160><c> way.</c><00:17:34.320><c> I</c><00:17:34.480><c> recorded</c>

00:17:34.789 --> 00:17:34.799 align:start position:0%
for the colors, by the way. I recorded
 

00:17:34.799 --> 00:17:36.390 align:start position:0%
for the colors, by the way. I recorded
this<00:17:34.960><c> demo</c><00:17:35.280><c> before</c><00:17:35.520><c> I</c><00:17:35.679><c> found</c><00:17:35.840><c> the</c><00:17:36.000><c> fix</c><00:17:36.160><c> to</c>

00:17:36.390 --> 00:17:36.400 align:start position:0%
this demo before I found the fix to
 

00:17:36.400 --> 00:17:38.390 align:start position:0%
this demo before I found the fix to
that.<00:17:36.640><c> And</c><00:17:36.880><c> I</c><00:17:37.120><c> didn't</c><00:17:37.280><c> bother</c><00:17:37.600><c> re-recording</c>

00:17:38.390 --> 00:17:38.400 align:start position:0%
that. And I didn't bother re-recording
 

00:17:38.400 --> 00:17:40.710 align:start position:0%
that. And I didn't bother re-recording
because<00:17:38.720><c> this</c><00:17:39.039><c> little</c><00:17:39.360><c> sped</c><00:17:39.600><c> up</c><00:17:39.840><c> clip</c><00:17:40.160><c> took</c><00:17:40.400><c> me</c>

00:17:40.710 --> 00:17:40.720 align:start position:0%
because this little sped up clip took me
 

00:17:40.720 --> 00:17:42.789 align:start position:0%
because this little sped up clip took me
half<00:17:40.960><c> an</c><00:17:41.200><c> hour</c><00:17:41.440><c> to</c><00:17:41.760><c> record</c><00:17:42.160><c> and</c><00:17:42.400><c> it</c><00:17:42.640><c> doesn't</c>

00:17:42.789 --> 00:17:42.799 align:start position:0%
half an hour to record and it doesn't
 

00:17:42.799 --> 00:17:44.150 align:start position:0%
half an hour to record and it doesn't
even<00:17:43.039><c> look</c><00:17:43.280><c> that</c><00:17:43.440><c> good</c><00:17:43.600><c> with</c><00:17:43.840><c> the</c><00:17:44.000><c> low</c>

00:17:44.150 --> 00:17:44.160 align:start position:0%
even look that good with the low
 

00:17:44.160 --> 00:17:47.510 align:start position:0%
even look that good with the low
resolution.<00:17:45.039><c> Although,</c><00:17:46.000><c> hold</c><00:17:46.240><c> on.</c><00:17:47.039><c> What</c><00:17:47.280><c> if</c>

00:17:47.510 --> 00:17:47.520 align:start position:0%
resolution. Although, hold on. What if
 

00:17:47.520 --> 00:17:49.669 align:start position:0%
resolution. Although, hold on. What if
we<00:17:47.679><c> just</c><00:17:48.000><c> skip</c><00:17:48.400><c> processing</c><00:17:48.880><c> the</c><00:17:49.039><c> pixels</c><00:17:49.440><c> that</c>

00:17:49.669 --> 00:17:49.679 align:start position:0%
we just skip processing the pixels that
 

00:17:49.679 --> 00:17:51.909 align:start position:0%
we just skip processing the pixels that
we're<00:17:50.000><c> not</c><00:17:50.240><c> displaying</c><00:17:51.120><c> since</c><00:17:51.360><c> the</c><00:17:51.520><c> entity</c>

00:17:51.909 --> 00:17:51.919 align:start position:0%
we're not displaying since the entity
 

00:17:51.919 --> 00:17:53.830 align:start position:0%
we're not displaying since the entity
limit<00:17:52.240><c> only</c><00:17:52.480><c> allows</c><00:17:52.720><c> us</c><00:17:52.880><c> to</c><00:17:53.120><c> display</c><00:17:53.440><c> every</c>

00:17:53.830 --> 00:17:53.840 align:start position:0%
limit only allows us to display every
 

00:17:53.840 --> 00:17:56.470 align:start position:0%
limit only allows us to display every
seventh<00:17:54.240><c> pixel</c><00:17:54.720><c> anyway?</c><00:17:55.360><c> Why</c><00:17:55.679><c> waste</c><00:17:56.000><c> the</c><00:17:56.160><c> time</c>

00:17:56.470 --> 00:17:56.480 align:start position:0%
seventh pixel anyway? Why waste the time
 

00:17:56.480 --> 00:17:58.549 align:start position:0%
seventh pixel anyway? Why waste the time
calculating<00:17:57.039><c> all</c><00:17:57.280><c> the</c><00:17:57.440><c> pixels</c><00:17:57.840><c> that</c><00:17:58.080><c> we</c><00:17:58.400><c> don't</c>

00:17:58.549 --> 00:17:58.559 align:start position:0%
calculating all the pixels that we don't
 

00:17:58.559 --> 00:18:01.029 align:start position:0%
calculating all the pixels that we don't
get<00:17:58.799><c> to</c><00:17:58.960><c> see?</c><00:17:59.760><c> With</c><00:18:00.000><c> this</c><00:18:00.240><c> optimization,</c>

00:18:01.029 --> 00:18:01.039 align:start position:0%
get to see? With this optimization,
 

00:18:01.039 --> 00:18:03.510 align:start position:0%
get to see? With this optimization,
we're<00:18:01.360><c> now</c><00:18:01.600><c> looking</c><00:18:01.840><c> at</c><00:18:02.080><c> right</c><00:18:02.400><c> about</c><00:18:02.720><c> 1.3</c>

00:18:03.510 --> 00:18:03.520 align:start position:0%
we're now looking at right about 1.3
 

00:18:03.520 --> 00:18:05.750 align:start position:0%
we're now looking at right about 1.3
FPS.<00:18:04.320><c> If</c><00:18:04.559><c> you're</c><00:18:04.720><c> keeping</c><00:18:05.039><c> track,</c><00:18:05.440><c> that's</c>

00:18:05.750 --> 00:18:05.760 align:start position:0%
FPS. If you're keeping track, that's
 

00:18:05.760 --> 00:18:08.549 align:start position:0%
FPS. If you're keeping track, that's
over<00:18:06.240><c> six</c><00:18:06.559><c> times</c><00:18:06.960><c> faster</c><00:18:07.360><c> than</c><00:18:07.679><c> before.</c><00:18:08.400><c> But</c>

00:18:08.549 --> 00:18:08.559 align:start position:0%
over six times faster than before. But
 

00:18:08.559 --> 00:18:10.630 align:start position:0%
over six times faster than before. But
since<00:18:08.799><c> we're</c><00:18:09.039><c> brute</c><00:18:09.360><c> forcing</c><00:18:09.760><c> way</c><00:18:10.080><c> past</c><00:18:10.320><c> that</c>

00:18:10.630 --> 00:18:10.640 align:start position:0%
since we're brute forcing way past that
 

00:18:10.640 --> 00:18:13.110 align:start position:0%
since we're brute forcing way past that
30<00:18:10.880><c> millisecond</c><00:18:11.440><c> script</c><00:18:11.760><c> timeout,</c><00:18:12.400><c> Portal</c><00:18:12.799><c> 2</c>

00:18:13.110 --> 00:18:13.120 align:start position:0%
30 millisecond script timeout, Portal 2
 

00:18:13.120 --> 00:18:15.110 align:start position:0%
30 millisecond script timeout, Portal 2
isn't<00:18:13.440><c> feeling</c><00:18:13.679><c> so</c><00:18:13.919><c> good</c><00:18:14.080><c> anymore.</c><00:18:14.720><c> The</c><00:18:14.960><c> game</c>

00:18:15.110 --> 00:18:15.120 align:start position:0%
isn't feeling so good anymore. The game
 

00:18:15.120 --> 00:18:17.510 align:start position:0%
isn't feeling so good anymore. The game
that<00:18:15.440><c> all</c><00:18:15.600><c> of</c><00:18:15.760><c> this</c><00:18:15.919><c> is</c><00:18:16.080><c> running</c><00:18:16.320><c> on</c><00:18:16.640><c> is</c><00:18:16.960><c> itself</c>

00:18:17.510 --> 00:18:17.520 align:start position:0%
that all of this is running on is itself
 

00:18:17.520 --> 00:18:19.990 align:start position:0%
that all of this is running on is itself
running<00:18:17.840><c> at</c><00:18:18.080><c> barely</c><00:18:18.559><c> two</c><00:18:18.720><c> frames</c><00:18:19.039><c> per</c><00:18:19.360><c> second.</c>

00:18:19.990 --> 00:18:20.000 align:start position:0%
running at barely two frames per second.
 

00:18:20.000 --> 00:18:21.909 align:start position:0%
running at barely two frames per second.
The<00:18:20.160><c> more</c><00:18:20.400><c> time</c><00:18:20.559><c> we</c><00:18:20.799><c> give</c><00:18:20.880><c> to</c><00:18:21.039><c> the</c><00:18:21.200><c> emulator,</c>

00:18:21.909 --> 00:18:21.919 align:start position:0%
The more time we give to the emulator,
 

00:18:21.919 --> 00:18:24.630 align:start position:0%
The more time we give to the emulator,
the<00:18:22.080><c> less</c><00:18:22.400><c> time</c><00:18:22.720><c> Portal</c><00:18:23.200><c> 2</c><00:18:23.440><c> has</c><00:18:23.760><c> to</c><00:18:23.919><c> render</c><00:18:24.320><c> its</c>

00:18:24.630 --> 00:18:24.640 align:start position:0%
the less time Portal 2 has to render its
 

00:18:24.640 --> 00:18:26.950 align:start position:0%
the less time Portal 2 has to render its
frames.<00:18:25.520><c> If</c><00:18:25.760><c> only</c><00:18:26.000><c> there</c><00:18:26.240><c> was</c><00:18:26.400><c> a</c><00:18:26.559><c> way</c><00:18:26.720><c> to</c>

00:18:26.950 --> 00:18:26.960 align:start position:0%
frames. If only there was a way to
 

00:18:26.960 --> 00:18:29.630 align:start position:0%
frames. If only there was a way to
separate<00:18:27.360><c> the</c><00:18:27.679><c> game</c><00:18:27.919><c> server</c><00:18:28.320><c> from</c><00:18:28.559><c> the</c>

00:18:29.630 --> 00:18:29.640 align:start position:0%
separate the game server from the
 

00:18:29.640 --> 00:18:33.029 align:start position:0%
separate the game server from the
client.<00:18:30.640><c> Oh,</c><00:18:30.960><c> right.</c><00:18:31.600><c> Co-op</c><00:18:32.000><c> exists.</c><00:18:32.799><c> By</c>

00:18:33.029 --> 00:18:33.039 align:start position:0%
client. Oh, right. Co-op exists. By
 

00:18:33.039 --> 00:18:35.510 align:start position:0%
client. Oh, right. Co-op exists. By
hosting<00:18:33.360><c> a</c><00:18:33.600><c> Portal</c><00:18:34.000><c> 2</c><00:18:34.240><c> co-op</c><00:18:34.720><c> game</c><00:18:34.960><c> on</c><00:18:35.200><c> one</c>

00:18:35.510 --> 00:18:35.520 align:start position:0%
hosting a Portal 2 co-op game on one
 

00:18:35.520 --> 00:18:37.350 align:start position:0%
hosting a Portal 2 co-op game on one
computer<00:18:36.000><c> and</c><00:18:36.240><c> connecting</c><00:18:36.640><c> to</c><00:18:36.880><c> it</c><00:18:37.039><c> from</c>

00:18:37.350 --> 00:18:37.360 align:start position:0%
computer and connecting to it from
 

00:18:37.360 --> 00:18:39.350 align:start position:0%
computer and connecting to it from
another,<00:18:37.919><c> we</c><00:18:38.080><c> can</c><00:18:38.240><c> have</c><00:18:38.400><c> the</c><00:18:38.559><c> host</c><00:18:38.960><c> bear</c><00:18:39.200><c> the</c>

00:18:39.350 --> 00:18:39.360 align:start position:0%
another, we can have the host bear the
 

00:18:39.360 --> 00:18:41.110 align:start position:0%
another, we can have the host bear the
cost<00:18:39.600><c> of</c><00:18:39.760><c> running</c><00:18:40.000><c> the</c><00:18:40.160><c> emulator</c><00:18:40.720><c> while</c><00:18:40.960><c> the</c>

00:18:41.110 --> 00:18:41.120 align:start position:0%
cost of running the emulator while the
 

00:18:41.120 --> 00:18:42.950 align:start position:0%
cost of running the emulator while the
other<00:18:41.280><c> player</c><00:18:41.600><c> can</c><00:18:41.840><c> enjoy</c><00:18:42.160><c> a</c><00:18:42.400><c> smooth</c><00:18:42.720><c> frame</c>

00:18:42.950 --> 00:18:42.960 align:start position:0%
other player can enjoy a smooth frame
 

00:18:42.960 --> 00:18:45.510 align:start position:0%
other player can enjoy a smooth frame
rate<00:18:43.360><c> alongside</c><00:18:44.000><c> an</c><00:18:44.400><c> almost</c><00:18:44.799><c> recognizable</c>

00:18:45.510 --> 00:18:45.520 align:start position:0%
rate alongside an almost recognizable
 

00:18:45.520 --> 00:18:48.470 align:start position:0%
rate alongside an almost recognizable
Super<00:18:45.840><c> Mario</c><00:18:46.240><c> Bros.</c><00:18:47.120><c> But</c><00:18:47.440><c> at</c><00:18:47.679><c> this</c><00:18:47.919><c> point,</c><00:18:48.240><c> I</c>

00:18:48.470 --> 00:18:48.480 align:start position:0%
Super Mario Bros. But at this point, I
 

00:18:48.480 --> 00:18:50.230 align:start position:0%
Super Mario Bros. But at this point, I
think<00:18:48.640><c> I</c><00:18:48.880><c> really</c><00:18:49.120><c> have</c><00:18:49.360><c> played</c><00:18:49.679><c> all</c><00:18:49.919><c> of</c><00:18:50.080><c> my</c>

00:18:50.230 --> 00:18:50.240 align:start position:0%
think I really have played all of my
 

00:18:50.240 --> 00:18:52.150 align:start position:0%
think I really have played all of my
cards.<00:18:50.880><c> I</c><00:18:51.039><c> tried</c><00:18:51.280><c> building</c><00:18:51.520><c> a</c><00:18:51.679><c> standalone</c>

00:18:52.150 --> 00:18:52.160 align:start position:0%
cards. I tried building a standalone
 

00:18:52.160 --> 00:18:53.830 align:start position:0%
cards. I tried building a standalone
Squirrel<00:18:52.559><c> runtime,</c><00:18:53.039><c> the</c><00:18:53.280><c> same</c><00:18:53.440><c> version</c><00:18:53.600><c> that</c>

00:18:53.830 --> 00:18:53.840 align:start position:0%
Squirrel runtime, the same version that
 

00:18:53.840 --> 00:18:55.830 align:start position:0%
Squirrel runtime, the same version that
Portal<00:18:54.240><c> 2</c><00:18:54.400><c> uses</c><00:18:54.799><c> to</c><00:18:55.039><c> test</c><00:18:55.280><c> how</c><00:18:55.520><c> well</c><00:18:55.600><c> the</c>

00:18:55.830 --> 00:18:55.840 align:start position:0%
Portal 2 uses to test how well the
 

00:18:55.840 --> 00:18:58.070 align:start position:0%
Portal 2 uses to test how well the
emulator<00:18:56.320><c> would</c><00:18:56.480><c> run</c><00:18:56.799><c> without</c><00:18:57.120><c> any</c><00:18:57.440><c> overhead,</c>

00:18:58.070 --> 00:18:58.080 align:start position:0%
emulator would run without any overhead,
 

00:18:58.080 --> 00:19:00.150 align:start position:0%
emulator would run without any overhead,
but<00:18:58.320><c> even</c><00:18:58.559><c> that</c><00:18:58.880><c> clocks</c><00:18:59.280><c> in</c><00:18:59.440><c> at</c><00:18:59.679><c> only</c><00:18:59.840><c> about</c>

00:19:00.150 --> 00:19:00.160 align:start position:0%
but even that clocks in at only about
 

00:19:00.160 --> 00:19:03.270 align:start position:0%
but even that clocks in at only about
3.3<00:19:00.880><c> frames</c><00:19:01.200><c> pers</c><00:19:01.760><c> on</c><00:19:01.919><c> the</c><00:19:02.160><c> title</c><00:19:02.559><c> screen.</c>

00:19:03.270 --> 00:19:03.280 align:start position:0%
3.3 frames pers on the title screen.
 

00:19:03.280 --> 00:19:05.669 align:start position:0%
3.3 frames pers on the title screen.
Squirrel<00:19:03.840><c> just</c><00:19:04.080><c> isn't</c><00:19:04.480><c> comparable</c><00:19:05.039><c> to</c><00:19:05.200><c> C</c><00:19:05.520><c> in</c>

00:19:05.669 --> 00:19:05.679 align:start position:0%
Squirrel just isn't comparable to C in
 

00:19:05.679 --> 00:19:07.350 align:start position:0%
Squirrel just isn't comparable to C in
terms<00:19:05.840><c> of</c><00:19:06.000><c> raw</c><00:19:06.320><c> performance,</c><00:19:06.960><c> not</c><00:19:07.200><c> even</c>

00:19:07.350 --> 00:19:07.360 align:start position:0%
terms of raw performance, not even
 

00:19:07.360 --> 00:19:09.029 align:start position:0%
terms of raw performance, not even
close.<00:19:07.919><c> It's</c><00:19:08.080><c> a</c><00:19:08.240><c> language</c><00:19:08.559><c> made</c><00:19:08.799><c> for</c>

00:19:09.029 --> 00:19:09.039 align:start position:0%
close. It's a language made for
 

00:19:09.039 --> 00:19:10.630 align:start position:0%
close. It's a language made for
lightweight<00:19:09.520><c> scripting,</c><00:19:10.000><c> and</c><00:19:10.160><c> I</c><00:19:10.400><c> don't</c><00:19:10.559><c> think</c>

00:19:10.630 --> 00:19:10.640 align:start position:0%
lightweight scripting, and I don't think
 

00:19:10.640 --> 00:19:12.310 align:start position:0%
lightweight scripting, and I don't think
anyone<00:19:11.039><c> ever</c><00:19:11.280><c> imagined</c><00:19:11.679><c> it</c><00:19:11.840><c> would</c><00:19:12.000><c> be</c><00:19:12.160><c> running</c>

00:19:12.310 --> 00:19:12.320 align:start position:0%
anyone ever imagined it would be running
 

00:19:12.320 --> 00:19:14.390 align:start position:0%
anyone ever imagined it would be running
an<00:19:12.559><c> emulator.</c><00:19:13.360><c> That</c><00:19:13.679><c> said,</c><00:19:13.919><c> I</c><00:19:14.080><c> would</c><00:19:14.240><c> have</c>

00:19:14.390 --> 00:19:14.400 align:start position:0%
an emulator. That said, I would have
 

00:19:14.400 --> 00:19:15.669 align:start position:0%
an emulator. That said, I would have
loved<00:19:14.559><c> to</c><00:19:14.720><c> find</c><00:19:14.880><c> a</c><00:19:15.039><c> more</c><00:19:15.200><c> practical</c>

00:19:15.669 --> 00:19:15.679 align:start position:0%
loved to find a more practical
 

00:19:15.679 --> 00:19:17.669 align:start position:0%
loved to find a more practical
application<00:19:16.240><c> for</c><00:19:16.559><c> this,</c><00:19:16.960><c> but</c><00:19:17.200><c> given</c><00:19:17.440><c> the</c>

00:19:17.669 --> 00:19:17.679 align:start position:0%
application for this, but given the
 

00:19:17.679 --> 00:19:19.430 align:start position:0%
application for this, but given the
quality<00:19:18.000><c> and</c><00:19:18.240><c> performance</c><00:19:18.720><c> of</c><00:19:18.880><c> emulating</c>

00:19:19.430 --> 00:19:19.440 align:start position:0%
quality and performance of emulating
 

00:19:19.440 --> 00:19:21.909 align:start position:0%
quality and performance of emulating
just<00:19:19.600><c> the</c><00:19:19.840><c> original</c><00:19:20.240><c> Super</c><00:19:20.559><c> Mario</c><00:19:20.960><c> Bros.,</c><00:19:21.679><c> I</c>

00:19:21.909 --> 00:19:21.919 align:start position:0%
just the original Super Mario Bros., I
 

00:19:21.919 --> 00:19:23.510 align:start position:0%
just the original Super Mario Bros., I
don't<00:19:22.160><c> think</c><00:19:22.320><c> this</c><00:19:22.480><c> is</c><00:19:22.640><c> worth</c><00:19:22.960><c> much</c><00:19:23.200><c> more</c><00:19:23.360><c> than</c>

00:19:23.510 --> 00:19:23.520 align:start position:0%
don't think this is worth much more than
 

00:19:23.520 --> 00:19:25.430 align:start position:0%
don't think this is worth much more than
a<00:19:23.679><c> simple</c><00:19:23.919><c> tech</c><00:19:24.240><c> demo.</c><00:19:24.799><c> Feel</c><00:19:24.960><c> free</c><00:19:25.120><c> to</c><00:19:25.200><c> prove</c>

00:19:25.430 --> 00:19:25.440 align:start position:0%
a simple tech demo. Feel free to prove
 

00:19:25.440 --> 00:19:27.510 align:start position:0%
a simple tech demo. Feel free to prove
me<00:19:25.600><c> wrong</c><00:19:25.760><c> in</c><00:19:25.919><c> the</c><00:19:26.080><c> comments.</c><00:19:26.720><c> Anyway,</c><00:19:27.120><c> if</c><00:19:27.280><c> you</c>

00:19:27.510 --> 00:19:27.520 align:start position:0%
me wrong in the comments. Anyway, if you
 

00:19:27.520 --> 00:19:28.870 align:start position:0%
me wrong in the comments. Anyway, if you
subscribe,<00:19:27.919><c> I</c><00:19:28.160><c> might</c><00:19:28.320><c> tell</c><00:19:28.400><c> you</c><00:19:28.480><c> about</c><00:19:28.640><c> the</c>

00:19:28.870 --> 00:19:28.880 align:start position:0%
subscribe, I might tell you about the
 

00:19:28.880 --> 00:19:30.789 align:start position:0%
subscribe, I might tell you about the
time<00:19:28.960><c> I</c><00:19:29.200><c> turned</c><00:19:29.360><c> Portal</c><00:19:29.760><c> 2</c><00:19:30.000><c> into</c><00:19:30.160><c> a</c><00:19:30.400><c> Minecraft</c>

00:19:30.789 --> 00:19:30.799 align:start position:0%
time I turned Portal 2 into a Minecraft
 

00:19:30.799 --> 00:19:32.870 align:start position:0%
time I turned Portal 2 into a Minecraft
client.<00:19:31.520><c> Otherwise,</c><00:19:32.000><c> that's</c><00:19:32.240><c> all</c><00:19:32.480><c> from</c><00:19:32.640><c> me</c>

00:19:32.870 --> 00:19:32.880 align:start position:0%
client. Otherwise, that's all from me
 

00:19:32.880 --> 00:19:36.919 align:start position:0%
client. Otherwise, that's all from me
today.<00:19:33.679><c> See</c><00:19:33.919><c> you.</c>

