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 - Wonder Boy in Monster World oddity

Reply to topic
Author Message
  • Joined: 08 Dec 2005
  • Posts: 488
  • Location: Melbourne, Australia
Reply with quote
Wonder Boy in Monster World oddity
Post Posted: Wed Mar 24, 2004 9:24 am
Wonder Boy in Monster World does a "IN a,(00h)" when displaying the SEGA splash screen.

This seems to be a rather odd way of determining whether the game is running on an SMS1 or 2, since according to Charles MacDonald's documentation, this read should return the last byte of the instruction which read the port (00h) on an SMS1, and return FFh on an SMS2.

The game then tests a bit of the data read, and if it is set, adds a "TM" to the SEGA screen.

What is this all about? Does anyone have any idea why they only want to show the TM symbol on an SMS2?
  View user's profile Send private message Visit poster's website
Sylvain
  • Guest
Reply with quote
Post Posted: Wed Mar 24, 2004 11:25 am
I'd say because the TM symbol already appeared on the ROM logo screen on the SMS1, while it's not present on the SMS2 logo screen ?
 
  • Joined: 18 Sep 1999
  • Posts: 498
  • Location: Portland, Oregon USA
Reply with quote
Post Posted: Wed Mar 24, 2004 4:31 pm
Quote
> Wonder Boy in Monster World does a "IN a,(00h)" when
> displaying the SEGA splash screen.

Can you provide more details? When you say "SEGA splash screen", are you referring to the BIOS start-up screen? If so which emulator and BIOS version are you using? Are you running the game in Japanese or Export mode?

I can't find any instance where that game accesses port $00. Do you have a PC for the IN a,(00h) instruction?

Thanks.

--
Eric R. Quinn
  View user's profile Send private message Visit poster's website
  • Joined: 08 Dec 2005
  • Posts: 488
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Wed Mar 24, 2004 6:34 pm
Quote
> Can you provide more details? When you say "SEGA splash screen", are you referring to the BIOS start-up screen?

No, after the BIOS screen, the game displays "SEGA" on a light blue background.

Quote
> I can't find any instance where that game accesses port $00. Do you have a PC for the IN a,(00h) instruction?

The IN instruction is at PC=719h. Here is a disassembly of that area:

719 in a,($00)
71B bit 6,a
71D jr z,$072b
71F ld hl,$821b
722 ld de,$3ae5
725 ld bc,$0004
728 call $0345
72B ...

The call to 0345 displays the "TM" part. Here are two screen shots to clarify:

When IN returns 00h:



When IN returns FFh:


  View user's profile Send private message Visit poster's website
  • Joined: 08 Dec 2005
  • Posts: 488
  • Location: Melbourne, Australia
Reply with quote
Re: Wonder Boy in Monster World oddity (Fixed Images)
Post Posted: Wed Mar 24, 2004 6:35 pm
Quote
> > Can you provide more details? When you say "SEGA splash screen", are you referring to the BIOS start-up screen?

> No, after the BIOS screen, the game displays "SEGA" on a light blue background.

> > I can't find any instance where that game accesses port $00. Do you have a PC for the IN a,(00h) instruction?

> The IN instruction is at PC=719h. Here is a disassembly of that area:

> 719 in a,($00)
> 71B bit 6,a
> 71D jr z,$072b
> 71F ld hl,$821b
> 722 ld de,$3ae5
> 725 ld bc,$0004
> 728 call $0345
> 72B ...

> The call to 0345 displays the "TM" part. Here are two screen shots to clarify:

> When IN returns 00h:

>

> When IN returns FFh:

>
  View user's profile Send private message Visit poster's website
  • Joined: 18 Sep 1999
  • Posts: 498
  • Location: Portland, Oregon USA
Reply with quote
Re: Wonder Boy in Monster World oddity (Fixed Images)
Post Posted: Thu Mar 25, 2004 12:04 am
Quote
> > > Can you provide more details? When you say "SEGA splash
> > > screen", are you referring to the BIOS start-up screen?

> > No, after the BIOS screen, the game displays "SEGA" on a
> > light blue background.

Thanks for the update. I was using the wrong ROM. (I still get confused about all the Wonder Boy games and their variations.)

As for the reason for the "TM" part, here's a theory: Reading port $00 is equivalent to reading port $3E. Port $3E is the memory control port and is write-only. However, if it could be read, then bit 6 (which is the bit being tested) would indicate whether the cartridge ROM was enabled or disabled. Perhaps, this game was designed to run either in a stand-alone cartridge or as a built-in game. In the case of a built-in game, bit 6 would be set and the "TM" would be displayed. For a cartridge, no "TM" would be necessary (perhaps because a SEGA start-up BIOS screen would already have been displayed.) I really don't know, but it might explain why only bit 6 is tested.

--
Eric R. Quinn
  View user's profile Send private message Visit poster's website
  • Joined: 08 Dec 2005
  • Posts: 488
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Tue Jul 06, 2010 6:53 am
Sorry to bump such an old topic, but I have another theory on what's happening here.

There's a version of Genesis "Sonic the Hedgehog" which contains code to detect whether it is running on a Japanese or export system, and only display "TM" in the latter case.

Perhaps this is what Wonder Boy in Monster World is trying (unsuccessfully) to do?

To find out, I'd like to see what happens when reading port 0x00 on Japanese machines. Does anyone know?

Alternatively, is anyone able to run the game on a Japanese system and see what happens?

To clarify, the game in question is "Wonder Boy in Monster World" (ROM CRC32: 7d7ce80b), title screen shown here:



Immediately before the title screen, one or other of the screens below will be displayed, depending on the value of bit 6 read from port 0x00:


tm.png (1.69 KB)
tm.png
notm.png (1.67 KB)
notm.png
title.png (5.48 KB)
title.png

  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14689
  • Location: London
Reply with quote
Post Posted: Tue Jul 06, 2010 9:17 am
It's GG code.

On the GG, bit 6 of port $00 is set for export, reset for Japan (see http://www.smspower.org/Development/RegionDetection). Also, the GG has no BIOS splash screen so it's typically the case that GG games show a SEGA splash and SMS ones don't (although there are exceptions, as we can see).

I think it is not at all unusual to find GG games that show a TM on their SEGA screen or not depending on the console region. This is just copy-pasta coding.
  View user's profile Send private message Visit poster's website
  • Joined: 08 Dec 2005
  • Posts: 488
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Tue Jul 06, 2010 10:27 am
Maxim wrote
It's GG code.


Well, that concisely solves this 6-year-old question!

By changing the file extension of the ROM, we can see that on the GG the code does what I suspected: "TM" is displayed on export systems but not Japanese ones.
  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 Jul 06, 2010 11:09 am
There is a Wiki entry about it:
http://www.smspower.org/Development/WonderBoyInMonsterWorld-SMS

If you want to complete.
  View user's profile Send private message Visit poster's website
  • Joined: 08 Dec 2005
  • Posts: 488
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Tue Jul 06, 2010 11:11 am
Maxim wrote
I think it is not at all unusual to find GG games that show a TM on their SEGA screen or not depending on the console region.


Having tested several GG games, it seems you are correct. In particular, "Wonder Boy [B].gg" displays the exact splash screen pictured above (albeit with a palette change) - in this case, the region detection works correctly. Interestingly, "Wonder Boy [A].gg" does not seem to perform the region detection - it never displays "TM".

So, now that we know that this code is intended for the GG, can anyone confirm its actual behaviour on the SMS? Does the game really show "TM" on an (export) SMS2 but not on an (export) SMS1?
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14689
  • Location: London
Reply with quote
Post Posted: Tue Jul 06, 2010 12:26 pm
I'd expect it to work as Charles' doc says.

I've made it so the site links to these development pages from the main game page, to increase discoverability...
  View user's profile Send private message Visit poster's website
  • Joined: 03 Apr 2001
  • Posts: 601
  • Location: Asturias
Reply with quote
Post Posted: Wed Jul 07, 2010 11:44 am
For the record, most Mega Drive games check for the system's region before showing (or not) the "TM" alongside the initial SEGA logo.
  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!