|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Author | Message |
---|---|
|
SMS to SMD
Posted: Fri Jul 15, 2011 4:55 pm
|
Has any one ever built this?
http://devster.monkeeh.com/segapage.html
Just want someone to double check this make sure there's no errors before I try to assemble this from a bad sports game I don't care about :P. |
|
|
Posted: Sat Jul 16, 2011 2:26 am Last edited by Maraakate on Sat Jul 16, 2011 7:21 am; edited 1 time in total |
Already went and built it. It does work. For nomad functionality you must solder B30 to Pin 45 on the ASIC. It is a very tight fight, but it can be done with a simple soldering iron.
I have issues with the pause button working. It must think it is always on because if I flip the switch on my PAR it will immediately bring up the code menu. I will have to double check my wiring for the pause circuit, but it looked okay earlier. Building this will allow you to play the later 8mbit TecToy games like Sonic Blast and Sitio do Picapau. I cannot confirm if it will work with Street Fighter II but it probably does. If anyone has those master megas and Street Fighter II you could verify it for me. I'd really like to get this document on what combinations of hardware allow these odd mappers to boot properly. |
|
|
Posted: Sat Jul 16, 2011 7:10 am |
I think I built my adaptor with that schematic too. It is missing some pins though so there probably will be games that don't work. | |
|
Posted: Sat Jul 16, 2011 7:20 am |
Every game I have put in so far has worked perfectly. I'm still amazed the 8mbit late TecToy games work. I played some Outrun and Phantasy Star as well. Phantasy Star saves and retrieves games just fine. I just haven't gotten the pause button working. I will check it soon. I probably goofed up something or something is crossing that shouldn't be. It's like 6 wires or so that's part of the pause circuit so it shouldn't be too hard to diagnose. Does the pause button work for you? Also, here is some pictures (sorry for the bad quality camera, it's all I have right now) Other than the pause button issue it works great! Now I can finally take my SMS places (yeah,yeah could have bought a Master Mega or Master Gear but where's the fun in that?). |
|
|
Posted: Sat Jul 16, 2011 11:55 am |
Pause button is grounding one address line on MD cartslot, it has a pullup resistor on it
1MB games are no different from older ones, mapper works exactly the same with no extra stuff apart from one extra address lines which is on the ROM not console side. |
|
|
Posted: Sat Jul 16, 2011 3:35 pm |
Well, the rumor is true... 1MB late TecToy games do not work on early SMS1. I have an SMS1 with no games in the BIOS (except snail maze) and no matter how hard I tried and even trying to boot with a 50hz mode it would never work. They start up perfectly fine and play just fine on the Nomad though. I don't know if this is unique to v1.3 BIOS or all SMS1. |
|
|
Posted: Sat Jul 16, 2011 5:09 pm |
I fixed the pause switch issue. One of the wires was on the wrong side of the resistor and a ground was in the wrong place. PAR still does not work properly though. Those extra data lines are probably used by PAR. Oddly enough, the code menu comes up just but its immediately. You don't have to press pause after flipping the switch. The trainers and all that work. Pity it doesn't work with it, but hey, at least I built the device! | |
|
Posted: Sat Jul 16, 2011 7:56 pm |
The problem is probably in checksum, the SMS1 BIOS is unable to get right one etc. Nomad and MD have no BIOS for SMS, whatever there is in the cartslot gets played immediately. |
|
|
Posted: Sat Jul 16, 2011 7:59 pm |
According to the Dev. section of the site v1.3 handles the checksum a little differently. Maybe the version with Hang-On built-in may be able to handle these games. Also, Game Box Serie Lutas does not play on Nomad. This cartridge is pretty unique that you have to power it on and off (hard reset) for it to switch games. All you get is a blank screen on the nomad. |
|
|
Posted: Sat Jul 16, 2011 9:46 pm |
These 1MB games don't checksum the whole ROM, just the first 256KB. I've never figured out why they don't work properly on a 1.3 BIOS... | |
|
Posted: Sat Jul 16, 2011 10:03 pm |
Does it have any thing to do with this "more efficient" way it validates the checksum? And if I bypassed the BIOS would the games boot? |
|
|
Posted: Sat Jul 16, 2011 10:13 pm Last edited by Maxim on Sun Jul 17, 2011 3:59 pm; edited 1 time in total |
Not sure what you're referring to. Without a BIOS, I expect they'd work fine. | |
|
Posted: Sat Jul 16, 2011 10:36 pm |
From Dev section BIOSes article:
Does this have any thing to do with it? Also, have noticed this with Phantasy Star. I had two corrupt saves happen to me today... sort of. One was for sure a corrupt save, every time I went to open the magic or status menu on one of my saves the game would freeze, even on the SMS. I deleted the file, started a new game and later a small block of the border for the save menu was missing. I removed the battery and reseated it to erase all the saves and this solved the issue. Not sure if the converter is corrupting saves and requires some extra capacitors in-line with something or extra control lines... or if my battery is starting to go bad. I measured the voltage with a DVM and it read 3.086V so the battery voltage is good, but what should I for with amperage? It may not be holding a good charge any more. It is 20 years old after all... |
|
|
Posted: Sun Jul 17, 2011 9:04 am |
The game specifies the checksummed area and the checksum itself, which is specific to the checksummed area. 1MB games typically specify 256KB (the $0 range). They do this for two reasons:
1. it's faster - it probably saves about 5s of staring at the Sega logo 2. checksumming all 1MB won't work on many consoles due to the BIOS bug So the checksum should work the same as a 256KB or 512KB game. I can't see a software reason for the failure. In an emulator with a selectable BIOS (e.g. Kega) you can load these 1MB games through the BIOS without problems. |
|
|
Posted: Sun Jul 17, 2011 1:58 pm |
This whole time I kept referring to it as 1mbit, it's actually 8mbit. Now this has to be re-explained on why it doesn't work! Sorry! |
|
|
Posted: Sun Jul 17, 2011 3:58 pm |
1MB = 8Mb. What I wrote remains valid. | |
|
Posted: Sun Jul 17, 2011 4:08 pm |
Yes, my mistake again. Damn bit wars (and I included cart sizes too) with its MB, Mb, Megabits, etc. On a side note, my data became corrupt again with the save menu on Phantasy Star again. I did an amp test on the battery, it reads 100mA. Is this normal for this type of battery? |
|
|
Posted: Sun Jul 17, 2011 5:47 pm |
I have tried using Kega and selecting the BIOS as well and they do boot. But, we are talking about emulators which do use hacks and workarounds that sometimes aren't documented. I know it's more trouble than it's worth to find out the exact reason why these games fail to load on this particular BIOS, but I am quite intrigued... |
|
|
Posted: Fri Jul 22, 2011 3:29 am |
I did a little extra commenting on the 1.3 disassembly...
00000108: F3 DI ; disable interrupts
; Copy 221 bytes of ROM [0289h] to RAM [0700h]. ; Copy routine to check for header, check region and calc chksum 00000109: 21 89 02 LD HL,0289h 0000010C: 11 00 C7 LD DE,C700h 0000010F: 01 DD 00 LD BC,00DDh 00000112: ED B0 LDIR ; Init and check for valid rom 00000114: C3 90 0B JP 0B90h ; Return from check 00000117: F3 DI 00000118: 3A 00 C0 LD A,(C000h) ; memory enable value for rom 0000011B: B7 OR A 0000011C: 28 1A JR Z,+1Ah ; 0 indicates no rom found -> 138 - wait on user 0000011E: 2A 70 C2 LD HL,(C270h) ; caclulated checksum 00000121: .... LD DE,(C26Ah) ; checksum from header 00000125: B7 OR A 00000126: ED 52 SBC HL,DE 00000128: CA D1 C7 JP Z,C7D1h ; 35Ah - passed! Run cart ; write software error message 0000012B: CD E6 04 CALL Clear_end_of_VRAM (04E6h) 0000012E: 21 76 01 LD HL,0176h ; write 00000131: 06 03 LD B,03h ; "Software Error" 00000133: CD 6A 01 CALL 016Ah ; message 00000136: 18 FE JR -02h ; infinite loop 00000138: CD 62 01 CALL 0162h < ; wait loop <snip> ; Check for any rom 0000028B: 21 5E C7 LD HL,C75Eh ; 2E7h - rom enables 0000028E: 06 03 LD B,03h ; check for specific type of rom (card, cart, ext) 00000290: 3E EB LD A,EBh 00000292: D3 3E OUTA (3Eh) ; all roms off 00000294: 7E LD A,(HL) 00000295: 32 00 C0 LD (C000h),A ; save which rom enable we're using 00000298: D3 3E OUTA (3Eh) ; enable specific rom 0000029A: D9 EXX ; save registers 0000029B: CD 36 C7 CALL C736h ; check for header at 0x7FF0 0000029E: CD 31 C7 CALL C731h ; check for header at 0x3FF0 000002A1: CD 2C C7 CALL C72Ch ; check for header at 0x1FF0 ; failed 000002A4: D9 EXX ; restore registers 000002A5: 23 INC HL ; next type of rom (card, cart, ext) 000002A6: 10 E8 DJNZ -18h ; couldn't find any type of valid rom 000002A8: AF XOR A 000002A9: 32 00 C0 LD (C000h),A ; 0 in C000h indicates failure ; exit rom checksum roution (pass or fail) 000002AC: 3E EB LD A,EBh ; all roms off 000002AE: D3 3E OUTA (3Eh) 000002B0: 3E E3 LD A,E3h ; BIOS rom enabled 000002B2: D3 3E OUTA (3Eh) 000002B4: C9 RET ; C72Ch 000002B5: 21 F0 1F LD HL,1FF0h 000002B8: 18 08 JR +08h ; C731h 000002BA: 21 F0 3F LD HL,3FF0h 000002BD: 18 03 JR +03h ; C736 000002BF: 21 F0 7F LD HL,7FF0h ; Check for header at (HL) 000002C2: 11 60 C2 LD DE,C260h 000002C5: 01 10 00 LD BC,0010h 000002C8: ED B0 LDIR ; copy header to ram 000002CA: 21 56 C7 LD HL,C756h ; 2DFh 000002CD: 11 60 C2 LD DE,C260h 000002D0: 06 08 LD B,08h 000002D2: 1A LD A,(DE) ; check header string 000002D3: BE CP (HL) 000002D4: C0 RET NZ 000002D5: 23 INC HL 000002D6: 13 INC DE 000002D7: 10 F9 DJNZ -07h 000002D9: CD 61 C7 CALL C761h ; 2EAh - check rom using header 000002DC: F1 POP AF 000002DD: 18 CD JR -33h ; 2ACh [DATA-BEGIN-AT-02DF] TMR SEGA [DATA-BEGIN-AT-02E7] 000002E7: CB AB 6B ; CB = enable card rom, AB = enable cart rom, 6B = enable external rom ; C761h check rom using header 000002EA: 11 00 00 LD DE,0000h 000002ED: 3A 6F C2 LD A,(C26Fh) 000002F0: 4F LD C,A 000002F1: E6 F0 AND F0h 000002F3: FE 40 CP 40h 000002F5: 28 08 JR Z,+08h ; SMS Export -> 2FFh 000002F7: 2A 70 C2 LD HL,(C270h) 000002FA: 23 INC HL 000002FB: 22 6A C2 LD (C26Ah),HL 000002FE: C9 RET ; check checksum 000002FF: 79 LD A,C 00000300: D6 0A SUB 0Ah 00000302: E6 0F AND 0Fh 00000304: F5 PUSH AF 00000305: 21 C4 C7 LD HL,C7C4h ; 34Dh = 1F 3F 7F BF 7F 7F 7F 7F 7F 02 06 0E 1E 3E EB D3 00000308: 4F LD C,A 00000309: 06 00 LD B,00h 0000030B: 09 ADD HL,BC 0000030C: 46 LD B,(HL) 0000030D: 0E F0 LD C,F0h 0000030F: 21 00 00 LD HL,0000h 00000312: CD B6 C7 CALL C7B6h ; 33Fh - calc chksum 00000315: ED 53 70 C2 LD (C270h),DE ; save above header 00000319: F1 POP AF 0000031A: D6 04 SUB 04h 0000031C: D8 RET C ; only lower banks in chksum 0000031D: 4F LD C,A 0000031E: 06 00 LD B,00h 00000320: 21 CD C7 LD HL,C7CDh ; 02 06 0E 1E 3E = # banks - 2 00000323: 09 ADD HL,BC 00000324: 46 LD B,(HL) 00000325: 3E 02 LD A,02h 00000327: C5 PUSH BC 00000328: 32 FF FF LD (FFFFh),A 0000032B: 3C INC A 0000032C: F5 PUSH AF 0000032D: CD B0 C7 CALL C7B0h 00000330: F1 POP AF 00000331: C1 POP BC 00000332: 10 F3 DJNZ -0Dh 00000334: ED 53 70 C2 LD (C270h),DE 00000338: C9 RET ; next bank 00000339: 01 00 40 LD BC,4000h 0000033C: 21 00 80 LD HL,8000h ; calc checksum 0000033F: 7B LD A,E 00000340: 86 ADD (HL) 00000341: 5F LD E,A 00000342: 7A LD A,D 00000343: CE 00 ADC 00h 00000345: 57 LD D,A 00000346: 23 INC HL 00000347: 0B DEC BC 00000348: 78 LD A,B 00000349: B1 OR C 0000034A: 20 F3 JR NZ,-0Dh 0000034C: C9 RET ; high byte of length to check in low banks 0000034D: 1F ; A = 8KB 0000034E: 3F ; B = 16KB 0000034F: 7F ; C = 32KB 00000350: BF ; D = 48KB 00000351: 7F ; E = 64KB 00000352: 7F ; F = 128KB 00000353: 7F ; 0 = 256KB 00000354: 7F ; 1 = 512KB 00000355: 7F ; 2 = 1MB ; # high banks to check - 2 00000356: 02 ; E = 64KB = 4 banks 00000357: 06 ; F = 128KB = 8 banks 00000358: 0E ; 0 = 256KB = 16 banks 00000359: 1E ; 1 = 512KB = 32 banks 0000035A: 3E ; 2 = 1MB = 64 banks ; Overlap - 0000035A is both data and code! ; checksum passed! 0000035A: 3E EB LB A, EB 0000035C: D3 3E OUTA (3Eh) ; all roms off 0000035D: 3E 3A LD B, 3A 0000035E: 3A 00 C0 LD A,(C000h) ; specific rom enable 00000361: D3 3E OUTA (3Eh) ; enable rom 00000363: C3 00 00 JP 0000h ; start rom |
|
|
Posted: Fri Jul 22, 2011 5:18 am |
Thanks for this, though I do not know anything on assembly language... But, I am very interested in learning it. Is this a good place to start? I saw there were some basic SMS programming guides (I believe they were authored by Maxim iirc). |
|
|
Posted: Fri Jul 22, 2011 8:55 am |
Not really - it has a lot of technical system stuff in there which is not particularly enlightening on the assembly code side.
Please move discussion of this issue to http://www.smspower.org/forums/viewtopic.php?t=13187 |
|