EverDrive Forum

General => EverDrive 64 => Topic started by: saturnu on April 14, 2014, 03:59 PM

Title: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.2
Post by: saturnu on April 14, 2014, 03:59 PM
(https://my.mixtape.moe/xqqxwt.png)

Hi,
here is my transfer pak source and demonstration program :D

EDIT 1: bugifx - something important was commented out ^^
EDIT 2: v0.2 ram reading/writing
EDIT 3: demo tool update
EDIT 4: demo tool bugfix on newer os
EDIT 5: v0.62 MBC2 RAM dump fix
EDIT 6: v0.63 tv_mode force off - some experimental stuff

if you want to try out the lib, it seems that this tool is "save" to use anyway. :D

WARNING: this isn't tested on any retail cart until now.

keep in mind that the transfer pak isn't a flagship in engineering at all.
better clean the contacts, don't shake it to much and make a test-dump before writing to it. ^^
i mean it should work. :D - just be careful ^^

i was a bit to lazy to program a proper file selection screen, so the restore function is
enabled in the menu, if a file is found that matches up the way the tool is doing it's backup.

e.g.
TITLE: THE GAME
FILE: /GB64/THEGAME.srm

gb64_latest_version (http://krikzz.com/forum/index.php?topic=2298.0)

(force tv type, if the picture is running wild)

good luck! :3

I got it to work and was able to repeat it one or two more times. I have everdrive64 v2. Here are the steps I took:

1. System was turned off
2. Plugged both gb camera and transfer pack SNUGGLY into the controller on port 1.
3. Turn on and start  libgbpak beta v.6 (with sram write)
4. Libgbpak makes the gb ding sound and shows the "check connection" message on the bottom and NO -1 or -4
5. If requirements in step 4 has been met, then slightly pull the gb camera out JUST A LITTLE BIT instead of it being all the way in the transfer pack. I am talking about 1 or 2 mm.
6. Press the reset button on the system - not powering it off.
7. Start libgbpak again with a little prayer...
8. Once it shows the name of the game, press B to dump the SRAM, and be patient because it is about 128KB.

Can this information be added to the main post or the readme file or something? I was having the same issue, and pulling the cartridge out just a tiny bit really did the trick.

compatibility list

green - supported
red - currently unsupported
yellow - does this even exist?
purple - for the brave and faithful  ^^

00ROM ONLYsupported
01MBC1 supported
02MBC1+RAM  supported
03MBC1+RAM+BATTERY  supported
04???
05MBC2 supported
06MBC2+BATTERYsupported - since v0.62
07???
08ROM+RAM supported
09ROM+RAM+BATTERYsupported
0A???
0BMMM01not supported - but possible
0CMMM01+RAM not supported - but possible
0DMMM01+RAM+BATTERY not supported - but possible
0E???
0FMBC3+TIMER+BATTERY  supported
10MBC3+TIMER+RAM+BATTERY/MBC30supported
11MBC3  supported
12MBC3+RAMsupported
13MBC3+RAM+BATTERYsupported
14???
15MBC4experimental - since v0.63
16MBC4+RAMexperimental - since v0.63
17MBC4+RAM+BATTERYexperimental - since v0.63
18???
19MBC5supported
1AMBC5+RAMsupported
1BMBC5+RAM+BATTERYsupported
1CMBC5+RUMBLEsupported
1DMBC5+RUMBLE+RAMsupported
1EMBC5+RUMBLE+RAM+BATTERYsupported
1FMBC6 ?not supported
20MBC6+RAM (e.g. Net de Get Minigame@100)not supported - need more info
21MBC6+RAM+BATTERY ?not supported
22MBC7 (Kirby's Tilt n' Tumble, Command Master)not supported - but possible
23MMBC7+RAM ?not supported
24MBC7+RAM+BATTERY ?not supported
[...]
59MBC1 Game Boy Smart Cardnot supported - but possible
[...]
97???
99???
[..]
BEMBC5 Pocket Voice Recordernot supported
EAMBC1 SONIC5not supported - but possible
FCPOCKET CAMERAsupported - since v0.60
FDBANDAI TAMA5 (Tamagotchi 3)not supported - but possible
FEHuC3not supported - need more info
FFHuC1+RAM+BATTERY/HuC1Aexperimental - since v0.63
??G-MMC1not supported - need more info
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: BolinCaker on April 14, 2014, 06:16 PM
I don't understand what this is. Is it so you could upload like your game save from Pokemon gameboy to pokemon stadium?
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: saturnu on April 14, 2014, 07:02 PM
basically it's library, so developers could use of the transfer pak.

the transfer pak can:
- read rom
- read ram
- write ram
(- read/set rtc - activate rumble)

atm. it could only read the rom, but not the ram (savegame)
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: meneerbeer on April 14, 2014, 10:06 PM
Isn't this similar: http://lacklustre.net/n64/agbd/

Not sure if it works on Everdrive though.
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: reprep on April 15, 2014, 01:21 AM
thanks saturnu. if you release a binary, i would gladly help testing.

all gbc games are mbc5 and usually super cheap, so you can use one for testing.
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: Cybertronic on April 15, 2014, 09:03 PM
What game uses Ram? Maybe I have one I could just mail to you.
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: saturnu on April 19, 2014, 01:15 AM
there is still process on this... but i takes time to get it more reliable.
even the original implementation seems to double check connections power state etc... ^^
just dumped a rom over usb today, which is working on an emulator :D
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: robneal81 on April 19, 2014, 02:10 AM
I'm excited to see what can come of this!  The ultimate goal would be to play GB/GBC games on an N64, but even ROM dumping is awesome.  Looking forward to seeing how far you go and I'll happily test anything you'd like.
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: reprep on April 19, 2014, 02:15 AM
there is still process on this... but i takes time to get it more reliable.
even the original implementation seems to double check connections power state etc... ^^
just dumped a rom over usb today, which is working on an emulator :D

that is great news.
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: nuu on April 19, 2014, 11:36 AM
Good job Saturnu! :D
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: saturnu on April 19, 2014, 01:29 PM
I'm excited to see what can come of this!  The ultimate goal would be to play GB/GBC games on an N64, but even ROM dumping is awesome.  Looking forward to seeing how far you go and I'll happily test anything you'd like.

this would be a pokemon stadium romhacking job, 'cause it's the only good emulator out there.
gnuboy64 has some sound issues and gblator has no sound at all. ^^

i think a cool features could be the possibility to transfer savegames from your original carts to the edgb or sdcard. :>
or maybe a savegame cheat tool which allows you to search for and alter some values inside the savegame.

atm. i have a modified version of my menu with a modified version of my loader64 to transfer the romdata from sdram to the pc.

i would be grateful if someone would help testing. ^^
i'm planing to realease some tools you could play with, but today my sd2snes has arrived so this will have to wait. :D
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: saturnu on April 20, 2014, 11:28 PM
on the top left is my usb loader client in the terminal, dumping the ed64 sdram.
the ed64 is running alt64.
on the right you can see geany with the the library source. ^^
it's great that it's possible to use the ed64 sdram as extended ram, 'cause the n64 only has 4 or 8Mbyte rdram. :>

(http://abload.de/thumb/libgbojyk1.png) (http://abload.de/image.php?img=libgbojyk1.png)

EDIT: today i implemented ram bankswitching and reading/writing (untested) :>
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: saturnu on April 22, 2014, 03:58 AM
hi,
perhaps someone could test this for me?
i'm unsure if there is a timing error in my disk saving or if it's just caused by my new micro sdcard.
most of the time the files are ending up in 0-byte but sometimes it's working. ^^
the dumping is allright, i could print out the correct bytes... it's just an saving error, somehow. -_-


install: copy the GB64 folder to the root of the sdcard.
(warning: writes to the false sectors) :>


usage:
insert the transfer pak and the rom before starting the rom.
if you could read the title push 'A' to dump.

Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: Paulweeze on April 22, 2014, 05:26 AM
Im gonna test it out for ya with a few different titles :D. What do the error messages corespond to? I assume that -4 means no transfer pack and -1 means no rom?
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: Paulweeze on April 22, 2014, 05:53 AM
I got it to show up with a name (had to use a different controller) and dumped it but I can't find the dump. Where does the program dump the rom to? Btw, does this require a microsd card?
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: saturnu on April 22, 2014, 11:58 AM
no ^^ it doesn't require a microsd card.
the errors mainly mean, that the connector is dirty :>
the file should be in '/GB64/romtitle.gb' and hopefully has some bytes in it?

EDIT: found another sdcard in my camera, it looks like the sdcard isn't the problem. :/

hm,
the whole system freezes right after
diskWrite(begin_sector, (void *)0xb2000000, file_sectors);
even with the non-dma
fatWriteFile(&rom_data, gbcart.romsize/ 512);
it hangs :D

it's working randomly, so it can't be completely wrong this way. ^^

the dumping isn't the problem, i can readout the data with usb just fine :D
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: saturnu on April 22, 2014, 04:51 PM
Hi,
the save bug is fixed!
here is the first working preview rom. i've still disabled ram dumping, 'cause of security reasons. ^^
i don't want to mess with your savegames, without testing it by myself before. :D
the rom is saved under the '/GB64' directory and named after the title.
if you want to give me some feedback/bugreport, please copy the information from the info screen, too. :>

install: copy the GB64 folder to the root of the sdcard.
gb64_v02.zip (http://www8.zippyshare.com/v/90203587/file.html)
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: robneal81 on April 22, 2014, 06:10 PM
Just tried it with Mario Land 2.  It dumped a .gb rom perfectly.  I'll gladly test a version for the save game as well...I don't care if mine gets messed up.

Great job!
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: Paulweeze on April 22, 2014, 06:22 PM
I got it to work! Just dumped quite a bit gb games and playing it on an emu. I was also able to dump the menu of one of my multicarts. Thanks Saturnu!
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: saturnu on April 23, 2014, 02:46 AM
I'll gladly test a version for the save game as well...I don't care if mine gets messed up.

 hrhr ok...this version is for the brave and faithful, ram dumping it's totally untested and probably doesn't work at all. :D
don't blame me if something bad happens with your savegames!
gb64_v02e.zip (http://www1.zippyshare.com/v/48094325/file.html)
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: robneal81 on April 23, 2014, 03:09 AM
Okay, I dumped both the save games and the roms of Super Mario Land 2 (GB) and Zelda Oracle Of Seasons (GBC).  Here's what I found:

- SML2 dumped perfectly.

- The file Zelda created worked, however it was dumped as ".gb", not ".gbc".  Absolutely not a big deal, just thought I'd let you know.

- Both save game files were dumped as ".srm".  I had to change them to ".sav" in order for VBA to detect them, but they both worked perfect!

- I tried the original cartridges on my GBA and using your software did not correct the save files: The cartridges still worked perfectly.

So far, it looks great!  I only have one suggestion:  Instead of having it say "power off" after it's done, could you have it go back to the main screen?  Maybe have it say "Hit A to go back", or something like that? 

Thanks for the great work!
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: Paulweeze on April 23, 2014, 04:15 AM
- The file Zelda created worked, however it was dumped as ".gb", not ".gbc".  Absolutely not a big deal, just thought I'd let you know.
Did you have to rename it .gbc to work in an emu?
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: robneal81 on April 23, 2014, 04:19 AM
Did you have to rename it .gbc to work in an emu?

Not for the emulators I tried, but I imagine some would require the change.
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: reprep on April 23, 2014, 06:32 AM
.gb, .gbc difference is for software only i guess and to avoid confusion. no real effect on any emulators/hardware etc afaik.
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: Paulweeze on April 23, 2014, 06:56 AM
.gb, .gbc difference is for software only i guess and to avoid confusion. no real effect on any emulators/hardware etc afaik.
True statement. Just dumped super mario deluxe and it worked on vba.
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: saturnu on April 23, 2014, 09:42 AM
i'm totally amazed that it's working. :D
but not every savegame is the same, some are bigger, some are smaller and using other memory bank controllers. ^^
appending a 'c' to the file extension is fixed in minute. ^^
btw. the 'power off' is just a note, 'cause the previous 'Z - Exit' didn't work after writing to the sdcard. :D
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: adimifus on May 10, 2014, 08:27 AM
Tested with Pokemon TCG. The ROM dump loads fine in bgb and Everdrive GB, but the save dump doesn't load in either bgb or on the Everdrive GB.
Dumped SAV again, and works fine now.  :o
Super Mario Land 2 ROM and SAV dumps work fine.
Legend of Zelda DX ROM and SAV dumps work fine.
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on May 10, 2014, 06:41 PM
thanks for the report.
it seems like a good idea to compare a few dump results in a next version of this tool, so it could alert the user, if there is a bad connection.
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: adimifus on May 10, 2014, 07:03 PM
It's weird. I looked at the first save dump I made in a hex editor, and there was a lot of text data that pertained to the game (namely deck names) but i guess it was corrupt enough to not be recognized by the game. All subsequent dumps I've made worked fine the first time, both for ROMs and save data. Maybe the dump compare thing could be an option?

One strange thing that happened was I accidentally dumped a game twice in a row, and somehow a duplicate file was created with the same file name. It doesn't show up when I look at the ad card on my computer, but it's still listed in the everdrive menu. And if i view the file using the everdrive, there is data like the file is actually there. (maybe it is? But why can't I see it on my pc?)
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: Paulweeze on May 10, 2014, 07:37 PM
Thats weird. When the file duplicates itself, you can generally see it in your computer. When you go to delete both, it doesn't actually get rid of it until you leave the folder and go back (at least in windows). Btw, i found out that the multicarts i dumped retain the game that the header is named after (and have a different checksum). For example, for the 37 in 1 if you choose pacman sce, you can play it. Anything else softlocks an emulator. And I finally got a pokemon save to save  ;). Had to rename it .sav for visualboy advance but at least I can set these saves aside for when I get a edgb. I appreciate your hard work Saturnu!
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on May 10, 2014, 11:16 PM
hm yes, there needs to be additional checks, if a file already exists.

in windows or dos there couldn't be more than one file with the same name in the same folder. ^^
in linux it's case sensitive so it's somehow possible (for the os "test.dat" and "Test.dat" are two different files).
now guess what's going on with the everdrive os? if you are not careful enough you could add more then one file with exactly the same
name in the same folder. :>
you could delete that duplicate with linux and windows chkdisk could fix that problem for you, too.

but this shouldn't be a problem for the user, it's something a programmer should take care of instead. ^^
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: adimifus on May 10, 2014, 11:42 PM
The duplicate ONLY showed up in the everdrive OS. And the filenames were exactly the same, including case. Only one of them showed up in linux for me (not sure what it would look like in windows). What's really odd is I did the same thing once before (tried to dump the ROM when I already did) and it told me the file already existed. So I don't know what happened to cause the duplicate.
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: adimifus on May 19, 2014, 08:32 AM
Would writing saves back to retail carts be possible with the transfer pak? It would make this a convenient way to change batteries in carts without losing the saves.
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: alecfa on May 19, 2014, 09:52 AM
Woah, this is awesome, saturnu. I too would absolutely love the ability to write saves, by the way. Keep up the great work!
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on May 21, 2014, 10:11 AM
testing, testing, testing ^^

(http://abload.de/thumb/edgb_64gbk6uoe.jpg) (http://abload.de/image.php?img=edgb_64gbk6uoe.jpg)
Title: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: Mickkn on June 02, 2014, 10:49 PM
Would writing saves back to retail carts be possible with the transfer pak? It would make this a convenient way to change batteries in carts without losing the saves.

Could be very sweet.

--------------------------------

This feature is awesome, just used it to dumb my level 42 charactor from Mario Golf. Works like a charm.

How is it going with making Transferpak compatible with Everdrive GB?

Sent from my iPad using Tapatalk HD
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on June 04, 2014, 04:01 PM
Just transfered a character from the EDGB to Mario Golf for the N64 with the Transferpak. :D

now that i could use my edgb, to set it to all mappers, i think i'm able to try out and debug the ram writing feature! :D
Title: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: Mickkn on June 05, 2014, 01:02 PM

Just transfered a character from the EDGB to Mario Golf for the N64 with the Transferpak. :D

now that i could use my edgb, to set it to all mappers, i think i'm able to try out and debug the ram writing feature! :D

Did you manage to use the EDGB with MarioGolf loaded, to use on the MarioGolf 64 game?



Sent from Tapatalk
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on June 05, 2014, 03:09 PM
yes ^^
Title: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: Mickkn on June 05, 2014, 03:12 PM
New EDGB OS? Or how is it achieved?


Sent from Tapatalk
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on June 05, 2014, 03:37 PM
libgbpak init the EDGB into gamemode and goes back to the ED64-Menu.
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: Mickkn on June 05, 2014, 04:06 PM
Meaning that you'll run the GB64 "app", with the transferpak in. Return to ED64-menu and load the game?

Sounds awesome if it will work :D
Title: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: Mickkn on June 05, 2014, 06:02 PM
Second ...when is next beta released? :)


Sent from Tapatalk
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on June 05, 2014, 06:17 PM
when pokemon stadium is patched, so it doesn't reset the EDGB in the gb-tower. ^^
or when the savegame restore feature is tested and i'm sure it is working properly.

the only games that are fully working right now are:
mickey's speedway usa
mario golf

i still have to test:
mario tennis
perfekt dark

is someone interested in all these japanese transferpak compatible titles?
maybe someone from japan? :D
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: nuu on June 05, 2014, 10:32 PM
Just transfered a character from the EDGB to Mario Golf for the N64 with the Transferpak. :D

now that i could use my edgb, to set it to all mappers, i think i'm able to try out and debug the ram writing feature! :D
Great! Transfer pak support is the one thing that the EMS 64M Smart Card does better than the EDGB.

is someone interested in all these japanese transferpak compatible titles?
maybe someone from japan? :D
Sure! Although I'm not from Japan. But I know there are Japanese Everdrive fans as well.
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: Mickkn on June 07, 2014, 11:23 PM
I can test some early beta if you want :)
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: Traveller on June 08, 2014, 06:13 AM
So will this allow me to extract my GB Camera pics?
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on June 08, 2014, 10:17 AM
maybe, but i don't have one ^^
try one this tools after dumping the ram from the gbcamera

win32:
http://1x-upon.com/~despens/gameboy/howto/gb_cam_dump.zip
http://1x-upon.com/~despens/gameboy/howto/gcam14.zip

*nix:
https://github.com/jkbenaim/gbcamextract
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: Mickkn on June 17, 2014, 02:07 PM
Are there a PC application that can run GB games through a transferPak in a USB connected N64 controller?
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on June 17, 2014, 07:40 PM
not as far as i know and i searched for every bit of transfer pak code. :D
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: kubuntuuser on July 27, 2014, 02:08 PM
Can you reupload the gb64_v02e.zip?
File has expired.
I'll test the save dump function with some pokemon games
Thanks in advance
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on July 27, 2014, 03:08 PM
Sure ^^
gb64_v02e.zip (http://www28.zippyshare.com/v/86241694/file.html)
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: Paulweeze on July 27, 2014, 03:13 PM
Can you reupload the gb64_v02e.zip?
File has expired.
I'll test the save dump function with some pokemon games
Thanks in advance
No need to test, just dump your save for your own purpose :D. Saturnu's program has allowed me to dump about 5 or so sram saves that work with the EDGB, a bunch of my own games, and multicarts. I wonder if it would work with eeprom prototypes though?
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: kubuntuuser on July 27, 2014, 09:15 PM
Sure ^^
gb64_v02e.zip (http://www28.zippyshare.com/v/86241694/file.html)

Thanks. Works like a charm. ;D
Dumped my yellow, gold, silver and crystal saves without problems.
Is it possible to restore save files to the cartridge back?
Didn't find a option in the application.
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on July 27, 2014, 10:15 PM
I have a version that can restore saves, but it has still some bugs. :>
currently i'm working on some snes multiplayer networking stuff, but it's on the longtime todo list :D
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: Paulweeze on July 27, 2014, 11:31 PM
I have a version that can restore saves, but it has still some bugs. :>
Could you post (or pm) the beta? I have some games that i dont care if i kill the save (all of the mario and wario lands lol) but would be awesome to experiment with.
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on July 27, 2014, 11:50 PM
if it would be already in a testing stage, i would have uploaded it anyway, the feature isn't stable and useful atm. :D
it's mainly hardcoded source, mappers are fixed and even the save file selection is missing. ^^
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: Paulweeze on July 27, 2014, 11:56 PM
Thats cool, just didnt know what the bugs were. Well whatever you are working on, we are all greatful!
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: kubuntuuser on July 28, 2014, 11:09 AM
I have a version that can restore saves, but it has still some bugs. :>
currently i'm working on some snes multiplayer networking stuff, but it's on the longtime todo list :D
OK no problem.
ATM my saves are secure from battery dying  :D
But I'll gladly try it when you have time to bring it in a testable state ^^
Kudos for your work ;)
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on August 08, 2014, 02:47 AM
hm, maybe i should look over the save upload function again. :D
are there any bugs beside that? i can't really remember anymore. ^^
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on August 10, 2014, 04:23 AM
save restore seems to be working now. ^^
i'm going to upload a beta version tomorrow or the next days.
until now i have tested it with the edgb, but i don't own any retail carts with memory on it. ^^
Title: Re: [lib] libgbpak - a Transfer Pak beta library v0.2
Post by: saturnu on August 10, 2014, 02:27 PM
EDIT:

download moved to first post :>

http://krikzz.com/forum/index.php?topic=1548.50 (http://krikzz.com/forum/index.php?topic=1548.50)
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.2
Post by: Paulweeze on August 10, 2014, 08:16 PM
SUCCESS :) :D ;D!!!
Tested Super Mario Land 2, felt like an idiot cause i used a different save (Wario Land iirc) but found the right save and successfully transfered the save. Now, i can go from EDGB to retail and backup my saves and dump multicarts. Talk about convenient!
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.2
Post by: saturnu on August 10, 2014, 08:23 PM
tanks for testing :D
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.2
Post by: Paulweeze on August 10, 2014, 08:44 PM
tanks for testing :D
No problem, thanks for releasing it!
Just tested Pokemon Red, SUCCESS :P!!!
Pretty confident that this tool works fine, and in fact is now better than the one designated for the 64drive. I will test other saves tomorrow as well
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.2
Post by: kubuntuuser on August 12, 2014, 02:23 AM
Tested restoring Pokemon Yellow and Crystal.
Both worked without Problems  ;D
Thanks for releasing such a great work :D
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.2
Post by: dkx on August 13, 2014, 10:53 AM
Just registered to thank you for this amazing tool! :)

I tested it yesterday with 5 games. All of them dumped successfully, same goes for the savegames.
Next thing I tried, booting up a GB-Emulator and load up my fresh dumped games with the according savegames.
The .srm files simply renamed to .sav, the Emulator recognized these and everything worked fine.
The last thing I did was grabbing a savegame from the web for a game, renamed it according to my own dump and then write it to my GB-SRAM. Worked nicely as well, now I have a third party savegame on my cart.

Just had a weird issue with a modified Pokemon Crystal save. The restore worked fine in general, but Pokemon Stadium 2 froze once I clicked on the edition in any menu. After a reboot, the savegame was wiped again. Guess this is related to the savegame after all.

Anyway, once again thank you very much for this useful tool!
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.2
Post by: saturnu on August 13, 2014, 11:01 AM
thanks for the feedback :D
it's nice to hear that someone can make use of it ^^
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.2
Post by: Leoplureodon on September 03, 2014, 03:50 AM
Hi. Got an everdrive 64 for this tool, and like many others I'm having great success with it!

Keep up the great work!!
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.2
Post by: NicNic on December 21, 2014, 06:29 PM
Hi,

Does anyone know of any solution to dump Gameboy Camera save ?

GB64 v3 doesn't work with this sram...
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.2
Post by: saturnu on December 22, 2014, 03:47 PM
hm yes, i looked at the camera rom header and it's using a special mapper (0xFC), that is capable to do the camera stuff beside the rom/ram mapping.
a pretty logical implementation, to say the truth. ^^

atm. i don't own such a camera and it's pretty awful to program for a device, totally blind. :D
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.2
Post by: NicNic on December 24, 2014, 01:58 AM
atm. i don't own such a camera and it's pretty awful to program for a device, totally blind. :D

I know nothing at all about programming. :(
So, if I can improve the world in that way, send me your postal address in PM, I'll send you back a Gameboy Camera.
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.2
Post by: saturnu on January 29, 2015, 01:17 AM
camera support? on the next fleamarket, i'm looking around for one. i don't think it's worth it - sending one around the globe. :>

btw. i thought about a microcontroller based transfer pak emulator, something like a flashcart, that could be connected instead of a joypad or as an adapter. :>

it's more or less just a copy&paste job. i have the controller code and transfer pak code ready, but atm. i'm not sure about the interface.
maybe just sram and a homebrew on the ed64 uploading to the device, or a seperate sdcard and some buttons.
there are pros and cons...

but atm it's on the bottom of the todo list, i have to finish other projects first. ^^
hopefully someone is faster than me, after reading this. :D
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.5
Post by: saturnu on March 28, 2015, 12:03 PM
pocket camera test version

changelog:
- ed64v3 support
- gameboy camera sram dump support (untested) - tested by gojira54, should work

I'm not sure if the camera sram dumping works ^^
would be cool if someone could give me a feedback on this


writeback of the camera sram is disabled, 'cause i don't have a camera and couldn't test if it's working. (don't want to currupt your data) ^^
(maybe it's already working. if someone really needs this feature, leave a comment ^^)

Download:
gb64_v05_beta_camera_test.zip (http://krikzz.com/forum/index.php?topic=2298.0)

maybe, but i don't have one ^^
try one this tools after dumping the ram from the gbcamera

win32:
http://1x-upon.com/~despens/gameboy/howto/gb_cam_dump.zip
http://1x-upon.com/~despens/gameboy/howto/gcam14.zip

*nix:
https://github.com/jkbenaim/gbcamextract
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.2
Post by: saturnu on April 05, 2015, 05:44 PM
Changelog:
- just a compatibility fix
- added 0.2 second delay in order to wait for the 3v3 to 5v converter to stabilize


Download:
gb64_v06_beta.zip (http://krikzz.com/forum/index.php?topic=2298.0)

same version - with camera ram write enabled (experimental: untested!)
gb64_v06_beta_cam_write.zip (http://krikzz.com/forum/index.php?topic=2298.0)
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.6
Post by: Mattroid on April 05, 2015, 10:17 PM
I'd like to help test camera compatibility, but I can't get it to recognize the camera. I tested with a GBC game and everything there seems to work fine, but the camera continues to give a "check connection" message. First time it gave me error -4, I then cleaned the contacts on the camera. After that, it gave me error -1. Since then, it doesn't give me an error code at all, but has always simply said 'check connection' at the bottom.

So I'm not sure what's up with that. Anything else you can think of that I might try?
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.6
Post by: saturnu on April 05, 2015, 11:02 PM
hm this is strange, what version are you using?

Code: [Select]
if(_set_gbPower(0)!=0)
return -1;
   
//get power status 0=off 1=on
if(_get_gbPower()!=0)
return -2;

//set power off 0=off 1=on
if(_set_gbPower(1)!=0)
return -3;

//get power status 0=off 1=on
if(_get_gbPower()!=1)
return -4;


this is happening after starting the tool:

1. turn off power -> if it fails: error -1
2. check if power is off -> if it fails: error -2
3. turn on power -> if it fails: error -3
4. check if power is on -> if it fails: error -4

in your case:
first it could not check for power on
than it could not set the power off?
and than nothing?


- you have to power off the n64
- insert pak and cartridge
- than start the n64 and the tool

if you change or reinsert the cartridge, it's not enough to just reset the n64 or to go back to menu and start the tool over again

some guy already dumped his camera with the tool and it's more or less doing the same with the camera as with the normal cartridges :>
so i can't say that there is anything special you could try beside cleaning.
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.6
Post by: Mattroid on April 06, 2015, 12:50 AM
I tried both v0.5 and v0.6 (w/ram write), though with v0.6 I may not have shut down the N64 after testing the GBC game. I'll go try the camera from boot up now and report back.

EDIT: Same problem. Weird. I'll take the camera apart and clean it better when I can...I can't seem to find my triwing or technical screwdriver set so I'm kinda stuck at the moment.
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.6
Post by: blueberries91 on April 06, 2015, 08:12 AM
I just received my everdrive 64 and went to boot up my pokemon silver when I noticed the battery died on my save  :( now I dont have a save and am having a hard time finding any .srm saves. Would it be possible to used a .sav file with this program, or could anyone post their .srm save for pokemon silver?
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.6
Post by: saturnu on April 06, 2015, 10:34 AM
gameboy saves are gameboy saves :>
i just named it .srm

-> just rename the file ending
Title: Re: [lib] libgbpak - a Transfer Pak beta library
Post by: yoloswag420 on April 06, 2015, 08:47 PM
on the top left is my usb loader client in the terminal, dumping the ed64 sdram.
the ed64 is running alt64.
on the right you can see geany with the the library source. ^^
it's great that it's possible to use the ed64 sdram as extended ram, 'cause the n64 only has 4 or 8Mbyte rdram. :>

(http://abload.de/thumb/libgbojyk1.png) (http://abload.de/image.php?img=libgbojyk1.png)

EDIT: today i implemented ram bankswitching and reading/writing (untested) :>

>dat wallpaper
>dat wm configuration
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.6
Post by: saturnu on April 07, 2015, 01:07 AM
i'm not sure what's happening if all the power commands are failing.
maybe the 3v3 power supply rail is a bit weak after all these years.

in my case i have some ripples on the 3v3 rail as well.
this could be fixed by recaping the power supply. :>
(it's making funny noises even with just the few mA more, the expansion pak needs, if i insert it ^^)

every device you add uses a few mA more and stresses the power supply

if you have some problems with the tool:
maybe it could help to replace the expansion pak with the jumper pak
or unpluging all other joypads...

the 3v3 rail starts at the power supply and goes
[power supply 3v3]->[n64]->[joypad]->[transfer pak (3v3->5v)]->[cartridge]

these are quit a few connectors and
if you want to try to reduce the impedance by cleaning them
these are the important points

isopropyl alcohol and a gum eraser are good tools for it

n64 side of the power supply connector
(http://abload.de/img/power_n64_sideg8u74.png)

n64 side of the joypad connector
(http://abload.de/img/controller_n64_sidekdun4.png)

these are the more critical ones
even shaking the pak while using it could produce errors

as you can see gnd and 3v3 are split over a few pins

front of the pak pcb
(http://abload.de/img/pak_headerqcuw9.png)

back of the pak pcb
(http://abload.de/img/pak_header_backmfur9.png)

game boy carts, are transported in pockets, lying on the carpet...
there is a good chance for dust to cover the contacts and even to go over into the cartslot

for the cartslot on the tp, maybe you could use some cardboard ^^

(sandpaper isn't a good idea, think of corrosion ^^)

gb cart pcb (single sided)
(http://abload.de/img/gb_cart_5vscul6.png)

happy cleaning :>
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.6
Post by: asdfqwer426 on May 09, 2015, 09:32 PM
keep up the great work! i was so happy to find this program a few months back, as well as your write up for transfer pak with everdrive GB. in another thread about the GB camera, you mention maybe adding support for changing to port 2. I don't know how hard this would be, but i would love it for my handheld 64, as i like to use the second port for transfer pak.

(http://i.imgur.com/ZGRjbLjm.jpg?1)

Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.6
Post by: panzerwings on May 27, 2015, 04:36 PM
Yeah, I got two transfer packs from ebay yesterday and immediately tried to back up my gameboy camera... I had the same check connection and -1 and -4 errors as the above posters.

I cleaned the connectors on the transfer packs with alcohol and normal gameboy games would immediately just work and get recognized. I was able to dump as well, but gameboy camera would never show up. Turning on and off would not get the camera to be recognized.

Perhaps like you said, maybe the power supply is dying. I will look into getting a 3rd party power adapter and try again.

Edit - Updated 1:51PM 5/27/2015-
I got it to work and was able to repeat it one or two more times. I have everdrive64 v2. Here are the steps I took:

1. System was turned off
2. Plugged both gb camera and transfer pack SNUGGLY into the controller on port 1.
3. Turn on and start  libgbpak beta v.6 (with sram write)
4. Libgbpak makes the gb ding sound and shows the "check connection" message on the bottom and NO -1 or -4
5. If requirements in step 4 has been met, then slightly pull the gb camera out JUST A LITTLE BIT instead of it being all the way in the transfer pack. I am talking about 1 or 2 mm.
6. Press the reset button on the system - not powering it off.
7. Start libgbpak again with a little prayer...
8. Once it shows the name of the game, press B to dump the SRAM, and be patient because it is about 128KB.

Thank you Saturnu for creating this awesome tool!
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.6
Post by: saturnu on May 27, 2015, 10:13 PM
hm it seems like it still is connection problem. but altering the position the connector makes contact is a nice little trick. ^^
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.6
Post by: panzerwings on May 28, 2015, 06:18 PM
hm it seems like it still is connection problem. but altering the position the connector makes contact is a nice little trick. ^^

Yeah, I will probably open the transfer packs up and clean the gameboy contacts with alcohol eventually. I have two: one for gameboy backups, and one to try the gbloader mod.
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.6
Post by: Mattroid on May 29, 2015, 09:27 PM
Nice trick, I'll have to try that. I usually try various things like that but didn't in this case for some reason. Thanks.
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.6
Post by: Traveller on June 03, 2015, 02:56 PM
Hey!

I've also now had success. I cleaned the camera pins again, plugged it all the way in, then tried the reset thing and it worked after a couple of tries.

I didn't have to do the pulling out slightly thing. I also used the version which apparently had the write function disabled to put my Pokemon save onto a cart, or was it only the camera that was locked out from doing that?
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.6
Post by: saturnu on June 04, 2015, 01:20 AM
same version - with camera ram write enabled (experimental: untested!)
gb64_v06_beta_cam_write.zip (http://krikzz.com/forum/index.php?topic=2298.0)

yes, only camera writeback was disabled
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.61
Post by: timmy on February 06, 2016, 10:34 PM
Can you add support for dumping unadvertised sram?

I try to back up my Final Fantasy Legend 1 (aka Sa-Ga) game since it only has 1 save file. But I never could with Mega Memory Card or Monster Brain.

I try GB64 and it says the game has no sram! So I think it is a mistake in the rom header.

I think Final Fantasy Adventure (Seiken Densetsu) has same problem.

It is Ok to overdump the unadvertised sram I can fix it.

Thank you for this program.
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.61
Post by: saturnu on February 07, 2016, 01:39 AM
ah, thanks for that info.

it was just a tiny bug in the interface, cause the save option was only enabled, if there is external ram available.
the mbc2 has internal ram, so only the battery flag was set and not the external ram flag.

i don't know if it's working properly, i haven't tested it by now. ^^
http://krikzz.com/forum/index.php?topic=2298.0


(https://f.zdev.com/dl/rbzoti.png)
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: timmy on February 07, 2016, 07:51 PM
Thanks but I am having two problems with 0.62.

1 is, it seems to be stuck in PAL mode? My screen rolls like crazy and I can barely see what is on the screen.

2 is, I tried to dump the sram but it created a zero byte file SAGA.SRM. I can't read the screen to see if there is any more info to report. I dumped a pokemon game with 0.3 and got a 32k srm file.
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: saturnu on February 07, 2016, 08:01 PM
i've reuploaded v0.62 today, the archive from yesterday night was buggy. ^^
but SAGA is dumping and restoring it's sram fine for me.

the screenshot is from an acutal dumped sram file. :D

btw. try to force the tv mode for the rom in the config menu ^^
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: timmy on February 07, 2016, 08:23 PM
0.63  worked! :D

Any chance you can fix the screen mode thing? It's hard to dump when you can't see the screen properly O_O The 0.3 version displays fine for me.

edit: I set option to NTSC but no luck.
0.61 also goes to PAL, that's oldest version I have other than 0.3.
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: saturnu on February 07, 2016, 08:25 PM
yes i think i should debug this, too. ^^
this sounds really annoying. :D
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: timmy on February 09, 2016, 04:12 AM
Latest version of 0.63 fixes the screen problems thank you! :D

One last request, and this may be too much work / too difficult, so it is fine if say no, please don't worry about it! :)

Can you figure out how to dump saved games from Mega Memory Card by InterAct? I've got a few carts with dead batteries so I can't restore saves from MMC in order to dump them with ed64. I guess I can figure out how to change the cart battery evenutally tho..

I dumped MMC rom and I can see the save game file table at 0x7800 with my save file titles listed and if I run the DEMO.GB rom in an emulator it show my games in the delete menu like normal. So if we're lucky getting at the saves might be as simple as overdumping DEMO.GB?

Anyway I'm very happy with this program as is already thanks so much!!! :D :D :D


edit:

Here is a picture (http://www.pcworld.com/product/pg/271342/detail) of MMC.

Also it seems all of 0x7000 ~ 0x7FFF is used for file management. I see this by comparing with
 never used MMC rom  (https://www.loveroms.com/download/gameboy/megamemory-v10-by-interact-e/66846)file from the net.

0x7000 ~0x7800 looks like a FAT table!

(http://i68.tinypic.com/2hfkr2v.png)
(http://i68.tinypic.com/2elyw04.png)
(http://i67.tinypic.com/amw8qx.png)
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: saturnu on February 09, 2016, 10:51 AM
basically i know nothing about this devices memory mapping and i don't have one to experiment with.
if you want to overdump a mbc5 rom or something, i can provide a testversion, that doesn't use the information from the romheader for the rom/ram size.

the linked DEMO.gb is set to -> mbc5 + 32KByte ROM + 32KByte RAM

Here is a hardcoded libgbpak version that is using 4MByte ROM + 128KByte RAM
https://f.zdev.com/dl/stqysj.z64

keep in mind, that this is taking ages to dump. ^^

(https://f.zdev.com/dl/zglvyu.png)
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: timmy on February 10, 2016, 01:12 AM
That header might be inaccurate. It's unlicensed cart so it may not use a MBC series chip. It definitely doesn't have a battery. It might have extra ram but I can't think why it would need it unless GB ram isn't enough to hold the file table + buffers. I can see 4 ICs inside but I can't tell what they are. Three have pins on all four sides and one has two rows of pins. Probably at least 1 is EEPROM/FLASH chip.

I tried the overdumper version but the resulting rom was repeating the part from 0x4000 ~ 8000 over and over again. SRAM was just FF entirely. I guess the only way to get at the game files is for someone else to reverse the code and figure out the memory map.

Thanks anyway! It was a good try! :D
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: saturnu on February 10, 2016, 08:36 AM
yes, this makes sense. ^^
but i somehow hesitate to monitor the register access with the rom that's online. maybe it's a dead end to experiment with that rom at all, 'cause nobody knows if it's a clean dump. ^^
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: TUWieZ on March 03, 2016, 04:34 AM
Not sure if this could help on implementing HuC3 (this game probably has little documentation),  but 'Robot Ponkottsu 64 - 7tsu no Umi no Caramel (Japan)' is an N64 title which used the transferpak to receive data from the japanese Robopon GBC titles, Sun/Star/Moon. (These games have custom cartridges with speakers + a replaceable cr2025 compartment, and use HuC3.)

https://github.com/Drenn1/GameYob/issues/51#issuecomment-16026325

Phenomenal work so far by the by, very impressed at the support for custom carts like pokemon rumble pinball and the gameboy camera  :)
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: gbc12 on April 17, 2016, 09:53 AM
is it possible to use libgbpak with this concept --> (http://micro-64.com/features/gsneon64.shtml) (homebrew uploading to the n64 via gameshark), to run this program on a real N64 console without needed an everdrive? does the program need to be modified?
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: saturnu on April 17, 2016, 10:14 AM
libgbpak is a library, that you can use in any of your c64 programs, the demonstration tool is everdrive specific.
so in theory it is possible to use the library in some homebrew with a gameshark, but you need to figure out a way to transfer the roms back to the pc.
maybe you can get use of the LPT port or the controller pak and a dexdrive. ^^

if you are going to program a gameshark version, say so. the library uploaded is a bit outdated, so i need to update it, if there is a serious homebrew project incoming. ^^


EDIT:
i guess the lpt port might be possible with a gameshark pro.
-> dump the rom to the rdram -> dump the rdram with the gameshark -> use some extraction tool - to dump the rom out of the ram image
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: gbc12 on April 17, 2016, 11:57 AM
I know this method found here (http://www.paulscode.com/forum/index.php?topic=810.0) and here (http://www.nesworld.com/article.php?system=n64&data=n64-howtodumproms) will connect the gameshark to the pc and you use "Game Software Code Creator" to extract the file.

The way i saw it was do this same setup, but instead of loading the neon64 homebrew, loading the demonstration tool homebrew for the everdrive. which could be used with "Game Software Code Creator" to extract files from the transfer pak to the pc. It's just since the everdrive version runs right to an SD card, if i ran it on a gameshark, there would be errors.

I didn't know if the library was already configured for gameshark. I didn't want to mess up a sm64 cart! :)

edit:
A more visual way of explaining process tree i was going for:
1) use this method (http://micro-64.com/features/gsneon64.shtml) but instead of loading neon64, load the everdrive transfer pak demo
2) plug game into transfer pak on controller with game
3) use that program to save instead of to SD card, but to ram of gameshark/n64
4) program on PC freezes to give you a chance to press button on Game Software Code Creator
5) file loads to pc
6) loops back to title screen of program

i just didn't know if this library treads the SD card of the everdrive as any storage device on the hardware (including ram)
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: gbc12 on April 22, 2016, 10:42 AM
if you are going to program a gameshark version, say so. the library uploaded is a bit outdated, so i need to update it, if there is a serious homebrew project incoming. ^^

i forgot to say so! :) YES! please make a gameshark version for the libgbpak and a gameshark version of the demonstration tool. thx!
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: saturnu on April 22, 2016, 10:43 AM
No, thanks. ^^
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: gbc12 on April 22, 2016, 10:46 AM
aww... lol!
thx for the work on the base library! It's a great start!
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: gbc12 on April 26, 2016, 04:54 PM
will this program work on ANY version of the everdrive? (v1, v2.x, and/or v3)
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: saturnu on April 26, 2016, 06:25 PM
i guess so
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: nelan_hroth on May 03, 2016, 09:03 AM
Hey Saturnus,

Just got my Everdrive V3 a few hours ago,

Been having an issue getting PKMN Crystal Cart to dumb onto my SD card.
When i get to either dumping RAM, or Dumping ROM, I get an message "File Already Exists on Drive"

Especially after trying to do a RAM dump it advises me to "Power Down" and after hitting Z, the text gets loaded up and distorted.

In addition the Screen Is not loading the background for the Rom when loaded up off of the Root menu of the SD drive.

I have the most updated version of the OS for the Everdrive, and the most updated version of libgbpak.
The Carts are all ntsc including Everdrive Cart at the moment

I couldn't find anything that this is exclusively working for only PAL carts at this time, is this the case?
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: saturnu on August 21, 2016, 02:36 PM
is this tool still working on a v2.5 and v3 correctly?
would be nice if someone could check this.
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: iwasaperson on August 21, 2016, 08:15 PM
is this tool still working on a v2.5 and v3 correctly?
would be nice if someone could check this.

I have a 2.5 and am getting the same problem (black background, file already exists).

Clearly the application is having trouble reading the SD card, especially since the background is black..
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: saturnu on August 22, 2016, 05:22 PM
bugfix version released v0.6.3.1

- v2, v2.5, v3 compatibility fix
- additional PAL 256x240 interface for better compatibilty
- startup 'bing' sound removed

if you are using a v1 you should try the legacy version v0.6.3
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: iwasaperson on August 23, 2016, 03:50 AM
bugfix version released v0.6.3.1

- v2, v2.5, v3 compatibility fix
- additional PAL 256x240 interface for better compatibilty
- startup 'bing' sound removed

if you are using a v1 you should try the legacy version v0.6.3
Well... it almost works. Whenever I dump either the save or the ROM, it fails very consistently. I'm trying to dump Pokemon Red for starters, and the application reads it correctly (so does Pokemon Stadium), but when I dump it, it outputs a file that has two repeating hex values instead of what's supposed to be there.

Ex: "POKEMONRED " becomes "POPOMOMORERE"

I thought it was just a bad connection, but I cleaned everything like crazy and it's still not working, even though everything works perfectly in Pokemon Stadium.

On an unrelated note, is there a chance of applying this fix to alt64 so I can use that on my ED64 2.5?

EDIT: Here is the dumped ROM: http://www109.zippyshare.com/v/iBPSfzbY/file.html
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.1
Post by: saturnu on August 23, 2016, 11:26 AM
huh, very strange :D
but i have the same error, maybe i can figure it out. ^^
thanks for the bug report
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.1
Post by: saturnu on August 24, 2016, 01:12 AM
bugfix version released v0.6.3.2

- sdcard write fix
- startup 'bing' sound implemented again
- option - back to ED64 OS fixed

everything seems to work now, but i'm doing a bit more testing this time ^^
releasing it soon...
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.1
Post by: fintogive on August 24, 2016, 07:55 AM
Hey saturnu i have a question. can your program be updated to dump a gameboy test cart?  im at the end of my rope trying to find a way to dump this cart. and i see your still activity working on this program?

It recognizes there's a cart in the slot (with the name DMG AGING)  but it shows check connection so i cant dump it.  and yes the connection on the transfer pak controller and cartridge has been polished to a shine and the slots are clean. so i know theres no bad connection.  ive tried 3 other transfer paks and controllers with version v0.6.3 and v0.3.  it works with a regular cart.  its important i get this dumped cause its an eprom and eprom data will die from bit rot eventually making this 1000 dollar cart worthless.  the cart works fine on every hardware for the gb gbc and gba.

here a scan on the cart disasembled. it uses a full size 32k eprom
http://i322.photobucket.com/albums/nn435/davidevgen/Scan10043_zpsaomvceci.jpg
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.1
Post by: saturnu on August 24, 2016, 10:05 AM
hm yes,
the dump fails 'cause i check for a good connection by the cartridge name in the header.
it seems like in this case it starts with a blank (0x20), i guess i should improve this anyway. ^^
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.1
Post by: fintogive on August 24, 2016, 10:56 AM
I hope so cause the next step is to de solder the eprom from the board, buy a programmer and dump it that way.  The retrode doesnt work corectly with this cart so im out of options.  If im correct this rom doesnt have header data but im not sure.

Let me know if you can come up with something :P  Thanks!
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.1
Post by: saturnu on August 24, 2016, 02:41 PM
i've uploaded v0.6.3.2
i guess it now should dump your test cart as well

but maybe it's just this rom floating around on the internet ^^
Game\ Boy\ Controller\ Kensa\ Cartridge\ \(Japan\)\ \[b\].gb
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.1
Post by: fintogive on August 24, 2016, 03:28 PM
ive tried to find my version of the rom on the internet.  the one you are talking about isnt the same.  Anyways thank you very much!  ill check it out and report back with the results.

Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.2
Post by: fintogive on August 24, 2016, 03:45 PM
so it didnt show the check connection error but nothing appeared to dump after it saids dumping... dumped...  it said somthing like fatcantopenfilebyename error and didnt respond to button inputs.  i tried tetris and it came up with the same error with no rom file on the sd.
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.2
Post by: saturnu on August 24, 2016, 04:09 PM
for me it's working on my v2.0 :/
i'm not sure if i can really debug this without a v2.5 or v3

here is a debug rom, that displays the exact error code:
https://a.pomf.cat/zoeptv.v64
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.2
Post by: ozidual on August 24, 2016, 04:38 PM
I just wanted to pop in and say thank you saturnu.  I haven't tested the new version, but back when I first picked up my ed64 the first thing I did was back up my old GB/GBC saves.  It's a good feeling to have all of those old memories somewhere safe :)
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.2
Post by: iwasaperson on August 25, 2016, 02:14 AM
New version works perfectly! Thank you.

ROM Hashes match with No-Intro, and save loads up just fine.
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.2
Post by: fintogive on August 25, 2016, 07:34 AM
Dang well i thought maybe it was because it was on fat32 so i switched to a 2gb fat formatted card and didnt get any different results.  so should i try a earlier OS or everdrive?  or doesnt it just not work with v2.5/v3?
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.2
Post by: saturnu on August 25, 2016, 11:45 AM
I'm testing with the latest OS v2.12 on my ED64v2.0 and iwasaperson is using a ED64v2.5.
Acutually i don't know what's going on with your cart.
you can try put it on an alternate sdcard and place it as OS64.v64 in the ED64 folder, to boot from it directly. ^^
Or you can try to backup your sdcard, format it with fat32 and use a 4KB cluster size.

changelog:
v0.6.3.3
- updated v2.5 fw
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.2
Post by: fintogive on August 25, 2016, 02:36 PM
Oh!!!... I feel stupid now... i should have just read the dang readme file XD

"put the GB64 directory at the root of the sd card"
 now its working! derp...

And from what i can tell ive successfully dumped the rom! thanks man your a real life saver!

now i just got one more cart to dump and thats the n64 test cart.
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: TUWieZ on August 26, 2016, 10:15 AM
Not sure if this could help on implementing HuC3 (this game probably has little documentation),  but 'Robot Ponkottsu 64 - 7tsu no Umi no Caramel (Japan)' is an N64 title which used the transferpak to receive data from the japanese Robopon GBC titles, Sun/Star/Moon. (These games have custom cartridges with speakers + a replaceable cr2025 compartment, and use HuC3.)

https://github.com/Drenn1/GameYob/issues/51#issuecomment-16026325

Phenomenal work so far by the by, very impressed at the support for custom carts like pokemon rumble pinball and the gameboy camera  :)

Just wanna add onto this, there's an open source GB emu called "GEST" made specifically for the obscure HuC3 mapper. This was the only emu I've seen that can read/write battery files for HuC3 games like Robopon.
http://gest-emu.mbnet.fi/down.htm (http://gest-emu.mbnet.fi/down.htm)
http://www.cherryroms.co.uk/forums/copier-and-hardware-forum/gbgbc-huc1-and-huc3-mapper.html (http://www.cherryroms.co.uk/forums/copier-and-hardware-forum/gbgbc-huc1-and-huc3-mapper.html)
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.2
Post by: saturnu on August 26, 2016, 10:24 AM
thanks for that link, this might come in userful.

it seems like there are a lot of abscure mappers supported by this emulator like:
mbc7
tama5
huc3
ROCKMAN8
BC
MMM01
POKE
8IN1
MK12

Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.2
Post by: skaman on August 27, 2016, 05:24 AM
I built a standalone GB cart reader with support for all of the official mappers.

I dump HuC1(0xFF) as MBC1 and HuC3(0xFE) as MBC5.

MBC7(0x22) and TAMA5(0xFD) are the problem carts when it comes to save games.  MBC7 uses reads/writes to 0xA080(Kirby)/0xA180(CMaster) and TAMA5 uses 0xA000/0xA001 for both ROM and RAM.
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.62
Post by: skaman on November 23, 2016, 10:28 PM
Latest version of 0.63 fixes the screen problems thank you! :D

One last request, and this may be too much work / too difficult, so it is fine if say no, please don't worry about it! :)

Can you figure out how to dump saved games from Mega Memory Card by InterAct? I've got a few carts with dead batteries so I can't restore saves from MMC in order to dump them with ed64. I guess I can figure out how to change the cart battery evenutally tho..

I dumped MMC rom and I can see the save game file table at 0x7800 with my save file titles listed and if I run the DEMO.GB rom in an emulator it show my games in the delete menu like normal. So if we're lucky getting at the saves might be as simple as overdumping DEMO.GB?

Anyway I'm very happy with this program as is already thanks so much!!! :D :D :D


edit:

Here is a picture (http://www.pcworld.com/product/pg/271342/detail) of MMC.

Also it seems all of 0x7000 ~ 0x7FFF is used for file management. I see this by comparing with
 never used MMC rom  (https://www.loveroms.com/download/gameboy/megamemory-v10-by-interact-e/66846)file from the net.

0x7000 ~0x7800 looks like a FAT table!

(http://i68.tinypic.com/2hfkr2v.png)
(http://i68.tinypic.com/2elyw04.png)
(http://i67.tinypic.com/amw8qx.png)
Finally found some time to look at the Mega Memory.  I'm still working out all of the little details but the two tables that timmy posted are the mapping for each stored save game and the save title list.  Each byte in the mapping table represents 0x100 (256) bytes.

The save data is run length encoded and uses the 1st byte of each block as the RLE marker.  For example, if the save game block starts with 0x12 then that is the byte used for run length encoding.  You will most likely see a bunch of 0x12s repeating thru out the block.  Each 0x12 (except the 1st one) designates a run length encoded item consisting of 3 bytes.  Following the 0x12, the 2nd byte is the count and the 3rd byte is the byte that repeats.  If bytes don't repeat in the save then they're stored as is. 

The actual RLE marker byte changes based on the save data.  The Mega Memory selects a byte not used in the save game.  This prevents corruption of the save game due to the RLE.

More testing to do.

For anyone wanting to dump their MMC and extract their stored saves, more details posted here:  http://forums.nesdev.com/viewtopic.php?f=20&t=15181
Title: Re: [lib] libgbpak - a Transfer Pak beta library and demo-tool v0.6
Post by: Asaki on April 08, 2018, 06:43 AM
I got it to work and was able to repeat it one or two more times. I have everdrive64 v2. Here are the steps I took:

1. System was turned off
2. Plugged both gb camera and transfer pack SNUGGLY into the controller on port 1.
3. Turn on and start  libgbpak beta v.6 (with sram write)
4. Libgbpak makes the gb ding sound and shows the "check connection" message on the bottom and NO -1 or -4
5. If requirements in step 4 has been met, then slightly pull the gb camera out JUST A LITTLE BIT instead of it being all the way in the transfer pack. I am talking about 1 or 2 mm.
6. Press the reset button on the system - not powering it off.
7. Start libgbpak again with a little prayer...
8. Once it shows the name of the game, press B to dump the SRAM, and be patient because it is about 128KB.

Can this information be added to the main post or the readme file or something? I was having the same issue, and pulling the cartridge out just a tiny bit really did the trick.
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.2
Post by: TUWieZ on July 26, 2018, 04:41 PM
thanks for that link, this might come in userful.

it seems like there are a lot of abscure mappers supported by this emulator like:
mbc7
tama5
huc3
ROCKMAN8
BC
MMM01
POKE
8IN1
MK12

I built a standalone GB cart reader with support for all of the official mappers.

I dump HuC1(0xFF) as MBC1 and HuC3(0xFE) as MBC5.

MBC7(0x22) and TAMA5(0xFD) are the problem carts when it comes to save games.  MBC7 uses reads/writes to 0xA080(Kirby)/0xA180(CMaster) and TAMA5 uses 0xA000/0xA001 for both ROM and RAM.

Any updates on a release for a save dumper with huc3 support?

The speaker and RTC in huc3 cartridges make the save battery die very fast; which is why the cartridges for huc3 games are designed for battery swapping (while the game is powered on so the save isn't lost.)

Sorry to post about this again but I don't wanna lose my saves if I forget to replace the batteries on time lol

(https://i.imgur.com/ntTwnQC.jpg)
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.2
Post by: skaman on August 06, 2018, 10:08 AM
Details on MBC7 Saves here:  http://gbdev.gg8.se/forums/viewtopic.php?id=448

Details on TAMA5 Saves here:  http://gbdev.gg8.se/forums/viewtopic.php?id=469
Title: Re: [lib] libgbpak - a Transfer Pak beta library and dumping-tool v0.63.2
Post by: r1ggles on October 03, 2018, 08:45 PM
Can't dump the save from Pokemon Crystal (JPN) version, the English versions of Yellow, Gold work fine. Thanks for developing this tool btw!

If I view the Japanese ROM in GB View it shows SRAM as "UNKNOWN" meanwhile the English version says 256 KBit (32 KBytes (4 banks of 8 Kbytes each)), if that's any help to know what the region difference could be.


Here's a pastebin with memory addresses to the Japanese version of Pokemon Crystal:

https://pastebin.com/jTJdNYZK
(thanks to gifvex)


GB64 Info:

Title: PM_CRYSTAL
Mapper: 0x04
Rombanks: 0x00
Romsize (kb): 2048
Rambanks: 0x00