Logo file: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 3: Line 3:
[[File:kof96load.png|frame|KOF 96 custom loading screen (LOGO_E.PRG).]]
[[File:kof96load.png|frame|KOF 96 custom loading screen (LOGO_E.PRG).]]


Optional structured files consisting of an index, fix and palette data for CD loading animations.
LOGO files are optional files used to create custom CD loading screens.


The [[BIOSes|BIOS]] loads these files after checking the [[IPL file]] if they are present at the CD's root, at address 0x120000 according to the console's nationality: LOGO_E.PRG, LOGO_U.PRG, or LOGO_J.PRG.
The [[system ROM]] automatically loads one of the following files according to the console's [[nationality]] setting, if present in the CD's root:
 
* LOGO_E.PRG for European nationality.
* LOGO_U.PRG for US nationality.
* LOGO_J.PRG for Japanese nationality.
 
The files must not be larger than ?? bytes. (KOF '99 uses 16.3KB files)


=File format=
=File format=


{|class="regdef"
{|class="wikitable"
|'''Address'''
!Size
|'''Size'''
!Description
|'''Description'''
|-
|-
|0
|Word
|Word
|Flags
|-
|Longword
|Data type
|Data type
(known values: $0000, $0001, $0003)
The 8 low bits are stored to $11C817 by the bios.
*Bit 0 - If set do not draw the internal 'NOW LOADING please wait' graphic (see picture top right).
*Bit 1 - If set no progress indicator is drawn.
*Bit 2 - If set no animation is drawn.
No other bits seem to be checked by the bios.
The above is true on the first IPL load only. Some games have different in-game loading graphics that do not follow the above. More information is needed on how these work (SAMSHO4 for example).
|-
|-
|0+2
|Longword
|Data pointer
|-
|Longword
|Longword
|Data type
|Data type
*1:Fix tiles
*2:Palette
*3:Map
*4:Animation Map
|-
|-
|2+4
|Longword
|Longword
|Absolute data start address (Starting from $120000)
|Data pointer
|-
|-
|colspan=3|...
|...
|
|-
|-
|2+*
|Longword
|Longword
|$FFFFFFFF terminator
|0xFFFFFFFF terminator
|-
|?
|Data previously pointed to...
|}
|}


==Fix tiles data==
The first word represents flags:
 
* Bit 0: If set, do not draw the default 'NOW LOADING please wait' graphic (see picture top right).
* Bit 1: If set, no progress bar is drawn.
* Bit 2: If set, no animation is drawn.
 
No other bits seem to be checked by the system ROM.
 
The rest of the file's contents are "data type - pointer" longword pairs. The type codes used must be sorted in an ascending order. The file is terminated with a $FFFFFFFF type code. The valid type codes are:


*Offset (longword) $4000 = tile $200
*1: Fix tiles
*Size (longword) $4000 = $200 tiles
*2: Palette
*Tile data...
*3: Tile map
*4: Animation map
 
The pointer values are absolute, starting from $120000.
 
==Fix tiles data format==
 
* Offset (longword). Example: $4000 = start at tile #512
* Size (longword). Example: $2000 = load 256 tiles
* Tile data...


Like the regular [[fix graphics format]], but byteswapped.
Like the regular [[fix graphics format]], but byteswapped.


==Palette data==
==Palette data format==


*Palette number (word), the loading bar seems to use palette 0, so don't use it. Remember that fix tiles can only use the 16 first palettes.
* Palette number (word).
*16 words of [[palettes|color data]].
* 16 words of [[palettes|color data]].


==Map data==
Note: The default progress bar seems to use palette 0, be careful not to overwrite it. Remember that fix tiles can only use the 16 first palettes.


*Fix address where to start mapping ($7102 is good)
==Map data format==
*Width in tiles (word) $18
*Height in tiles (word) $0B
*Tile numbers/palettes...


Mapped left to right, top to down.
All values are words.


==Animation map data==
* Start fix map address ($7102 is good).
* Width in tiles.
* Height in tiles.
* Fix tilemap data as found in [[VRAM]]...


*Fix address where to start mapping ($7102 is good)
Note: Mapping is done from left to right, top to bottom.
*Width in tiles (word)
*Height in tiles (word)
*Number of frames in animation
*Animation speed (in frames)
*Tile numbers/palettes...


==Animation map data format==
All values are words.
* Start fix map address ($7102 is good).
* Width in tiles.
* Height in tiles.
* Number of frames in animation.
* Animation speed (in frames).
* Fix tilemap data as found in [[VRAM]]...


==Using LOGO files for in-game loading==
==Using LOGO files for in-game loading==


By default the bios will always use the initial LOGO file during in game loading sequences. It is possible to change this by loading a new data over the logo information at $120000. How this gets loaded is not yet confirmed but its suspected that games request the data to be loaded as it would any other data given there is not need for 'LOGO' to be in the file name in this situation. It may also be possible the bios looks out for data being loaded into this region before drawing.
By default the system ROM will always use the initial LOGO file during in game loading sequences. It is possible to change this by loading new data over the buffered LOGO file data at $120000. How this gets loaded is not yet confirmed but its suspected that games request the data to be loaded as it would any other data given there is not need for 'LOGO' to be in the file name in this situation. It may also be possible the system ROM looks out for data being loaded into this region before drawing.


The ability to change the default progress bar (handled by the bios) is also available. The bios places the start address of its code to handle progress bar drawing at $11C80C. This code is then always called via 'MOVEA.L 0x11C80C,A0', 'JSR(A0)'. To use a custom progress bar simply place the start address of your custom progress bar code at $11C80C. Current progress bar state is held at address $10F691. Your code should handle all elements of drawing the progress bar.
The ability to change the default progress bar (handled by the system ROM) is also available. The system ROM places the start address of its code to handle progress bar drawing at $11C80C. This code is then always called via 'MOVEA.L 0x11C80C,A0', 'JSR(A0)'. To use a custom progress bar simply place the start address of your custom progress bar code at $11C80C. Current progress bar state is held at address $10F691. Your code should handle all elements of drawing the progress bar.


It appears games plant their custom progress bar code into the default LOGO file as well as any further files that get loaded to this range. Below is the routine used by Samurai Shodown IV as seen in file 'JL_ST1.PRG' once in RAM. The main game program code places 0x120086 to $11C80C
It appears games plant their custom progress bar code into the default LOGO file as well as any further files that get loaded to this range. Below is the routine used by Samurai Shodown IV as seen in file 'JL_ST1.PRG' once in RAM. The main game program code places 0x120086 to $11C80C
Line 108: Line 124:
124AFE  4E75                      RTS
124AFE  4E75                      RTS
</syntaxhighlight>
</syntaxhighlight>
==Additional Notes==
Attempting to load a LOGO with an Animation speed of less than 5 can cause crashes. [Tested on a Japanese region top loader with Neo CD Loader installed]
[[Category:CD systems]]
[[Category:CD systems]]

Latest revision as of 13:04, 15 November 2024

CDZ default loading screen.
KOF 96 custom loading screen (LOGO_E.PRG).

LOGO files are optional files used to create custom CD loading screens.

The system ROM automatically loads one of the following files according to the console's nationality setting, if present in the CD's root:

  • LOGO_E.PRG for European nationality.
  • LOGO_U.PRG for US nationality.
  • LOGO_J.PRG for Japanese nationality.

The files must not be larger than ?? bytes. (KOF '99 uses 16.3KB files)

File format

Size Description
Word Flags
Longword Data type
Longword Data pointer
Longword Data type
Longword Data pointer
...
Longword 0xFFFFFFFF terminator
? Data previously pointed to...

The first word represents flags:

  • Bit 0: If set, do not draw the default 'NOW LOADING please wait' graphic (see picture top right).
  • Bit 1: If set, no progress bar is drawn.
  • Bit 2: If set, no animation is drawn.

No other bits seem to be checked by the system ROM.

The rest of the file's contents are "data type - pointer" longword pairs. The type codes used must be sorted in an ascending order. The file is terminated with a $FFFFFFFF type code. The valid type codes are:

  • 1: Fix tiles
  • 2: Palette
  • 3: Tile map
  • 4: Animation map

The pointer values are absolute, starting from $120000.

Fix tiles data format

  • Offset (longword). Example: $4000 = start at tile #512
  • Size (longword). Example: $2000 = load 256 tiles
  • Tile data...

Like the regular fix graphics format, but byteswapped.

Palette data format

Note: The default progress bar seems to use palette 0, be careful not to overwrite it. Remember that fix tiles can only use the 16 first palettes.

Map data format

All values are words.

  • Start fix map address ($7102 is good).
  • Width in tiles.
  • Height in tiles.
  • Fix tilemap data as found in VRAM...

Note: Mapping is done from left to right, top to bottom.

Animation map data format

All values are words.

  • Start fix map address ($7102 is good).
  • Width in tiles.
  • Height in tiles.
  • Number of frames in animation.
  • Animation speed (in frames).
  • Fix tilemap data as found in VRAM...

Using LOGO files for in-game loading

By default the system ROM will always use the initial LOGO file during in game loading sequences. It is possible to change this by loading new data over the buffered LOGO file data at $120000. How this gets loaded is not yet confirmed but its suspected that games request the data to be loaded as it would any other data given there is not need for 'LOGO' to be in the file name in this situation. It may also be possible the system ROM looks out for data being loaded into this region before drawing.

The ability to change the default progress bar (handled by the system ROM) is also available. The system ROM places the start address of its code to handle progress bar drawing at $11C80C. This code is then always called via 'MOVEA.L 0x11C80C,A0', 'JSR(A0)'. To use a custom progress bar simply place the start address of your custom progress bar code at $11C80C. Current progress bar state is held at address $10F691. Your code should handle all elements of drawing the progress bar.

It appears games plant their custom progress bar code into the default LOGO file as well as any further files that get loaded to this range. Below is the routine used by Samurai Shodown IV as seen in file 'JL_ST1.PRG' once in RAM. The main game program code places 0x120086 to $11C80C

120086  4EF9 0012 4AD0             JMP      0x124AD0
124AD0  4DF9 003C 0000             LEA      0x3C0000,A6
124AD6  41F9 0012 4B00             LEA      0x124B00,A0
124ADC  1239 0010 F691             MOVE.B   0x10F691,D1
124AE2  0241 00F0                  ANDI.W   #0xF0,D1
124AE6  D0C1                       ADDA.W   D1,A0
124AE8  203C 719B A200             MOVE.L   #0x719BA200,D0
124AEE  7E0F                       MOVEQ    #0xF,D7
124AF0  1018                       MOVE.B   (A0)+,D0
124AF2  2C80                       MOVE.L   D0,(A6)
124AF4  0680 0020 0000             ADDI.L   #0x200000,D0
124AFA  51CF FFF4                  DBF      D7,*-0xA [0xC00422]
124AFE  4E75                       RTS


Additional Notes

Attempting to load a LOGO with an Animation speed of less than 5 can cause crashes. [Tested on a Japanese region top loader with Neo CD Loader installed]