If you are still using the old URL (datacrystal.romhacking.net), please update your bookmarks! The old URL may stop working soon.
The current URL is datacrystal.tcrf.net.
The current URL is datacrystal.tcrf.net.
Crystal Beans from Dungeon Explorer/Cutscene Script: Difference between revisions
Jump to navigation
Jump to search
(Created page) |
m (Hawk moved page Crystal Beans From Dungeon Explorer/Cutscene Script to Crystal Beans from Dungeon Explorer/Cutscene Script) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{subpage}} | |||
A '''Cutscene script''' is a sequence of commands to load data and control different aspects of a cutscene. The command have not been all completely reverse-engineered but the command number and the number and size of their arguments is known. In the table below '''long''' refers to a 24-bits integer. | A '''Cutscene script''' is a sequence of commands to load data and control different aspects of a cutscene. The command have not been all completely reverse-engineered but the command number and the number and size of their arguments is known. In the table below '''long''' refers to a 24-bits integer. | ||
Line 9: | Line 10: | ||
| '''Decompress data to VRAM'''<br> | | '''Decompress data to VRAM'''<br> | ||
Arguments:<br> | Arguments:<br> | ||
:'''long''': pointer to the source address of the data to be decompressed | :'''long''': pointer to the source address of the data to be decompressed | ||
:'''word''': VRAM destination address (as given to IO port $2116) | :'''word''': VRAM destination address (as given to IO port $2116) | ||
:'''word''': number of words to decompress | :'''word''': number of words to decompress | ||
|- | |- | ||
Line 16: | Line 17: | ||
| '''Decompress and set palette ($7FEE00)'''<br> | | '''Decompress and set palette ($7FEE00)'''<br> | ||
Arguments:<br> | Arguments:<br> | ||
:'''long''': pointer to the source address of the data to be decompressed | :'''long''': pointer to the source address of the data to be decompressed | ||
:'''word''': destination palette index (only the low byte is used) | :'''word''': destination palette index (only the low byte is used) | ||
:'''word''': number of words to decompress | :'''word''': number of words to decompress | ||
|- | |- | ||
Line 23: | Line 24: | ||
| '''Decompress data (tilemap?) to WRAM ($7F8000) and send it to VRAM?'''<br> | | '''Decompress data (tilemap?) to WRAM ($7F8000) and send it to VRAM?'''<br> | ||
Arguments:<br> | Arguments:<br> | ||
:'''long''': pointer to source address of the data to be decompressed | :'''long''': pointer to source address of the data to be decompressed | ||
:'''word''': number of words to decompress | :'''word''': number of words to decompress | ||
:'''word''': VRAM destination address (as given to IO port $2116) (note: the VRAM address will increment by $20 between each item) | :'''word''': VRAM destination address (as given to IO port $2116) (note: the VRAM address will increment by $20 between each item) | ||
:'''word''': size in words of the items to send | :'''word''': size in words of the items to send | ||
:'''word''': number of items to send | :'''word''': number of items to send | ||
:'''word''': number of bytes between items to send | :'''word''': number of bytes between items to send | ||
|- | |- | ||
Line 33: | Line 34: | ||
| '''Send data (tilemap?) to VRAM?'''<br> | | '''Send data (tilemap?) to VRAM?'''<br> | ||
Arguments:<br> | Arguments:<br> | ||
:'''word''': source data index from $7F8000 | :'''word''': source data index from $7F8000 | ||
:'''word''': VRAM destination address (as given to IO port $2116) (note: the VRAM address will increment by $20 between each item) | :'''word''': VRAM destination address (as given to IO port $2116) (note: the VRAM address will increment by $20 between each item) | ||
:'''word''': size in words of the items to send | :'''word''': size in words of the items to send | ||
:'''word''': number of items to send | :'''word''': number of items to send | ||
:'''word''': number of bytes between items to send | :'''word''': number of bytes between items to send | ||
|- | |- | ||
Line 56: | Line 57: | ||
| '''Set OAM data?'''<br> | | '''Set OAM data?'''<br> | ||
Arguments:<br> | Arguments:<br> | ||
:'''word''': pointer to [[Crystal Beans From Dungeon Explorer:Cutscene sprite data struct|OAM data struct]] (copied to [$1C5D]) | :'''word''': pointer to [[Crystal Beans From Dungeon Explorer:Cutscene sprite data struct|OAM data struct]] (copied to [$1C5D]) | ||
:'''word''': pointer to [[Crystal Beans From Dungeon Explorer:Cutscene sprite control|sprite control commands]] (copied to [$1B11]) | :'''word''': pointer to [[Crystal Beans From Dungeon Explorer:Cutscene sprite control|sprite control commands]] (copied to [$1B11]) | ||
:'''word''': copied to [$1BE9] | :'''word''': copied to [$1BE9] | ||
|- | |- | ||
Line 66: | Line 67: | ||
| '''Init tilemap?'''<br> | | '''Init tilemap?'''<br> | ||
Arguments:<br> | Arguments:<br> | ||
:'''word''': VRAM destination address (as given to IO port $2116) | :'''word''': VRAM destination address (as given to IO port $2116) | ||
:'''byte''': number of VRAM words to set | :'''byte''': number of VRAM words to set | ||
:'''byte''': copied to [$3B] | :'''byte''': copied to [$3B] | ||
|- | |- | ||
Line 73: | Line 74: | ||
| '''?'''<br> | | '''?'''<br> | ||
Arguments:<br> | Arguments:<br> | ||
:'''word''': some index (copied to register X) | :'''word''': some index (copied to register X) | ||
:'''word''': copied to [$1A08+index] | :'''word''': copied to [$1A08+index] | ||
:'''word''': copied to [$1A0E+index] | :'''word''': copied to [$1A0E+index] | ||
|- | |- | ||
Line 80: | Line 81: | ||
| '''?'''<br> | | '''?'''<br> | ||
Arguments:<br> | Arguments:<br> | ||
:'''word''': copied to [$1B59] | :'''word''': copied to [$1B59] | ||
:'''word''': copied to [$1A14] | :'''word''': copied to [$1A14] | ||
:'''word''': copied to [$1A18] | :'''word''': copied to [$1A18] | ||
:'''word''': copied to [$1B11] | :'''word''': copied to [$1B11] | ||
|- | |- | ||
Line 110: | Line 111: | ||
| '''?'''<br> | | '''?'''<br> | ||
Arguments:<br> | Arguments:<br> | ||
:'''word''': ? | :'''word''': ? | ||
:'''word''': function pointer (copied to [$1B11]) | :'''word''': function pointer (copied to [$1B11]) | ||
:'''word''': copied to [$1B35] | :'''word''': copied to [$1B35] | ||
|- | |- | ||
Line 120: | Line 121: | ||
| '''?'''<br> | | '''?'''<br> | ||
Arguments:<br> | Arguments:<br> | ||
:'''word''': index from $7F8000 (source data) | :'''word''': index from $7F8000 (source data) | ||
:'''word''': copied to [$32] | :'''word''': copied to [$32] | ||
:'''word''': copied to [$38] | :'''word''': copied to [$38] | ||
:'''word''': copied to [$3B] | :'''word''': copied to [$3B] | ||
:'''word''': copied to [$38] | :'''word''': copied to [$38] | ||
:'''word''': copied to [$41] | :'''word''': copied to [$41] | ||
|- | |- | ||
Line 133: | Line 134: | ||
| '''Execute function'''<br> | | '''Execute function'''<br> | ||
Arguments:<br> | Arguments:<br> | ||
:'''word''': function pointer | :'''word''': function pointer | ||
:'''word''': function argument (copied to [$38]) | :'''word''': function argument (copied to [$38]) | ||
|- | |- |
Latest revision as of 21:03, 28 January 2024
This is a sub-page of Crystal Beans from Dungeon Explorer.
A Cutscene script is a sequence of commands to load data and control different aspects of a cutscene. The command have not been all completely reverse-engineered but the command number and the number and size of their arguments is known. In the table below long refers to a 24-bits integer.
Command reference
Command | Description |
---|---|
0x00 0x01 |
Decompress data to VRAM Arguments:
|
0x02 0x03 |
Decompress and set palette ($7FEE00) Arguments:
|
0x04 | Decompress data (tilemap?) to WRAM ($7F8000) and send it to VRAM? Arguments:
|
0x05 | Send data (tilemap?) to VRAM? Arguments:
|
0x06 | ? No arguments |
0x07 | Same as 0x06 but pause execution |
0x08 | ? No arguments |
0x09 | Same as 0x08 but pause execution |
0x0A | Set OAM data? Arguments:
|
0x0B | Same as 0x0A but pause execution |
0x0C 0x0D |
Init tilemap? Arguments:
|
0x0E 0x0F |
? Arguments:
|
0x10 | ? Arguments:
|
0x11 | Same as 0x10 but pause execution |
0x12 | ? Arguments:
|
0x13 | Same as 0x12 but pause execution |
0x14 | Delay
|
0x15 | Same as 0x14 but pause execution |
0x16 0x17 |
? No arguments |
0x18 | ? Arguments:
|
0x19 | Same as 0x18 but pause execution |
0x1A | ? Arguments:
|
0x1B | Same as 0x1A but pause execution |
0x1C 0x1D |
Execute function Arguments:
|
0x1E 0x1F |
? Arguments:
|
0x20 0x21 |
End of script No arguments |