-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTITLE_x_SYS.txt
68 lines (53 loc) · 1.83 KB
/
TITLE_x_SYS.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
TITLE_*.SYS Files
=================
SYS files hold palette and sprite data for the game logo displayed in the CDZ
menu screen. There's one for each nationality, where the filename matches
TITLE_*.SYS; * is either 'J', 'U', or 'E'.
Palettes are stored first, there's space for 45 of them ($5A0 bytes).
Following that are 45 sprite tiles in the regular SPR file format, making a 9*5
tiles (144*80 pixels) logo. Tiles are mapped from left to right, top to bottom.
Palette note: Index 0 is transparent, and the area behind the game logo in
the CDZ menu screen is not entirely black. Proceed with caution.
todo: Create a tool that can generate a TITLE_*.SYS file from a .SPR file and
various .ngpal files. (blastar's NGFX can import from BMP/PNG/GIF files)
"See cdrom_load_title in cdrom.c of NEOCD 0.31":
void cdrom_load_title(void)
{
char Path[256];
char jue[4] = JUE;
char file[12] = TITLE_X_SYS;
FILE *fp;
char *Ptr;
int Readed;
int x, y;
strcpy(Path, cdpath);
file[6] = jue[m68k_read_memory_8(0x10FD83)&3];
strcat(Path, file);
fp = fopen(Path, "rb");
if (fp==NULL)
{
return;
}
fread(video_paletteram_pc, 1, 0x5A0, fp);
swab((char *)video_paletteram_pc, (char *)video_paletteram_pc, 0x5A0);
for(Readed=0;Readed<720;Readed++)
video_paletteram_pc[Readed] = video_color_lut[video_paletteram_pc[Readed]];
Ptr = neogeo_spr_memory;
Readed = fread(cdrom_buffer, 1, BUFFER_SIZE, fp);
spr_conv(cdrom_buffer, Ptr, Readed, video_spr_usage);
fclose(fp);
Readed = 0;
for(y=0;y<80;y+=16)
{
for(x=0;x<144;x+=16)
{
video_draw_spr(Readed, Readed, 0, 0, x+16, y+16, 15, 16);
Readed++;
}
}
(*blitter)();
memset(neogeo_spr_memory, 0, 4194304);
memset(neogeo_fix_memory, 0, 131072);
memset(video_spr_usage, 0, 32768);
memset(video_fix_usage, 0, 4096);
}