##### Other Function - BootROM Font Function

# syBtFntGet

Gets the font address

### FORMAT

`

  void *syBtFntGet( void )

`

### PARAMETER

  None

### RETURN

  Starting address for the font data in the boot ROM

### DESCRIPTION

  Gets the address where font data is stored in the boot ROM.

  Starting address for font data and the necessary fonts with the following constants must be requested with this function.

  Offset to the section starting data

  SYD_BT_FNT_ASCII_24_OFS | ASCII ASCII
  SYD_BT_FNT_WEST_24_OFS | ISO 8859-1 8-bit code second half for overseas
  SYD_BT_FNT_JISX_24_OFS | JIS X 0201 8-bit code second half for Japan
  SYD_BT_FNT_KANA_24_OFS | Shift JIS part1 Full character Japanese kana
  SYD_BT_FNT_LVL1_24_OFS | Shift JIS part2 Japanese kanji first standard part
  SYD_BT_FNT_LVL2_24_OFS | Shift JIS part3 Japanese kanji second standard part
  SYD_BT_FNT_GAIJ_24_OFS | GAIJI Special characters
  SYD_BT_FNT_VMSICON_OFS | VM default label icons

  Section data size

  SYD_BT_FNT_ASCII_24_SIZE | ASCII ASCII
  SYD_BT_FNT_WEST_24_SIZE | ISO 8859-1 8-bit code second half for overseas
  SYD_BT_FNT_JISX_24_SIZE | JIS X 0201 8-bit code second half for Japan
  SYD_BT_FNT_KANA_24_SIZE | Shift JIS part1 Full character Japanese kana
  SYD_BT_FNT_LVL1_24_SIZE | Shift JIS part2 Japanese kanji first standard part
  SYD_BT_FNT_LVL2_24_SIZE | Shift JIS part3 Japanese kanji second standard part
  SYD_BT_FNT_GAIJ_24_SIZE | GAIJISpecial characters
  SYD_BT_FNT_VMSICON_SIZE | VM default label icons

  Representative character code for each section (2 byte Japanese is Shift JIS code):

  SYD_BT_FNT_CODE_ASCII_MIN | First ASCII code
  SYD_BT_FNT_CODE_ASCII_MAX | Last ASCII code
  SYD_BT_FNT_CODE_8BIT_MIN | First 8-bit code
  SYD_BT_FNT_CODE_8BIT_MAX | Last 8-bit code
  SYD_BT_FNT_CODE_KANA_MIN | First 2 byte code
  SYD_BT_FNT_CODE_KANA_MAX | Last Japanese kana code
  SYD_BT_FNT_CODE_LVL1_MIN | First kanji first standard code
  SYD_BT_FNT_CODE_LVL1_MAX | Last kanji first standard code
  SYD_BT_FNT_CODE_LVL2_MIN | First kanji second standard code
  SYD_BT_FNT_CODE_LVL2_MAX | Last kanji second standard code
  SYD_BT_FNT_GAIJ_MIN | First special character code
  SYD_BT_FNT_GAIJ_MAX | Last special character code
  SYD_BT_FNT_ICON_MIN | First visual memory icon code
  SYD_BT_FNT_ICON_MAX | Last visual memory icon code

### EXAMPLE

      #define SMD_WRK_ADDR  (0x0c020000)
      main()
      {
      	void *smFntAddr, *smTheFntAddr;
      	void *smWrkAddr;
      	Uint8 smTheCode;

      	smFntAddr = syBtFntGet();
      	smWrkAddr = (void *)SMD_WRK_ADDR;
      	smTheCode = '?';

      	/* evaluate the font address in Boot ROM */
      	smTheFntAddr = (void *)((Uint8)smFntAddr + SYD_BT_FNT_WORK_ASCII_24_OFS
      		+ (smTheCode - SYD_BT_FNT_CODE_ASCII_MIN) * SYD_BT_FNT_24_SIZE_HAN );

      	/* font semaphore check */
      	if( syBtFntChkSmph() == SYD_BT_FNT_SMPH_SUCCESS ) {
      		/* copy 1 letter to work RAM from Boot ROM */
      		memcpy( smTheFntAddr, smWrkAddr, SYD_BT_FNT_24_SIZE_HAN );
      		/* font semaphore clear */
      		syBtFntClrSmph();
      	}
      }

### NOTE

  The current value of SYD_BT_FNTINI must be specified for the control number. If font data is gotten without acquiring the semaphore, an undefined value may be returned. The purpose of this function is to get the address of the font data, not to load the font data into the application. The application must be designed to copy the font data on its own.

syBtFntGet

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999