-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
654 additions
and
372 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
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 40 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. | ||
|
||
todo: create some sort of tool for creating a TITLE_*.SYS file from a .SPR file | ||
and palette data. (or even better, a .png file, for people who aren't me!) | ||
|
||
"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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,78 @@ | ||
The USER subroutine and You | ||
=========================== | ||
USER is always jumped to by the BIOS. | ||
It's meant to respond to the value in BIOS_USER_REQUEST. | ||
After doing so, jump to SYSTEM_RETURN so the BIOS can resume operation. | ||
|
||
Neo-Geo Dev wiki example code | ||
----------------------------- | ||
JT_User: | ||
dc.l StartupInit | ||
dc.l EyeCatcher | ||
dc.l Game | ||
dc.l Title | ||
|
||
User: | ||
move.b d0,REG_DIPSW | ||
clr.l d0 | ||
move.b BIOS_USER_REQUEST,d0 | ||
lsl.b #2,d0 | ||
lea JT_User,a0 | ||
movea.l (a0,d0),a0 | ||
jsr (a0) | ||
jmp BIOSF_SYSTEM_RETURN | ||
|
||
USER_REQUEST Command 0 (StartupInit) | ||
------------------------------------ | ||
Initialize the soft/debug DIPs in the 68K user RAM. | ||
Used on first time starting up on a MVS system. | ||
|
||
* Set BIOS_USER_MODE to 0 | ||
* Init user RAM, display, IO | ||
* any game initialization crap? | ||
|
||
SNK docs: | ||
"Initialize only the part defined by the address $10E-$113 as the backup area | ||
of the work area used for the game. Normally, use this area for high scores, | ||
rankings, etc. On the MVS, this command is called only once: when the cartridge | ||
is inserted into the main board for the first time. Initialize the work area, | ||
excluding the backup area, screen displays, and I/O, etc. every time USER is | ||
entered." | ||
|
||
USER_REQUEST Command 1 (EyeCatcher) | ||
----------------------------------- | ||
Shows the game's boot logo animation if the Eye catcher anim flag ($114) is 1. | ||
Apparently not checked on the MVS, only home? | ||
|
||
(todo: find out more information, like what games use command 1) | ||
|
||
Games that use Command 1: | ||
* NAM-1975 | ||
* Poker Night? (most likely) | ||
|
||
Questionable: | ||
* Do GIGA POWER games use Command 1? | ||
|
||
USER_REQUEST Command 2 (Game) | ||
----------------------------- | ||
Show the game's demo. | ||
|
||
SNK docs: | ||
"A demonstration of the title and the game is performed when a request is made. | ||
Jump to SYSTEM_RETURN when the demonstration is over and the game has yet not | ||
been started. Or, if the game has been started, jump to SYSTEM_RETURN after the | ||
game is over." | ||
|
||
USER_REQUEST Command 3 (Title) | ||
------------------------------ | ||
Show the game's title screen. | ||
On MVS systems, this is called when a coin is inserted. | ||
|
||
SNK docs: | ||
"Only the game title is displayed. This command is requested only in the mode | ||
with the MVS-forced start. At this point, the SELECT_TIMER ($10FDDA, B) gives | ||
the remaining time in BCD, so please display this on the screen. When the time | ||
runs out, instructions come from the system to start the game. Therefore, there | ||
is no need for the game side to return to the SYSTEM_RETURN. Everything else is | ||
the same as in the Command 2 game demo. (Please note that if the Game Start | ||
Compulsion is not set for compulsion time, then the SELECT_TIMER is not used.)" | ||
The USER subroutine and You | ||
=========================== | ||
USER is always jumped to by the BIOS. | ||
It's meant to respond to the value in BIOS_USER_REQUEST. | ||
After doing so, jump to SYSTEM_RETURN so the BIOS can resume operation. | ||
Neo-Geo Dev wiki example code | ||
----------------------------- | ||
JT_User: | ||
dc.l StartupInit | ||
dc.l EyeCatcher | ||
dc.l Game | ||
dc.l Title | ||
User: | ||
move.b d0,REG_DIPSW | ||
clr.l d0 | ||
move.b BIOS_USER_REQUEST,d0 | ||
lsl.b #2,d0 | ||
lea JT_User,a0 | ||
movea.l (a0,d0),a0 | ||
jsr (a0) | ||
jmp BIOSF_SYSTEM_RETURN | ||
USER_REQUEST Command 0 (StartupInit) | ||
------------------------------------ | ||
Initialize the soft/debug DIPs in the 68K user RAM. | ||
Used on first time starting up on a MVS system. | ||
* Set BIOS_USER_MODE to 0 | ||
* Init user RAM, display, IO | ||
* any game initialization crap? | ||
SNK docs: | ||
"Initialize only the part defined by the address $10E-$113 as the backup area | ||
of the work area used for the game. Normally, use this area for high scores, | ||
rankings, etc. On the MVS, this command is called only once: when the cartridge | ||
is inserted into the main board for the first time. Initialize the work area, | ||
excluding the backup area, screen displays, and I/O, etc. every time USER is | ||
entered." | ||
USER_REQUEST Command 1 (EyeCatcher) | ||
----------------------------------- | ||
Shows the game's boot logo animation if the Eye catcher anim flag ($114) is 1. | ||
Apparently not checked on the MVS, only home? <- todo: verify this | ||
(todo: find out more information, like what games use command 1) | ||
Games that use Command 1: | ||
* NAM-1975 | ||
* Poker Night? (most likely) | ||
Questionable: | ||
* Do GIGA POWER games use Command 1? | ||
USER_REQUEST Command 2 (Game) | ||
----------------------------- | ||
Show the game's demo. | ||
SNK docs: | ||
"A demonstration of the title and the game is performed when a request is made. | ||
Jump to SYSTEM_RETURN when the demonstration is over and the game has yet not | ||
been started. Or, if the game has been started, jump to SYSTEM_RETURN after the | ||
game is over." | ||
USER_REQUEST Command 3 (Title) | ||
------------------------------ | ||
Show the game's title screen. | ||
On MVS systems, this is called when a coin is inserted. | ||
SNK docs: | ||
"Only the game title is displayed. This command is requested only in the mode | ||
with the MVS-forced start. At this point, the SELECT_TIMER ($10FDDA, B) gives | ||
the remaining time in BCD, so please display this on the screen. When the time | ||
runs out, instructions come from the system to start the game. Therefore, there | ||
is no need for the game side to return to the SYSTEM_RETURN. Everything else is | ||
the same as in the Command 2 game demo. (Please note that if the Game Start | ||
Compulsion is not set for compulsion time, then the SELECT_TIMER is not used.)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
Designing Fix Tiles | ||
=================== | ||
For the most part, it's similar to designing 8x8 tiles on other systems. | ||
You just need to be aware that the fix layer will display over everything, and | ||
that the 8x16 functionality of MESS_OUT requires a specific layout: | ||
|
||
[8x16 MESS_OUT output] | ||
The 8x16 tiles for MESS_OUT are laid out like so: | ||
|
||
(page n) Top Half | ||
(page n+1) Top Half | ||
|
||
Command 8 with the upper byte set as $01, and data of "0123", writing to $7010: | ||
+-------+-------+-------+-------+ | ||
Addr| $7010 | $7030 | $7050 | $7070 | | ||
Data| $0130 | $0131 | $0132 | $0133 | | ||
+-------+-------+-------+-------+ | ||
Addr| $7011 | $7031 | $7051 | $7071 | | ||
Data| $0230 | $0231 | $0232 | $0233 | | ||
+-------+-------+-------+-------+ | ||
|
||
If you think this sucks, you have two options: | ||
1) Write 8x16 messages yourself using 8x8 output | ||
2) Write your own version of MESS_OUT :p | ||
Designing Fix Tiles | ||
=================== | ||
For the most part, it's similar to designing 8x8 tiles on other systems. | ||
You just need to be aware that the fix layer will display over everything, and | ||
that the 8x16 functionality of MESS_OUT requires a specific layout: | ||
[8x16 MESS_OUT output] | ||
The 8x16 tiles for MESS_OUT are laid out like so: | ||
(page n) Top Half | ||
(page n+1) Top Half | ||
Command 8 with the upper byte set as $01, and data of "0123", writing to $7010: | ||
+-------+-------+-------+-------+ | ||
Addr| $7010 | $7030 | $7050 | $7070 | | ||
Data| $0130 | $0131 | $0132 | $0133 | | ||
+-------+-------+-------+-------+ | ||
Addr| $7011 | $7031 | $7051 | $7071 | | ||
Data| $0230 | $0231 | $0232 | $0233 | | ||
+-------+-------+-------+-------+ | ||
If you think this sucks, you have two options: | ||
1) Write 8x16 messages yourself using 8x8 output | ||
2) Write your own version of MESS_OUT :p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.