From 7423a00fbf4bca27c136be66bbc8f1026c9e5515 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Sat, 22 Aug 2020 14:02:30 -0400 Subject: [PATCH] Gambatte: use homebrew fast load BIOS files instead of Sameboy when use real bios is false --- .../Consoles/Nintendo/Gameboy/Gambatte.cs | 6 +++--- .../Properties/Resources.cs | 9 ++++++--- .../Resources/agb_boot.rom.gz | Bin 1858 -> 227 bytes .../Resources/cgb_boot.rom.gz | Bin 1688 -> 225 bytes .../Resources/dmg_boot.rom.gz | Bin 226 -> 140 bytes .../Resources/sameboy_agb_boot.rom.gz | Bin 0 -> 1866 bytes .../Resources/sameboy_cgb_boot.rom.gz | Bin 0 -> 1696 bytes .../Resources/sameboy_dmg_boot.rom.gz | Bin 0 -> 234 bytes 8 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 src/BizHawk.Emulation.Cores/Resources/sameboy_agb_boot.rom.gz create mode 100644 src/BizHawk.Emulation.Cores/Resources/sameboy_cgb_boot.rom.gz create mode 100644 src/BizHawk.Emulation.Cores/Resources/sameboy_dmg_boot.rom.gz diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs index d12a75d6dc..2eed6763c6 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs @@ -108,9 +108,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy else { var builtinBios = (biosSystemId, biosId) switch { - ("GB", "World") => Resources.SameboyDmgBoot, - ("GBC", "World") => Resources.SameboyCgbBoot, - ("GBC", "AGB") => Resources.SameboyAgbBoot, + ("GB", "World") => Resources.FastDmgBoot, + ("GBC", "World") => Resources.FastCgbBoot, + ("GBC", "AGB") => Resources.FastAgbBoot, (_, _) => throw new Exception("Internal GB Error (BIOS??)"), }; bios = BizHawk.Common.Util.DecompressGzipFile(new MemoryStream(builtinBios.Value, false)); diff --git a/src/BizHawk.Emulation.Cores/Properties/Resources.cs b/src/BizHawk.Emulation.Cores/Properties/Resources.cs index 4bcb534912..caf84ab094 100644 --- a/src/BizHawk.Emulation.Cores/Properties/Resources.cs +++ b/src/BizHawk.Emulation.Cores/Properties/Resources.cs @@ -15,9 +15,12 @@ namespace BizHawk.Emulation.Cores.Properties { internal static readonly Lazy CPC_BASIC_1_1_ROM = new Lazy(() => ReadEmbeddedByteArray("CPC_BASIC_1.1.ROM.gz")); internal static readonly Lazy CPC_OS_6128_ROM = new Lazy(() => ReadEmbeddedByteArray("CPC_OS_6128.ROM.gz")); internal static readonly Lazy OS_464_ROM = new Lazy(() => ReadEmbeddedByteArray("OS_464.ROM.gz")); - internal static readonly Lazy SameboyCgbBoot = new Lazy(() => ReadEmbeddedByteArray("cgb_boot.rom.gz")); - internal static readonly Lazy SameboyAgbBoot = new Lazy(() => ReadEmbeddedByteArray("agb_boot.rom.gz")); - internal static readonly Lazy SameboyDmgBoot = new Lazy(() => ReadEmbeddedByteArray("dmg_boot.rom.gz")); + internal static readonly Lazy FastCgbBoot = new Lazy(() => ReadEmbeddedByteArray("cgb_boot.rom.gz")); + internal static readonly Lazy FastAgbBoot = new Lazy(() => ReadEmbeddedByteArray("agb_boot.rom.gz")); + internal static readonly Lazy FastDmgBoot = new Lazy(() => ReadEmbeddedByteArray("dmg_boot.rom.gz")); + internal static readonly Lazy SameboyCgbBoot = new Lazy(() => ReadEmbeddedByteArray("sameboy_cgb_boot.rom.gz")); + internal static readonly Lazy SameboyAgbBoot = new Lazy(() => ReadEmbeddedByteArray("sameboy_agb_boot.rom.gz")); + internal static readonly Lazy SameboyDmgBoot = new Lazy(() => ReadEmbeddedByteArray("sameboy_dmg_boot.rom.gz")); internal static readonly Lazy SgbCartPresent_SPC = new Lazy(() => ReadEmbeddedByteArray("sgb-cart-present.spc.gz")); internal static readonly Lazy ZX_128_ROM = new Lazy(() => ReadEmbeddedByteArray("128.ROM.gz")); internal static readonly Lazy ZX_48_ROM = new Lazy(() => ReadEmbeddedByteArray("48.ROM.gz")); diff --git a/src/BizHawk.Emulation.Cores/Resources/agb_boot.rom.gz b/src/BizHawk.Emulation.Cores/Resources/agb_boot.rom.gz index 1a778e92d77125ce3bcf8d96a99da215a5ebd672..75482e66635cfc7720b924d9b1dc9fcc429ad763 100644 GIT binary patch literal 227 zcmV<90381xiwFqrQbAt?0AXihUt(`>bS`plZ2;}kzY76j9LMqR2^k$W$|+=0Mx`%d zH24>6ek?YNy89FOOZ*d3lGXg3jEL=yJ0IO*aFoH~dDp9Z>iO0^^*kDp9;4ipDz3*> zu~`#`%W`Fs8#JXwL9r!8j1+hxd8~C#N&?>$y^H74IJMoGVQ(pf1sQhDjT=tj{6z|o zpfAG##|ze@+RI(((w}Fyv_pNr+?b`vE-aljE^x@6jM#)MG~o;xAm69`rw7uUQd0037bYBc}= literal 1858 zcmV-I2fg?oiwFpWJKA0X0AXihUt(`>bS`plZ2;v}`I8Gl6z<7nMi$8?Vi}Q5dJ;zj zvF=d2lihX19TtUh#8Krwt0>3rCUNd6inx!WEJZmAS>-NQ+{PHUbrssRu0j@ZMp|e2 zLHQSS^}P4K*RQ{xem&E#aU9EaSV5tg_@vHNxgPtZPFz!DQNx%Y3vjT-Ygir3tvNV5cbv0U0X|(bZ z5G{cvbQ*gO5?ft1OAX(YG`OYHf*RKt_%Ov*JwbJtk4jha?2^KFk3dWER(QK z5=(ZddHCR}=R;9XC>T>2LItN=5G^$q*0KKJpmDKEZ?X$9SvfFiT*BRzC z?46U913Pxh>e!`Yn|3e({RcssPYp|A{77 z3GIeq)3b|HBqjDY9^a`Q0NDS&CQu}_Is1b#p_k`$s+Z81ZbX%j(XyZ;5;(Z1&Bp7ofs$bPrQp>_WR$;_LuW7 z^ntwJ`w0vI34XsfAAo7@V3UH>Au2kU%zJNt8d97WPlWKObBH*1@p}H;*<~;R}IC&#$8&vwpPv4)&5Pvo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f^}Tvb)D&qV-YLIrrCoVN8j zefaQNNQ`#sIUOqSIg!n#oiacSIpj{xy~p+wPRncQsZ_~Qbw;|z{ zI13#H=8sLNl!|Fn@RGJ48|s@dtptpmq)-N!jxZZ}Q|gIR>_fGMqmSg3rn=iRC{I$L zCPJ3xe6Qj*KDME(>Ji4GaASe{*p#xW;JP21QC3x4O{zh0JcFWI3m^U{A=gx^Po!jY zAAUdeN~1d5gQ=$`k51lc|FJf;AK#yPs`u!mvBPMgY0@1{#?yB6g*wO?gNxg7Zv%NLw_>TP8nDSP5X}KNv7P zPnX_zrpS|JgTWkzj(O5N?sYmbqyytu3-z24Zc80)<~5K2*g3 diff --git a/src/BizHawk.Emulation.Cores/Resources/dmg_boot.rom.gz b/src/BizHawk.Emulation.Cores/Resources/dmg_boot.rom.gz index 6096a5745bfca48c67139db647eea439c725fbbd..4e8a5c23503b1a2ddd14f7ec7732a0b346ebcb3d 100644 GIT binary patch literal 140 zcmV;70CWEziwFo2>px!v0Ay`vUt(`>bS`plZ2+x`I|_q96h+_cAZivcff!N+QU=0B z)K+jeHWq>_uybjacL{>ssH1NKT6y4pien-P26+_b>o@%9U^wH$1;SO6GLs|F@TE$O uickFkB8IwmIRhP&G55W7+G5?`-|T$mPmDF8Tn^rC&2k4rKg>b^0RR94Y&u#1 literal 226 zcmV<803H7yiwFqP+h$n=0Ay`vUt(`>bS`plZ2+yvJrBW97zN4yBe58Yql=eS3Imvl)D(+W+u3G)V8+FPP z!v`fOhXcyuhdL}EiMXEW*kkajj4m~PXB&{i8Aa8i{E6vvd?m^&InpSEtKLzHr5v17 zGgP$KfD_w*P|Vlf*TR$7N~fFXN|FNX2nQE1AcMsni`^{N;LcFhRL#7$-5GzG_7Z~L ckb+Z6n)TMs*cq)l{4Lb`0YLpB_W%I^0C~4+jQ{`u diff --git a/src/BizHawk.Emulation.Cores/Resources/sameboy_agb_boot.rom.gz b/src/BizHawk.Emulation.Cores/Resources/sameboy_agb_boot.rom.gz new file mode 100644 index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D1I^TlhVx!Q&l`Hij=1rZ;7haYt*b2YrKEs{*8@ei1PYHQHi0fWm_d2cN9g_ zUN1_gbLB(c9Q=q7;;bM)Y>&rPbk4!8HOK}yX7lEOCKN)SLH2vSurh7>%z5*W2r|(% zH1pn@4_~G#-~7D#fZ|GGVm3{bxajxh^3c=S&xx4hM2RKT?8HPY7E>%g08R{z88dO> zq)GMT6W+gn^yu`tb8FVD1*|!UkOe>}6oRPYv6$CyWi1F`Ew}*(p#KIX1OUgMR5cz4 z0YcKgtE#B*@?){YhYxS=%~WkWO^B{rmMuC*haAKX9*jE(g-SSS`kf^}Tvb)D&qV-Y zLIrrCoVN8jefaQNNQ`#sIUOqSIg!n#oiacSIpj{xy~p+wPRncQsZ_~Qbw;|z{I13#H=8sLNl!|Fn@RGJ48|s@dtptpmq)-N!jxZZ}Q|gIR>_fGMqmSg3 zrn=iRC{I$LCPJ3xe6Qj*KDME(>Ji4GaASe{*p#xW;JP21QC3x4O{zh0JcFWI3m^U{ zA=gx^Po!jYAAUdeN~1d5gQ=$`k51lc|FJf;AK#yPs`u!mvBPMgY0@1{#?yB6g*wO?gNxg7Zv%NLw_>TP8nD zSP5X}KNv7PPnX_zrpS|JgTWkzj(O5N?sYmbqyytu3-z24Zc80)<}po>&wB literal 0 HcmV?d00001 diff --git a/src/BizHawk.Emulation.Cores/Resources/sameboy_dmg_boot.rom.gz b/src/BizHawk.Emulation.Cores/Resources/sameboy_dmg_boot.rom.gz new file mode 100644 index 0000000000000000000000000000000000000000..831acd61f78277db5d4cb49e734a8d130efd5d33 GIT binary patch literal 234 zcmVbS`plZ2+yvJrBW97zN4yBe58Yql=eS3Imvl)D(+W+ zu3G)V8+FPP!v`fOhXcyuhdL}EiMXEW*kkajj4m~PXB&{i8Aa8i{E6vvd?m^&InpSE ztKLzHr5v17GgP$KfD_w*P|Vlf*TR$7N~fFXN|FNX2nQE1AcMsni`^{N;LcFhRL#7$ k-5GzG_7Z~Lkb+Z6n)TMs*cq)l{4Lb`0YLpB_W%I^0Bq20+yDRo literal 0 HcmV?d00001