Use hardware.inc 5.0 constants
- Lingua principale
- Assembly
- Stelle
- 179
- Fork
- 64
- Merge medio
- 7g 22h
- PR unite (30g)
- 1
Descrizione
Right from the very beginning with Hello World, the tutorial uses constants from [hardware.inc](https://github.com/gbdev/hardware.inc). Version 5.0, released 2025-06-22, changed the naming convention for bit number and mask constants, and also added a number of new constants for more hardware-related quantities that are currently hard-coded in the tutorial.
A few of the examples in Hello World:
- `ld a, LCDCF_ON | LCDCF_BGON` would now be `ld a, LCDC_ON | LCDC_BG_ON` ... and could explicitly specify more of the flag bits, like `LCDC_BG_9800`
- `WaitVBlank: ld a, [rLY] :: cp 144 :: jp c, WaitVBlank` can use `LY_VBLANK` for `144`
- `ld hl, $9800` can be `ld hl, TILEMAP0`
And some of the ones in Unbricked:
- `ld b, 160 :: ld hl, _OAMRAM` would now be `ld b, OAM_SIZE :: ld hl, STARTOF(OAM)`
- `ld a, 128 + 16` and `ld a, 16 + 8` would now be `ld a, 128 + OAM_Y_OFS` and `ld a, 16 + OAM_X_OFS`
- `ld a, P1F_GET_BTN` would now be `ld a, JOYP_GET_BUTTONS` (and `[rP1]` would be `[rJOYP]`)
- `[_OAMRAM + 5]` could be `[STARTOF(OAM) + 1 * OBJ_SIZE + OAMA_X]` (i.e. the X coord of OBJ 1)
- etc
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Individua le sezioni del tutorial Hello World e Unbricked e confronta le relative costanti con hardware.inc 5.0. Sostituisci i nomi obsoleti e le quantità hardware codificate direttamente indicate nell’issue, quindi verifica che gli esempi aggiornati utilizzino in modo coerente la nuova convenzione di denominazione e le nuove costanti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Ambito
- documentation, game-dev
- Tipo di issue
- Documentazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100