I have been working on translating The Legend of Zelda to Lojban. This page holds a copy of my notes while working on it.
See clinoi be la'e lu le ranmi be la zeldas li'u for a translation of the instruction manual.
General notes on the encoding. VRAM loading is done by a few routines, the main one is described below.
The routine is given an address and does the following:
1. If the byte at the address has the high-bit set, we're done. Return.
2. Otherwise, read two bytes from that address, this is the address (big-endian) in VRAM that the data should be written to.
3. Read the next byte. If high bit (bit 7) is set, set the Inc32 bit of $2000. If bit 6 is set, perform RLE. (Explained below.) The remaining six bits are the length.
4. If performing RLE, read the next byte, write it length times, then go to 1.
5. Otherwise, read the next byte.
6. Write this byte.
7. Decrement length.
8. If length is not zero, go to 5.
9. Go to 1.
RLE: Stands for Run-Length Encoding. With RLE, you'll have pairs of bytes. The first gives you a run-length, the second is the data itself. When uncompressing, you simply repeat the data byte run-length times.
I do my romhacking with hexpose. It's pretty simple, but it does the job. I also used a disassembler at some point to figure out some of the above, but I ended up just gleaning it from various sources and how the data itself works.
Title screen starts at $1A879
Due to the nature of the loading routine, I can translate such that things take up less space, but I can't make them take more. That is, unless I can find where the reference addresses are stored. Hopefully, this won't cause too many issues.
Cave text $405C-$45B1:
Cave text is distinct from the usual routines, in that it has no way to set the VRAM address, rather there seems to be a separate sub-routine that pulls data from the table of cave text. It also assigns functions to the two high bits, which would be impossible out side of text.
Cave text starts at a certain point, and has three lines. Text starts on the first line. Line termination is achieved by setting high-bits on the last character in the line.:
$405C 43 Bytes - IT'S DANGEROUS TO GO ALONE! TAKE THIS. - .O'I DO PO'O KLAMA I KO CPACU TI - $4087 42 Bytes - MASTER USING IT AND YOU CAN HAVE THIS. - DO KA'E PONSE TI GI'O CERTU LOZU'O PILNO - $40B1 25 Bytes - TAKE ANY ROAD YOU WANT. - KO KLAMA FO LE SELDJICA - $40C9 42 Bytes - SECRET IS IN THE TREE AT THE DEAD-END. - MIPRI NE'I LE TRICU BEVI LE SE PLUTA - $40F3 34 Bytes - LET'S PLAY MONEY MAKING GAME. - .E'U MI'O KELCI LEZU'O JDINI CPACU - $4115 41 Bytes - PAY ME FOR THE DOOR REPAIR CHARGE. - KO PLEJI FI MI LONU CIKRE LE VORME - $413D 36 Bytes - SHOW THIS TO THE OLD WOMAN. - KO JARCO TU'A TI LE TOLCI'O NINMU - $4162 39 Bytes - MEET THE OLD MAN AT THE GRAVE. - KO PENMI LE TOLCI'O NANMU LE MORSI STUZI - $4189 30 Bytes - BUY MEDICINE BEFORE YOU GO. - KO TE VECNU LO VE MIKCE PU LONU KLAMA - $41A7 23 Bytes - PAY ME AND I'LL TALK. - KO PLIJE MI POI TAVLA - (I really don't like the above, but it's space-restricted.) how about mi tavla gi'o terle'i anyway it's pleji, not plije, and the second sumti is the payment no the recepienent $41BE 34 Bytes - THIS AIN'T ENOUGH TO TALK. - how about ti na banzu lenu mi tavla - $41E2 - GO UP,UP, THE MOUNTAIN AHEAD. - $4208 - GO NORTH,WEST,SOUTH, WEST TO THE FOREST OF MAZE. - $423C - BOY, YOU'RE RICH! - .UE DO RICFU - $4151 - BUY SOMETHIN' WILL YA! - $4268 - BOY, THIS IS REAL EXPENSIVE! - $428D - TAKE ANY ONE YOU WANT. - $42A4 - IT'S A SECRET TO EVERYBODY. - $42C8 - GRUMBLE, GRUMBLE... - $42DD - EASTMOST PENNINSULA IS THE SECRET. - $4305 - DODONGO DISLIKES SMOKE. - $431D - DID YOU GET THE SWORD FROM THE OLD MAN ON TOP OF THE WATERFALL? - $435D - WALK INTO THE WATERFALL. - $4380 - SECRET POWER IS SAID TO BE IN THE ARROW. - $43AC - DIGDOGGER HATES CERTAIN KIND OF SOUND. - $43D6 - I BET YOU'D LIKE TO HAVE MORE BOMBS. - $4400 - IF YOU GO IN THE DIRECTION OF THE ARROW. - $442C - LEAVE YOUR LIFE OR MONEY. - $444F - THERE ARE SECRETS WHERE FAIRIES DON'T LIVE. -
All of Treasures $91AB-$94BC:
These actually are in the ROM out of order from when they appear on screen.
These also seem to have their own sub-routine for display. This one starts with a byte indicating how far over to start the line. Lines are terminated with $FF. Some times you get two lines for descriptions, sometimes only one. The positioning of the lines seems to be decided somewhere that I haven't found.
Main menu is around 9D58
"ZELDA" appears at 9EFB for some reason
A969: - THANKS LINK,YOU'RE ?THE HERO OF HYRULE* -
AB17 has some more endgame stuff
Credits at AC6F
AD45: ANOTHER QUEST WILL START(AB)FROM HERE PRESS THE START BUTTON YOU ARE GREAT YOU HVE AN AMAZING WISDOM AND POWER END OF "THE LEGEND OF ZELDA"
More main menu at 1A15C
1A2CB has death menu stuff
1A329 looks to have the pause menu stuff
Visible story screen runs from 1A454 to 1A827
THE LEGEND OF ZELDA LE LISRI PE LA ZELDAS wouldn't it be nice to be consistent with lisri/ranmi? MANY YEARS AGO PRINCE DARKNESS GANNON STOLE ONE OF THE TRIFORCE WITH POWER PRINCESS ZELDA HAD ONE OF THE TRIFORCE WITH WISDOM SHE DIVIDED IT INTO 8 UNITS TO HIDE IT FROM GANNON BEFORE SHE WAS CAPTURED GO FIND THE 8 UNITS LINK TO SAVE HER-----------| LE PALCI PO'U LA GANYN PUKI ZERLE'A LE CIBMAKFA PE LOKA TSALI I LE NOBLI PO'U LA ZELDAS PONSE LE CIBMAKFA PE LOKA PRIJE I ZY FENDI FI BI SPISA TEZU'E LENU MIPRI FI GY KEI PU LENU ZY SELKAVBU DOI LINK KO CPACU LE BI SPISA TEZU'E LONU NURGAU ZY
2109 " CMENE "
2112 " NI KANRO "
22A7 "CFARI TADJI"
22E7 "VIMCU TADJI"
REGISTER YOUR NAME CUXNA LE DO CMENE ELIMINATION MODE VIMCU TADJI -LIFE- NI KANRO USE B BUTTON FOR THIS KO PILNO BY