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 - Super Tetris weirdness

Reply to topic
Author Message
  • Joined: 21 Jul 2005
  • Posts: 412
  • Location: GBG
Reply with quote
Super Tetris weirdness
Post Posted: Mon Jan 11, 2010 10:34 pm
A user reported that he couldn't run Super Tetris on my emulator the other day and I thought I had screwed up the mapper thing somehow...
It turns out that the game tries to write to IO port $18, thereby disabling RAM and more.

DB 10    INA ($10)
CB EF    SET 5,A
D3 18    OUTA ($18)

I have not tested this on my machines yet, though I suppose it works on my MegaDrive (the SMS converted Frogger proto did), but I don't think it works on my SMS.

Now to the question, is there a difference regarding port $3E (and in this case $18) between JP/Korean and US/EU SMS machines?
  View user's profile Send private message Visit poster's website
  • Joined: 27 Oct 2009
  • Posts: 138
Reply with quote
Post Posted: Tue Jan 12, 2010 1:00 am
How strange Flubba as I just found this out last night too and was going to post about it. There are also reads on port 16, and from my initial tests it seems to be related to the gear to gear link that maybe it supports on the gamegear? I only played with it for a few minutes but returning 0 on the port 16 read stopped 2 player mode from working.

Super Tetris doesn't work if you emulate port 3E AND emulate only 3 lines connected to bus as after you press a button to start the game it unmaps itself. Maybe the korean/japanese consoles have all the IO lines instead of only 3.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8651
  • Location: Paris, France
Reply with quote
Post Posted: Tue Jan 12, 2010 3:37 am
Weren't those bits unsupported on the Japanese consoles?
Note that I dumped the GG cartridge of this game and got the same ROM, so it works on a GG in SMS mode.

I suspect maybe it could be code related to running from a multi-game pirate cartridge?
  View user's profile Send private message Visit poster's website
  • Joined: 27 Oct 2009
  • Posts: 138
Reply with quote
Post Posted: Tue Jan 12, 2010 6:43 am
Bock wrote
I suspect maybe it could be code related to running from a multi-game pirate cartridge?


Could be, though it is strange that 2 player mode doesn't work if you change the result of a few ports. Does Super Tetris work with a gear-gear link?

I don't know if anyone has verified the port 3E results on a Jap SMS, from all current documents they aren't listed as different. Though I seem to recall someone mentioning that the Jap SMS has a physical way to detect which slot is used but it escapes me now.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14741
  • Location: London
Reply with quote
Post Posted: Tue Jan 12, 2010 8:52 am
The Japanese BIOS detects which slot has something in it by checking if the middle 4 bits of the first 256 bytes are all the same. It uses port $3E to select which slot to boot.

The behaviour of the low ports on a GG in SMS mode is a bit of a mystery; the GG BIOS uses port $02 to detect if it is running in SMS mode or GG mode.

0000001C: 3E F5         LD A,F5h
0000001E: D3 02         OUTA (02h)
00000020: DB 02         INA (02h)
00000022: FE F5         CP F5h
00000024: 20 0B         JR NZ,+0Bh
00000026: 3E FA         LD A,FAh
00000028: D3 02         OUTA (02h)
0000002A: DB 02         INA (02h)
0000002C: FE FA         CP FAh
0000002E: 20 01         JR NZ,+01h
00000030: AF            XOR A
00000031: 32 01 C7      LD (C701h),A
00000034: 3E FF         LD A,FFh
00000036: D3 02         OUTA (02h)


If port $02 acted like port $3e (as Charles' doc says it would), this would be disabling everything in the last opcode. So I guess Charles' doc is wrong?

He also says port $12 is mirror of $3e in both GG and SMS modes.
  View user's profile Send private message Visit poster's website
  • Joined: 21 Jul 2005
  • Posts: 412
  • Location: GBG
Reply with quote
Post Posted: Wed Jan 13, 2010 10:32 pm
Ralph: what was the problem with PGA Tour Golf? I seem to have the same problem in S8DS ;)
  View user's profile Send private message Visit poster's website
  • Joined: 27 Oct 2009
  • Posts: 138
Reply with quote
Post Posted: Wed Jan 13, 2010 11:28 pm
FluBBa wrote
Ralph: what was the problem with PGA Tour Golf? I seem to have the same problem in S8DS ;)


Heh, I noticed Kega had the same problem too actually. Took me a few hours to track down because it's such a small issue. The VDP status register shouldn't be 0 for the 5 lower bits it seems. Charleys document states it returns garbage values for these bits, I always wished it would be putting the same sprite information in them the TMS does (though it's not big enough for 64).

Another interesting thing about the intro level for this game is it has the middle section as tiles and smooth scrolls it even though it's only half the screen. It uses sprites on each side to mask the operation so you can't see the non full tiles.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14741
  • Location: London
Reply with quote
Post Posted: Wed Jan 13, 2010 11:57 pm
Well, it's doing that because it hasn't got enough spare tiles to show the whole thing :) Gauntlet does the same thing to mask its scrolling.
  View user's profile Send private message Visit poster's website
  • Joined: 21 Jul 2005
  • Posts: 412
  • Location: GBG
Reply with quote
Post Posted: Thu Jan 14, 2010 11:21 am
And while we're talking about weird stuff in games...
What did you have to fix to get the System E games running? (except the encryption).
  View user's profile Send private message Visit poster's website
  • Joined: 27 Oct 2009
  • Posts: 138
Reply with quote
Post Posted: Thu Jan 14, 2010 1:06 pm
FluBBa wrote
And while we're talking about weird stuff in games...
What did you have to fix to get the System E games running? (except the encryption).


Nothing really, maybe 6 lines changed in the VDP core. RetroCopy runs at the cycle level and I have pretty much every iteration of the VDP already done, so in essence it's a bit like just physically plonking in another chip and connecting the wires. Most of the time was spent writing the IO/decryption/rom loading mechanism (the .GAME format was rejigged a little to support arcade stuff).

If you're going to get that running on the DS good luck, will probably need a fair bit of "optimization". :) For me it wasn't much drama adding it but if you're going to spend 80 hours optimizing it for 6 or so average games then your fans should be worshipping your statue before bed each night. ;)
  View user's profile Send private message Visit poster's website
  • Joined: 21 Jul 2005
  • Posts: 412
  • Location: GBG
Reply with quote
Post Posted: Thu Jan 14, 2010 3:22 pm
Hmm, I will probably not get it running correctly regarding the graphics but speed shouldn't be the issue (since I can run it at 4x speed today and still have something like 40% cpu time left).
The reason I want to do it is to objectify my VDP core.
  View user's profile Send private message Visit poster's website
  • Joined: 27 Oct 2009
  • Posts: 138
Reply with quote
Post Posted: Thu Jan 14, 2010 3:35 pm
FluBBa wrote
Hmm, I will probably not get it running correctly regarding the graphics but speed shouldn't be the issue (since I can run it at 4x speed today and still have something like 40% cpu time left).
The reason I want to do it is to objectify my VDP core.


Well each VDP has 32KB of RAM and the main system has 16KB itself so I expect it to be a different challenge to running the SMS x6 as the CPU cache on the NintendoDS is pretty low. The other challenge would be (I guess your VDP is like most scanline renderers) rendering the planes correctly, it would likely require a new implementation and less optimizations per VDP than you currently do. Do you also run the PSG at 4x when doing fast forward? Because the SegaE hardware has two of them which is another consideration.
  View user's profile Send private message Visit poster's website
  • Joined: 06 Feb 2009
  • Posts: 110
  • Location: Toulouse, France
Reply with quote
Post Posted: Fri Jan 22, 2010 8:50 am
About Super Tetris, are there any evidence it was released as a real SMS cartridge ? I could not find any info confirming this.
  View user's profile Send private message
  • Joined: 27 Oct 2009
  • Posts: 138
Reply with quote
Post Posted: Fri Jan 29, 2010 3:03 am
Eke wrote
About Super Tetris, are there any evidence it was released as a real SMS cartridge ? I could not find any info confirming this.


Since there are few Koreans involved in the emulation scene (at least on english websites) you'll find it hard to confirm this I think. It's certainly weird that this game doesn't have a 2 player mode if you change a few return values on the ports, almost like it was going to have a gglink mode but they took it out.

I do hope it's not a SMS game though, means I can scrap it from the RC SMS database, I don't like weird games like this ;)
  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!