-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathROM_Buildfile.event
172 lines (160 loc) · 8.67 KB
/
ROM_Buildfile.event
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/*
This is a translation for the build of the unreleased Pokémon Picross for the Game Boy and Game Boy Color that surfaced on the internet on September 2020.
The patch is complete, the entire story, the titlescreen, the tutorials, the menus and the puzzle names are all done, even the Game Boy Printer error messages have been translated.
The game is easy to navigate and play even with no translation, as long as the player is already familiar with nonogram rules.
The translation work was done through a combination of online tools and consultations and as such it might not be very accurate, however, the source is now available on github.
If you are interested in making your own version of the translation, or translating the game into a different language, check: https://github.com/LeonarthCG/POKEPICROSS_Translation
*/
#ifndef GBOFFSET //org to Bank:Offset
#define GBOFFSET(bank,offset) "((offset&0x3FFF) + (bank*0x4000))" //(bank * 0x4000) + offset inside of the bank
#endif
#ifndef GBBANK //get an absolute offset and figure out the bank
#define GBBANK(offset) "((offset>>14)&0xFF)"
#endif
#ifndef GBPOIN //get an absolute offset and convert it into the offset in the bank, +0x4000 if not bank 0
#ifndef GBBANK //get an absolute offset and figure out the bank
#define GBBANK(offset) "((offset>>14)&0xFF)"
#endif
#define GBPOIN(offset) "((offset&0x3FFF)+((0x4000)-(0x4000&(0x4000<<(GBBANK(offset))))))"
#endif
#include "graphics.event"
#include "fontWidth.event"
#include "fontGraphics.event"
#include "names.event"
#include "dialogue.event"
#include "system.event"
PUSH; ORG GBOFFSET(0x02,0x4C5D); BYTE 0x01; POP //add one pixel after a character is drawn, not two
//replace main menu graphics and background maps
PUSH
ORG GBOFFSET(0x03,0x649C+1); BYTE 0x07
ORG GBOFFSET(0x03,0x649E+1); BYTE 0x00 0x40
ORG GBOFFSET(0x03,0x64A4+1); BYTE (0x1800/0x80) 0
ORG GBOFFSET(0x07,0x4000)
#incbin "compressed/main.png.bin.dmp"
ORG GBOFFSET(0x03,0x64B6+1); BYTE 0x07
ORG GBOFFSET(0x03,0x64B8+1); BYTE 0x00 0x60
ORG GBOFFSET(0x03,0x64BE+1); BYTE (0x0800/0x80) 0
ORG GBOFFSET(0x07,0x6000)
#incbin "compressed/main.map.bin.dmp"
ORG GBOFFSET(0x03,0x64C4+1); BYTE 0x07
ORG GBOFFSET(0x03,0x64C6+1); BYTE 0x00 0x70
ORG GBOFFSET(0x03,0x64CC+1); BYTE (0x0800/0x80) 0
ORG GBOFFSET(0x07,0x7000)
#incbin "compressed/safari.map.bin.dmp"
POP
//replace title menu graphics and background map
PUSH
ORG GBOFFSET(0x28,0x4380+1); BYTE 0x0A
ORG GBOFFSET(0x28,0x4382+1); BYTE 0x00 0x40
ORG GBOFFSET(0x28,0x4388+1); BYTE (0x1800/0x80) 0
ORG GBOFFSET(0x0A,0x4000)
#incbin "compressed/title.png.bin.dmp"
ORG GBOFFSET(0x7A,0x7020)
#incbin "titletiles.map"
ORG GBOFFSET(0x7A,0x7420)
#incbin "titlecolors.map"
POP
//same as above but for gb mode
PUSH
ORG GBOFFSET(0x28,0x4452+1); BYTE 0x0A
ORG GBOFFSET(0x28,0x4454+1); BYTE 0x00 0x60
ORG GBOFFSET(0x28,0x445A+1); BYTE (0x1800/0x80) 0
ORG GBOFFSET(0x0A,0x6000)
#incbin "compressed/titlegb.png.bin.dmp"
ORG GBOFFSET(0x5B,0x7C00)
#incbin "titlegb.map"
POP
//smaller text for dialogue, this makes text 1 byte per character/control code, instead of two
PUSH; ORG GBOFFSET(0x00,0x0AD9); BYTE 0x16 0x00 //only load one byte at a time, printer text
PUSH; ORG GBOFFSET(0x02,0x4C28); BYTE 0x16 0x00 //only load one byte at a time
PUSH; ORG GBOFFSET(0x02,0x4C39); BYTE 0x18 0x27 //do not check for 0xFF after 0xFE (linebreak)
//move the arrows for the yes no prompts, so that they match the new graphics
PUSH
ORG GBOFFSET(0x06,0x46C3); BYTE 0x51
ORG GBOFFSET(0x06,0x46D3); BYTE 0x51
ORG GBOFFSET(0x06,0x46C7); BYTE 0x51
ORG GBOFFSET(0x06,0x46D7); BYTE 0x51
ORG GBOFFSET(0x06,0x469B); BYTE 0x51
ORG GBOFFSET(0x06,0x46AB); BYTE 0x51
ORG GBOFFSET(0x06,0x46BB); BYTE 0x51
ORG GBOFFSET(0x06,0x46CB); BYTE 0x51
ORG GBOFFSET(0x06,0x46BF); BYTE 0x51
ORG GBOFFSET(0x06,0x46CF); BYTE 0x51
ORG GBOFFSET(0x06,0x4883); BYTE 0x51
ORG GBOFFSET(0x06,0x4893); BYTE 0x51
ORG GBOFFSET(0x06,0x4857); BYTE 0x51
ORG GBOFFSET(0x06,0x4867); BYTE 0x51
ORG GBOFFSET(0x06,0x4877); BYTE 0x51
ORG GBOFFSET(0x06,0x4887); BYTE 0x51
ORG GBOFFSET(0x06,0x487B); BYTE 0x51
ORG GBOFFSET(0x06,0x488B); BYTE 0x51
ORG GBOFFSET(0x06,0x487F); BYTE 0x51
ORG GBOFFSET(0x06,0x488F); BYTE 0x51
POP
//change all pokedex names to use consecutive tiles, so we can just load graphics there
#define dexName0 "0x5F 0x5F 0x5F 0x5F 0x5F 0x00 0x01 0x02 0x03 0x04"
#define dexName1 "0x5F 0x5F 0x5F 0x5F 0x5F 0x05 0x06 0x07 0x08 0x09"
#define dexName2 "0x5F 0x5F 0x5F 0x5F 0x5F 0x0A 0x0B 0x0C 0x0D 0x0E"
#define dexName3 "0x5F 0x5F 0x5F 0x5F 0x5F 0x0F 0x10 0x11 0x12 0x13"
#define dexName4 "0x5F 0x5F 0x5F 0x5F 0x5F 0x14 0x15 0x16 0x17 0x18"
#define dexName5 "0x5F 0x5F 0x5F 0x5F 0x5F 0x19 0x1A 0x1B 0x1C 0x1D"
#define dexName6 "0x5F 0x5F 0x5F 0x5F 0x5F 0x1E 0x1F 0x20 0x21 0x22"
#define dexName7 "0x5F 0x5F 0x5F 0x5F 0x5F 0x23 0x24 0x25 0x26 0x27"
#define dexNameRow "dexName0 dexName1 dexName2 dexName3 dexName4 dexName5 dexName6 dexName7"
ORG $7D945
BYTE dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow
BYTE dexName0 dexName1 dexName2 dexName3 dexName4 dexName5 dexName6
ORG $EA7E7
BYTE dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow dexNameRow
BYTE dexName0 dexName1 dexName2 dexName3 dexName4 dexName5 dexName6
//new code for the graphics loading, this handles most cases
ORG GBOFFSET(0x3A,0x6771)
BYTE 0xCD 0x00 0x7D //call $7D00
BYTE 0x00 //nop
ORG GBOFFSET(0x3A,0x7D00)
#incbin "asm/pokedex1.bin"
//new code for the graphics loading, this handles reloading the page after viewing a pokémon entry
ORG GBOFFSET(0x3E,0x4FC2)
BYTE 0xCD 0x00 0x6D //call $6D00
ORG GBOFFSET(0x3E,0x6D00)
#incbin "asm/pokedex2.bin"
//and the graphics, on an empty bank
ORG GBOFFSET(0x2C,0x4000)
#incbin "graphics/pokedexnames.png.bin"
//remove the original graphics
#define emptydextile "WORD 0xFF00FF00 0xFF00FF00 0xFF00FF00 0xFF00FF00;"
#define emptydexline "emptydextile emptydextile emptydextile emptydextile emptydextile emptydextile emptydextile emptydextile emptydextile emptydextile emptydextile emptydextile emptydextile emptydextile emptydextile emptydextile"
ORG $165000
emptydexline emptydexline emptydexline
emptydextile emptydextile emptydextile emptydextile emptydextile emptydextile emptydextile
//change all safari album names to use consecutive tiles, so we can just load graphics there
#define safariName0 "0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x85 0xD0 0xD1 0xD2 0xD3 0xD4 0xD5 0xD6 0xD7 0xD8 0xD9 0xDA 0x85"
#define safariName1 "0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x85 0xDB 0xDC 0xDD 0xDE 0xDF 0xE0 0xE1 0xE2 0xE3 0xE4 0xE5 0x85"
#define safariName2 "0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x85 0xE6 0xE7 0xE8 0xE9 0xEA 0xEB 0xEC 0xED 0xEE 0xEF 0xF0 0x85"
#define safariName3 "0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x85 0xF1 0xF2 0xF3 0xF4 0xF5 0xF6 0xF7 0xF8 0xF9 0xFA 0xFB 0x85"
#define safariName4 "0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x85 0xFC 0xFD 0xFE 0xFF 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x85"
#define safariName5 "0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x85 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F 0x10 0x11 0x85"
#define safariName6 "0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x85 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1A 0x1B 0x1C 0x85"
#define safariName7 "0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x85 0x1D 0x1E 0x1F 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x85"
#define safariNameRow "safariName0 safariName1 safariName2 safariName3 safariName4 safariName5 safariName6 safariName7"
ORG $ECF89
BYTE safariNameRow safariNameRow safariNameRow safariNameRow safariNameRow safariNameRow
BYTE safariName0 safariName1 safariName2
//new code for the graphics loading, this handles most cases
ORG GBOFFSET(0x3B,0x4DF5)
BYTE 0xCD 0x00 0x7D //call $7D00
ORG GBOFFSET(0x3B,0x7D00)
#incbin "asm/safari1.bin"
//new code for the graphics loading, this handles reloading the page after viewing a pokémon entry
ORG GBOFFSET(0x3E,0x5690)
BYTE 0xCD 0x00 0x7D //call $7D00
ORG GBOFFSET(0x3E,0x7D00)
#incbin "asm/safari2.bin"
//and the graphics, on an empty bank
ORG GBOFFSET(0x2D,0x4000)
#incbin "graphics/safarinames.png.bin"
//remove the original graphics
#define emptysaftile "WORD 0x00FFFF00 0x00FFFF00 0x00FFFF00 0x00FFFF00;"
#define emptysafline "emptysaftile emptysaftile emptysaftile emptysaftile emptysaftile emptysaftile emptysaftile emptysaftile emptysaftile emptysaftile emptysaftile emptysaftile emptysaftile emptysaftile emptysaftile emptysaftile"
ORG $190D00
emptysafline emptysafline emptysafline emptysafline emptysafline emptysafline emptysafline