LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

JP/US/EU Region detection

Root / Submissions / [.]

ChangeVCreated:
Download:VKSKVXGY
Version:Size:
Recently, SmileBasic is released in Europe. Now, there are 3 different SmileBASICs. JP, US, and EU versions. If we know the region of Smile BASIC, we can add region specific stuff such as language option or different easter eggs for each region. When SmileBASIC was released in US years ago, I made region check routine that detects JP or US system. I used the region check in many of my games such as Slime vs Ninja. When the game is running for the first time, SmileBASIC detects region and show Japanese title screen on JP 3DS, English title screen on US 3DS. (language setting can be changed and saved later) The most important aspect is the "first time" part. Sure, you can ask player for language or region and use that information. My routine eliminates that action. It just detects region at start up silently. no need for user input. simple. Now the upgraded routine can detect EU version of SmileBASIC too. You can add special greeting for European user at the start up of game... without asking player if he/she has EU SmileBASIC.

Instructions:

How it detects the region: SmileBoom logo sprites are different in the JP/US/EU SmileBASIC. The region check routine simply checks the pixel of logo and determine if it is JP/US/EU SmileBASIC. how to use: I made region check routine as library file. the library contains 2 routines. REGION() - this routine returns region info as number (0 is JP, 1 is US, 2 is EU) REGION$() - this routine returns region as string ("JP", "US", or "EU") *WiiU version is treated as JP region. load library file into one of slots. activate the slot using USE command. call region check routine at the beginning of code and save the value into some variable for later use.
LOAD "PRG1:REGION.LIB",0
USE 1

VAR A=REGION()

IF A=0 THEN ?"This is JP SmileBASIC"
IF A=1 THEN ?"This is US SmileBASIC"
IF A=2 THEN ?"This is EU SmileBASIC"
This routine is not just for game. It can be used in other project such as graphic editor (with multi language) Feel free to use in your project. If this routine is used for language option, then don't forget to add language select menu. the player may want to change language later. Library limits : When region check routine is called, it resets all graphics using ACLS. so call the region check only once at the beginning of code and store value into variable and use it. (if you use custom graphics, load custom graphics after checking the region)

Nice! I forgot the sprite pages changed regionally. I'm all for these kinds of extrapolated information solutions!

Seems really useful! +1 from me!

You could load the file into an array, like LOAD "DAT:SYS/DEFSP.GRP",ARRAY It might be faster to check one of the built in programs, since the file size is smaller. I'm not sure if there are any differences in the EU version though.

Replying to:12Me21
You could load the file into an array, like LOAD "DAT:SYS/DEFSP.GRP",ARRAY It might be faster to check one of the built in programs, since the file size is smaller. I'm not sure if there are any differences in the EU version though.
Thanks for the array loading method. I tried loading GRP file into array when developing petit converter long ago, but forgot about it until you mentioned. now the code is smaller.
DEF REGION_V2()
DIM AR[0,0]
LOAD "DAT:SYS/DEFSP.GRP",AR,0
RETURN !(AR[485,193]AND 1)+!(AR[485,193]>>1)
END
and about the file check method, I made old version with several file check routines about 2 years ago on miiverse. that was for only JP/US region detection. as for JP/US/EU system files, there are 5 system files that's different in each region. I made 5 routines using EX3KEYDRUM, EX8TECHDEMO, GAME1DOTRC, GAME4SHOOTER, and GAME5VS files. for example, In EX8TECHDEMO file... word "[UP]" is used in JP and US version word "Confirm" is used in US and EU version. I used that to determine the region. key : E8EEN1

Min compatibility Wii U Can detect US version yay wii u sb for us confirmed

Replying to:Midnight
Min compatibility Wii U Can detect US version yay wii u sb for us confirmed
Actually, if it detects the Wii U version, it automatically sets the region as 0 (Japan).

You should probably remove the Wii U check just in case SB BIG is released outside Japan.

Replying to:12Me21
You should probably remove the Wii U check just in case SB BIG is released outside Japan.
The SB logo is used as a check, and SB BIG has a different logo. We don't know what the SB BIG logo will look like outside of Japan yet, so I guess the Wii U check was added just to stay on the safe side.

Replying to:Midnight
Min compatibility Wii U Can detect US version yay wii u sb for us confirmed
They had the program's minimum compatible system as Wii U, to which this was a joke about

Now it's saying that I'm using the EU version because of the update. Is there any way to fix this?

Replying to:HTV04
Now it's saying that I'm using the EU version because of the update. Is there any way to fix this?
No. We got EU version too. All files and even the graphics are same as EU version That's why my routine thinks it is EU version. In old version of SB, the SmileBASIC logo had black with white border. Now it is just see-thru with white border just like EU version. This is the second time SmileBoom screwed up my region detect routine. SmileBoom changed transparent color of default graphics on Japanese SB ver 3.5.2 a few months ago. They changed transparent (ARGB 0,0,0,0) to gray-transparent (which was still invisible but RGB is some shade of gray 0,248,248,248) My old detect routine misread color and gave wrong result on JP version. When SB EU version was released in Europe, I fixed that bug and added EU detection and released my detection routine. Now SmileBoom screwed up my latest detection too. Theres is no way to distinguish between EU and US version now. all files(TXT, DAT,graphics) in SYS folder are same as EU version. sizes and time too.

I just had the best idea for detecting EU 3DS systems. So, do you know how 3DSs from Europe use a PAL system instead of a NTSC system, which means that they’re slightly slower than NTSC systems? Well, what if we take advantage of the slowness and make a check when a program runs to see how fast it can interpret something, and then use that to determine whether a 3DS is PAL or not? It sounds like it could be complicated, but it may be possible.

Replying to:HTV04
I just had the best idea for detecting EU 3DS systems. So, do you know how 3DSs from Europe use a PAL system instead of a NTSC system, which means that they’re slightly slower than NTSC systems? Well, what if we take advantage of the slowness and make a check when a program runs to see how fast it can interpret something, and then use that to determine whether a 3DS is PAL or not? It sounds like it could be complicated, but it may be possible.
no

Replying to:HTV04
I just had the best idea for detecting EU 3DS systems. So, do you know how 3DSs from Europe use a PAL system instead of a NTSC system, which means that they’re slightly slower than NTSC systems? Well, what if we take advantage of the slowness and make a check when a program runs to see how fast it can interpret something, and then use that to determine whether a 3DS is PAL or not? It sounds like it could be complicated, but it may be possible.
Why not?

Replying to:HTV04
I just had the best idea for detecting EU 3DS systems. So, do you know how 3DSs from Europe use a PAL system instead of a NTSC system, which means that they’re slightly slower than NTSC systems? Well, what if we take advantage of the slowness and make a check when a program runs to see how fast it can interpret something, and then use that to determine whether a 3DS is PAL or not? It sounds like it could be complicated, but it may be possible.
3DSes aren't PAL or NTSC, they're the exact same in every region. They're just region locked.

Well, this is for those who still have V3.5.2 because it broke with the newest V3.6.0. SmileBoom unified the logo in every version I guess.

Replying to:HTV09
Well, this is for those who still have V3.5.2 because it broke with the newest V3.6.0. SmileBoom unified the logo in every version I guess.
Yeah, it thinks I'm Japanese now.