Page 1 of 1
Emulator and TMSS
Posted: Wed Sep 10, 2014 8:46 am
by KanedaFr
Hi,
Is there an emulator which correctly emulate TMSS ?
I know Fusion could load the Genesis rom (and so the TMSS) but does it hang like it should (
http://segaretro.org/TradeMark_Security_System)
I ask because I'm fixing some games which is not TMSS ready and I only have pre-TMSS genny 1 so no way to fully test my hack (:
It works on Fusion with TMSS but it is enough ?
Posted: Wed Sep 10, 2014 8:57 am
by twosixonetwo
I'm not quite sure I understand what you want: Do you want it to hang, or to not hang?
Either way, I am quite sure that TMSS is well researched so you should be safe by doing what toe segaretro article says if you want it NOT to hang on TMSS machines, or to make sure your rom does not comply with this if you want it to hang.
Posted: Wed Sep 10, 2014 9:34 am
by KanedaFr
I want it to hang
Of course I'm following sega retro article (and some others hint from people here) but I can't test it

Posted: Wed Sep 10, 2014 9:52 am
by twosixonetwo
Are you sure your bios rom is working?
I tested the behaviour in Fusion with a bios rom and it worked like it should:
Original game:
Shows TMSS screen, then plays game.
Hacked rom without "SEGA" at 0x100:
Black screen
(Without the bios rom both versions ran)
Posted: Wed Sep 10, 2014 10:32 am
by Stef
I was in your case Kaneda and as far I searched no emulator emulate correctly the TMSS security lock. When I tested on real hardware it appeared you have to write 'SEGA' in the security register (A14000) in a short period of time after cold boot before accessing VDP. If you don't do that, any write to the VDP will lock the system.
Posted: Wed Sep 10, 2014 11:30 am
by twosixonetwo
Are you sure not even Exodus emulates this correctly? At least it explicitly has an option for using TMSS with and without VDP lockout, I didn't test it though.
Posted: Wed Sep 10, 2014 12:23 pm
by Stef
To be honest i was even not able to make Exodus working with TMSS.
I setup the genesis bios but for some reasons it was not using it or not booting correctly. It's a shame because Exodus has many interesting features but it does have many problems on my system. For instance i have to unload all modules and reload them one by one (megadrive, controller, rom loader...) to boot correctly a rom (otherwise i obtain a gray screen). It's really a pain as i do have to reconfigure controller buttons every time for instance.
Posted: Wed Sep 10, 2014 2:51 pm
by Mask of Destiny
I'm planning on adding support for TMSS to BlastEm, but it hasn't been a huge priority. I could probably through together a quick implementation over the weekend (wouldn't necessarily be accurate if there are any timing constraints, but better than nothing), but I don't know how useful that would be for you since you're on Windows from what I remember. I could produce a new Windows build, but it would have the same limitations as the last one (no Z80 and at least one other 32-bit related bug).
Posted: Wed Sep 10, 2014 2:54 pm
by KanedaFr
I don't need it NOW
I"m just listing the available solution...
It seems a cheap MD2 is the easy one.
I just hope my SMD works on MD2

Posted: Wed Sep 10, 2014 8:12 pm
by Eke
It's emulated in Genesis Plus GX so if you have a modded Wii you can test it easily too. On windows, there is the Retroarch port but it has more limited features and non-TMSS model is forced by default. It could quickly be added as a new core setting though if this is really needed.
Posted: Thu Sep 11, 2014 7:47 am
by Stef
Is the emulation really accurate ? I don't think any emulator take attention to the limited time period allowed to write the security register but I can confirm it exists on real hardware.
Posted: Thu Sep 11, 2014 9:20 am
by Eke
From the available patent, TMSS is really simple, it latches data written to $a140xx and compares the last string written to "SEGA" string. When VDP address is accessed, CPU is halted (probably using HALT or RESET signal since VDP generates DTACK itself) if string comparator fails.
http://www.google.com/patents/US5155768
This is how I emulated it at least, there does not seem to be any delay or specific timing involved, my guess is that it will always lock at some point because any software has to access VDP if you want something else than a black screen.
But maybe there is more than what they described in patent. Are you sure there was no code trying to access VDP before your first write to the register ?
Posted: Thu Sep 11, 2014 12:37 pm
by Stef
Yeah i already read the patent but i believe it does not give every details. Actually i got a game which was not working on my NTSC system (but worked in PAL), i modified the code to write the security code "earlier" (it had some weird init processing) and it worked in both NTSC / PAL case. I verified the original code was not accessing VDP port before writing security code but it was not enough to make it work. Maybe i missed something as i believe others games write the security code "not that early" and it works.
Posted: Tue Sep 16, 2014 5:42 am
by Nemesis
TMSS support in Exodus was fairly last minute, and not based on any hardware tests. No guarantees at all that it works the same way as the real hardware at this point. This is one of many things that needs to be addressed in order to truly make Exodus hardware-exact. Implementing (optional) hardware lockups for access to areas that don't assert DTACK hasn't even been done though, and that was higher on my list than hardware-exact TMSS support.