Skip to content

Conversation

@hlatourette
Copy link
Contributor

@hlatourette hlatourette commented Jan 4, 2026

Addresses #125 (but does not completely resolve). I have not updated/touched any of the unbricked/Pt II/Pt III sections and I left the Joypad Input section of cheatsheet.md untouched (as it references/uses Pt II).

Discovered this while going through Part I of the tutorial and toy project (https://github.com/hlatourette/skyline-gbc/tree/main):

------                                                                                     
 > [5/5] RUN make build &&     make test &&     make package:                              
0.139 mkdir -p build && cd build && rgbasm -I../include -I../src -o hello-world.o ../src/hello-world.asm && rgblink -o skyline-gbc.gb hello-world.o && rgbfix -v -p 0xFF skyline-gbc.gb
0.177 error: Undefined symbol `LCDCF_ON`
0.177     at ../src/hello-world.asm(51)
0.177 error: Undefined symbol `LCDCF_BGON`
0.177     at ../src/hello-world.asm(51)
0.177 Linking failed with 2 errors
0.182 make: *** [Makefile:10: build] Error 1
------
Dockerfile:8
--------------------
   7 |     WORKDIR /usr/local/src/skyline-gbc
   8 | >>> RUN make build && \
   9 | >>>     make test && \
  10 | >>>     make package
  11 |     
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c make build &&     make test &&     make package" did not complete successfully: exit code: 2

Confirmed the changes to hello-world.asm (as well as the changes suggested in the cheat sheet) build and run using toy project (https://github.com/hlatourette/skyline-gbc/tree/main):
image

The conversions were all gotten from definitions and comments in hardware_compat.inc

Copy link
Member

@ISSOtm ISSOtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes themselves look fine, and that they're partial is still an improvement, so I'm recommending merging while keeping the issue open.

Copy link
Member

@avivace avivace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks ok to me, however I do not understand your comment:

Discovered this while going through Part I

Does that mean that when you where going through Part I you had errors? Because the tutorial clearly points you to the target hardware.inc version we support.

I also wouldn't merge this right now, I don't think it's beneficial to start to fragment the target hardware.inc version between different lessons of the same part.

@hlatourette
Copy link
Contributor Author

hlatourette commented Jan 5, 2026

This looks ok to me, however I do not understand your comment:

Discovered this while going through Part I

Does that mean that when you where going through Part I you had errors? Because the tutorial clearly points you to the target hardware.inc version we support.

I also wouldn't merge this right now, I don't think it's beneficial to start to fragment the target hardware.inc version between different lessons of the same part.

Thanks both for taking a look! @avivace yeah the tutorial is correct and the raw link explicitly points to 4.0 of hardware.inc. The 'discovery' is more that I made the mistake of going straight to the hardware.inc repo and pulling the latest version rather than following the permalink to the version being used by the tutorial. When I ran into the build error above, checked the diff and saw the compatibility includes file (realized there's fairly significant drift between the current release and the tutorial). Figured this might be a mistake others would make, then saw issue #125 and opened this to bump up the hello world part and cheat sheet of the docs.

Agree with the concern about splitting the tutorial parts across different version of the hardware.inc file. If y'all are fine with keeping this open for a couple days, I can go through the remaining parts and update them to v5.3 as well as part of this PR.

@avivace
Copy link
Member

avivace commented Jan 5, 2026

Alright, maybe it's also a good idea then to (more explicitly) show the targeted version of hardware.inc (and not only link it) - or to have a small intro disclaimer about the supported dependencies versions.

And yes - let's keep the PR open till the migration of the entire part is complete.

@avivace avivace marked this pull request as draft January 5, 2026 21:37
@hlatourette hlatourette force-pushed the update-hardware-inc-version branch from 71f8d82 to e6b4712 Compare January 6, 2026 05:37
@hlatourette
Copy link
Contributor Author

Updated all portions of Part II (as well as the joypad section of the cheat sheet mentioned above) to build against constants from v5.3.0 of hardware.inc. Confirmed builds using the following Dockerfile:

FROM ghcr.io/gbdev/rgbds:latest AS build
RUN apt-get update && apt-get install -y && \
    apt-get autoremove && \
    apt-get -y clean && \
    rm -rf /var/lib/apt/lists/*
COPY . /usr/local/src/unbricked
WORKDIR /usr/local/src/unbricked
RUN ./build_all.sh

Output:

docker build --target=build -t unbricked .
[+] Building 0.9s (10/10) FINISHED                                          docker:default
 ...

If you want, I can include examples of the output ROMs running, but the changes were all 1:1 drop-in replacements for definitions. I have not done any of the slightly more invasive suggestions in #125 by @Rangi42 like [_OAMRAM + 5] --> [STARTOF(OAM) + 1 * OBJ_SIZE + OAMA_X] (it's just been updated to [STARTOF(OAM) + 5] here). Based on comments in #125 perhaps this is something @Les-Wet can continue to tackle.

Additionally I added a tip to the Project Structure page of Part III to clarify that it is still using v4.0 of hardware.inc.

@hlatourette hlatourette marked this pull request as ready for review January 6, 2026 05:55
@hlatourette hlatourette changed the title Update Hello World and Cheatsheet to hardware.inc v5.3 Update Hello World Part II and Cheatsheet to hardware.inc v5.3 Jan 6, 2026
@avivace avivace merged commit e3629e0 into gbdev:master Jan 11, 2026
3 checks passed
@hlatourette hlatourette deleted the update-hardware-inc-version branch January 11, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants