Don't require to specify bsnes version when building

This commit is contained in:
Ilari Liusvaara 2013-11-30 10:39:32 +02:00
parent b8b982871d
commit be7f8ef115
42 changed files with 157 additions and 75 deletions

View file

@ -1,7 +1,7 @@
From 831e9614a7babbacf59935960fbaa6cfc8d49c08 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 9 Nov 2011 00:30:36 +0200
Subject: [PATCH 1/9] Make libsnes compile
Subject: [PATCH 01/10] Make libsnes compile
Changes between v083 and v084 had broken libsnes. Fix it so it at least
compiles.
@ -78,5 +78,5 @@ index fbb4482..5f5ded6 100755
}
SNES::cartridge.load(SNES::Cartridge::Mode::SuperGameBoy, xmlrom);
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,8 @@
From df7851648e41ae6b6efd1a54cdcd32ac55a90131 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 9 Nov 2011 00:31:59 +0200
Subject: [PATCH 2/9] Fix bsnes version number in libsnes to be v084, not v083
Subject: [PATCH 02/10] Fix bsnes version number in libsnes to be v084, not
v083
---
ui-libsnes/libsnes.cpp | 2 +-
@ -21,5 +22,5 @@ index 5f5ded6..6b4ef12 100755
unsigned snes_library_revision_major(void) {
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From b481e3d161d924cc5a4449329393c8d9f23b27ec Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 9 Nov 2011 00:37:44 +0200
Subject: [PATCH 3/9] Don't use time() in emulating chips
Subject: [PATCH 03/10] Don't use time() in emulating chips
Instead of using time() in chip emulation, create new interface method
currentTime(), defaulting to time(0). This way frontend can cleanly
@ -80,5 +80,5 @@ index f1a48c0..df975e8 100755
extern Interface *interface;
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From af7fdd9f73a3eb5e9266c59bfb4dd676679b2f7d Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 9 Nov 2011 01:52:08 +0200
Subject: [PATCH 4/9] Save controller state when savestating
Subject: [PATCH 04/10] Save controller state when savestating
When savestating, save the controller state and restore it upon loadstate.
Prevents libsnes from mixing up buttons.
@ -341,5 +341,5 @@ index f7d6f3b..08e7051 100755
if(cartridge.mode() == Cartridge::Mode::SufamiTurbo) sufamiturbo.serialize(s);
if(cartridge.mode() == Cartridge::Mode::SuperGameBoy) icd2.serialize(s);
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From aa1352516e38ff64f304d8831b357841c4795e43 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Fri, 11 Nov 2011 03:05:48 +0200
Subject: [PATCH 5/9] Fix unserialization of 64-bit signed integers
Subject: [PATCH 05/10] Fix unserialization of 64-bit signed integers
---
nall/serializer.hpp | 2 +-
@ -21,5 +21,5 @@ index ff2337a..e6bc8fa 100755
isize += size;
}
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From 794d83cb28a93d9ae1e613598d3c7cf09090d6a3 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Fri, 11 Nov 2011 19:49:46 +0200
Subject: [PATCH 6/9] Allow frontend to control random number seed
Subject: [PATCH 06/10] Allow frontend to control random number seed
---
snes/interface/interface.cpp | 5 +++++
@ -49,5 +49,5 @@ index 6881810..8583595 100755
region = config.region;
expansion = config.expansion_port;
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From 4f6981592e29038ad9f818399c0d5a48750cf28a Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 7 Mar 2012 16:57:18 +0200
Subject: [PATCH 7/9] Fix mouse polling
Subject: [PATCH 07/10] Fix mouse polling
Don't poll for mouse motion excessive number of times (no need to poll it for
each bit!)
@ -59,5 +59,5 @@ index b66ea51..b07c8ab 100755
+ int _position_y;
};
--
1.8.4.rc3
1.8.4.4

View file

@ -1,8 +1,8 @@
From 7b09063fbcaf50c56b476a744f9f3d9634777740 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Mon, 24 Sep 2012 21:46:09 +0300
Subject: [PATCH 8/9] Add needed support for detecting true polls as opposed to
just autopolling
Subject: [PATCH 08/10] Add needed support for detecting true polls as opposed
to just autopolling
---
snes/cpu/cpu.hpp | 1 +
@ -65,5 +65,5 @@ index 8b6aaa6..c5ee930 100755
//DMAPx
uint8 CPU::mmio_r43x0(uint8 i) {
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From 62f8a07104b57b75071318098145d99012dbc908 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Sun, 27 Oct 2013 10:52:45 +0200
Subject: [PATCH 9/9] Support notifying latches
Subject: [PATCH 09/10] Support notifying latches
---
snes/cpu/mmio/mmio.cpp | 1 +
@ -61,5 +61,5 @@ index 30ee7fd..203f7b0 100755
extern Interface *interface;
--
1.8.4.rc3
1.8.4.4

View file

@ -0,0 +1,22 @@
From 242efcc9cf10fa58c8e06f154c41db21e6aa2688 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Sat, 30 Nov 2013 10:26:59 +0200
Subject: [PATCH 10/10] Add support for auto-detecting bsnes version
---
bsnes.mk | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 bsnes.mk
diff --git a/bsnes.mk b/bsnes.mk
new file mode 100644
index 0000000..11300e2
--- /dev/null
+++ b/bsnes.mk
@@ -0,0 +1,3 @@
+BSNES_SUPPORTS_DEBUGGER=yes
+LIBSNES_DIR=ui-libsnes
+BSNES_VERSION=084
--
1.8.4.4

View file

@ -1,7 +1,7 @@
From b19b3b2d1d7a522af695f4482abb28e52804326b Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 9 Nov 2011 00:30:36 +0200
Subject: [PATCH 01/12] Make libsnes compile
Subject: [PATCH 01/13] Make libsnes compile
Changes between v083 and v084 had broken libsnes. Fix it so it at least
compiles.

View file

@ -1,7 +1,7 @@
From bb2fed04fbfe62a89e4bcfe90f44b4738f7c7c1a Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 9 Nov 2011 00:31:59 +0200
Subject: [PATCH 02/12] Fix bsnes version number in libsnes to be v085, not
Subject: [PATCH 02/13] Fix bsnes version number in libsnes to be v085, not
v083
---

View file

@ -1,7 +1,7 @@
From 7379b4570e5755a5a1da25181ba4f5d1ca461a98 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 9 Nov 2011 00:37:44 +0200
Subject: [PATCH 03/12] Don't use time() in emulating chips
Subject: [PATCH 03/13] Don't use time() in emulating chips
Instead of using time() in chip emulation, create new interface method
currentTime(), defaulting to time(0). This way frontend can cleanly

View file

@ -1,7 +1,7 @@
From efe1b5884c316ce070953edd87c6c9aeffffaa94 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 9 Nov 2011 01:52:08 +0200
Subject: [PATCH 04/12] Save controller state when savestating
Subject: [PATCH 04/13] Save controller state when savestating
When savestating, save the controller state and restore it upon loadstate.
Prevents libsnes from mixing up buttons.

View file

@ -1,7 +1,7 @@
From cdf2f46490f128308eb7f399d03530936ebeda0a Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Fri, 11 Nov 2011 03:05:48 +0200
Subject: [PATCH 05/12] Fix unserialization of 64-bit signed integers
Subject: [PATCH 05/13] Fix unserialization of 64-bit signed integers
---
nall/serializer.hpp | 2 +-

View file

@ -1,7 +1,7 @@
From 4dc46334ec175e26277632fee4aea80768749af9 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Fri, 11 Nov 2011 19:49:46 +0200
Subject: [PATCH 06/12] Allow frontend to control random number seed
Subject: [PATCH 06/13] Allow frontend to control random number seed
---
snes/interface/interface.cpp | 5 +++++

View file

@ -1,7 +1,7 @@
From eeaf6dc52d39ca9c150ff61864c11297d200d968 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 7 Mar 2012 16:57:18 +0200
Subject: [PATCH 07/12] Fix mouse polling
Subject: [PATCH 07/13] Fix mouse polling
Don't poll for mouse motion excessive number of times (no need to poll it for
each bit!)

View file

@ -1,7 +1,7 @@
From 7018377c93553071fc404db872b2746d40ac3bce Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Sat, 1 Sep 2012 11:23:34 +0300
Subject: [PATCH 08/12] Fix uninitialized variables
Subject: [PATCH 08/13] Fix uninitialized variables
These uninitialized variables cause a lot of desyncs in Shadowrun.
---

View file

@ -1,7 +1,7 @@
From 6e0364c9a86caa71623a188a720b2d68b304b89b Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Mon, 24 Sep 2012 21:46:09 +0300
Subject: [PATCH 09/12] Add needed support for detecting true polls as opposed
Subject: [PATCH 09/13] Add needed support for detecting true polls as opposed
to just autopolling
---

View file

@ -1,7 +1,7 @@
From e397bd46f17d6ea00c8c96d5a8e0c5f5b4a6f642 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Sun, 14 Oct 2012 23:31:36 +0300
Subject: [PATCH 10/12] Fix compiling on GCC 4.7
Subject: [PATCH 10/13] Fix compiling on GCC 4.7
---
nall/string.hpp | 2 +-

View file

@ -1,7 +1,7 @@
From e047aa8eb9883f60e4141effba8128a4a555d8be Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Sun, 27 Oct 2013 10:52:45 +0200
Subject: [PATCH 11/12] Support notifying latches
Subject: [PATCH 11/13] Support notifying latches
---
snes/cpu/mmio/mmio.cpp | 1 +

View file

@ -1,7 +1,7 @@
From a5b380757b086e3a00b47fe14e2a63c74683e8da Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Thu, 28 Nov 2013 22:36:29 +0200
Subject: [PATCH 12/12] Support unlimited number of breakpoints
Subject: [PATCH 12/13] Support unlimited number of breakpoints
---
snes/alt/cpu/cpu.cpp | 22 +++++++-------

View file

@ -0,0 +1,22 @@
From 8bc6bb381e680616dcc843c99889799aedd43163 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Sat, 30 Nov 2013 10:27:37 +0200
Subject: [PATCH 13/13] Support auto-detecting bsnes version
---
bsnes.mk | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 bsnes.mk
diff --git a/bsnes.mk b/bsnes.mk
new file mode 100644
index 0000000..20f22f6
--- /dev/null
+++ b/bsnes.mk
@@ -0,0 +1,3 @@
+BSNES_SUPPORTS_DEBUGGER=yes
+LIBSNES_DIR=ui-libsnes
+BSNES_VERSION=085
--
1.8.4.4

View file

@ -1,7 +1,7 @@
From 6c3da8eb6516d25e97b46d97fb0d3d24ca9ecfd0 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 9 Nov 2011 00:37:44 +0200
Subject: [PATCH 1/7] Don't use time() in emulating chips
Subject: [PATCH 1/8] Don't use time() in emulating chips
Instead of using time() in chip emulation, create new interface method
currentTime(), defaulting to time(0). This way frontend can cleanly
@ -80,5 +80,5 @@ index f1a48c0..df975e8 100755
extern Interface *interface;
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From c87e7d9288a91db3b32b5ba4b2b74e52c0d3c11d Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 9 Nov 2011 01:52:08 +0200
Subject: [PATCH 2/7] Save controller state when savestating
Subject: [PATCH 2/8] Save controller state when savestating
When savestating, save the controller state and restore it upon loadstate.
Prevents libsnes from mixing up buttons.
@ -342,5 +342,5 @@ index 9f5273d..005e731 100755
if(cartridge.mode() == Cartridge::Mode::SufamiTurbo) sufamiturbo.serialize(s);
#if defined(GAMEBOY)
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From a62794b0bfa1d2bfc8907a1e4d4e5aa6fe3ee426 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Fri, 11 Nov 2011 19:49:46 +0200
Subject: [PATCH 3/7] Allow frontend to control random number seed
Subject: [PATCH 3/8] Allow frontend to control random number seed
---
snes/interface/interface.cpp | 5 +++++
@ -49,5 +49,5 @@ index 284e389..99901ff 100755
region = config.region;
expansion = config.expansion_port;
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From 33ecd422954b7e15d9e83b7035b07ffb52f4e1e8 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 7 Mar 2012 16:57:18 +0200
Subject: [PATCH 4/7] Fix mouse polling
Subject: [PATCH 4/8] Fix mouse polling
Don't poll for mouse motion excessive number of times (no need to poll it for
each bit!)
@ -59,5 +59,5 @@ index b66ea51..b07c8ab 100755
+ int _position_y;
};
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From 52a1a595f4473b4de0cdedcb018aef68108a2c73 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Mon, 24 Sep 2012 21:46:09 +0300
Subject: [PATCH 5/7] Add needed support for detecting true polls as opposed to
Subject: [PATCH 5/8] Add needed support for detecting true polls as opposed to
just autopolling
---
@ -65,5 +65,5 @@ index 8b6aaa6..c5ee930 100755
//DMAPx
uint8 CPU::mmio_r43x0(uint8 i) {
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From 74b67f36961839fcbc1caa23930151bd9b3e9d7e Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Sun, 14 Oct 2012 23:29:40 +0300
Subject: [PATCH 6/7] Fix compiling on GCC 4.7
Subject: [PATCH 6/8] Fix compiling on GCC 4.7
---
nall/string.hpp | 2 +-
@ -34,5 +34,5 @@ index 3b2be7a..ca90762 100755
#include <nall/snes/cartridge.hpp>
#include <nall/gameboy/cartridge.hpp>
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From 5dc532e67245f1e83504be4a21fef1ab15b08af2 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Sun, 27 Oct 2013 10:52:45 +0200
Subject: [PATCH 7/7] Support notifying latches
Subject: [PATCH 7/8] Support notifying latches
---
snes/cpu/mmio/mmio.cpp | 1 +
@ -61,5 +61,5 @@ index 30ee7fd..203f7b0 100755
extern Interface *interface;
--
1.8.4.rc3
1.8.4.4

View file

@ -0,0 +1,22 @@
From ce0634fe5a8dea973ca9c357ec788740fbcfcf09 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Sat, 30 Nov 2013 10:28:05 +0200
Subject: [PATCH 8/8] Support auto-detecting bsnes version
---
bsnes.mk | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 bsnes.mk
diff --git a/bsnes.mk b/bsnes.mk
new file mode 100644
index 0000000..2248b71
--- /dev/null
+++ b/bsnes.mk
@@ -0,0 +1,3 @@
+BSNES_SUPPORTS_DEBUGGER=
+LIBSNES_DIR=ui-libsnes
+BSNES_VERSION=086
--
1.8.4.4

View file

@ -1,7 +1,7 @@
From a8018b3c90314bd0c112842fe81b27e978b891eb Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 9 Nov 2011 00:37:44 +0200
Subject: [PATCH 1/7] Don't use time() in emulating chips
Subject: [PATCH 1/8] Don't use time() in emulating chips
Instead of using time() in chip emulation, create new interface method
currentTime(), defaulting to time(0). This way frontend can cleanly
@ -80,5 +80,5 @@ index f1a48c0..df975e8 100755
extern Interface *interface;
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From de423d6ec33a20f33652c6b9c8ce703b867b51bd Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 9 Nov 2011 01:52:08 +0200
Subject: [PATCH 2/7] Save controller state when savestating
Subject: [PATCH 2/8] Save controller state when savestating
When savestating, save the controller state and restore it upon loadstate.
Prevents libsnes from mixing up buttons.
@ -342,5 +342,5 @@ index f746c3a..67e08a2 100755
if(cartridge.mode() == Cartridge::Mode::SufamiTurbo) sufamiturbo.serialize(s);
#if defined(GAMEBOY)
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From e1fce124df0a1ea43324df65b9d0ee7262eda988 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Fri, 11 Nov 2011 19:49:46 +0200
Subject: [PATCH 3/7] Allow frontend to control random number seed
Subject: [PATCH 3/8] Allow frontend to control random number seed
---
snes/interface/interface.cpp | 5 +++++
@ -49,5 +49,5 @@ index 9b70bbf..cbd096c 100755
region = config.region;
expansion = config.expansion_port;
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From 21e21c3b953f499bb3e309ff6a04b38763e7910a Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Wed, 7 Mar 2012 16:57:18 +0200
Subject: [PATCH 4/7] Fix mouse polling
Subject: [PATCH 4/8] Fix mouse polling
Don't poll for mouse motion excessive number of times (no need to poll it for
each bit!)
@ -59,5 +59,5 @@ index b66ea51..b07c8ab 100755
+ int _position_y;
};
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From 9b14075f51587694015f8507f1c7cb565fee8225 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Mon, 24 Sep 2012 21:46:09 +0300
Subject: [PATCH 5/7] Add needed support for detecting true polls as opposed to
Subject: [PATCH 5/8] Add needed support for detecting true polls as opposed to
just autopolling
---
@ -65,5 +65,5 @@ index 8b6aaa6..c5ee930 100755
//DMAPx
uint8 CPU::mmio_r43x0(uint8 i) {
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From 8c41bf9b792c08ecbf22a87d4e85f3e4801e62d2 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Sun, 14 Oct 2012 23:25:33 +0300
Subject: [PATCH 6/7] Add missing include to libsnes.cpp
Subject: [PATCH 6/8] Add missing include to libsnes.cpp
---
target-libsnes/libsnes.cpp | 1 +
@ -19,5 +19,5 @@ index 3b2be7a..ca90762 100755
#include <nall/snes/cartridge.hpp>
#include <nall/gameboy/cartridge.hpp>
--
1.8.4.rc3
1.8.4.4

View file

@ -1,7 +1,7 @@
From 13643c86bfff3871968cf6e8b4f991465d4e81e7 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Sun, 27 Oct 2013 10:52:45 +0200
Subject: [PATCH 7/7] Support notifying latches
Subject: [PATCH 7/8] Support notifying latches
---
snes/cpu/mmio/mmio.cpp | 1 +
@ -61,5 +61,5 @@ index 30ee7fd..203f7b0 100755
extern Interface *interface;
--
1.8.4.rc3
1.8.4.4

View file

@ -0,0 +1,22 @@
From e74f6d6ce7b369d82abf1eed6d7c3e99af0d8f64 Mon Sep 17 00:00:00 2001
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Date: Sat, 30 Nov 2013 10:28:40 +0200
Subject: [PATCH 8/8] Support auto-dectecting bsnes version
---
bsnes.mk | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 bsnes.mk
diff --git a/bsnes.mk b/bsnes.mk
new file mode 100644
index 0000000..c31911f
--- /dev/null
+++ b/bsnes.mk
@@ -0,0 +1,3 @@
+BSNES_SUPPORTS_DEBUGGER=
+LIBSNES_DIR=target-libsnes
+BSNES_VERSION=087
--
1.8.4.4

View file

@ -103,9 +103,8 @@ SECRET_RABBIT_CODE=
# Set to non-empty value (e.g. 'yes') to build the gambatte core.
BUILD_GAMBATTE=
# Bsnes version used. Non-empty value also causes bsnes core to be built.
# 087 has different layout from the rest.
BSNES_VERSION=085
# Set to non-empty value (e.g. 'yes') to build the bsnes core.
BUILD_BSNES=yes
# Set to non-empty value (e.g. 'yes') if bsnes build uses compatiblity core, not accuracy core.
BSNES_IS_COMPAT=

View file

@ -1,4 +1,4 @@
ifdef BSNES_VERSION
ifdef BUILD_BSNES
OBJECTS=core.$(OBJECT_SUFFIX) scpu-disasm.$(OBJECT_SUFFIX) bitmap.$(OBJECT_SUFFIX)
BSNES_CFLAGS=
BSNES_LDFLAGS=
@ -8,22 +8,20 @@ BSNES_PROFILE_STRING=profile=compatibility
else
BSNES_PROFILE_STRING=profile=accuracy
endif
ifeq ($(BSNES_VERSION), 084)
BSNES_PROFILE_STRING+=options=debugger
CFLAGS += -DBSNES_HAS_DEBUGGER
else
ifeq ($(BSNES_VERSION), 085)
include ../../../bsnes/bsnes.mk
ifdef BSNES_SUPPORTS_DEBUGGER
BSNES_PROFILE_STRING+=options=debugger
CFLAGS += -DBSNES_HAS_DEBUGGER
endif
endif
ifeq ($(BSNES_VERSION), 087)
BSNES_TARGET_STRING=target=libsnes
else
BSNES_TARGET_STRING=ui=ui-libsnes
endif
CFLAGS += -DBSNES_V${BSNES_VERSION}
CFLAGS += -DBSNES_VERSION=\"${BSNES_VERSION}\"
CFLAGS += -DLIBSNES_INCLUDE_FILE=\"${LIBSNES_DIR}/libsnes.hpp\"
BSNES_LIBRARY=bsnes/out/libsnes.$(ARCHIVE_SUFFIX)

View file

@ -45,11 +45,7 @@
#endif
#include <snes/snes.hpp>
#include <gameboy/gameboy.hpp>
#ifdef BSNES_V087
#include <target-libsnes/libsnes.hpp>
#else
#include <ui-libsnes/libsnes.hpp>
#endif
#include LIBSNES_INCLUDE_FILE
#define DURATION_NTSC_FRAME 357366
#define DURATION_NTSC_FIELD 357368