-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathLOGO_x_PRG.txt
152 lines (124 loc) · 5.83 KB
/
LOGO_x_PRG.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
LOGO_*.PRG Files
================
These types of files represent data for the Neo-Geo CD loading screen. Simple
loading screens don't require much in the way of code, while custom loading
screens (e.g. Samurai Shodown IV) do.
Since this is a PRG file and the format depends on various 68K data widths, it's
typically best/easiest to use a 68K assembler to generate the LOGO_*.PRG file.
================================================================================
[Basic Layout]
The basic layout of a LOGO_*.PRG file is as follows:
+--------+------+------+-------------+
| Offset | Type | Size | Description |
+--------+------+------+-------------+
| $0000 | Word | 1 | Header Data |
|$0002...| Long |(var.)| Entry Index |
|(later) |(var.)|(var.)| Entry Data |
+--------+------+------+-------------+
================================================================================
[Header Data]
The default header data only has three bits worth of control.
Custom loaders may be able to interpret this word differently.
FEDCBA98 76543210
xxxxxxxx xxxxx|||
||+-- Disable "Now Loading" graphic
|+--- Disable progress indicator
+---- Disable animation
<Disable "Now Loading" graphic>
When set to 1, this will disable the built-in blue/green "Now Loading" graphic.
<Disable progress indicator>
When set to 1, this will disable the built-in progress indicator.
<Disable animation>
When set to 1, this will disable all animation commands. Don't set this if
you're going to use any animations, or you'll wonder why they don't show up. :p
================================================================================
[Entry Index]
The entry index holds a number of entries. Each entry is two longword values:
the data type, and the start address. It appears that you should structure the
file list in the order of the data types, so the fix tile data (if you're using
it) should come first, then palettes, etc. However, this has not been confirmed
to be true. (Just some anecdotal stuff from when I made my first LOGO_x.PRG file.)
<Data Type>
$00000000: ?????????
$00000001: Fix tiles
$00000002: Palette data
$00000003: Fix map
$00000004: Animation map
$FFFFFFFF: Entry list terminator
(Custom loaders might be able to handle different types?)
<Start Address>
These values are meant to be absolute addresses, starting at $120000. What's
loaded at $120000, you might ask? The file you're creating! This is why I
suggested using an assembler, since making labels for the data and adding
$120000 to them works just fine.
================================================================================
[Entry Data]
This is the fun part, since each data type has different setups.
<Fix Tiles>
+--------+------+------+-------------+
| Offset | Type | Size | Description |
+--------+------+------+-------------+
| $0000 | Word | 1 | Load Offset |
| $0002 | Word | 1 | Fix Size |
|$0004...| Fix |(var.)| Fix tiles^ |
+--------+------+------+-------------+
^ Fix tile data is byteswapped from the normal format.
Examples:
* when the Load Offset is $4000, the first fix tile is loaded at position $100.
* when the Fix Size is $4000, 512 ($200) tiles of Fix data are loaded.
<Palette Data>
+--------+------+------+-------------+
| Offset | Type | Size | Description |
+--------+------+------+-------------+
| $0000 | Word | 1 | Palete Num. |
| $0002 | Word | 16 | Color Data |
+--------+------+------+-------------+
The first four palette sets (indexes 0-4) are typically used by the BIOS and
aren't touched in official games. If you know you're never going to use the
default BIOS loading screen, you might be able to get away with trashing them.
The Color Data is the same format as the regular palette colors.
<Fix Map>
+--------+------+------+----------------+
| Offset | Type | Size | Description |
+--------+------+------+----------------+
| $0000 | Word | 1 | VRAM address |
| $0002 | Word | 1 | Width (tiles) |
| $0004 | Word | 1 | Height (tiles) |
|$0006...| Word |(var.)| Fix Mapping |
+--------+------+------+----------------+
VRAM address is the starting position for the fix data.
Width and height are measured in number of tiles.
The fix mapping data is mapped from left to right, top to bottom.
<Animation Map>
The animation map is similar to the fix map, but with more data to handle.
+--------+------+------+----------------+
| Offset | Type | Size | Description |
+--------+------+------+----------------+
| $0000 | Word | 1 | VRAM address |
| $0002 | Word | 1 | Width (tiles) |
| $0004 | Word | 1 | Height (tiles) |
| $0006 | Word | 1 | Num. of Frames |
| $0008 | Word | 1 | Anim. Speed |
|$000A...| Word |(var.)| Anim. Mapping |
+--------+------+------+----------------+
Animation speed is measured in number of frames.
================================================================================
[Custom Load Screen]
This is where you'll REALLY need to be using a 68K assembler.
(super todo)
- Write new loading screen data to $120000.
- $11C80C holds the address of the progress drawing bar routine.
- $10F690 holds the current progress bar status. It seems to be read as a word
by the NGCD system ROM?
================================================================================
[Other Notes]
* Samurai Shodown IV and Samurai Spirits RPG use many custom loading screens.
* It's assumed that the vs. screen loading pics from KOF96 (and other games) are
using a custom loading screen as well.
* The following games don't contain Fix data in their LOGO_*.PRG files:
* Street Hoop/Dunk Dream/whatever the third name for the game was
* Metal Slug
* Metal Slug 2
* Aero Fighters/Sonic Wings 2
* Aero Fighters/Sonic Wings 3
* Twinkle Star Sprites