Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - SMS Dump tool released!

Reply to topic
Author Message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8068
  • Location: Paris, France
Reply with quote
SMS Dump tool released!
Post Posted: Sun May 16, 2010 3:44 pm
So, I made this custom tool for my own use a long time ago (in 2002), tweaked it over the years and used it a lot. I've sent it to a few people but then I suspect its public is rather limited anyway. Kept forgetting to officially release it, so here it is now.

The program run on a Master System and allows copying data from a slot to another. It has varierty of options. The main use for this program is to use a Gender Adapter with a SRAM writable cartridge plugged in the back and copy cartridges content to the SRAM cart, to be later read back with a SMS Reader on PC. This is the process I use to dump Japanese/Korean cartridges. On an US/EU SMS you can use the program to dump US/EU compatible cartridges. The idea is that using the SMS hardware itself to access cartridges gives better results that the SMS Reader design which doesn't support all kind of cartridges.



Because SMS BIOS boot is programmed to prioritize the cartridge slot over the expansion slot for booting (which may be a mistake) the way I use it is:

- Write the smsdump.exe program on SRAM cartridge.
- Set write-disable lock on SRAM cartridge (if you have such lock).
- Plug SRAM cartridge on expansion slot of SMS via Gender Adapter
- Power on
- From now on the program has copied itself to RAM and doesn't use the slot from which it booted. Don't press PAUSE because the interrupt vector is at 66h and the slots are disabled unless in copying state.
- Plug in cartridge to read on cartridge slot
- If the system has crashed (the flashing WAITING prompt is meant to tell you if the system has crashed) power off and try again.
- Use the interface to select memory area to read/write, mapper and size. There is no 32 KB setting because 48 KB essentially does the same and it helpful for SG-1000 cartridges with mapper using a 40 KB memory region.
- Pressing B also to read the memory, see sum per block of 16 KB pages (compatible with smspage.exe output to easily compare) and verify that the memory can be read in a stable way.
- Set write-enable lock on SRAM cartridge (if you have such lock).
- Press A to start copy.
- When copy is done, set write-enable lock on SRAM cartridge (if you have such lock).
- Power off.

- Read the SRAM cartridge on SMS Reader on PC or equivalent.

About hot pluggin cartridges: I have done it thousands of times on various SMS and never damaged any of them. Certain carts makes SMS crash more than other (I've got some Korean carts that can take several dozen attempt at hot plugging before not crashing the system).

You can edit config.asm and recompile if you want to use unusual settings (mapper addresses, sizes, etc.).

Download:
http://www.smspower.org/Homebrew/SMSDump-SMS
(Sources are included)

See it in action here:


Things I'd like to do:
- Replace the font with something better readable.
- Improve the interface to be able to select more values, perhaps input any value, without having to edit config.asm and recompile.

That's it.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8068
  • Location: Paris, France
Reply with quote
Post Posted: Sun May 16, 2010 3:49 pm
Here's some sample settings from the manual to give you an idea of how to set it up:

 ----------------------------------------------------
  Read a SG-1000 mycard, or a SMS card
 ----------------------------------------------------
                SOURCE                  DESTINATION
 ----------------------------------------------------
 Slot           Cart                    Expansion
 Start Page     0                       0
 Address        0x0000                  0x0000
 Mapper         <none>                  <none>
 Size           32
 ----------------------------------------------------

 ----------------------------------------------------
  Read a standard 256 kb SMS cartridge in bank 2
 ----------------------------------------------------
                SOURCE                  DESTINATION
 ----------------------------------------------------
 Slot           Cartridge               Expansion
 Start Page     0                       0
 Address        0x8000                  0x8000
 Mapper         0xFFFF                  0xFFFF
 Size           256
 ----------------------------------------------------

 ----------------------------------------------------
  Read a CodeMaster 128 kb SMS cartridge in bank 2
 ----------------------------------------------------
                SOURCE                  DESTINATION
 ----------------------------------------------------
 Slot           Cartridge               Expansion
 Start Page     0                       0
 Address        0x8000                  0x8000
 Mapper         0x8000                  0xFFFF
 Size           128
 ----------------------------------------------------

 ----------------------------------------------------
  Read a BIOS
 ----------------------------------------------------
                SOURCE                  DESTINATION
 ----------------------------------------------------
 Slot           BIOS                    Expansion
 Start Page     0                       0
 Address        0x0000 (or 0x8000 *)    0x8000
 Mapper         <none> (or 0xFFFF *)    0xFFFF
 Size           32 (or more *)
 ----------------------------------------------------
  (*) Depending on the BIOS size


Using a copy of this program even on a read-only cartridge also allow to compare byte sum per 16-KB page which can allow identifiying new dumps and variations.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12718
  • Location: London
Reply with quote
Post Posted: Sun May 16, 2010 8:02 pm
My Master System doesn't have A and B buttons :(
  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1147
Reply with quote
Post Posted: Sun May 16, 2010 9:48 pm
Quote
Because SMS BIOS boot is programmed to prioritize the cartridge slot over the expansion slot for booting (which may be a mistake) the way I use it is:


Is it the other way around? (BIOS prioritizes the expansion slot first, then the cartridge slot)

Otherwise couldn't you put your programmed SRAM cartridge in the cartridge slot, the game to read in the expansion slot, and power on the system without hot swapping?

This is a very, very cool program. Thank you for sharing it with us! The font is especially nice, please don't change it. ;D
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8068
  • Location: Paris, France
Reply with quote
Post Posted: Mon May 17, 2010 2:47 pm
Maxim wrote
My Master System doesn't have A and B buttons :(

ARGH, that has to be the most embarassing mistake ever. It never happened.

Charles MacDonald wrote
Is it the other way around? (BIOS prioritizes the expansion slot first, then the cartridge slot)

Otherwise couldn't you put your programmed SRAM cartridge in the cartridge slot, the game to read in the expansion slot, and power on the system without hot swapping?

Yes it is possible to do that for export console, but on a japanese console the expansion slot is export format and cartridge slot is japanese format so it has to be the other way around and require hot swapping.

Charles MacDonald wrote
This is a very, very cool program. Thank you for sharing it with us! The font is especially nice, please don't change it. ;D

Difficult to distinguish characters such as O (zero) and D (dee).
  View user's profile Send private message Visit poster's website
  • Joined: 15 Mar 2010
  • Posts: 45
  • Location: Florida
Reply with quote
Post Posted: Tue May 18, 2010 4:04 am
Now all you need is to make a ram cart without destroying a game.
  View user's profile Send private message
  • Joined: 16 Dec 2009
  • Posts: 253
  • Location: Outback Australia
Reply with quote
Post Posted: Wed May 19, 2010 4:06 am
Very nice! Perhaps somebody will now dump 4-pak :)
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8068
  • Location: Paris, France
Reply with quote
Tool to deinterleave Korean dumps of games using ASCII-ish 8KB mapper
Post Posted: Wed Oct 13, 2010 12:39 pm
Note:
Using "SMS Dump" which work with chunks of 16 KB, you can still dump the Korean games using 8 KB block mappers like Penguin Adventure, etc. (set the mapper location to 0x0002). You will get blocks 8 KB of correct data followed by 8 KB of an unwanted page.
Attached is a helper tool to re-assemble the 8 KB part (C source included). Its a trivial tool but for the record and confirming the process I thought it was worth posting it.

  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8068
  • Location: Paris, France
Reply with quote
Trick to dump SC-3000 Basic if you can't hotplug them
Post Posted: Wed Mar 09, 2011 8:09 am
I developed a theoretical (untested yet) trick to solve the problem that hot-plugging Basic cartridges tends to crash a SMS and I can't dump them the way I usually do it. Because I usually have my development cartridge plugged in expansion port I need to boot it first then hot plug the cartridge, which crash the SMS with Basic cartridges.

However you can reverse the boot order here by using simple Basic code.

eg: if you want to execute:
3E EB         ld a, EBh
D3 3E         outa (3Eh)
3E 6B         ld a, 6Bh
D3 3E         outa (3Eh)
C3 00 00   jp 0000h


You can write that Basic program:
10 FOR X=&HA000 TO &HA00A
20 READ AA: POKE X,AA: NEXT X
30 CALL &HA000
40 DATA 62,235,211,62,62,107,211,62,195,0,0


A000 here is a valid RAM address for SF-7000 basic, where I tested the concept. I don't have a Sega Keyboard handy to test it on a real cartridge but next week when I travel to Hokkaido for dumping purpose I'll see if I can use a variation of this trick to dump and find Basic ROM variations.
  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1147
Reply with quote
Post Posted: Thu Mar 10, 2011 5:21 am
When the Basic cartridge is plugged in, it shorts pin B3 to +5V which disables the built-in work RAM, so that the cartridge can map it's own RAM into that area.

Cover pin B3 on the Basic cartridge with tape, and this will prevent it disabling the built-in work RAM. It shouldn't crash anymore and you can dump the ROM now. Or if you are using some kind of adapter, just make sure pin B3 is no longer connected (cut the trace, etc.)

Notice that the cartridge RAM will not be accessible, but for dumping it's probably not a big deal. :)
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8068
  • Location: Paris, France
Reply with quote
Post Posted: Thu Mar 10, 2011 5:39 am
Thanks for the tip! Comes in very handy.

I am now working on supporting USB in SMS Dump so that data can be transfered to the PC directly via the magical Master Everdrive cartridge.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8068
  • Location: Paris, France
Reply with quote
SMS Dump for Master Everdrive USB
Post Posted: Thu Mar 10, 2011 3:10 pm
I have a working WIP version of SMS Dump that send data directly via USB to the PC and a small command-line client program to retrieve dumps.

Its not polished and quite broken now but if someone is interested let me know.

For now it seems like there is a bug with the firmware of the Everdrive to communicate back to the PC, so I had to use various workaround and reduce the transfer speed by a huge factor to cope with that. Igor is working on improving the firmware for that situation (it wasn't really a well tested feature to communicate from SMS to PC) and it can be updated via JTAG.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8068
  • Location: Paris, France
Reply with quote
Post Posted: Sat Apr 23, 2011 3:27 pm
Here's a picture of using the Master Everdrive to dump data via USB.
X-Terminator Dump.jpg (503.72 KB)
X-Terminator Dump.jpg

  View user's profile Send private message Visit poster's website
  • Joined: 05 Nov 2014
  • Posts: 204
  • Location: Auckland - NZ
Reply with quote
Post Posted: Tue Apr 23, 2019 7:15 pm
I know this is digging up an old thread.. but do you still have a copy of this that allows dumping via usb on a master everdrive?
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8068
  • Location: Paris, France
Reply with quote
Post Posted: Wed Apr 24, 2019 9:01 am
wasup wrote
I know this is digging up an old thread.. but do you still have a copy of this that allows dumping via usb on a master everdrive?


For any question that stars with "do you still have a copy" the answer is yes :)

Here's a raw dump of the folder including a git repo with the change from 1.00 to that version. I think this unfinished, there was an issue with the USB system in the Everdrive at the time (maybe fixed in other revisions?) if I recall correctly I think enabling USB would make it impossible or difficult to reliably read the cartridge at location $7F01 and $7F02 as the USB registers would conflict and there was no way to disable USB.

  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!