From b757c4a4145943ae3837bf2026da5d0d173bd2c3 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Thu, 4 Aug 2016 18:53:33 -0700 Subject: [PATCH] Now support GBS version 2? --- gme/Gbs_Core.cpp | 2 +- gme/gme.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gme/Gbs_Core.cpp b/gme/Gbs_Core.cpp index 5703db6..34d4850 100644 --- a/gme/Gbs_Core.cpp +++ b/gme/Gbs_Core.cpp @@ -48,7 +48,7 @@ blargg_err_t Gbs_Core::load_( Data_Reader& in ) if ( !header_.valid_tag() ) return blargg_err_file_type; - if ( header_.vers != 1 ) + if ( header_.vers < 1 || header_.vers > 2 ) set_warning( "Unknown file version" ); if ( header_.timer_mode & 0x78 ) diff --git a/gme/gme.cpp b/gme/gme.cpp index 0340c55..3fbb080 100644 --- a/gme/gme.cpp +++ b/gme/gme.cpp @@ -55,7 +55,8 @@ const char* gme_identify_header( void const* header ) switch ( get_be32( header ) ) { case BLARGG_4CHAR('Z','X','A','Y'): return "AY"; - case BLARGG_4CHAR('G','B','S',0x01): return "GBS"; + case BLARGG_4CHAR('G','B','S',0x01): + case BLARGG_4CHAR('G','B','S',0x02): return "GBS"; case BLARGG_4CHAR('G','Y','M','X'): return "GYM"; case BLARGG_4CHAR('H','E','S','M'): return "HES"; case BLARGG_4CHAR('K','S','C','C'):