File tree Expand file tree Collapse file tree 4 files changed +18
-15
lines changed Expand file tree Collapse file tree 4 files changed +18
-15
lines changed Original file line number Diff line number Diff line change 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
68DEF MBC1SRamEnable EQU $0000
Original file line number Diff line number Diff 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
565565SendSGBPackets:
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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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
10351036wOnSGB:: db
You can’t perform that action at this time.
0 commit comments