Petit Computer


Table of Contents

TIP : Automatic JP/ENG select on JP/US 3DS.
GAME : StonBall
GAME : NyanCat

Automatic JP/ENG select on JP/US 3DS

if we know the region(JP or US) of petit computer, we can add dual language support (such as RPG dialogue or menu) and game automatically selects proper language at start up.

There are 2 simple ways to check the region of Petit computer/puchicon.

first method is checking the system version.
There is numeric system variable for version number, VERSION

Currently (March/10/2013), Japanese petit computer's version number is 8240
US petit computer's version number is 8224

simply, check this system variable and guess the US/JP region.

CLEAR
CLS

IF VERSION==8224 THEN REGION=0 ELSE REGION=1
IF REGION==0 THEN ? "Petit Computer" ELSE ? "フ゜チコンmkII"

'wait for button press
FOR I=0 TO 1:I=BUTTON():NEXT
above code uses US version number, so if SmileBoom updates US version of PetitComputer, we need to modify our code with new version number.
of course, if SmileBoom updates both JP/US with same version number in the future then this method will become useless.

the other method is using TALK command.
both JP and US petit computer can run TALK command without error, but US version doesn't produce any sounds.

if we use TALKCHK() function while talking something, we can check if it is Japanese version or not.

"." period is valid letter that can be used in TALK command.
since it is just talking control symbol, it will not produce any sound even on JP version of petit computer.
(You can use other talking control symbol such as "'", "/", "|", "_", "?", "!", "%", or " ". I simply used "." because it looks good.)

it will pause about 3/60 seconds. but if we use TALKCHK() function within those 3/60 seconds, it will return TRUE even though we don't hear anything.
on US version, TALKCHK() function will just return FALSE no matter what.

CLEAR
CLS

TALK"."
REGION=TALKCHK()
IF REGION==0 THEN ? "Petit Computer" ELSE ? "フ゜チコンmkII"

'wait for button press
FOR I=0 TO 1:I=BUTTON():NEXT
I don't think SmileBoom will restore the TALK support in the future. so I think this method is reliable way to check the region of petit computer.

if anyone uses these checking-region-and-auto-change-language in your game, don't forget to add option to change the language manually in option menu.
some user may want to play in other language.

here are actual screenshots.
same program on different JP/US system.

Here is practical example using TALK method.

there are 2 simple way to use the region value.

first, use it directly in IF statement and put something on screen.
when print something, if region is JP, draw Japanese text.
if region is US, draw English text.

second, use RESTORE to read JP/US section of DATA into array.
make 2 sections of DATA. list of Japanese DATA and list of English DATA
make 2 labels. english label has same label name with extra 'E' at the end.
when using RESTORE, use MID$("E",0,region_value) to add E to end of label name string.
RESTORE will be set to correct JP/US DATA section.

CLEAR
CLS

'check JP/US region
'JP フ゜チコンmkII = 0
'US PetitComputer= 1
TALK"."
ENG=!TALKCHK()

'put JP/US menu
LOCATE 5,5
IF ENG THEN ? "ITEM MENU" ELSE ? "アイテム メニュ-"

'read JP/US data into ITEM array
RESTORE "@ITEM_DATA"+MID$("E",0,ENG)
FOR I=0 TO 2
 READ ITEM$(I)
NEXT

'put ITEM array  
FOR I=0 TO 2
 LOCATE 6,7+I
 ? I;":";ITEM$(I)
NEXT

'wait for button press
FOR I=0 TO 1:I=BUTTON():NEXT

'japanese data
@ITEM_DATA
DATA ホ゜-ション
DATA ソ-ト゛
DATA リンコ゛

'english data
@ITEM_DATAE
DATA Potion
DATA Sword
DATA Apple
here is screenshot of result.

white 3DS is Japanese LL version.
black 3DS is regular US version.
both run same program and it automatically selects proper language.

It is possible to eliminate the needs for 2 separate language versions in games.


StonBall

Here is my second project for Petit Computer.
It is not a port of one of my previous games.
While my brother was converting his old graphics for Petit Computer, I decided to make simple remake of old MSX game using ASCii Graphics.

STONBALL

It is a remake of old BASIC game from old game making book for MSX computer.
It is a simple block pushing puzzle game. Control left or right player to push blocks and move all balls to bottom.
but, if both players are on same line, they will not push at all.
it sounds easy, but it is pretty hard.

There are 20 levels originally, but MSX version had only 10.
I only used those 10-stage data and rewrote everything from scratch.
for example, MSX version used 2d array to store stage data... I used strings.
since Petit Computer supports touch control, I added touch control for stage menu and gameplay.

here is source code in QR-code format.
(you will need 3DS/DSi with Petit Computer to scan them)

Here is solution for stage 1 and 2.
If you don't want to spoil the fun of solving first 2 stages, don't watch this video.

Click here for StonBall Cheat Code

NyanCat

Here is my first Petit Computer project.

NyanCat!
(go here for more info about NyanCat. http://www.youtube.com/watch?v=QH2-TGUlwu4)

Here is QR code for Petit Computer DSiware.
To test it, you need 3DS (or DSi) and "Petit Computer" DSiware game.


Back to homepage