From 1eb6f61d62133922ac15c61792be8ea901d6baba Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Mon, 11 Aug 2025 16:31:18 -0400 Subject: Identify `JOYP_SGB_MLT_REQ` constant --- constants/misc_constants.asm | 3 +++ engine/gfx/palettes.asm | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index a542b4a7..8bd6f223 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -10,3 +10,6 @@ DEF TRUE EQU 1 ; input DEF NO_INPUT EQU 0 + +; SGB command MLT_REQ can be used to detect SGB hardware +DEF JOYP_SGB_MLT_REQ EQU %00000011 diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm index fe69144c..429d8123 100644 --- a/engine/gfx/palettes.asm +++ b/engine/gfx/palettes.asm @@ -462,8 +462,8 @@ CheckSGB: ei call Wait7000 ldh a, [rJOYP] - and $3 - cp $3 + and JOYP_SGB_MLT_REQ + cp JOYP_SGB_MLT_REQ jr nz, .isSGB ld a, JOYP_SGB_ZERO ldh [rJOYP], a @@ -494,8 +494,8 @@ CheckSGB: call Wait7000 call Wait7000 ldh a, [rJOYP] - and $3 - cp $3 + and JOYP_SGB_MLT_REQ + cp JOYP_SGB_MLT_REQ jr nz, .isSGB call SendMltReq1Packet and a -- cgit v1.3.1-sl0p