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 - New SMS USB Reader

Reply to topic
Author Message
  • Joined: 21 Aug 2014
  • Posts: 10
  • Location: Germany
Reply with quote
New SMS USB Reader
Post Posted: Sat Aug 23, 2014 11:31 am
Last edited by Iron Hand on Thu Nov 07, 2019 3:55 pm; edited 2 times in total
Greatings,

to all 8-bit fans and all users of this forum.

This is my first post on this board but im reading on smspower.org for a long time. This is also the first time i have maybe someting interesting to say. Im not a native english speaker so my expression might by a little bit odd.

I was so fascinated from the SMS Reader on this site that i have build one by my own, but with some improvements that somebody would interest in.



Before i start my descriptions i show you a little video because its the best beginning i thing to make clear what i spoke for.

SMS USB Reader Video

The very basic part of the device is the same as by the original reader, which is by the way a great work from the developer. Thanks for this.
The counters and the logic ICs are taken from the parallel version.

As the topic says this Reader connect to the PC over the USB port. All electronic parts are powered over the USB too. No external power device is needed. The USB part is done by an FTDI IC.

As a reason of use of the USB port the Reader works on near all modern systems that support a USB 2.0 interface and the FTDI driver. That includes Win2000, XP, Windows 7, 8 and some Linux derivates. I think a real LPT port is rarer to find.

The heart of the Reader is a AVR Atmega8 microcontroller (µC) who done all of the work to read out and write data from and to the game cardrige. It can be programmed over the integrated ISP interface.

The controller has some very easy to use commands to communicate with the Reader. For example: to read an 128k game you have only to send a "D" string to the Atmega. After this the Reader sends a byte stream to the PC and all to do is to get the data and do whatever you want.

All documents, source code, routed boards and schematic are published on my homepage under the following link:
USB SMS Reader Homepage

Its in german only so i use this forum to disposal it to english people.

Some pictures of the device can found here: Some Pics of the Reader

Hardware

I have some different designs of the board but the most importend are the single layer board which you see on the pictures and a double layer for a profesional PCB building.

One Layer (Single Side) Eagle Board Download
Two Layer (Double Side) Eagle Board Download

Firmware

For the µC you need a kind of firmware that you have to burn into the Atmega over the ISP interface. You can use any kind of programmer for AVR devices that support the ISP. I use the AVR mk2 and the AVR Dragon.

The software for the controller is written in pure assembler and i want to do some little work on it next time. So i published the HEX file only. If i finished it i publish the source code to. But believe me its not so interesting stuff.

SMS Reader µC Firmware HEX File Download

A usefull document will be the firmware manual, which listed all commands for the controller.

Firmware Manual

For the FTDI USB-Serial IC you can use my configuration. Than your reader will count on your system as SMS Reader in the hardware monitor.

FTDI SMS Reader Configuration Download

Software

The host software SMSUltra is a demonstration for all functions the Reader support. Use the source to build up your own stuff. Its written in C# and runs on x86 and x64 systems.

The software is not finished yet too but i work on the last features.

SMS Ultra V0.8 Source Download
SMS Ultra V0.8 x86 BinaryDownload
SMS Ultra V0.8 x64 BinaryDownload

This short introduction should give you an overview over the project. There is much more to say about but this should be enough for the begining. I hope somebody whould enjoy with it. If you have any question you can ask they here in the forum. If you find some bugs on anything. report it to me. Thanks.

Have FUN with 8-BIT POWER

Iron Hand
8273477A-A2B7-4AC3-8D2C-6C6E84546532.jpeg (68.42 KB)
Attachment fairy
8273477A-A2B7-4AC3-8D2C-6C6E84546532.jpeg
C3B14F29-63DB-406C-95B7-09ADB249C54B.png (38.21 KB)
Attachment fairy
C3B14F29-63DB-406C-95B7-09ADB249C54B.png
C1D64CF1-5C63-42A1-9897-477D46595F0B.png (62.9 KB)
Attachment fairy
C1D64CF1-5C63-42A1-9897-477D46595F0B.png
one_layer_v10.rar (61.11 KB)
Single Side Layer
two_layer_v10.rar (63.95 KB)
Double Side Layout
smsreaderusb.rar (893 B)
Atmega Firmware
Firmware V0.85 Control Manual.rar (1.58 KB)
Firmware Manual
smsreaderusb_ftdi.rar (841 B)
FTDI Config File
SMSUltra_src_v85.rar (107.73 KB)
SMSUltra Source Code
SMSUltra_v85.rar (13.3 KB)
SMS Ultra v85 x86
SMSUltra_x64_v85.rar (13.22 KB)
SMS Ultra v85 x64

  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Sat Aug 23, 2014 12:59 pm
This is very cool! Nice to see a USB enabled SMS cartridge reader.

I like the single-sided PCB layout too.
  View user's profile Send private message Visit poster's website
  • Joined: 27 Apr 2014
  • Posts: 281
  • Location: Texas
Reply with quote
Post Posted: Sat Aug 23, 2014 6:18 pm
This is neat! If I had SMS games I would build one.
  View user's profile Send private message Visit poster's website
  • Joined: 06 Dec 2013
  • Posts: 335
  • Location: Canada
Reply with quote
Post Posted: Mon Aug 25, 2014 4:38 am
Could your SMS Ultra software be also used to burn carts? I'm developing a cart burning system and it would be quite nice to make it compatible with your command set.
  View user's profile Send private message
  • Joined: 21 Aug 2014
  • Posts: 10
  • Location: Germany
Reply with quote
Post Posted: Mon Aug 25, 2014 6:26 am
db-electronics wrote
Could your SMS Ultra software be also used to burn carts? I'm developing a cart burning system and it would be quite nice to make it compatible with your command set.


Basically the SMS USB Reader can write any byte to any address of a game cardrige. This includes the RAM banks of the original games and the overall RAM of self-made rewritable cards.

If you look to the firmware manual you will find the "T" command which is the universal writing command for the Reader. This writes one byte to the current address and will work for every RAM card system. (RAM of the original Sega game cards and rewritable cards.) A very basic use of this command is implemented in SMSUltra, you find it under "Write Control" in the lower right corner.

Furthermore you find the "W" command in the list. With this you can write a entire buffer[] array to RAM bank 0 in less than a second. Such a further command for the entire address space will come in the next versions of the firmware. Unfortunately i not yet have build a rewritable card. So i cant test it, but sure it will come next time i work on it.

The SMSUltra software will get a extension to slowly write a data file to the full address space with the help of the "T" command, so you can easy burn your rewritable cards. The implementation of the new command i described ahead will follow, so the burning will become extrem fast.
  View user's profile Send private message Visit poster's website
  • Joined: 17 Sep 2013
  • Posts: 140
  • Location: TC, MI
Reply with quote
Post Posted: Mon Aug 25, 2014 9:04 pm
I would like to redesign the board for you in a smaller footprint with SMT components.

One major improvement that I can make for you is to remove the ICSP connector. Believe it or not, the atmega can be programmed by the FTDI by a method called "bitbanging. "

I could also help you do a production run for the community.

One question, could this ba made to support Gamegear carts as well, since they use similar mappers? We would need a cart adapter of course.
  View user's profile Send private message Visit poster's website
  • Joined: 21 Aug 2014
  • Posts: 10
  • Location: Germany
Reply with quote
Post Posted: Tue Aug 26, 2014 6:25 am
Jazzmarazz wrote
I would like to redesign the board for you in a smaller footprint with SMT components.

I plane a redesign with a smaller PCB too. But for this projekt i exclude SMT for the moment, because it makes it harder for many people to recreate the Reader. But for a professional build of the board it would be interesting anyway. Feel free to to cool things ;)

Jazzmarazz wrote
One major improvement that I can make for you is to remove the ICSP connector. Believe it or not, the atmega can be programmed by the FTDI by a method called "bitbanging. "

This is very interesting and would be a nice feature. I know the technic but i never used it before. Also i use the "debugWIRE" from the AVR dragon. Is it possible to use such a debug technic over bitbanging and the FTDI too?

Jazzmarazz wrote
I could also help you do a production run for the community.

Perhaps, if anyone have interest in. But better with the updated HW and SW solution.

Jazzmarazz wrote
One question, could this ba made to support Gamegear carts as well, since they use similar mappers? We would need a cart adapter of course.

Im looking for a old, defect GameGear system on ebay for the card connector to recreate the adapter from consolingmyself.co.uk (GG->SMS adapter). I'm confident that this will run out of the box with the Reader.

By the way you can use all parts of the USB Reader for uncommercial projects for free. Just make a little note to me, my homepage and smspower.org please. Im glad to see people they still have interest in the SMS.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Tue Aug 26, 2014 7:21 am
Amazing Amazing.

Would you like to work on adding a Japanese port as well?
I'd be extremely happy to have an adapter that can reliably read Game Gear and Japanese cartridge since most of my dumping work nowadays has to do with those.
  View user's profile Send private message Visit poster's website
  • Joined: 11 Mar 2006
  • Posts: 80
Reply with quote
Post Posted: Tue Aug 26, 2014 6:19 pm
I've been waiting for this for a long time. Excellent job.
Would it be possible to program a cart with 315-5235 + 29f040?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14683
  • Location: London
Reply with quote
Post Posted: Tue Aug 26, 2014 9:23 pm
How quickly do arbitrary address changes happen? The worst case ought to be changing from 0000 to ffff, then fffe, etc. Might it have been easier to use a serial to parallel chip instead, or would the sequential increments be too slow then? Is there a hybrid where you can bit bang an address and also increment?

By putting the paging control logic in the uC, I think it makes it harder to do custom mapper control for exotic cartridges. Could you add some commands to control the paging register address, slot location and slot size? For example, paging 4KB chunks starting at address $4000 by writing bytes to $a000. Alternatively, I think the command set offers enough to make host software control of this possible.
  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Wed Aug 27, 2014 4:37 am
The Game Gear Game Genie is a cheap source for cartridge connectors. They aren't very hard to desolder and remove.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14683
  • Location: London
Reply with quote
Post Posted: Wed Aug 27, 2014 7:09 am
Cheaper than a dead Game Gear? I thought they were quite pricey.
  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Wed Aug 27, 2014 3:38 pm
Maxim wrote
Cheaper than a dead Game Gear? I thought they were quite pricey.


I guess it depends where, the last two I bought were under $20 USD each. Usually the GG systems go for a lot more now that people are more savvy about knowing how to repair them.
  View user's profile Send private message Visit poster's website
  • Joined: 21 Aug 2014
  • Posts: 10
  • Location: Germany
Reply with quote
Post Posted: Wed Aug 27, 2014 6:36 pm
Last edited by Iron Hand on Fri Aug 29, 2014 5:27 am; edited 1 time in total
Maxim wrote
How quickly do arbitrary address changes happen? The worst case ought to be changing from 0000 to ffff, then fffe, etc. Might it have been easier to use a serial to parallel chip instead, or would the sequential increments be too slow then? Is there a hybrid where you can bit bang an address and also increment?

I have do the little job and calculate some timings. There are some side effects of course in a µC but in a good approximation it will do it. Before i start one comment: i realy talk about nano seconds. (1ns = 0.000001 ms means milliseconds)

To increase the address by one i need more or less 1080 ns = 0.00108 ms

To count from 0x0000-0xFFFF without do anything (reading or writing) we need so 70777800ns = 70,7ms

This is the reason why i can "jump" to a user given address in near no time. (see command "G" in firmware manual).

The thing that outbreak the system at reading a card is the overhead from the serial connection. This i drive with 750000 baud. This is the fastest you can run with a 12Mhz clock. You can get a little bit more with a 16MHz external quartz but i design the Reader with an minimum of resources.

Now you can calculate on and on but the important thing is how fast you can read out a game. How you can see in the video it is fast enough not to bore a player when he want use the "Read n Play" function.

To read out standard european or us cardriges you need:
512k game - 13 seconds
256k - 6 seconds
128k - 3 seconds
32k - 1 second
8k (RAM) less 1 second

BTW i dont now how fast you can run things with the parallel port. I thing the most obstacle are the driver for the operating system. But you can use the parallel very fast too. So this is not the main reason to build the USB Reader. :-)

Maxim wrote
By putting the paging control logic in the uC, I think it makes it harder to do custom mapper control for exotic cartridges

More or less, but not harder as in software. If i release the source of the firmware everybody can do things by his own.

Maxim wrote
Could you add some commands to control the paging register address, slot location and slot size? For example, paging 4KB chunks starting at address $4000 by writing bytes to $a000. Alternatively, I think the command set offers enough to make host software control of this possible.

When i understand the technic full i will do this. In the moment the mapping is limited to Slot 2. This means you can map any bank plus the two RAM banks to slot 2 (0x8000 - 0xBFFF). See command "k" in the manual and in the SMSUltra software under Reading Control -> Select Bank.
To read out normal cards this is not necessary couse the Atmega to this job himselfe.

Other maping technics like Slot 0 and Slot 1 plus custom mapping will come in the future.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14683
  • Location: London
Reply with quote
Post Posted: Wed Aug 27, 2014 6:54 pm
The parallel port is limited to about 2MHz, I seem to remember, and since it takes multiple pin state transitions per byte on the SMS Reader, the result is pretty slow, especially when seeking. Writing flash requires a lot of seeking, especially to reach 0xaaaa through a mapper chip, more so if you have to do that for every byte.
  View user's profile Send private message Visit poster's website
  • Joined: 17 Sep 2013
  • Posts: 140
  • Location: TC, MI
Reply with quote
Post Posted: Thu Aug 28, 2014 3:01 am
Iron Hand wrote
Jazzmarazz wrote
I would like to redesign the board for you in a smaller footprint with SMT components.

I plane a redesign with a smaller PCB too. But for this projekt i exclude SMT for the moment, because it makes it harder for many people to recreate the Reader. But for a professional build of the board it would be interesting anyway. Feel free to to cool things ;)

Jazzmarazz wrote
One major improvement that I can make for you is to remove the ICSP connector. Believe it or not, the atmega can be programmed by the FTDI by a method called "bitbanging. "

This is very interesting and would be a nice feature. I know the technic but i never used it before. Also i use the "debugWIRE" from the AVR dragon. Is it possible to use such a debug technic over bitbanging and the FTDI too?

Jazzmarazz wrote
I could also help you do a production run for the community.

Perhaps, if anyone have interest in. But better with the updated HW and SW solution.

Jazzmarazz wrote
One question, could this ba made to support Gamegear carts as well, since they use similar mappers? We would need a cart adapter of course.

Im looking for a old, defect GameGear system on ebay for the card connector to recreate the adapter from consolingmyself.co.uk (GG->SMS adapter). I'm confident that this will run out of the box with the Reader.

By the way you can use all parts of the USB Reader for uncommercial projects for free. Just make a little note to me, my homepage and smspower.org please. Im glad to see people they still have interest in the SMS.


I do not think it can replace debugWIRE, but it does replace ISP and ICSP. Bitbanging will allow for you to program your atmega over the same usb connector that you use for dumping carts.

Here is where I used it:
http://jazz-disassemblies.blogspot.com/2013/09/populating-gb-programmer-jazz-ass...

Also, nearly finished:

3Y4nKL9l.png.jpg (57.05 KB)
3Y4nKL9l.png.jpg

  View user's profile Send private message Visit poster's website
  • Joined: 21 Aug 2014
  • Posts: 10
  • Location: Germany
Reply with quote
Post Posted: Thu Aug 28, 2014 2:02 pm
@Jazzmarazz: This is realy good work. Its looks more profesional than my prototyp. Would you finish your design, so the last unrouted lines disappear? If so, i really thing about to let me build a pcb by a company.

On the other hand i still plan a redesign without SMT parts, so the rebuilding will be easier. But than sure with Bitbang technology.

Thanks for your work.
  View user's profile Send private message Visit poster's website
  • Joined: 21 Aug 2014
  • Posts: 10
  • Location: Germany
Reply with quote
New SMSUltra Version 8.5
Post Posted: Sat Aug 30, 2014 11:45 am
A new version of the SMSUltra software is released. Now you can select in the options menu the emulator you want use for Read n Play. I test it with "Meka" and "Fusion" but should work with any other emulator with command line system too.

Also you can now write a file up to 64k to any start address between 0x0000 - 0xFFFF. Buts there is no automatic mapping whithin this mode. This will coming soon.

SMSUltra Source v8.5
SMSUltra x86 v8.5
SMSUltra Source x64 v8.5

Enjoy and have Fun.
SMSUltra_src_v85.rar (107.73 KB)
SMSUltra_v85.rar (13.3 KB)
SMSUltra_x64_v85.rar (13.22 KB)

  View user's profile Send private message Visit poster's website
  • Joined: 17 Sep 2013
  • Posts: 140
  • Location: TC, MI
Reply with quote
Post Posted: Sun Oct 12, 2014 6:47 pm
Bump. I sent you a PM.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Sun Oct 12, 2014 7:59 pm
I have added attachment to all posts in this thread. Please post a copy of everything using attachments and not external links. We are here for the long run and want to preserve all information. Users sites always disappear after a handful of years.

Again - fantastic work !
  View user's profile Send private message Visit poster's website
  • Joined: 28 Mar 2011
  • Posts: 88
Reply with quote
Post Posted: Sat Oct 18, 2014 11:03 am
Nice job, I would recommend you put your power decoupling capacitors closer to your ICs though.

The 50-pin connector can be bought for a couple of dollars from Farnell or such. That's where I got mine for my SMSReader. Would have to look up the part number though.
  View user's profile Send private message
  • Joined: 17 Oct 2015
  • Posts: 17
Reply with quote
Sms reader not working
Post Posted: Tue Oct 22, 2019 6:53 am
I have made the USBReader and have the following problem

I have tried both Windows 7 and Windows 10 both 32 bit and 64 bit versions

In device manager It shows the com port number

When i open the software up it will not find the reader at all, says the com port cant be open even though at first it says successfully opened.

When I plug it into the computer the led comes on, and the second led blinks then goes off

I programmed the chip in AVRDUDE and all seems ok

hope someone can point me in the right direction.

thanks

[/img]

  View user's profile Send private message
  • Joined: 17 Oct 2015
  • Posts: 17
Reply with quote
sms avrdude atmega8-16pu fuse setting
Post Posted: Mon Nov 04, 2019 12:16 pm
hi all does anyone know the fuse settings for a atega8-16pu, im using avrdude and a USBasp, I've built the above sms reader but I think the reason it is not working is the fuse settings.

thanks

Brian
  View user's profile Send private message
  • Joined: 21 Aug 2014
  • Posts: 10
  • Location: Germany
Reply with quote
Post Posted: Tue Nov 05, 2019 6:25 pm
xybots wrote
hi all does anyone know the fuse settings for a atega8-16pu, im using avrdude and a USBasp, I've built the above sms reader but I think the reason it is not working is the fuse settings.

thanks

Brian


I think I really forgot to post the fuse settings. Because the Atmega is driven by the FTDI IC,

the SUT_CKSEL register must be set to EXTCLK_6CK_0MS


SMSReader_Fuses.png (36.58 KB)
Fuse setting for SMSReader USB
SMSReader_Fuses.png

  View user's profile Send private message Visit poster's website
  • Joined: 09 Jan 2012
  • Posts: 67
  • Location: Germany
Reply with quote
Post Posted: Wed Nov 06, 2019 7:24 pm
Could you fix your download links?
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Wed Nov 06, 2019 10:52 pm
Iron_Hand: indeed it would be good if you replaced every links in your initial post with links to attachments hosted on smspower, thank you.

(Both third-party hosted attachments and user-hosted attachments are never standing the test of time. Our attachments have been there for almost 20 years. Being primarily a preservation website, it's only natural that strongly discourage linking to external files. Thank you!)
  View user's profile Send private message Visit poster's website
  • Joined: 21 Aug 2014
  • Posts: 10
  • Location: Germany
Reply with quote
Broken Links Fixed
Post Posted: Thu Nov 07, 2019 4:04 pm
Sorry for the broken links. I have upload all file to SMS Power now.
I hope I have not forgotten anything.

I have reactivated the project a bit and also provided a new SMSUltra version (v85). The link is in the post.

Have Fun and happy dumping :-)
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Fri Nov 08, 2019 2:28 pm
Amazing, thanks for your work :)
  View user's profile Send private message Visit poster's website
  • Joined: 11 May 2017
  • Posts: 3
  • Location: Spain
Reply with quote
Post Posted: Thu Jan 09, 2020 12:56 am
Brutal Work! Congratulations
  View user's profile Send private message
  • Joined: 05 Nov 2014
  • Posts: 435
  • Location: Auckland - NZ
Reply with quote
Post Posted: Tue Jan 28, 2020 8:47 am
I have built one of these too but am having trouble getting it to work.

I programmed the atmega along with the fuse settings and the ATmega stopped responding. I figured it was because the FTDI chip needed changing from the default configuration so that the clock worked correctly. The FTDI chip i had came off a cheap usb to serial adapter but i was unable to reprogram it. I suspect it might have been a clone chip so i have since brought a new one and replaced it.

I was not able to open the FTDI template file that was attached to this thread and i got the error "Failed to load template. This is not a valid device type". When i open it in notepad there are a bunch of random Japanese looking characters so possibly my computer is missing a font or language which is corrupting it? I gave up on that and used the default settings and changed the IO control pins to the following..

C0 = CLK6
C1 = RXLED#
C2 = TXLED#
C3 = PWREN#
C4 = SLEEP#

That got the ATmega responding again and i can read and write to it again, so the clock is now working. The FTDI chip is detected correctly and a com port shows up in windows. Neither of the LEDs do anything and when i open the com port though. In SMS Ultra i can open the com port but after a few seconds it gets closed and says no reader found.

Any ideas what might be wrong? I suspect its to go with the config in the FTDI chip but am not certain.
  View user's profile Send private message
  • Joined: 05 Nov 2014
  • Posts: 435
  • Location: Auckland - NZ
Reply with quote
Post Posted: Wed Jan 29, 2020 6:27 am
I managed to solve it... further up it was mentioned that the clock is 12Mhz. Changed C0 to 12Mhz instead of 6Mhz and its came to life.
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!