From 2adcea17d7494ea05f759fbc60c4ffe5d98770cc Mon Sep 17 00:00:00 2001 From: bardeci Date: Wed, 21 Apr 2021 04:02:59 +0200 Subject: [PATCH] Added several upscalers (for devices which support them) -Added several upscalers (for devices which support them). -Merged RG350 and RG350M versions. -Simplified several functions. -Removed some redundant files. -Updated some build scripts. --- build_gcw0.sh | 26 +++++ build_retrofw_ipk.sh | 31 +++++ build_retrofw_opk.sh | 26 +++++ dist/gambatte_dmg.png | Bin 0 -> 789 bytes dist/gambatte_dms.png | Bin 0 -> 1110 bytes dist/gambatte_gbc.png | Bin 0 -> 614 bytes dist/manual.txt | 266 ++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 349 insertions(+) create mode 100755 build_gcw0.sh create mode 100755 build_retrofw_ipk.sh create mode 100755 build_retrofw_opk.sh create mode 100644 dist/gambatte_dmg.png create mode 100644 dist/gambatte_dms.png create mode 100644 dist/gambatte_gbc.png create mode 100644 dist/manual.txt diff --git a/build_gcw0.sh b/build_gcw0.sh new file mode 100755 index 0000000..b8aac0c --- /dev/null +++ b/build_gcw0.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +BDAT=$(date +"%Y%m%d-%H%M%S") +echo '#define BUILDDATE "'$BDAT'"' >./gambatte_sdl/builddate.h + +echo "cd libgambatte && scons" +(cd libgambatte && scons -Q target=gcw0) || exit +echo "cd gambatte_sdl && scons" +(cd gambatte_sdl && scons -Q target=gcw0) +mv gambatte_sdl/gambatte_sdl gambatte_sdl/gambatte-dms.gcw0 + +echo "cd gambatte_sdl && scons -c" +(cd gambatte_sdl && scons -c) +echo "cd libgambatte && scons -c" +(cd libgambatte && scons -c) +echo "rm -f *gambatte*/config.log" +rm -f *gambatte*/config.log +echo "rm -rf *gambatte*/.scon*" +rm -rf *gambatte*/.scon* +find . -type f -iname \*.o -delete +find . -type f -iname gambatte_sdl -delete + +rm -f gambatte-dms-gcw0-r572u4-$BDAT.opk +mksquashfs ./dist/gcw0/default.gcw0.desktop ./gambatte_sdl/gambatte-dms.gcw0 ./dist/gcw0/gambatte_dms.png ./dist/gcw0/manual.txt gambatte-dms-gcw0-r572u4-$BDAT.opk -all-root -no-xattrs -noappend -no-exports + +find . -type f -iname gambatte-dms.gcw0 -delete diff --git a/build_retrofw_ipk.sh b/build_retrofw_ipk.sh new file mode 100755 index 0000000..20bb608 --- /dev/null +++ b/build_retrofw_ipk.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +BDAT=$(date +"%Y%m%d-%H%M%S") +echo '#define BUILDDATE "'$BDAT'"' >./gambatte_sdl/builddate.h + +echo "cd libgambatte && scons" +(cd libgambatte && scons -Q target=retrofw) || exit +echo "cd gambatte_sdl && scons" +(cd gambatte_sdl && scons -Q target=retrofw) + +rm -rf /tmp/.gambatte-ipk/ && mkdir -p /tmp/.gambatte-ipk/root/home/retrofw/emus/gambatte /tmp/.gambatte-ipk/root/home/retrofw/apps/gmenu2x/sections/emulators /tmp/.gambatte-ipk/root/home/retrofw/apps/gmenu2x/sections/emulators.systems +cp dist/manual.txt dist/gambatte_dms.png dist/gambatte_dmg.png dist/gambatte_gbc.png /tmp/.gambatte-ipk/root/home/retrofw/emus/gambatte +cp gambatte_sdl/gambatte_sdl /tmp/.gambatte-ipk/root/home/retrofw/emus/gambatte/gambatte-dms.dge +cp dist/retrofw/gambatte.lnk /tmp/.gambatte-ipk/root/home/retrofw/apps/gmenu2x/sections/emulators +cp dist/retrofw/gb.gambatte.lnk dist/retrofw/gbc.gambatte.lnk /tmp/.gambatte-ipk/root/home/retrofw/apps/gmenu2x/sections/emulators.systems +sed "s/^Version:.*/Version: `date +%Y%m%d`/" dist/retrofw/control > /tmp/.gambatte-ipk/control +tar --owner=0 --group=0 -czvf /tmp/.gambatte-ipk/control.tar.gz -C /tmp/.gambatte-ipk/ control +tar --owner=0 --group=0 -czvf /tmp/.gambatte-ipk/data.tar.gz -C /tmp/.gambatte-ipk/root/ . +echo 2.0 > /tmp/.gambatte-ipk/debian-binary +ar r gambatte-dms-retrofw-r572u4-$BDAT.ipk /tmp/.gambatte-ipk/control.tar.gz /tmp/.gambatte-ipk/data.tar.gz /tmp/.gambatte-ipk/debian-binary + +echo "cd gambatte_sdl && scons -c" +(cd gambatte_sdl && scons -c) +echo "cd libgambatte && scons -c" +(cd libgambatte && scons -c) +echo "rm -f *gambatte*/config.log" +rm -f *gambatte*/config.log +echo "rm -rf *gambatte*/.scon*" +rm -rf *gambatte*/.scon* +find . -type f -iname \*.o -delete +find . -type f -iname gambatte_sdl -delete diff --git a/build_retrofw_opk.sh b/build_retrofw_opk.sh new file mode 100755 index 0000000..f4321b0 --- /dev/null +++ b/build_retrofw_opk.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +BDAT=$(date +"%Y%m%d-%H%M%S") +echo '#define BUILDDATE "'$BDAT'"' >./gambatte_sdl/builddate.h + +echo "cd libgambatte && scons" +(cd libgambatte && scons -Q target=retrofw) || exit +echo "cd gambatte_sdl && scons" +(cd gambatte_sdl && scons -Q target=retrofw) +mv gambatte_sdl/gambatte_sdl gambatte_sdl/gambatte-dms.retrofw + +echo "cd gambatte_sdl && scons -c" +(cd gambatte_sdl && scons -c) +echo "cd libgambatte && scons -c" +(cd libgambatte && scons -c) +echo "rm -f *gambatte*/config.log" +rm -f *gambatte*/config.log +echo "rm -rf *gambatte*/.scon*" +rm -rf *gambatte*/.scon* +find . -type f -iname \*.o -delete +find . -type f -iname gambatte_sdl -delete + +rm -f gambatte-dms-retrofw-r572u4-$BDAT.opk +mksquashfs ./dist/gcw0/default.gcw0.desktop ./gambatte_sdl/gambatte-dms.gcw0 ./dist/gcw0/gambatte_dms.png ./dist/manual.txt gambatte-dms-gcw0-r572u4-$BDAT.opk -all-root -no-xattrs -noappend -no-exports + +find . -type f -iname gambatte-dms.retrofw -delete diff --git a/dist/gambatte_dmg.png b/dist/gambatte_dmg.png new file mode 100644 index 0000000000000000000000000000000000000000..03b97f39b4e784ddebe16c996fe2b5ae8705bac2 GIT binary patch literal 789 zcmV+w1M2*VP)7#%x9yLSMT7rh@ zQhe;#+Hj&lo3?m@!1?2m+2#zscc*zr|9}D($V${d<M_^$fZ*71+CmKK*+3?mE!C@*0zbAY|f0luiRjlSwp zy$n4>h92U$bjB7i;(Y_h<7Z8r4o_Py=a6P}coxT{DqBFS@tX#?oI~9S@CEPONPR%Q zTLGc>x2~n@0Zxafvw(630Y{(j{=I%jxQQ^wfYaIsUOJ}fHZLnBvSW9uO#|8cW$utLUJ`TUx4Q@Wp9*{3p zwJ#Dv2$Crd$rK05ON!dv7Ru+!py>&?`8bkk4t|pxKJpNLvztA@Vzq$~g5H6C+%ua% z2!X|F*B!MQ;5WH3c>4kTW_QyG6gvs9SZ#P3m_YA9KP*zHVViTd*TJ3tPcH}Zr+`2N(ZPc9rYk<&51~16koi}$nfxVP_7+i}AHHR4bHELZ&oh!zl8 T`PEY=00000NkvXXu0mjfp2=v1 literal 0 HcmV?d00001 diff --git a/dist/gambatte_dms.png b/dist/gambatte_dms.png new file mode 100644 index 0000000000000000000000000000000000000000..a32239e4bb9bf6c57c9a00003ddf2117e0903825 GIT binary patch literal 1110 zcmV-c1gZOpP)| zvKURPCQYr{*f`jmi4cg5W@b>wM2N=Ib}+gMt<$?pJMZ+hP?K~^l+LJsfq%nyFD`fH za(8L88-wk|hdenBzMtp!{PH|`2mnF|!QTl0QY(ZIf>``MUc7vz@Vm;NRoVUHz?4}0 zJ}8Q+S(Fe$zzY)A)}Lc-{W*SB*{I|6~V}fDUP0> zR1rm>*BgT4i?0kg9iFPN&Tb7~&t2^1i=Ze9Hk%DLn+-Hg8(`Q;1S2PU0kiP43b4-Z zngnQ?t}fsYzjG$a1u`Xp&Z}N@UiBh0I<9dhfr;`+Q-Fm%%ujlT$gRl37;TaeMFG@94p!3GhMuA9l4nO?(i;m&Z zX$+4}Yh(3uLy)i`>fuEhyeK2PcVrM~x$H&zwMnquN%Vws+KH$W*x)x61Qn?&ym-p# zvr_?vod&~Bqbn%sC_j=70-5{)>g`Raw>M!S#hHhT`tOTN9Juj01nOMi#^*GF2Byy- z(AE(FP1ES;T`>w|@a*3x`S|-2rZV4vR}10<;T$@)-hk zE?osa`P>JZrqR|BL03=$P17KRm^Wd)y$OU6G`6+ky*lN^dOM>lwJH#xU2wnsDFSsa zLj`hW0ydjX3w&(_)Y5-B7(`=RE9&ixrGQcamsWudK?0wa!KY=NKxGB0_CPjYM7Deh zmN+afab@AMMsDv2xxFJTluyeL(pwPHTgdI7vk7@YLbg!Ez|Gs}zj?bNTra?jvM!uY z%ZN_R;L+nJmI7D0;&Amnh10tXPiV(nfUo#@@uGy;)t4&}ck%T)C#%%HdCK3y!@xxNd zWu&-eC7fF+tH7~k1>8g1T6pi*`3eEC5*dOhYcn;XthqXK;n@~m?jJ*VwhfA+(89*i z!p7mbvjfka9k_?Kas8VDf{_zV>QtcA-MlCvS2)yDYB)>w6_oHTOim{(FD7bmyL%q( z?)g)Jf#49Lv3QB^ESOQ4QkXQ5fPZiV{=pH`B~U|EKKRI`7cg*ZSmPqo3_=JlGR@jE z|Dei<4vM1i;m2Ld`>kPJsJ;DL^Sfa~6Jr|eH^U;hvAIP#11^Qoa4A$ZRChc6C$8sa cw_q#&0-1``V8l0$DgXcg07*qoM6N<$f`KatHvj+t literal 0 HcmV?d00001 diff --git a/dist/gambatte_gbc.png b/dist/gambatte_gbc.png new file mode 100644 index 0000000000000000000000000000000000000000..543407382facae8befa6acaf6ee4e7b12498ce0a GIT binary patch literal 614 zcmV-s0-61ZP)^KxHGzXjm!yWmdxdjM2b#kaEuP*rty09^m(6#NJHqX1^U5>iT`X&M~If#W#h z`RLv<4C6iQ&OAQ)4{?9DnH)fN^;PWAKYIE(IzZX(qWCyKe(epG*$XIYb*f=zWdqFc zQCk0idh1$j$&mrdb{Cn#9x{bJm~Kx>qi2Fx0Q^)l8k`yaEsdM!H1DQv?BnPFDWwWR z2-4{^D5W5TAf;3%j+PtdG!LfR6W_-w!jy6|=en*7h%kUr!^AT1t0|b4fkbN{SJ*_Z zusORTlr_$q2hbbmSl#%9+D<=t0RGRj${|?gP`vYYy>X7bd4T%vHH_z9q5;_L0Zg|i zAoRwmR0gcAD`9T82l4=>+k@R6hybG*(Ho~&d-fHka{<%2K&5$!O7jx6?LKPTeOOyp zc=Gx?TyH3#qyd-}fLVbEz+vtxv0(j-BMmUOpo`AqFw->NZ*D=C1K literal 0 HcmV?d00001 diff --git a/dist/manual.txt b/dist/manual.txt new file mode 100644 index 0000000..22cff9e --- /dev/null +++ b/dist/manual.txt @@ -0,0 +1,266 @@ + +Gambatte-DMS emulator +------------------------------------------------ + +Gambatte is an accuracy-focused, open-source, +cross-platform Game Boy Color emulator written +in C++. It is based on hundreds of corner case +hardware tests, as well as previous documentation +and reverse engineering efforts. + + +Default Ingame Controls +------------------------------------------------ + +D-PAD D-PAD +B Button B Button +A Button A Button +Select Select +Start Start +R trigger / POWER Menu +L trigger Fast Forward + + +General Menu Controls +------------------------------------------------ + +D-PAD Move cursor +B Button Go back / Cancel +A Button Select / Perform action + + +Save States +------------------------------------------------ + +There are 10 savestate slots available per game. +There are options in the menu for loading and +saving states. + +The default slot is always Slot 0. + +The default slot will always be selected when +starting the emulator. Selected savestate slot +will not be saved on emulator exit. + + +Emulator Options +------------------------------------------------ + +Here is a list of the available config options: + +- Show FPS: + Shows or hides the FPS counter. + Default is "Off". + +- Scaler: + Allows to select between a range of scalers. + Default is "No Scaling". + +- Mono Palette: + Allows to load external palette files for + use with monochrome GB games in DMG mode. + The "Auto" option will try to find a palette + with the same name as the ROM file, and it + will load the default palette if it fails. + +- Color Filter: + Allows to load external filter files for + use with color games in GBC mode. + +- DMG/GBC border: + Allows to load external PNG border images + for use in DMG/GBC mode. + The "Auto" option will try to find a border + with the same name as the ROM file, and it + will load the default border if it fails. + +- System: + Allows to select the system priority when + a ROM supports both DMG and GBC modes. + +- Boot Logos: + Allows to use GB/GBC BIOS files to display + the splashscreen logo when loading a game. + +- Ghosting: + Enables or disables frame mixing to mimic + the DMG LCD ghosting. + Default is "DMG only". + +- Controls: + Allows the user to tune the controls. + +- Sound: + Allows the user to select between Mono and + Stereo sound. + Default is "Stereo". + + +Palette files +------------------------------------------------ + +Palette files are text files with the extension +".pal" and its format must be: + +0xRRGGBB 0xRRGGBB 0xRRGGBB 0xRRGGBB +0xRRGGBB 0xRRGGBB 0xRRGGBB 0xRRGGBB +0xRRGGBB 0xRRGGBB 0xRRGGBB 0xRRGGBB + +Where each line is a separate 4-color palette +for each sprite layer, and the color order is: +"white" "light-grey" "dark-grey" "black". + + +Filter files +------------------------------------------------ + +Filter files are text files with the extension +".fil" and its format must be: + +a1 a2 a3 a4 +b1 b2 b3 b4 +c1 c2 c3 c4 + +Where each value is a decimal number, ranging +from -255 to 255 which gets applied to the +GBC colors using the following algorithm: + +Rfinal = ((( R*a1 + G*a2 + B*a3 ) >> 8 ) + a4) +Gfinal = ((( R*b1 + G*b2 + B*b3 ) >> 8 ) + b4) +Bfinal = ((( R*c1 + G*c2 + B*c3 ) >> 8 ) + c4) + +A general rule to avoid the resulting colors +exceeding the valid RGB range of 0-255 is that +the sum of the 4 values in a row should always +be between 0-255. + + +File Paths +------------------------------------------------ + +- Emulator Settings are saved in: + $HOME/.gambatte/settings/ + +- Savestates and game saves are stored in: + $HOME/.gambatte/saves/ + +- Palette files must be stored in: + $HOME/.gambatte/palettes/ + +- Filter files must be stored in: + $HOME/.gambatte/filters/ + +- Border images must be stored in: + $HOME/.gambatte/borders/ + +- BIOS files must be stored in: + $HOME/.gambatte/bios/ + +- Valid BIOS filenames are: + gb_bios.bin + gbc_bios.bin + + +Cheats +------------------------------------------------ + +Gambatte supports Game Genie and Game Shark +cheat codes. Each cheat system has its own menu. + +Game Genie cheats: +------------------------ + +Game Genie codes can have 6 or 9 digits. They +are applied once each and they can only be +disabled by exiting the emulator and reloading +the ROM. + +To introduce a code, go to the Game Genie menu, +highlight a code line and press A to enter edit +mode. While in edit mode you can change the +value of each digit by using the D-Pad. +When you're done, press A to save the changes +or B do discard them. + +If you're introducing a 6-digit code, just leave +the last 3 digits as zeroes and your code will +be detected as a 6-digit code. If all digits are +zeroes, the code is ignored. + +There are up to 20 lines for introducing several +codes at once if you need to. + +To apply the cheats, press Start, and then +confirm the action by pressing A. The codes will +then be applied and the code list will be +cleared. + +Cheat codes are not saved on emulator exit. + +Game Shark cheats: +------------------------ + +Game Shark codes have 8 digits. They can be +enabled and disabled at any time. + +To introduce a code, go to the Game Shark menu, +highlight a code line and press A to enter edit +mode. While in edit mode you can change the +value of each digit by using the D-Pad. +When you're done, press A to save the changes +or B do discard them. + +If all digits are zeroes, the code is ignored. + +There are up to 20 lines for introducing several +codes. + +To enable the cheats, select the slot on the +left of the codes and press A to toggle the +desired cheat on and off. An empty slot means +the cheat code is disabled, while a check mark +means it is enabled. + +Cheat codes are not saved on emulator exit. + + +Credits +------------------------------------------------ +Gambatte emulator + +Copyright (C) 2007 by Sindre Aam�s +aamas@stud.ntnu.no + +This program is free software; you can +redistribute it and/or modify it under the terms +of the GNU General Public License version 2 as +published by the Free Software Foundation. + +This program is distributed in the hope that it +will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License +version 2 for more details. + +You should have received a copy of the GNU +General Public License version 2 along with this +program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA + +------------------------------------------------ + +Additional features and menu rework from the +Gambatte-DMS version by Hi-Ban. +Special thanks to Surkow, Senquack and Pingflood +for helping this noob. +Source code available at: +https://github.com/bardeci/dot-matrix-simulator + +------------------------------------------------ + +Game Boy and Game Boy Color are registered +trademarks of Nintendo of America Inc. +Gambatte is not affiliated with or endorsed by +any of the companies mentioned.