Skip to content

Commit 79518a6

Browse files
authored
Consistently refer to CGB, not GBC (#491)
1 parent ec37f61 commit 79518a6

File tree

4 files changed

+18
-15
lines changed

4 files changed

+18
-15
lines changed

constants/hardware_constants.asm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
; From http://nocash.emubase.de/pandocs.htm.
1+
; Reference documents:
2+
; https://gbdev.io/pandocs/
3+
; https://github.com/gbdev/hardware.inc
24

3-
DEF GBC EQU $11
5+
DEF CGB EQU $11
46

57
; MBC1
68
DEF MBC1SRamEnable EQU $0000

engine/gfx/palettes.asm

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -396,11 +396,11 @@ LoadSGB:
396396
ret nc
397397
ld a, 1
398398
ld [wOnSGB], a
399-
ld a, [wGBC]
399+
ld a, [wOnCGB]
400400
and a
401-
jr z, .notGBC
401+
jr z, .notCGB
402402
ret
403-
.notGBC
403+
.notCGB
404404
di
405405
call PrepareSuperNintendoVRAMTransfer
406406
ei
@@ -563,21 +563,21 @@ Wait7000:
563563
ret
564564

565565
SendSGBPackets:
566-
ld a, [wGBC]
566+
ld a, [wOnCGB]
567567
and a
568-
jr z, .notGBC
568+
jr z, .notCGB
569569
push de
570-
call InitGBCPalettes
570+
call InitCGBPalettes
571571
pop hl
572572
call EmptyFunc3
573573
ret
574-
.notGBC
574+
.notCGB
575575
push de
576576
call SendSGBPacket
577577
pop hl
578578
jp SendSGBPacket
579579

580-
InitGBCPalettes:
580+
InitCGBPalettes:
581581
ld a, $80 ; index 0 with auto-increment
582582
ldh [rBGPI], a
583583
inc hl

home/start.asm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
_Start::
2-
cp GBC
3-
jr z, .gbc
2+
cp CGB
3+
jr z, .cgb
44
xor a
55
jr .ok
6-
.gbc
6+
.cgb
77
ld a, FALSE
88
.ok
9-
ld [wGBC], a
9+
ld [wOnCGB], a
1010
jp Init

ram/wram.asm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,8 @@ wScriptedNPCWalkCounter:: db
10291029

10301030
ds 1
10311031

1032-
wGBC:: db
1032+
; always 0 since full CGB support was not implemented
1033+
wOnCGB:: db
10331034

10341035
; if running on SGB, it's 1, else it's 0
10351036
wOnSGB:: db

0 commit comments

Comments
 (0)