View Issue Details

IDProjectCategoryView StatusLast Update
0000172fileGeneralpublic2020-08-09 16:38
ReporterGerbilSoft Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Fixed in Version5.40 
Summary0000172: console: Fix CGB detection
DescriptionCGB detection currently requires the old licensee code to be set to 0x33. This is correct for SGB detection, but it seems the CGB boot ROM doesn't care about this.

There are several unlicensed and homebrew ROMs that don't have the old licensee code set correctly, but they *do* function in CGB mode.
TagsNo tags attached.

Activities

GerbilSoft

2020-07-19 17:52

reporter  

0001-console-CGB-doesn-t-require-licensee-code-to-be-0x33.patch (1,013 bytes)   
From bc9ae4e46c5d655025c00e8836c42ba09b88efd6 Mon Sep 17 00:00:00 2001
From: David Korth <gerbilsoft@gerbilsoft.com>
Date: Sun, 19 Jul 2020 13:49:18 -0400
Subject: [PATCH] console: CGB doesn't require licensee code to be 0x33.

Various unlicensed and homebrew titles don't have the licensee code
set correctly, but they *do* function in CGB mode.
---
 magic/Magdir/console | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/magic/Magdir/console b/magic/Magdir/console
index 39e1e0e3..ae275ce3 100644
--- a/magic/Magdir/console
+++ b/magic/Magdir/console
@@ -125,6 +125,7 @@
 >0x14c		byte		x			(Rev.%02u)
 
 # Machine type. (SGB, CGB, SGB+CGB)
+# Old licensee code 0x33 is required for SGB, but not CGB.
 >0x14b		byte		0x33
 >>0x146		byte		0x03
 >>>0x143	byte&0x80	0x80	[SGB+CGB]
@@ -133,6 +134,8 @@
 >>>0x143	byte&0xC0	0x80	[CGB]
 >>>0x143	byte&0xC0	0xC0	[CGB ONLY]
 >0x14b		byte		!0x33
+>>0x143		byte&0xC0	0x80	[CGB]
+>>0x143		byte&0xC0	0xC0	[CGB ONLY]
 
 # Mapper.
 >0x147 byte 0x00  [ROM ONLY]
-- 
2.27.0

christos

2020-08-09 16:38

manager   ~0003440

Thanks!

Issue History

Date Modified Username Field Change
2020-07-19 17:52 GerbilSoft New Issue
2020-07-19 17:52 GerbilSoft File Added: 0001-console-CGB-doesn-t-require-licensee-code-to-be-0x33.patch
2020-08-09 16:38 christos Assigned To => christos
2020-08-09 16:38 christos Status new => assigned
2020-08-09 16:38 christos Status assigned => resolved
2020-08-09 16:38 christos Resolution open => fixed
2020-08-09 16:38 christos Fixed in Version => 5.40
2020-08-09 16:38 christos Note Added: 0003440