diff --git a/css/custom.css b/css/custom.css index 729cd711..59f5db4f 100644 --- a/css/custom.css +++ b/css/custom.css @@ -25,6 +25,11 @@ background-color: var(--quote-bg); } +.box.challenge { + border-color: #40a5b7; + background-color: var(--quote-bg); +} + .box.warning { border-left-color: #e7c000; background-color: rgba(255, 229, 100, .2); diff --git a/preproc/src/admonitions.rs b/preproc/src/admonitions.rs index 6c572ea7..dadb33aa 100644 --- a/preproc/src/admonitions.rs +++ b/preproc/src/admonitions.rs @@ -38,7 +38,7 @@ struct AdmonitionsGenerator<'a, Iter: Iterator>> { } impl<'a, Iter: Iterator>> AdmonitionsGenerator<'a, Iter> { - const KINDS: [&'static str; 3] = ["tip", "warning", "danger"]; + const KINDS: [&'static str; 4] = ["tip", "warning", "danger", "challenge"]; fn new(iter: Iter) -> Self { Self { diff --git a/src/part1/hello_world.md b/src/part1/hello_world.md index e3a766ee..453999e3 100644 --- a/src/part1/hello_world.md +++ b/src/part1/hello_world.md @@ -65,3 +65,22 @@ You could also take a flash cart (I use the [EverDrive GB X5](https://krikzz.com ![Picture of the Hello World running on a physical DMG](../assets/img/hello_dmg.jpg) Well, now that we have something working, it's time to peel back the curtains... + +:::challenge Challenge! + +When you see this box, a small challenge is available for you to try out. It can include questions or a small programming challenge. This is to help you understand the underlying material! + +For educators, these can be used in conjunction with learning materials. + +1. Your current challenge is to get the hello world shown above! + +
+ Answer (Click me!) + + This is where answers for the challenges will be placed! + +
+
+ + +::: \ No newline at end of file diff --git a/src/part1/toolchain.md b/src/part1/toolchain.md index 4fa559de..a8c9b954 100644 --- a/src/part1/toolchain.md +++ b/src/part1/toolchain.md @@ -59,3 +59,23 @@ There are some historical reasons, but RGBLINK can also be used to produce thing Note that RGBDS does not care at all about the files' extensions. Some people call their source code `.s`, for example, or their object files `.obj`. The file names don't matter, either; it's just practical to keep the same name. + +:::challenge Challenge! + +After I run `rgbfix` on a `.gb` file, then manually edit that same `.gb` file, can I change the value at `0x106` to anything I want? Why? + +[This might require some reading!](https://gbdev.io/pandocs/The_Cartridge_Header.html); + + +
+ Answer (Click me!) + + Because the header starts at `0x100` and ends at `0x14F`, anything within that range should not be overwritten after running `rgbfix`. + + Although some emulators do allow you to overwrite the header, if you do, then you risk locking a real Game Boy!" + +
+
+ + +::: \ No newline at end of file