Patch Viewer 1.0.9 'LINK'
Added Native Object Injection for the running script in WebView2 to access an IDispatch object from the Win32 component of the app and access the properties of the IDispatch object. See AddRemoteObject (#17).
Patch Viewer 1.0.9
Added: DocumentUltimateWebConfiguration.AvailableDisplayCultures property which gets all available display culturesfor the document viewer. Cultures for both bundled and custom translation files will be returned.
Fixed: Viewing some files (or converting when hosted on IIS) caused StackOverflowException. The viewer would only show "Status: error"message without details as it was not possible to catch this exception. This was expecially reproducable for PDFs with signed certificates.IIS (also IIS Express) reduces the regular 1 MB stacksize to 512KB (and to 256 KB on 32-bit w3wp.exe) and this caused some conversions tofail with this exception.This is now prevented. If current thread's stack size is lower than the required stack size, a new thread will be created with the requiredstack size and the conversion will be done inside this thread to prevent StackOverflowException.
Fixed: The opacity setting for text highlight annotations was not being represented correctly in the DocumentViewer. For example blacked out text using the Adobe text highlighting feature was no longer blacked out in the viewer.
Added: DocumentViewer.PrintOptions property. These options will be reflected as default values on the print dialog of the viewer. For example you can disable HighQuality print option or adjust the level to increase print speed.
Fixed: When converting some JPEG files to PDF via DocumentConverter, you would see "There was an error while reading a stream." error when opening the generated PDF with Acrobat Reader. However, the issue did not happen when using DocumentViewer to view the JPEG file (conversion to XPZ was sucessful) or when viewing the generated PDF with Chrome's internal PDF viewer. The problem was that JPEG file was embedded as it is (no re-encoding) into the PDF file and if that JPEG file's original encoding was not PDF spec compatible, you would get that error. Now ensured re-encoding all image formats even if they are allowed in PDF spec like JPEG so that they are guaranteed to open in all PDF viewers.
A subsequent search in the viewer (without reloading the document) with new criteria where no results are returned did not clear any of the highlights (yellow and orange both) from the previous successful search.
Added: Better auto full text search and highlight feature. New SearchOptions property replaces HighlightedKeywords and HighlightedColor properties and offers more advanced options like MatchOptions. SearchOptions settings are also reflected as default values in the UI. If you specify SearchOptions.Term, an automatic search will be done when the document is displayed, i.e. the specified term will be searched and results with clickable positions will be listed on the left pane and the term will be highlighted in the pages. For example, if you launch the document viewer from a search results page, you can pass the same search term to the viewer.
Added: FitMode, LayoutMode and ZoomLevel properties to DocumentViewer. Now you can set the initial display settings for the document (JS is no more is needed). FitMode is the initial mode for fitting pages to the viewer,e.g. fit width and fit page. LayoutMode is the initial mode for placing pages within the viewer, e.g. continuous, facing etc. ZoomLevel is the initial zoom level in percentage of the document, it's effectiveonly when FitMode.Zoom is used.
Added: MobileMode property to to DocumentViewer. You can now choose when to turn on mobile document viewer, e.g. MobileMode.OnPhone means it will be used only on phones but not tablets. Note that using full document viewer on mobile devices would cause performance issues (slow rendering), so you should prefer mobile document viewer which is optimized for mobile devices.
Fixed: The soft error which may be logged in server logs: 'GleamTech.DocumentUltimate.Resources.webviewer.Html5.external.images.ui-bg_glass_95_fef1ec_1x400.png' not found in assembly 'GleamTech.DocumentUltimate ...'
Added: DocumentViewer.InputOptions property which is a collection. For example an instance of the new SpreadsheetInputOptions class can be added to this property. By default the viewer will use the below instance for best results when displaying a spreadsheet document:
DocumentViewer.InputOptions property is implemented as a collection because in future we may provide more format specific options and the viewer will get the matching options automatically from this collection.
Added: PreCacheDocument method. Normally the source document is converted to a special web-friendly format and cached after the document viewer is displayed in the page and when the document is viewed for the first time. With this method, you can do the conversion and caching beforehand so this way, when a user opens the document for the first time, there will be no waiting and the document will be loaded immediately from the cache.
Fixed: When using SetDocumentStream, the "Download" button failed because a copy of the original stream was not kept in cache folder. Now added a new parameter keepStreamCached to this method which is by default set to true. This parameter specifies whether to keep the copied stream in cache folder even after it is converted to a web-friendly format. If set to false, "Download" button will be disabled ("Download as PDF" button will be still available) because the viewer will not know how to access your original stream if it's not cached. For example if you are using DownloadUrl property then you will not need to keep a copy of the original stream in cache so you can set this to false in that case.
Added: HighlightedKeywords property to specify the keywords to be highlighted when the document is displayed. For example, if you launch the document viewer from a search results page, you can pass the searched keywords.
Fixed: The document viewer failed with "Uncaught TypeError: $(...).block is not a function" when you included jQuery in the same page. From now on, document viewer's own jQuery version will not conflict with yours.
Improved: The toolbar is now reponsive, buttons will not be hidden and they will flow naturally to next row below. So all the available buttons will be visible regardless of the viewer size. Also the buttons are spaced better.
Meant to be useful for anyone who wants to becomea translator for Chrono Trigger and translate thegame to their own language.These programs do quite much more than just some little editing: Find data (images, text)
Find space for the data
Organize the data around in little pieces to ensure everything fits
Reroute pointers and modify code to handle the data
This project has grown together withBisqwit's Finnish Chrono Trigger translation,and to a lesser degree together with Mziab's Polish translation (no link), but it's not limited to either Finnish or Polish.It has been designed to allow as much flexibility as possible.2. How to begin?So here's what you do if you want to translate Chrono Trigger. Download Chronotools. (Source code on this site. Windows binaries also available, but they are not supported.)
You need the Chrono Trigger English ROM. (You won't get it from me.)
Read the quick start guide.
Feel free to contact me in questionsyou might have about translating/hacking Chrono Trigger.3. Current statusChronotools is no longer under active development.Here's the current situation.Last updated:2019-03-20 Subject Percentage Dialog handling 120% everything works, extra featuresDialog font handling 120% everything works, extra featuresStatus font handling 100% everything worksCharacter set issues 100% everything worksCompression algorithms 100% everything worksItem/tech/monster font handling 70% everything works ... on sloppy emulators :(Graphics handling 95% minor details leftSignature feature 100% everything worksError recovery 40% not all error situations are handledDocumentation 40% it isn't good or complete, but it existsRoom/event modifying 10% not easy, not necessary - but possibleEmulator compatibility 70% tested extensively with SNES9x 1.43, slight VWF8-related bugs; VWF8 doesn't quite work on newer emulatorsHardware compatibility 60% Issues with the VWF8 scrolling and DMA updates outside NMI3.1. Version historyCopypaste from the Makefile:# VERSION 1.0.0 first archived version. dumper works.# VERSION 1.0.1 working with recompressor, added tools.# VERSION 1.0.2 updates to patcher# VERSION 1.0.3 bugfixes to patcher - first working version!# VERSION 1.0.4 handled fixed strings too# VERSION 1.0.5 found item descriptions# VERSION 1.0.6 compressed better# VERSION 1.0.7 compressed more carefully# VERSION 1.0.8 documented the script# VERSION 1.0.9 fixed "..." handling and located the font# VERSION 1.0.10 had knowledge of character sets# VERSION 1.0.11 had a working font insertor# VERSION 1.0.12 had better knowledge of special codes# VERSION 1.0.13 used 62-base numbers# VERSION 1.0.14 added taipus.cc# VERSION 1.0.15 updated FIN/README and ct_fin.txt, but neither are archived# VERSION 1.0.16 added taipus.rb, fixed homepage urls and fixed mmap error checking.# VERSION 1.0.17 working again; uses space better; little modularized# VERSION 1.0.18 more of above# VERSION 1.0.19 code organising... improved 'i' in 8x8 font.# VERSION 1.0.20 binpacker changes, some translation done too# VERSION 1.0.21 more translation, some documentation, font palette changes.# VERSION 1.0.22 more translation, autowrapping support, conjugation detection code# VERSION 1.1.0 did some assembly hacking, support for code patching# VERSION 1.1.1 conjugating conjugating conjugating... work goes on# VERSION 1.1.2 and so on# VERSION 1.1.3 and so on... almost working! "case" still doesn't work.# VERSION 1.1.4 conjugating finally works!# VERSION 1.1.5 some bugfixes# VERSION 1.1.6 fixed an allocation bug and optimized the code generator a bit# VERSION 1.1.7 some translation, more asm changes# VERSION 1.1.8 syntax changes in the compiler, optimizations# VERSION 1.1.9 support for font/dictionary size skew# VERSION 1.1.10 new configuration system. Time to squash bugs.# VERSION 1.1.11 configuration works, font-enhancement works.# VERSION 1.2.0 variable-width 8pix font has stepped in, but has many many bugs.# VERSION 1.2.1 more vwf stuff, backup before doing big changes# VERSION 1.2.2 vwf stability++, also techniques now vwf. Scrolling bugs.# VERSION 1.2.3 lots of more translation# VERSION 1.2.4 8pix system deciphered, more bugs introduced# VERSION 1.2.5 characterset enlarged by 512, only vwf8 bugs still# VERSION 1.2.6 using nonstandard hash_map for greatly improved performance# VERSION 1.2.7 creating another compiler# VERSION 1.2.8 improved dictionary compression# VERSION 1.2.9 compiler progress, first windows binaries are working# VERSION 1.2.10 cursive font support# VERSION 1.2.11 some translation, compression optimizations# VERSION 1.3.0 new compression options, font reorganizer, generic typeface engine# VERSION 1.4.0 image patching support, more font reorganizing support# VERSION 1.4.1 lots of more translation (I'm archiving it here for my convenience)# VERSION 1.5.0 end of the compiler project; using assembler (xa65) now.# VERSION 1.5.1 vwf8 optimizations, assembly experiments# VERSION 1.5.2 compressed graphics support: decompressor and compressor# VERSION 1.5.3 better graphics compressor# VERSION 1.5.4 another archive-only version# VERSION 1.6.0 signature support (custom compressed image on startup screen)# VERSION 1.6.1 some remodularizing of code# VERSION 1.6.2 fixed the vwf8 scrolling problems and some other bugs# VERSION 1.6.3 battle item lister fixed - no vwf8 problems there now# VERSION 1.6.4 battle tech lister almost done; dumper: partial jap ROM support# VERSION 1.6.5 is working on an assembler# VERSION 1.6.6 has an almost working assembler# VERSION 1.6.7 has a complete assembler, doesn't require xa65 anymore# VERSION 1.6.8 patch version# VERSION 1.6.9 conjugater now partially asm; its compiler is a separate program# VERSION 1.7.0 some error checking; windows build of the assembler# VERSION 1.8.0 is GPL# VERSION 1.8.1 requires separate snescom (not bundled anymore)# VERSION 1.9.0 unified some configuration parts; added crononick-code support# VERSION 1.9.1 improved the signature feature; added checksum and ROM name feature# VERSION 1.9.2 has only documentation updates# VERSION 1.9.3 includes the forgotten snescode and dictionary modules.# VERSION 1.10.0 implemented various assembly optimization techniques# VERSION 1.10.1 updated the docs and the conj.code generator# VERSION 1.10.2 creates more useful information when dumping# VERSION 1.10.3 has technological updates but broken VWF8# VERSION 1.11.0 has technological updates and new item list code with VWF8# VERSION 1.11.1 adds the documentation core# VERSION 1.11.2 is a backup before anything catastrophic happens# VERSION 1.11.3 is another backup# VERSION 1.11.4 is another backup again# VERSION 1.11.5 another... big structural changes# VERSION 1.11.6 backup copy... this version has bugs# VERSION 1.11.7 unwraps the script when dumping, if configured so# VERSION 1.11.8 has much more documentation than before# VERSION 1.11.9 is faster than the few recent versions# VERSION 1.12.0 allows some strings to be moved between pages# VERSION 1.12.1 is an upgrade to support the new o65 extension...# VERSION 1.12.2 fixes a bug in ctdump (battle message list not dumped properly)# VERSION 1.12.3 fixes a bug that caused utils/codegen.cc not compile# VERSION 1.13.0 added support for expansion to 48 Mbit or 64 Mbit# VERSION 1.13.1 added support for free relocation of all script text# VERSION 1.13.2 is a minor bugfix to the expansion patch# VERSION 1.13.3 is a bugfix to the checksum fixer# VERSION 1.13.4 is a fix to the dumper. 600ad castle texts are now again ok.# VERSION 1.13.5 is another dumper fix, but also finishes the battle VWF8 support# VERSION 1.13.6 is yet another fix, but also finishes the monster name code# VERSION 1.13.7 brings an improvement to the sluggish VWF8 screens problem# VERSION 1.13.8 C++ standard compliance upgrade... also a new eq-related feature# VERSION 1.13.9 is a vwf8 bugfix, but seems to have other problems!# VERSION 1.14.0 is a new "stable" release, at least for posix.# VERSION 1.14.1 fixes the checksum generator problem and stabilizes the windows port.# VERSION 1.14.2 fixes a bug related to Lucca's SightScope with long monster names.# VERSION 1.14.3 supports changing the character names! Do a redump with ctdump and see.# VERSION 18.104.22.168 preliminary support for location events.# VERSION 22.214.171.124 improved compression. Configuration file changes.# VERSION 126.96.36.199 improved support for location events.# VERSION 188.8.131.52 improved location event decompiler.# VERSION 1.15.1 location event support - preliminary release.# VERSION 1.15.2 now dumps the button names and allows changing them.# VERSION 184.108.40.206 conjugator supports now [member].# VERSION 1.15.3 conjugator now supports definition by a table.# VERSION 220.127.116.11 minor changes in conjugator for severe grammars.# VERSION 18.104.22.168 a bugfix in ctdump (deleting the *c block). Added more documentation!# VERSION 22.214.171.124 minor changes in default config.# VERSION 126.96.36.199 changes in portability, documentation, and RLE IPS support.# VERSION 188.8.131.52 drops support for Windows versions.# VERSION 1.15.4 adds packedblob support and fixes compilation on certain platforms.# VERSION 1.15.5 improves compilability on more modern gcc versions# VERSION 184.108.40.206 improves compilability on more modern gcc versions# VERSION 1.15.6 adds rawblob and spriteblob support (thanks Michal Ziabkowski)# VERSION 220.127.116.11 improves the LZ-variant compression a little.# VERSION 1.15.7 improves compilability on more modern gcc versions# VERSION 1.15.8 improves compilability on more modern gcc versionsTo use the character name changing feature, do a redump with ctdumpand copypaste the *e, *c and *s1Bblocks to your script.3.1.1. Release notes Users of versions prior to 18.104.22.168: Note the changed format of packedimage and add_image settings in the configuration file! Users of version 1.14.3: Ensure the following two lines in your ct.cfg are disabled! load_code "relocstr.o65"add_call_of "RoomScriptFunctionB8" $C03557 20 true Otherwise you'll see wrong texts in wrong places. Latest Windows version is 1.14.3. Windows versions are no longer supported.4. Program list4.1. ctdumpDumps the script and fonts from a given ROM.Requires chrono-dumpee.smc.Produces the script file, the font files and a coupleof other image files.Sample of produced script:*z;dialog;-----------------;1000ad (Lucca's home);2300ad (factory);1000ad (rainbow shell trial);-----------------$F1IO:[nl] You got 1 [item]!$F1IQ:LARA: Oh, hi Crono.[nl] Lucca's off at Leene Square with her father, Taban, unveiling her new invention.$F1IS:LARA: Lucca and Taban only care about their silly toys!(Dumped from the English ROM)Usage example: ctdump chrono-uncompressed.smc4.2. ctinsertReinserts the (edited) script and (edited) fonts to a ROM.Requires the files referenced by ct.cfg(usually ct.txt, ct8fn.tga and ct16fn.tga,elemental images and optional extra fonts and code files).Produces ctpatch-hdr.ips and ctpatch-nohdr.ips.Curiously, it doesn't require the ROM.4.3. other4.3.1. makeipsmakeipscompares two ROMs and produces a patch file in IPS format.4.3.2. unmakeipsunmakeipsreads a ROM and an IPS file and produces a patched ROM file.4.3.3. xrayxray is a libggi-requiring applicationfor browsing the ROM contents.4.3.4. viewerviewer requires S-Lang and is a textmode ROM browseroriginally developed by me for Pokémon hacking.4.3.5. sramdumpViews a sram dump file in a readable format.4.3.6. base62Converts addresses between hex and base62 formats.I.e. $C2:5D4C -> 0eJI and vice versa.This development system uses base62 in the scriptdumps to reduce the amount of code written.5. Useful features5.1. Player name inflection It currently has support for conjugating names on fly.It's very important in Finnish, where you can't justadd "'s" to anything to make a genitive.For example, genitive of name Matti is "Matin",and genitive of name Crono is "Cronon".The conjugator-engine is a textual script filetranslated to 65c816 assembly on demand. It canbe customized to do conjugation in any language,not just Finnish.5.2. Font/dictionary skewIt's quite complicated to explain, but shortly said:In normal Chrono Trigger, the character set is as follows: 127 of them are assigned to the dictionary used to compress the script.
96 of them are possible visible symbols.