Skip to content

Commit

Permalink
More readme to prepare for release.
Browse files Browse the repository at this point in the history
  • Loading branch information
captainys committed Feb 20, 2022
1 parent 268607d commit ce4460e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 8 deletions.
17 changes: 17 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,23 @@ main_cui -HELP



# Emulating Marty
To emulate Marty, you need to own ROM images extracted from a Marty.

In addition to specify the ROM location in the command parameter in CUI or text dialog box in GUI, you also need to select the machine type. From CUI, add a parameter -TOWNSTYPE MARTY. Or from GUI, select MARTY as Towns Type.

If you do not specify the machine type, even with the Marty ROM, the virtual machine will start just like a full-spec FM TOWNS.

Martyを再現するには、Martyから抜き出したROMイメージが必要です。

MartyのROMイメージの場所をコマンドパラメータ、あるいはGUIのダイアログで指定する他に、マシンタイプをMartyに設定する必要があります。コマンドから指定する場合は -TOWNSTYPE MARTY オプションを追加してください。GUIから指定する場合は、リストからMARTYを選んでください。

マシンタイプを指定しない場合、MartyのROMを使っても、フルスペックのFM TOWNSのように起動してしまいます。





# Command-Line Examples
```
.\Tsugaru_CUI.exe -HELP
Expand Down
25 changes: 17 additions & 8 deletions src/towns/townsdef/townsdef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND



static inline void Capitalize(std::string &str)
{
for(auto &c : str)
{
if('a'<=c && c<='z')
{
c=c+'A'-'a';
}
}
}

std::string TownsTypeToStr(unsigned int townsType)
{
switch(townsType)
Expand Down Expand Up @@ -62,6 +73,7 @@ std::string TownsTypeToStr(unsigned int townsType)
}
unsigned int StrToTownsType(std::string str)
{
Capitalize(str);
if("R50"==str)
{
return FMR_50_60;
Expand Down Expand Up @@ -139,6 +151,7 @@ unsigned int StrToTownsType(std::string str)

unsigned int TownsStrToKeyComb(std::string str)
{
Capitalize(str);
if("NONE"==str || "none"==str)
{
return BOOT_KEYCOMB_NONE;
Expand Down Expand Up @@ -242,14 +255,7 @@ std::string TownsKeyCombToStr(unsigned int keycomb)

unsigned int TownsStrToGamePortEmu(std::string str)
{
for(auto &c : str)
{
if('a'<=c && c<='z')
{
c=c+'A'-'a';
}
}

Capitalize(str);
if("NONE"==str)
{
return TOWNS_GAMEPORTEMU_NONE;
Expand Down Expand Up @@ -598,6 +604,7 @@ std::string TownsGamePortEmuToStr(unsigned int emu)

unsigned int TownsStrToApp(std::string str)
{
Capitalize(str);
if("WINGCOMMANDER1"==str || "WC1"==str)
{
return TOWNS_APPSPECIFIC_WINGCOMMANDER1;
Expand Down Expand Up @@ -854,6 +861,7 @@ std::string TownsKeyboardModeToStr(unsigned int keyboardMode)
}
unsigned int TownsStrToKeyboardMode(std::string str)
{
Capitalize(str);
if(str=="DIRECT")
{
return TOWNS_KEYBOARD_MODE_DIRECT;
Expand Down Expand Up @@ -1009,6 +1017,7 @@ unsigned int TownsStrToKeyCode(std::string str)

map["TOWNS_JISKEY_ALT"]=TOWNS_JISKEY_ALT;
}
Capitalize(str);
auto found=map.find(str);
if(map.end()!=found)
{
Expand Down

0 comments on commit ce4460e

Please sign in to comment.