libElysianVMU 1.6.0
Full-featured, accurate, cross-platform library emulating the Dreamcast's Visual Memory Unit
Loading...
Searching...
No Matches
evmu_icondata.h File Reference

Go to the source code of this file.

Data Structures

struct  EvmuIconData
 

Macros

#define EVMU_ICONDATA_VMS_FILE_NAME   "ICONDATA_VMS"
 
Field Sizes

Sizes and dimensions for icons

#define EVMU_ICONDATA_DESCRIPTION_SIZE   16
 
#define EVMU_ICONDATA_ICON_WIDTH   32
 
#define EVMU_ICONDATA_ICON_HEIGHT   32
 
#define EVMU_ICONDATA_VMU_ICON_BYTES   128
 
#define EVMU_ICONDATA_DC_PALETTE_SIZE   16
 
#define EVMU_ICONDATA_DC_PALETTE_BYTES   32
 
#define EVMU_ICONDATA_DC_ICON_BYTES   512
 
Secret Bios

Definitions for secret BIOS information

#define EVMU_ICONDATA_BIOS_SECRET_OFFSET   0x2c0
 
#define EVMU_ICONDATA_BIOS_SECRET_BYTE_COUNT   16
 
Palette Colors

Extracting and packet palette colors

#define EVMU_ICONDATA_PALETTE_ENTRY_A(c)   ((c >> 12) & 0xf)
 
#define EVMU_ICONDATA_PALETTE_ENTRY_R(c)   ((c >> 8 ) & 0xf)
 
#define EVMU_ICONDATA_PALETTE_ENTRY_G(c)   ((c >> 4 ) & 0xf)
 
#define EVMU_ICONDATA_PALETTE_ENTRY_B(c)   ((c ) & 0xf)
 
#define EVMU_ICONDATA_PALETTE_ENTRY(a, r, g, b)    ((uint16_t)(((a & 0xf) << 12) | ((r & 0xf) << 8) | ((g & 0xf) << 4) | ((b & 0xf))))
 

Functions

const uint8_t * EvmuIconData_unlockSecretBiosBytes (void)
 

Detailed Description

EvmuIconData: Header for the ICONDATA_VMS reserved file.

ICONDATA_VMS is a reserved filename on the VMU filesystem that is treated differently by the Dreamcast's BIOS menu. Rather than having the regular EvmuVms header structure, it has a structure given by EvmuIconData.

An ICONDATA_VMS file provides the following:

  • Custom VMU icon which is drawn to the VMU in the DC BIOS
  • Custom DC icon which is drawn to the screen in the DC BIOS
  • Optional byte sequence for unlocking the secret 3D DC BIOS

The VMU icon is a simple monochrome bitmap of exactly the resolution of the VMU screen while the Dreamcast icon is a 32x32 icon with a 16-bit, 16-entry color palette.

Note
In order to unlock the secret 3D Dreamcast BIOS, a particular byte sequence must appear within the ICONDATA_VMS file. This sequence must appear starting at byte offset 0x2c0 with the following 16 byte values:
Byte Value Byte Value
0 0xda 8 0x18
1 0x69 9 0x92
2 0xd0 10 0x79
3 0xda 11 0x68
4 0xc7 12 0x2d
5 0x4e 13 0xb5
6 0xf8 14 0x30
7 0x36 15 0x86
Todo:
  • Set icondata icon if there is no game
  • data present instead of the ES logo/screensaver
  • good description of what IconData is
Bug:
  • Loading VMU image with both a game and an icondata just shows icon instead of starting game
Author
2023 Falco Girgis

Definition in file evmu_icondata.h.

Macro Definition Documentation

◆ EVMU_ICONDATA_BIOS_SECRET_BYTE_COUNT

#define EVMU_ICONDATA_BIOS_SECRET_BYTE_COUNT   16

Number of bytes in the secret BIOS byte sequence

Definition at line 74 of file evmu_icondata.h.

◆ EVMU_ICONDATA_BIOS_SECRET_OFFSET

#define EVMU_ICONDATA_BIOS_SECRET_OFFSET   0x2c0

Offset of the secret BIOS byte sequence.

Definition at line 73 of file evmu_icondata.h.

◆ EVMU_ICONDATA_DC_ICON_BYTES

#define EVMU_ICONDATA_DC_ICON_BYTES   512

Total number of bytes for the DC icon

Definition at line 66 of file evmu_icondata.h.

◆ EVMU_ICONDATA_DC_PALETTE_BYTES

#define EVMU_ICONDATA_DC_PALETTE_BYTES   32

Total number of bytes for the DC icon color palette.

Definition at line 65 of file evmu_icondata.h.

◆ EVMU_ICONDATA_DC_PALETTE_SIZE

#define EVMU_ICONDATA_DC_PALETTE_SIZE   16

Number of entries in the DC icon color palette.

Definition at line 64 of file evmu_icondata.h.

◆ EVMU_ICONDATA_DESCRIPTION_SIZE

#define EVMU_ICONDATA_DESCRIPTION_SIZE   16

Number of bytes in the EvmuIconData::description string.

Definition at line 60 of file evmu_icondata.h.

◆ EVMU_ICONDATA_ICON_HEIGHT

#define EVMU_ICONDATA_ICON_HEIGHT   32

Height of the DC icon in pixels.

Definition at line 62 of file evmu_icondata.h.

◆ EVMU_ICONDATA_ICON_WIDTH

#define EVMU_ICONDATA_ICON_WIDTH   32

Width of the DC icon in pixels.

Definition at line 61 of file evmu_icondata.h.

◆ EVMU_ICONDATA_PALETTE_ENTRY

#define EVMU_ICONDATA_PALETTE_ENTRY (   a,
  r,
  g,
 
)     ((uint16_t)(((a & 0xf) << 12) | ((r & 0xf) << 8) | ((g & 0xf) << 4) | ((b & 0xf))))

Packs the channels given by a, r, g, b, into a single 16-bit palette entry color.

Definition at line 86 of file evmu_icondata.h.

102 {
104 char description[EVMU_ICONDATA_DESCRIPTION_SIZE];
105 uint32_t vmuIconOffset;
106 uint32_t dcIconOffset;
108
110EVMU_EXPORT const uint8_t* EvmuIconData_unlockSecretBiosBytes (void) GBL_NOEXCEPT;
111
118EVMU_EXPORT const char* EvmuIconData_description (GBL_CSELF,
119 GblStringBuffer* pBuff) GBL_NOEXCEPT;
121EVMU_EXPORT GblBool EvmuIconData_secretBiosUnlocked (GBL_CSELF) GBL_NOEXCEPT;
123EVMU_EXPORT const void* EvmuIconData_vmuIcon (GBL_CSELF) GBL_NOEXCEPT;
125EVMU_EXPORT const void* EvmuIconData_dcIcon (GBL_CSELF) GBL_NOEXCEPT;
127EVMU_EXPORT uint16_t EvmuIconData_dcPaletteEntry (GBL_CSELF, size_t idx) GBL_NOEXCEPT;
129EVMU_EXPORT const uint8_t* EvmuIconData_secretBiosBytes (GBL_CSELF) GBL_NOEXCEPT;
131EVMU_EXPORT size_t EvmuIconData_totalBytes (GBL_CSELF) GBL_NOEXCEPT;
133
140EVMU_EXPORT size_t EvmuIconData_setDescription (GBL_SELF,
141 const char* pString) GBL_NOEXCEPT;
143EVMU_EXPORT void EvmuIconData_unlockSecretBios (GBL_SELF,
144 GblBool unlock) GBL_NOEXCEPT;
146EVMU_EXPORT void EvmuIconData_setSecretBiosBytes (GBL_SELF,
147 const uint8_t* pBytes) GBL_NOEXCEPT;
149
156EVMU_EXPORT GblByteArray* EvmuIconData_createVmuIconArgb4444 (GBL_CSELF) GBL_NOEXCEPT;
158EVMU_EXPORT GblByteArray* EvmuIconData_createDcIconArgb4444 (GBL_CSELF) GBL_NOEXCEPT;
160EVMU_EXPORT EVMU_RESULT EvmuIconData_log (GBL_CSELF) GBL_NOEXCEPT;
162
163GBL_DECLS_END
164
165#undef GBL_SELF_TYPE
166
167#endif
168
#define EVMU_EXPORT
Define used for adding attributes to export public symbols.
Definition evmu_api.h:18
const uint8_t * EvmuIconData_unlockSecretBiosBytes(void)
Returns the 16-byte ICONDATA sequence for unlocking the secret Dreamcast BIOS.
#define EVMU_ICONDATA_DESCRIPTION_SIZE
Number of bytes in the EvmuIconData::description string.
EVMU_RESULT
extended GBL_RESULT type representing any status for the codebase
uint8_t GblBool
Header structure for the ICONDATA_VMS special VMU file.

◆ EVMU_ICONDATA_PALETTE_ENTRY_A

#define EVMU_ICONDATA_PALETTE_ENTRY_A (   c)    ((c >> 12) & 0xf)

Extracts the alpha channel from DC icon a palette entry.

Definition at line 81 of file evmu_icondata.h.

◆ EVMU_ICONDATA_PALETTE_ENTRY_B

#define EVMU_ICONDATA_PALETTE_ENTRY_B (   c)    ((c ) & 0xf)

Extracts the blue channel from a DC icon palette entry

Definition at line 84 of file evmu_icondata.h.

◆ EVMU_ICONDATA_PALETTE_ENTRY_G

#define EVMU_ICONDATA_PALETTE_ENTRY_G (   c)    ((c >> 4 ) & 0xf)

Extracts the green channel from a DC icon palette entry.

Definition at line 83 of file evmu_icondata.h.

◆ EVMU_ICONDATA_PALETTE_ENTRY_R

#define EVMU_ICONDATA_PALETTE_ENTRY_R (   c)    ((c >> 8 ) & 0xf)

Extracts the red channel from a DC icon palette entry.

Definition at line 82 of file evmu_icondata.h.

◆ EVMU_ICONDATA_VMS_FILE_NAME

#define EVMU_ICONDATA_VMS_FILE_NAME   "ICONDATA_VMS"

Reserved EvmuDirEntry::fileName value for EvmuIconData files.

Definition at line 54 of file evmu_icondata.h.

◆ EVMU_ICONDATA_VMU_ICON_BYTES

#define EVMU_ICONDATA_VMU_ICON_BYTES   128

Total number of bytes for the VMU icon.

Definition at line 63 of file evmu_icondata.h.

Function Documentation

◆ EvmuIconData_unlockSecretBiosBytes()

const uint8_t * EvmuIconData_unlockSecretBiosBytes ( void  )

Returns the 16-byte ICONDATA sequence for unlocking the secret Dreamcast BIOS.