Commit 3521e405 authored by Cayce's avatar Cayce
Browse files

Add option fmsx_font, to load a fixed text font

parent 55ce574e
......@@ -14,17 +14,19 @@ Source : http://fms.komkon.org/fMSX/
## Configuration options
Specify these in your RetroArch core options:
Specify these in your RetroArch core options, either manually or via the RetroArch GUI.
fmsx_mode=MSX2+*|MSX1|MSX2
fmsx_video_mode=NTSC*|PAL
fmsx_mapper_type_mode=Guess Mapper Type A*|Guess Mapper Type B|Generic 8kB|Generic 16kB|Konami5 8kB|Konami4 8kB|ASCII 8kB|ASCII 16kB|GameMaster2|FMPAC
fmsx_ram_pages=Auto*|64KB|128KB|256KB|512KB
fmsx_vram_pages=Auto*|32KB|64KB|128KB|192KB
fmsx_allsprites=No*|Yes
fmsx_simbdos=No*|Yes
A star (*) indicates this is the default setting.
|setting|meaning|choices<br>(*) indicates the default setting
|---|---|---
|`fmsx_mode`|MSX model|MSX2+*&vert;MSX1&vert;MSX2
|`fmsx_video_mode`|select 60Hz or 50Hz|NTSC*&vert;PAL
|`fmsx_mapper_type_mode`|ROM mapper - use if a ROM does not load|Guess Mapper Type A*&vert;Generic 8kB&vert;Generic 16kB&vert;Konami5 8kB&vert;Konami4 8kB&vert;ASCII 8kB&vert;ASCII 16kB&vert;GameMaster2&vert;FMPAC
|`fmsx_ram_pages`|RAM size|Auto*&vert;64KB&vert;128KB&vert;256KB&vert;512KB
|`fmsx_vram_pages`|Video-RAM size|Auto*&vert;32KB&vert;64KB&vert;128KB&vert;192KB
|`fmsx_simbdos`|Simulate BDOS DiskROM access calls|No*&vert;Yes
|`fmsx_autospace`|Autofire the spacebar|No*&vert;Yes
|`fmsx_allsprites`|Show all sprites - do not emulate VDP hardware limitation|No*&vert;Yes
|`fmsx_font`|load a fixed text font from RetroArch's `system_directory`|standard*&vert;DEFAULT.FNT&vert;ITALIC.FNT&vert;INTERNAT.FNT&vert;CYRILLIC.FNT&vert;KOREAN.FNT&vert;JAPANESE.FNT
## BIOS
......@@ -137,11 +139,13 @@ How to use this:
To (de)activate KANA LOCK, press page down (COUNTRY). It works just like caps lock: press and release to enable.
Best enable SCREEN 1 to appreciate the full 8px width of the Japanese characters; in screen 0 characters are only 6px wide.
## Technical details
Video: 16bpp RGB565 (PSP: BGR565, PS2: BGR555) 272x228 (544x228 in 512px MSX2 screen modes). This includes an 8px (16px) border; MSX native screen resolutions are:
- horizontal: 256 or 512 (textmode: 40 or 80 columns)
- horizontal: 256 or 512 (textmode: 32, 40 or 80 columns)
- vertical: 192 or 212
Audio: rendered in 48kHz 16b mono.
......
......@@ -104,9 +104,6 @@ byte *SRAMData[MAXSLOTS]; /* SRAM (battery backed) */
/** Disk images used by fMSX *********************************/
const char *DSKName[MAXDRIVES] = { "DRIVEA.DSK","DRIVEB.DSK" };
/** Soundtrack logging ***************************************/
const char *SndName = "LOG.MID"; /* Sound log file */
/** Fixed font used by fMSX **********************************/
const char *FNTName = "DEFAULT.FNT"; /* Font file for text */
byte *FontBuf; /* Font for text modes */
......
......@@ -263,7 +263,6 @@ extern byte SSLReg[4]; /* Secondary slot reg. */
extern const char *ProgDir; /* Program directory */
extern const char *ROMName[MAXCARTS]; /* Cart A/B ROM files */
extern const char *DSKName[MAXDRIVES];/* Disk A/B images */
extern const char *SndName; /* Soundtrack log file */
extern const char *PrnName; /* Printer redir. file */
extern const char *CasName; /* Tape image file */
extern const char *ComName; /* Serial redir. file */
......
......@@ -22,6 +22,8 @@ static uint16_t XPal[80];
static uint16_t BPal[256];
static uint16_t XPal0;
static char FntName_buffer[1024];
extern byte *RAMData;
extern int RAMPages ;
......@@ -378,6 +380,7 @@ void retro_set_environment(retro_environment_t cb)
{ "fmsx_simbdos", "Simulate DiskROM disk access calls; No|Yes" },
{ "fmsx_autospace", "Use autofire on SPACE; No|Yes" },
{ "fmsx_allsprites", "Show all sprites; No|Yes" },
{ "fmsx_font", "Text font; standard|DEFAULT.FNT|ITALIC.FNT|INTERNAT.FNT|CYRILLIC.FNT|KOREAN.FNT|JAPANESE.FNT" },
{ NULL, NULL },
};
......@@ -597,6 +600,17 @@ static void check_variables(void)
VRAMPages = ModeVRAM;
}
var.key = "fmsx_font";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value && strcmp(var.value, "standard") != 0)
{
strncpy(FntName_buffer, var.value, sizeof(FntName_buffer)-1);
FntName_buffer[sizeof(FntName_buffer)-1] = 0;
FNTName=FntName_buffer;
Mode |= MSX_FIXEDFONT;
}
update_fps();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment