mikeryan / ems-flasher Goto Github PK
View Code? Open in Web Editor NEWEMS Flasher for the GB USB smart card 64M GameBoy flash cartridge
License: MIT License
EMS Flasher for the GB USB smart card 64M GameBoy flash cartridge
License: MIT License
Is there a way to extract a ROM which was bundled unintentionally with the MENU.GB file?
I flashed some samples into LSDJ a while ago but I don't have the ROM file anymore - need to get this back.
First off, I wanted to say thank you for making this! I've been struggling for weeks with the Windows drivers with no luck, so I'm glad this alternative exists for Mac.
My issue is that after I copy a rom to the flash cart, and then put the flash cart in a real Gameboy or a real Super Gameboy, the screen is only blank after the first flashing "Gameboy" logo.
I wonder if the problem is with menus.gb.
Here is my terminal output:
Daniels-MacBook-Pro-2:ems-flasher Daniel$ ./ems-flasher --format --verbose
trying to find EMS cart
claimed EMS cart
base address is 0x0
Formating...
Daniels-MacBook-Pro-2:ems-flasher Daniel$ ./ems-flasher --title --verbose
trying to find EMS cart
claimed EMS cart
base address is 0x0
Bank Title Size Enhancements
Page: 1
Menu: no menu ROM found at bank 0
Free space: 4096 KB
Daniels-MacBook-Pro-2:ems-flasher Daniel$ ./ems-flasher --write pokered.gb --verbose
trying to find EMS cart
claimed EMS cart
base address is 0x0
Loading the menu ROM...Writing /usr/local/share/ems-flasher/menus.gb [MENU#]...
3% 01:06
Writing pokered.gb [POKEMON RED]...
100% 00:00
Daniels-MacBook-Pro-2:ems-flasher Daniel$ ./ems-flasher --title --verbose
trying to find EMS cart
claimed EMS cart
base address is 0x0
Bank Title Size Enhancements
0 MENU# 32 KB SGB
64 POKEMON RED 1024 KB SGB
Page: 1
Page enhancements: SGB
Compatible consoles: All
Free space: 3040 KB
It looks like when writing the menu rom, it stops at 3% before moving on to writing the game rom. Do you have any suggestions?
Thanks for reading.
The command
sudo ./ems-flasher --verbose --write romname.gb
always results in:
trying to find EMS cart claimed EMS cart base address is 0x0 Loading the menu ROM...Writing /usr/share/ems-flasher/menu.gb [MENU#]... 0% 00:12
and it never continues from there.
I'm running Ubuntu 16.04.1 LTS 64 bit.
Hello again. I figured out why it was too hard for me to find this Git repo. http://lacklustre.net/projects/ems-flasher/ is full of outdated information about this project in nearly all sections (with broken links also), and this repo is not named anywhere there. Could you please update the page for newcomers? Or just redirect people to this repository, which readme.md
is quite complete.
Thanks!
Perhaps something I could fix in a file or how I am compiling?
$ ./config.sh
CC=cc
CFLAGS=-g -Wall -Werror -pedantic -std=c99
BINDIR=/usr/local/bin
DATADIR=/usr/local/share/ems-flasher
MANDIR=/usr/local/share/man
UDEVRULESDIR=/lib/udev/rules.d
libusb-1.0 seems to use libpthread
$ make
cc -c -g -Wall -Werror -pedantic -std=c99 -I/usr/include/libusb-1.0 -o ems.o ems.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o main.o main.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o header.o header.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o cmd.o cmd.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o updates.o updates.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o progress.o progress.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o flash.o flash.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o insert.o insert.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o update.o update.c
cc -g -Wall -Werror -pedantic -std=c99 -o ems-flasher-real ems.o main.o header.o cmd.o updates.o progress.o flash.o insert.o update.o -lusb-1.0 -lpthread
/usr/bin/ld: updates.o:/home/user/ems-flasher/flash.h:11: multiple definition of `flash_lastofs'; cmd.o:/home/user/ems-flasher/flash.h:11: first defined here
/usr/bin/ld: updates.o:/home/user/ems-flasher/flash.h:12: multiple definition of `flash_lasterrorstr'; cmd.o:/home/user/ems-flasher/flash.h:12: first defined here
/usr/bin/ld: progress.o:/home/user/ems-flasher/flash.h:11: multiple definition of `flash_lastofs'; cmd.o:/home/user/ems-flasher/flash.h:11: first defined here
/usr/bin/ld: progress.o:/home/user/ems-flasher/flash.h:12: multiple definition of `flash_lasterrorstr'; cmd.o:/home/user/ems-flasher/flash.h:12: first defined here
/usr/bin/ld: flash.o:/home/user/ems-flasher/flash.h:11: multiple definition of `flash_lastofs'; cmd.o:/home/user/ems-flasher/flash.h:11: first defined here
/usr/bin/ld: flash.o:/home/user/ems-flasher/flash.h:12: multiple definition of `flash_lasterrorstr'; cmd.o:/home/user/ems-flasher/flash.h:12: first defined here
/usr/bin/ld: insert.o:/home/user/ems-flasher/insert.h:7: multiple definition of `insert_pagesize'; cmd.o:/home/user/ems-flasher/insert.h:7: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:37: ems-flasher-real] Error 1
I'm attempting to compile ems-flasher from commit d90fa3f on Ubuntu 15.04. I have pkg-config 0.28-1ubuntu1 and libusb-1.0.0-dev 2:1.0.19-1.
When I run make
I get the following error and the program fails to compile
cc -g -Wall -Werror -pedantic -std=c99 `pkg-config --cflags libusb-1.0` -c ems.c
In file included from ems.c:2:0:
/usr/local/include/err.h:8:1: error: unknown type name ‘namespace’
namespace stasm
^
/usr/local/include/err.h:9:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
{
^
ems.c: In function ‘ems_write’:
ems.c:219:9: error: implicit declaration of function ‘err’ [-Werror=implicit-function-declaration]
err(1, "malloc");
^
cc1: all warnings being treated as errors
Makefile:21: recipe for target 'ems.o' failed
make: *** [ems.o] Error 1
I'm attempting to compile the ems-flasher on Ubuntu 22.04. Running ./config
outputs the following:
./config.sh
CC=cc
CFLAGS=-g -Wall -Werror -pedantic -std=c99
BINDIR=/usr/local/bin
DATADIR=/usr/local/share/ems-flasher
MANDIR=/usr/local/share/man
UDEVRULESDIR=/lib/udev/rules.d
libusb-1.0 doesn't seem to use libpthread. Fine.
make
still runs but fails:
make
cc -c -g -Wall -Werror -pedantic -std=c99 -I/usr/include/libusb-1.0 -o ems.o ems.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o main.o main.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o header.o header.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o cmd.o cmd.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o updates.o updates.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o progress.o progress.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o flash.o flash.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o insert.o insert.c
cc -g -Wall -Werror -pedantic -std=c99 -c -o update.o update.c
./updateheader.sh -c -s < menu.gb > menucs.gb
./updateheader.sh -c < menu.gb > menuc.gb
./updateheader.sh -s < menu.gb > menus.gb
cc -g -Wall -Werror -pedantic -std=c99 -o ems-flasher-real ems.o main.o header.o cmd.o updates.o progress.o flash.o insert.o update.o -lusb-1.0
/usr/bin/ld: updates.o:/home/hellocatfood/Desktop/ems-flasher/flash.h:11: multiple definition of `flash_lastofs'; cmd.o:/home/hellocatfood/Desktop/ems-flasher/flash.h:11: first defined here
/usr/bin/ld: updates.o:/home/hellocatfood/Desktop/ems-flasher/flash.h:12: multiple definition of `flash_lasterrorstr'; cmd.o:/home/hellocatfood/Desktop/ems-flasher/flash.h:12: first defined here
/usr/bin/ld: progress.o:/home/hellocatfood/Desktop/ems-flasher/flash.h:11: multiple definition of `flash_lastofs'; cmd.o:/home/hellocatfood/Desktop/ems-flasher/flash.h:11: first defined here
/usr/bin/ld: progress.o:/home/hellocatfood/Desktop/ems-flasher/flash.h:12: multiple definition of `flash_lasterrorstr'; cmd.o:/home/hellocatfood/Desktop/ems-flasher/flash.h:12: first defined here
/usr/bin/ld: flash.o:/home/hellocatfood/Desktop/ems-flasher/flash.h:11: multiple definition of `flash_lastofs'; cmd.o:/home/hellocatfood/Desktop/ems-flasher/flash.h:11: first defined here
/usr/bin/ld: flash.o:/home/hellocatfood/Desktop/ems-flasher/flash.h:12: multiple definition of `flash_lasterrorstr'; cmd.o:/home/hellocatfood/Desktop/ems-flasher/flash.h:12: first defined here
/usr/bin/ld: insert.o:/home/hellocatfood/Desktop/ems-flasher/insert.h:7: multiple definition of `insert_pagesize'; cmd.o:/home/hellocatfood/Desktop/ems-flasher/insert.h:7: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:37: ems-flasher-real] Error 1
It seems that whenever I try to flash any GBC ROM the cartridge is unable to start either on a Game Boy Light or a Game Boy Color.
The Nintendo logo is incomplete and locks.
This happens with all GBC ROMs I've tested so far.
I think it may be related to the menu ROM for GBCs.
I don't have this issue when there are only GB ROMs on the cartridge.
Flashing seems to be successful, no error messages even with the --verbose
option.
Turns out the GameCube USB memory adapter from the same vendor has the same vendor and device IDs, and the vendor actually seems to ship the same driver for all their cards. Are you aware of anyone having tried this software with the GameCube version of the gadget?
Building with -Werror fails when building against glibc >= 2.20 due to a deprecated macro. According to man 7 feature_test_macros
, the macro _DEFAULT_SOURCE
should be defined in addition to _BSD_SOURCE
to get around this warning.
How can I use the menu functionality? There's no --help info, and it's not in the manpage. Is it even complete?
Can I just do this:
cat menu.gb i-can-assure-you-i-ripped-this.gb not-pirated-and-totally-legit-game2.gbc > no-copyright-infringement-here-menu.gbc
and then flash no-copyright-infringement-here-menu.gbc
? If so, to which bank?
If the project needs user-facing documentation, I'm happy to write it, as long as it doesn't involve interpreting code lol. I don't do C normally.
Hello. I read in the documentation manual that:
The static RAM is not paged and there is no partitioning mechanism that would
allow it to be shared by multiple ROMs. That means when a ROM save data to
the SRAM, it will likely corrupt previous data placed by another ROM.
But there is a menu that manages several ROM and several saves (in only one .sav file/SRAM module) written by Mottzilla: https://thegaminguniverse.org/ninjagaiden4/mottzilla/smartcard.html
The problem: it is coded over a 'hacked' version of the official EMS flasher program, which is Windows only and a pain in the ass for driver installation (even more now using Windows 10).
Could be possible to integrate this kind of menu or manager into the ems-flasher project?
Hey there,
Trying to write to my cart is giving me the following error every time I try to write a ROM (./ems-flasher --verbose --write lsdj.gb
):
trying to find EMS cart
claimed EMS cart
base address is 0x0
ems-flasher: invalid header for /usr/local/share/ems-flasher/menus.gb
I went ahead and moved the cloned repo to /usr/local/share/
to solve a previous issue where it couldn't find menus.gb
(project root apparently needs to be /user/local/share/ems-flasher/
), however, I can't seem to get past this issue.
Deleting and formatting from the cart works totally fine, albeit needing to unplug/plug back in the cart after every action (otherwise the program can't seem to find the cart). I'm on OS X, with the latest build dependencies. The compile (make
) seemed to run just fine.
Let me know if you need any more info from me for debugging!
On line 6 of Makefile there's a trailing whitespace after "/usr/bin" which results in the following error when running sudo make install
on Ubuntu 16.04
cc -g -Wall -Werror -pedantic -std=c99 -o ems-flasher-real ems.o main.o header.o cmd.o updates.o progress.o flash.o insert.o update.o -lusb-1.0 -lpthread
mkdir -p /usr/bin
install ems-flasher-real "/usr/bin "/ems-flasher
install: cannot create regular file '/usr/bin /ems-flasher': No such file or directory
Makefile:81: recipe for target 'install' failed
make: *** [install] Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.